*, ::before, ::after {
    box-sizing: border-box;
}

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #f8fafc;
    --accent: #1e293b;
    --text-main: #0f172a;
    --text-muted: #475569;
    --grid-border: rgba(15, 23, 42, 0.1);
    --transition-base: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    background-color: #fff;
    line-height: 1.6;
    font-size: 16px;
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

main {
    flex: 1 0 auto;
}

footer {
    flex-shrink: 0;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Typography Enhancements */
h1, h2, h3, h4 {
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

/* Architectural Grid Utility */
.grid-line {
    border: 0;
    border-top: 1px solid var(--grid-border);
    margin: 0;
}

.border-grid-l { border-left: 1px solid var(--grid-border); }
.border-grid-r { border-right: 1px solid var(--grid-border); }
.border-grid-t { border-top: 1px solid var(--grid-border); }
.border-grid-b { border-bottom: 1px solid var(--grid-border); }

/* Custom Hero Component */
.hero-split {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    min-height: 80vh;
    align-items: center;
}

.hero-content {
    grid-column: 1 / 8;
    z-index: 10;
    padding-right: 2rem;
}

.hero-image-wrap {
    grid-column: 7 / 13;
    position: relative;
    height: 70vh;
    overflow: hidden;
}

.hero-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(0.8) contrast(1.1);
}

@media (max-width: 1024px) {
    .hero-content { grid-column: 1 / 13; padding-right: 0; margin-bottom: 2rem; }
    .hero-image-wrap { grid-column: 1 / 13; height: 50vh; }
}

/* Custom Buttons */
.btn-precision {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 2rem;
    min-height: 44px;
    background: var(--primary);
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.875rem;
    transition: var(--transition-base);
    border: 1px solid var(--primary);
    cursor: pointer;
    text-decoration: none;
}

.btn-precision:hover {
    background: var(--accent);
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.btn-precision-outline {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
}

.btn-precision-outline:hover {
    background: var(--accent);
    color: white;
}

/* Monolith Card System */
.monolith-card {
    background: white;
    border: 1px solid var(--grid-border);
    padding: 2.5rem;
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.monolith-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.monolith-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 0%;
    background: var(--primary);
    transition: var(--transition-base);
}

.monolith-card:hover {
    border-color: var(--primary);
    transform: translateY(-8px);
}

.monolith-card:hover::before {
    height: 100%;
}

/* Reveal Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Navigation */
.nav-link {
    position: relative;
    font-weight: 500;
    color: var(--text-muted);
    transition: var(--transition-base);
    padding: 0.5rem 0;
    display: inline-block;
    min-height: 44px;
    display: flex;
    align-items: center;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition-base);
}

.nav-link:hover { color: var(--primary); }
.nav-link:hover::after { width: 100%; }
.nav-link.active { color: var(--primary); }
.nav-link.active::after { width: 100%; }

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 400px;
    height: 100vh;
    background: white;
    z-index: 100;
    transition: 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    box-shadow: -10px 0 30px rgba(0,0,0,0.1);
}

.mobile-menu.active { right: 0; }

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0,0,0,0.5);
    z-index: 90;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-base);
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Cookie Consent */
#cookie-banner {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    right: 2rem;
    max-width: 600px;
    margin: 0 auto;
    background: var(--accent);
    color: white;
    padding: 1.5rem 2rem;
    z-index: 200;
    display: none;
    justify-content: space-between;
    align-items: center;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

@media (max-width: 640px) {
    #cookie-banner {
        bottom: 0;
        left: 0;
        right: 0;
        margin: 0;
        border-radius: 0;
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

/* Forms */
.form-input {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--grid-border);
    background: var(--secondary);
    transition: var(--transition-base);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
}
