/* =========================================
   1. BRAND VARIABLES & GLOBALS
   ========================================= */
:root {
    --color-charcoal: #315064; /* AMSB Dark Slate Blue */
    --color-blue: #4AB2D9;     /* AMSB Primary Light Blue */
    --color-gold: #EDAF21;     /* Warm Gold Accent */
    --color-light: #F4F3F0;    /* Premium Alabaster background */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body, html {
    width: 100%;
    overflow-x: hidden; 
    background-color: var(--color-light); 
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

/* Premium Tactile Noise Overlay */
body::before {
    content: "";
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    pointer-events: none; 
    z-index: 9999; 
    opacity: 0.04; 
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* =========================================
   2. WEBGL & PRELOADER
   ========================================= */
#webgl-container {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 1;
}

#loader-logo {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background-color: var(--color-charcoal);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* =========================================
   3. PREMIUM HEADER (MIX-BLEND-MODE)
   ========================================= */
#premium-header {
    position: fixed;
    top: 0; left: 0; width: 100%;
    padding: 2rem 5vw;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    pointer-events: none; 
    opacity: 0; 
    transform: translateY(-20px);
    mix-blend-mode: difference; /* Inverts over light/dark backgrounds */
    color: #fff; 
}

.h-nav { display: flex; gap: 3rem; pointer-events: auto; }
.h-nav a {
    text-decoration: none; color: #fff; font-size: 1rem;
    font-weight: 500; text-transform: uppercase; letter-spacing: 0.05em;
    position: relative; padding-bottom: 5px;
}
.h-nav a::after {
    content: ''; position: absolute; bottom: 0; left: 0;
    width: 0%; height: 1px; background-color: #fff; transition: width 0.3s ease;
}
.h-nav a:hover::after { width: 100%; }
.h-lang { font-weight: 600; color: #fff; cursor: pointer; pointer-events: auto; }

/* =========================================
   4. LOGO STYLING (FORCES WHITE IN HERO)
   ========================================= */
.h-logo img, .loader-logo-img, .hero-logo-img {
    filter: brightness(0) invert(1); /* Forces SVG to Pure White */
}

.h-logo img { height: 40px; width: auto; pointer-events: auto; }
.loader-logo-img { width: 180px; height: auto; display: block; }
.hero-logo-img {
    width: 20vw; max-width: 300px; height: auto;
    opacity: 0; transform: scale(0.9);
    margin-top: 2rem; display: block;
}
.massive-footer-img {
    width: 50vw; max-width: 800px; height: auto;
    margin: 0 auto -2vw auto; display: block;
}

/* =========================================
   5. HERO TYPOGRAPHY
   ========================================= */
#hero-text-container {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 100%; text-align: center;
    z-index: 5; pointer-events: none;
    display: flex; flex-direction: column; align-items: center; gap: 1.5rem;
    opacity: 0; /* FIX: Completely hidden until GSAP reveals it */
}

.hero-main-title {
    font-size: 7vw; line-height: 1; font-weight: 700; color: #fff;
    text-transform: uppercase; letter-spacing: 0.02em; margin: 0;
}

.hero-subtitle {
    font-size: 1.5rem; color: var(--color-gold); font-weight: 400;
    letter-spacing: 0.05em; opacity: 0;
}

.line { overflow: hidden; display: block; padding-bottom: 0.1em; }
.line-inner { display: block; transform: translateY(110%); }

/* =========================================
   6. SCROLL STRUCTURE & SECTIONS
   ========================================= */
.scroll-container {
    width: 100%; position: relative; z-index: 2; background: transparent;
}

#smooth-content { background: transparent; }
.intro-spacer { height: 100vh; background: transparent; position: relative; }
.container { max-width: 1600px; margin: 0 auto; padding: 0 5vw; }

.sec-typography, .sec-cases {
    background-color: var(--color-light); 
    position: relative; z-index: 10;
}

