/* V5: High-End Editorial & Cinematic Aesthetics */

:root {
    /* DEFAULT: Dark Editorial (mbrown.work inspired) */
    --bg-color: #0c0c0c;
    --bg-secondary: #141414;
    --text-primary: #f4f4f0;
    /* Creamy off-white */
    --text-muted: #888888;
    --accent: #d4af37;
    /* Subtle gold */
    --font-heading: 'Anton', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'Space Mono', monospace;
}

/* Reset & Smooth Scrolling Basics */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-body);
    /* Custom cursor logic requires hiding the default */
    cursor: none;
    overflow-x: hidden;
}

/* Prevent text selection highlighting for cleaner UI */
::selection {
    background: var(--text-primary);
    color: var(--bg-color);
}

/* -----------------------------------------------------------------
   CUSTOM CURSOR
   ----------------------------------------------------------------- */
.cursor-dot {
    width: 6px;
    height: 6px;
    background-color: var(--text-primary);
    border-radius: 50%;
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
}

.cursor-outline {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(244, 244, 240, 0.4);
    border-radius: 50%;
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: width 0.2s, height 0.2s, background-color 0.2s;
}

/* Hover state for links */
.cursor-outline.hover {
    width: 60px;
    height: 60px;
    background-color: rgba(244, 244, 240, 0.1);
    border-color: var(--text-primary);
}

/* -----------------------------------------------------------------
   PRELOADER
   ----------------------------------------------------------------- */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-color);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loader-text {
    font-family: var(--font-heading);
    font-size: 4vw;
    letter-spacing: 0.1em;
    color: var(--text-primary);
    overflow: hidden;
    /* For clip-path animation */
}

/* -----------------------------------------------------------------
   NAVIGATION & LAYOUT
   ----------------------------------------------------------------- */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 5vw;
}

.editorial-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 40px 5vw;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    mix-blend-mode: difference;
    /* Keeps text visible across light/dark sections */
}

.nav-brand {
    font-family: var(--font-heading);
    font-size: 24px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.nav-links {
    display: flex;
    gap: 40px;
}

.nav-links a {
    color: var(--text-primary);
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0%;
    height: 1px;
    background-color: var(--text-primary);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

/* -----------------------------------------------------------------
   TYPOGRAPHY UTILITIES (For GSAP SplitText Reveals)
   ----------------------------------------------------------------- */
.mono-text {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* 
  GSAP SplitType wraps characters/words in lines. 
  We hide the overflow on the parent line, so children can slide up from below. 
*/
.split-text {
    opacity: 0;
    /* Hidden until GSAP takes over */
}

.line {
    overflow: hidden;
    padding-bottom: 0.1em;
    /* Prevent descender clipping */
}

.word {
    transform: translateY(100%);
    /* Start pushed down below the mask */
}

.fade-up-text {
    opacity: 0;
    transform: translateY(30px);
}

/* -----------------------------------------------------------------
   SECTIONS
   ----------------------------------------------------------------- */

/* HERO */
.section-hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 5vw;
    position: relative;
}

.hero-container {
    margin-top: 10vh;
}

.hero-intro {
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.hero-heading {
    font-family: var(--font-heading);
    font-size: clamp(60px, 12vw, 200px);
    /* Massive scaling */
    line-height: 0.85;
    text-transform: uppercase;
    margin: 0;
    color: var(--text-primary);
}

.scroll-indicator {
    position: absolute;
    bottom: 50px;
    right: 5vw;
    color: var(--text-muted);
}

/* EXPERTISE */
.section-expertise {
    padding: 15vw 0;
    background-color: var(--bg-secondary);
}

.section-header {
    margin-bottom: 15vh;
}

.section-header h2 {
    font-family: var(--font-heading);
    font-size: clamp(40px, 6vw, 100px);
    line-height: 1;
    text-transform: uppercase;
}

.line-divider {
    width: 0%;
    /* Animates in */
    height: 1px;
    background-color: rgba(244, 244, 240, 0.2);
    margin-top: 30px;
}

.line-divider.dark {
    background-color: rgba(12, 12, 12, 0.2);
}

.expertise-grid {
    display: flex;
    flex-direction: column;
    gap: 15vh;
}

.expertise-item {
    width: 60%;
    position: relative;
}

.offset-grid {
    align-self: flex-end;
    /* Asymmetrical zig-zag layout */
}

.item-number {
    font-size: 24px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.expertise-item h3 {
    font-family: var(--font-heading);
    font-size: clamp(30px, 4vw, 70px);
    line-height: 0.9;
    margin-bottom: 30px;
    text-transform: uppercase;
    font-weight: 900;
    /* Necessary if switching to Inter for headers in Swiss mode */
    letter-spacing: -0.02em;
}

.expertise-item p {
    font-size: 18px;
    line-height: 1.6;
    color: var(--text-muted);
    max-width: 500px;
    margin-bottom: 40px;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    color: var(--text-primary);
}

/* LEDGER (Light contrast section) */
.section-ledger {
    padding: 15vw 0;
    background-color: var(--text-primary);
    color: var(--bg-color);
}

.section-header.dark h2 {
    color: var(--bg-color);
}

.ledger-container {
    border-top: 1px solid rgba(12, 12, 12, 0.2);
}

.ledger-row {
    display: flex;
    padding: 40px 0;
    border-bottom: 1px solid rgba(12, 12, 12, 0.1);
    transition: background-color 0.3s ease;
}

.ledger-row:hover {
    background-color: rgba(12, 12, 12, 0.03);
}

.heading-row {
    padding: 20px 0;
    color: var(--text-muted);
    border-bottom: 2px solid rgba(12, 12, 12, 0.8);
}

.heading-row:hover {
    background-color: transparent;
}

.col-metric {
    width: 30%;
    font-family: var(--font-heading);
    font-size: clamp(20px, 2.5vw, 36px);
    line-height: 1.1;
    padding-right: 20px;
}

.heading-row .col-metric {
    font-size: 12px;
    font-family: var(--font-mono);
}

.col-delta {
    width: 20%;
    font-family: var(--font-mono);
    font-weight: bold;
    display: flex;
    align-items: center;
}

.positive {
    color: #166534;
}

/* Deep green */
.neutral {
    color: #888;
}

.col-desc {
    width: 50%;
    font-size: 18px;
    line-height: 1.5;
    display: flex;
    align-items: center;
}

/* FOOTER */
.section-footer {
    padding: 15vw 0 5vw;
    background-color: var(--bg-color);
    text-align: center;
}

.section-footer h2 {
    font-family: var(--font-heading);
    font-size: clamp(60px, 10vw, 150px);
    line-height: 0.9;
    margin-bottom: 80px;
    text-transform: uppercase;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 100px;
}

.footer-links a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 16px;
    position: relative;
}

.footer-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: rgba(244, 244, 240, 0.3);
    transition: background-color 0.3s;
}

.footer-links a:hover::after {
    background-color: var(--text-primary);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    color: var(--text-muted);
    font-size: 10px;
    padding-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Responsive Overrides */
@media (max-width: 768px) {
    .editorial-nav {
        position: absolute;
    }

    .expertise-item {
        width: 100%;
    }

    .offset-grid {
        align-self: flex-start;
    }

    .ledger-row {
        flex-direction: column;
        gap: 15px;
    }

    .col-metric,
    .col-delta,
    .col-desc {
        width: 100%;
    }

    .nav-links {
        display: none;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 20px;
        text-align: left;
    }
}