.sec-typography {
    padding: 10vw 0; color: var(--color-blue);
    border-top: 1px solid rgba(49, 80, 100, 0.1);
}

.massive-text {
    font-size: 8vw; line-height: 1; font-weight: 500;
    letter-spacing: -0.03em; margin-bottom: 4rem;
}

.body-text {
    font-size: 2rem; line-height: 1.5; max-width: 1000px;
    color: var(--color-charcoal); margin-bottom: 8rem;
}

/* Stats Grid */
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; }
.stat-card {
    border-top: 1px solid rgba(49, 80, 100, 0.15);
    border-right: 1px solid rgba(49, 80, 100, 0.15);
    padding: 4rem 2rem; transition: all 0.4s ease;
}
.stat-card:nth-child(even) { border-right: none; }
.stat-card:hover { background-color: rgba(49, 80, 100, 0.05); border-top-color: var(--color-gold); }
.stat-number { font-size: 5rem; line-height: 1.1; font-weight: 500; margin-bottom: 1rem; color: var(--color-blue); }
.stat-card:hover .stat-number { color: var(--color-gold); }
.stat-label { font-size: 1.5rem; color: var(--color-charcoal); opacity: 0.8; }

/* Cases Section */
.sec-cases { padding-bottom: 10vw; }
.case-row { padding: 6rem 0; border-bottom: 1px solid rgba(49, 80, 100, 0.1); }
.case-row:last-child { border-bottom: none; }
.case-grid { display: grid; grid-template-columns: 1fr 1fr 2fr; grid-template-rows: 1fr 1fr; gap: 2rem; }
.case-cell { display: flex; width: 100%; }

.box-blue {
    background-color: var(--color-blue); padding: 2.5rem; align-items: flex-end; 
    aspect-ratio: 1 / 1; transition: transform 0.4s ease;
}
.case-row:hover .box-blue { transform: scale(0.97); background-color: var(--color-gold); }
.box-blue h4 { color: #fff; font-size: 2rem; font-weight: 500; line-height: 1.1; letter-spacing: -0.02em; }

.box-num { align-items: center; justify-content: center; font-size: 8rem; font-weight: 400; color: var(--color-blue); line-height: 1; }
.box-img { grid-column: 3 / 4; grid-row: 1 / 3; overflow: hidden; position: relative; background-color: var(--color-charcoal); }
.box-img img { width: 100%; height: 120%; object-fit: cover; display: block; }
.box-text { border: 1px solid rgba(49, 80, 100, 0.15); padding: 2.5rem; align-items: center; }
.box-text p { font-size: 1.1rem; line-height: 1.6; color: var(--color-charcoal); opacity: 0.8; }

/* Accordion */
.sec-accordion { background-color: var(--color-blue); padding: 10vw 0; color: #fff; position: relative; z-index: 10; }
.accordion-item { border-bottom: 1px solid rgba(255, 255, 255, 0.3); }
.accordion-item:first-child { border-top: 1px solid rgba(255, 255, 255, 0.3); }
.accordion-header {
    width: 100%; text-align: left; background: none; border: none; padding: 3rem 0;
    font-size: 3rem; font-family: inherit; color: #fff; cursor: pointer;
    display: flex; justify-content: space-between; align-items: center; transition: opacity 0.3s ease;
}
.accordion-header:hover { opacity: 0.7; }
.icon-plus { position: relative; width: 20px; height: 20px; }
.icon-plus::before, .icon-plus::after { content: ''; position: absolute; background-color: #fff; transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1); }
.icon-plus::before { top: 9px; left: 0; width: 100%; height: 2px; }
.icon-plus::after { top: 0; left: 9px; width: 2px; height: 100%; }
.accordion-item.active .icon-plus::after { transform: scaleY(0); }
.accordion-content { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.5s cubic-bezier(0.16, 1, 0.3, 1); }
.accordion-item.active .accordion-content { grid-template-rows: 1fr; }
.content-inner { overflow: hidden; }
.spec-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; padding-bottom: 3rem; font-size: 1.2rem; line-height: 1.6; }

/* Tunnel & History */
.sec-tunnel { height: 100vh; position: relative; background-color: var(--color-charcoal); z-index: 10; overflow: hidden; }
.tunnel-container { width: 100vw; height: 100vh; position: relative; overflow: hidden; }
.tunnel-img {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover; background-position: center; will-change: transform, opacity;
    box-shadow: 0 30px 60px rgba(0,0,0,0.5); transform-origin: center center;
}

.sec-history { background-color: var(--color-charcoal); color: var(--color-light); padding: 10vw 0; position: relative; z-index: 10; }
.history-title { font-size: 8vw; line-height: 1; color: var(--color-gold); margin-bottom: 8rem; letter-spacing: -0.03em; }
.history-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 5vw; position: relative; }
.history-step { padding: 20vh 0; opacity: 0.3; transition: opacity 0.5s ease; }
.history-step.active { opacity: 1; }
.history-step h3 { font-size: 5rem; color: var(--color-blue); margin-bottom: 1rem; }
.history-step p { font-size: 1.5rem; line-height: 1.6; max-width: 500px; }
.history-img-col { position: relative; }
.pinned-img-wrapper { position: relative; width: 100%; aspect-ratio: 1 / 1; overflow: hidden; border-radius: 4px; }
.h-img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.8s ease; }
.h-img.active { opacity: 1; }

/* Footer */
.sec-footer { background-color: var(--color-light); padding-top: 10vw; position: relative; z-index: 10; overflow: hidden; }
.footer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; margin-bottom: 10vw; }
.footer-col h4 { font-size: 1.5rem; color: var(--color-charcoal); margin-bottom: 1rem; }
.footer-link { font-size: 2rem; color: var(--color-charcoal); text-decoration: underline; font-weight: 500; }
.credits { color: var(--color-charcoal); opacity: 0.8; }
.footer-form { display: flex; flex-direction: column; gap: 1.5rem; }
.footer-form input, .footer-form textarea, .footer-form select {
    width: 100%; background: transparent; border: none; border-bottom: 1px solid var(--color-charcoal);
    padding: 1rem 0; font-size: 1.2rem; color: var(--color-charcoal); font-family: inherit; outline: none;
}
.footer-form input::placeholder, .footer-form textarea::placeholder { color: rgba(49, 80, 100, 0.5); }
.footer-form button {
    align-self: flex-start; background: var(--color-charcoal); color: var(--color-light); border: none;
    padding: 1rem 2.5rem; font-size: 1.1rem; cursor: pointer; display: flex; align-items: center; gap: 1rem; transition: background 0.3s ease;
}
.footer-form button:hover { background: var(--color-gold); }
.massive-footer-text { display: none; }

/* Responsive */
@media (max-width: 1024px) {
    .stats-grid { grid-template-columns: 1fr; }
    .stat-card { border-right: none; }
    .case-grid { grid-template-columns: 1fr; grid-template-rows: auto; }
    .box-blue { aspect-ratio: auto; min-height: 200px; }
    .box-num, .box-empty { display: none; }
    .box-img { grid-column: 1 / 2; grid-row: auto; min-height: 400px; }
    .history-layout { grid-template-columns: 1fr; }
    .history-img-col { display: none; }
    .history-step { padding: 10vh 0; }
    .footer-grid { grid-template-columns: 1fr; }
    #premium-header { display: none; /* Can add a mobile hamburger menu later */ }
}


/* =========================================
   DOM INTRO TUNNEL
   ========================================= */
#intro-tunnel {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    z-index: 50; /* Above WebGL, below Header */
    pointer-events: none;
}

.intro-img {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%) scale(0.01); /* Starts tiny in the center */
    width: 100vw; height: 100vh;
    background-size: cover;
    background-position: center;
    opacity: 0;
    will-change: transform, opacity;
    box-shadow: 0 30px 60px rgba(0,0,0,0.8);
}