/* ==========================================================================
   DESIGN SYSTEM & VARIABLES
   ========================================================================== */
:root {
    /* Colors */
    --cream: #F5F3EE;
    --navy: #1A1B2E;
    --gold: #C9975B;
    --gold-dark: #A67B45; /* Darker variant for accessible contrast on cream */
    --white: #FFFFFF;
    --border: rgba(26, 27, 46, 0.1); /* Dark border for cream bg */
    --border-dark: rgba(245, 243, 238, 0.1); /* Light border for dark bg */
    --text-main: #1A1B2E;
    --text-muted: rgba(26, 27, 46, 0.6);
    --text-light: #FFFFFF;
    --text-light-muted: rgba(255, 255, 255, 0.7);

    /* Typography */
    --font-serif: 'Playfair Display', Georgia, serif;
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;

    /* Typography Scale */
    --text-2xs: 0.65rem;
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.25rem;
    --text-xl: 1.5rem;
    --text-2xl: clamp(2rem, 3vw, 2.5rem);
    --text-3xl: clamp(3rem, 5vw, 4rem);
    --text-4xl: clamp(4rem, 8vw, 7.5rem);
    --text-stat: 4rem;
    --text-headline-mobile: clamp(1.6rem, 7.5vw, 2.25rem);

    /* Spacing System */
    --space-2xs: 0.25rem;
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2.5rem;
    --space-2xl: 4rem;
    --space-xl: 3rem;
    --space-section: 6rem;

    /* Spacing & Layout */
    --max-width: 1400px; /* Increased from 1200px */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 40px;
    --radius-pill: 9999px;
}

/* ==========================================================================
   MATRIX THEME OVERRIDES
   ========================================================================== */
body.theme-matrix {
    --serif-on-matrix: #F4E9D8;          
    --serif-accent: #D9AF6E;             
    --sans-on-matrix: #F0F5F1;           
    --sans-accent: #6EE7A8;              
    --text-muted-on-matrix: rgba(245, 245, 240, 0.65);
    --gold-on-matrix: #F0C674;
    --matrix-text-shadow: 0 4px 15px rgba(0, 0, 0, 0.8);
}
:root {
    /* Text mapped for Default Theme (Light Mode) */
    --serif-on-matrix: var(--text-main);          /* Playfair headings/hero/company names */
    --serif-accent: var(--gold-dark);             /* Playfair hover/emphasis only */
    --sans-on-matrix: var(--text-main);           /* Inter body/nav on the boundary */
    --sans-accent: var(--navy);                   /* Inter hover/active states only */
    --text-muted-on-matrix: var(--text-muted);
    --gold-on-matrix: var(--gold-dark);
    --matrix-text-shadow: none;
}


/* ==========================================================================
   MATRIX THEME - HERO & TEXT OVERRIDES
   ========================================================================== */
body.theme-matrix .hero-title-solid {
    color: var(--serif-on-matrix);
    text-shadow: var(--matrix-text-shadow);
}
body.theme-matrix .hero-title-outline {
    -webkit-text-stroke: 1.5px var(--serif-on-matrix);
    filter: drop-shadow(var(--matrix-text-shadow));
}
body.theme-matrix .hero-subtitle {
    color: var(--serif-on-matrix);
    text-shadow: var(--matrix-text-shadow);
}
body.theme-matrix .hero-desc {
    color: var(--sans-on-matrix);
    text-shadow: var(--matrix-text-shadow);
}
body.theme-matrix .hero-location {
    color: var(--sans-on-matrix);
    text-shadow: var(--matrix-text-shadow);
}
body.theme-matrix .hero-location svg {
    fill: var(--gold-on-matrix);
}
body.theme-matrix .hero-scroll {
    color: var(--sans-on-matrix);
    text-shadow: var(--matrix-text-shadow);
}
body.theme-matrix .status-badge {
    color: #6EE7A8;
    background: rgba(15, 15, 15, 0.88);
    border-color: rgba(0, 255, 70, 0.4);
}
body.theme-matrix .nav-logo {
    color: var(--serif-on-matrix);
    text-shadow: var(--matrix-text-shadow);
}
body.theme-matrix .section-label {
    color: var(--gold-on-matrix);
    text-shadow: var(--matrix-text-shadow);
}
body.theme-matrix .section-title {
    color: var(--serif-on-matrix);
    text-shadow: var(--matrix-text-shadow);
}
body.theme-matrix .view-all-btn {
    color: var(--sans-on-matrix);
    text-shadow: var(--matrix-text-shadow);
}
body.theme-matrix .view-all-btn:hover {
    color: var(--sans-accent);
}
body.theme-matrix .client-header h4 {
    color: var(--serif-on-matrix);
    text-shadow: var(--matrix-text-shadow);
}
body.theme-matrix .client-tag {
    color: var(--gold-on-matrix);
}
body.theme-matrix .client-content p {
    color: var(--sans-on-matrix);
    text-shadow: var(--matrix-text-shadow);
}
body.theme-matrix .faq-summary {
    color: var(--sans-on-matrix);
    text-shadow: var(--matrix-text-shadow);
}
body.theme-matrix .faq-content {
    color: var(--sans-on-matrix);
    text-shadow: var(--matrix-text-shadow);
}
body.theme-matrix .footer-bottom {
    color: var(--sans-on-matrix);
}
body.theme-matrix .footer-logo strong {
    color: var(--serif-on-matrix);
    text-shadow: var(--matrix-text-shadow);
}
body.theme-matrix .footer-logo span {
    color: var(--sans-on-matrix);
}
body.theme-matrix .footer-links a {
    color: var(--sans-on-matrix);
}
body.theme-matrix .footer-links a:hover {
    color: var(--sans-accent);
}

/* ==========================================================================
   RESET & BASE
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    overflow: hidden;
    height: 100%;
}

body {
    background-color: #E2E2E2; /* Darker gray background to frame the boxed content */
    color: var(--text-main);
    font-family: var(--font-sans);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    height: 100%;
    overflow: hidden;
}

.site-boundary {
    background-color: var(--cream);
    margin: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    height: calc(100vh - 32px);
    box-shadow: 0 0 40px rgba(0,0,0,0.05);
    overflow-y: auto;
    overflow-x: hidden;
    scroll-behavior: smooth;
    transition: background-color 0.4s ease;
}

/* Custom scrollbar for site-boundary */
.site-boundary::-webkit-scrollbar {
    width: 6px;
}
.site-boundary::-webkit-scrollbar-track {
    background: transparent;
    margin: var(--radius-lg);
}
.site-boundary::-webkit-scrollbar-thumb {
    background: rgba(26, 27, 46, 0.15);
    border-radius: 10px;
}
.site-boundary::-webkit-scrollbar-thumb:hover {
    background: rgba(26, 27, 46, 0.3);
}
.site-boundary {
    scrollbar-width: thin;
    scrollbar-color: rgba(26, 27, 46, 0.15) transparent;
}

body.theme-matrix .site-boundary {
    background-color: rgba(245, 243, 238, 0.15); /* Transparent to show matrix */
    border-color: var(--border-dark);
}

#matrix-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
    display: none;
    background-color: #000;
}

body.theme-matrix #matrix-bg {
    display: block;
}

@media (max-width: 768px) {
    .site-boundary {
        margin: 8px;
        height: calc(100vh - 16px);
        border-radius: var(--radius-md);
    }
}

*:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 4px;
}

a {
    color: inherit;
    text-decoration: none;
    transition: all 0.2s ease;
}

ul, ol {
    list-style: none;
}

img, svg {
    max-width: 100%;
    display: block;
}

button {
    background: none;
    border: none;
    cursor: pointer;
    font: inherit;
    color: inherit;
}

/* ==========================================================================
   TYPOGRAPHY
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-serif);
    line-height: 1.1;
    font-weight: 700;
}

.section-label {
    display: inline-block;
    font-family: var(--font-sans);
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--gold-dark);
    margin-bottom: 1rem;
}

.section-title em {
    font-style: italic;
    font-weight: 400;
}

/* ==========================================================================
   LAYOUT UTILITIES
   ========================================================================== */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.section-padding {
    padding-top: var(--space-section);
    padding-bottom: var(--space-section);
}

/* ==========================================================================
   BUTTONS & BADGES
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: var(--text-sm);
    transition: all 0.2s ease;
}

.btn--pill-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    background-color: var(--white);
    color: var(--navy);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    font-family: var(--font-sans);
    font-weight: 500;
    font-size: var(--text-sm);
    transition: var(--transition);
}
.btn--pill-outline:hover {
    background-color: var(--cream);
    border-color: var(--navy);
}

.btn--navy {
    background-color: var(--navy);
    color: var(--white);
}
.btn--navy:hover {
    background-color: #2a2c4a;
    transform: translateY(-2px);
}

.btn--gold {
    background-color: var(--gold);
    color: var(--white);
}
.btn--gold:hover {
    background-color: #b5854b;
    transform: translateY(-2px);
}

.btn--outline {
    background-color: transparent;
    color: var(--text-main);
    border: 1px solid var(--border);
}
.btn--outline:hover {
    background-color: rgba(26, 27, 46, 0.05);
}

.btn--outline-dark {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-light);
    border: 1px solid var(--border-dark);
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}
body.theme-matrix .btn--outline-dark {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--sans-on-matrix);
    border: 1px solid transparent;
}
.btn--outline-dark:hover {
    color: var(--white);
    background-color: rgba(255, 255, 255, 0.15);
}
body.theme-matrix .btn--outline-dark:hover {
    background-color: rgba(255, 255, 255, 0.15);
    color: var(--sans-accent);
}

/* ==========================================================================
   MATRIX THEME TOGGLE BUTTON
   ========================================================================== */
.theme-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.9rem;
    margin-right: 0.75rem;
    border-radius: var(--radius-pill);
    font-size: var(--text-sm);
    font-weight: 600;
    cursor: pointer;
    border: 1.5px solid var(--border);
    background: transparent;
    color: var(--text-main);
    transition: all 0.25s ease;
    user-select: none;
}

/* The pill toggle track */
.theme-toggle-btn .toggle-track {
    position: relative;
    width: 32px;
    height: 18px;
    background: rgba(26, 27, 46, 0.15);
    border-radius: 999px;
    transition: background 0.3s ease;
    flex-shrink: 0;
}
/* The sliding thumb */
.theme-toggle-btn .toggle-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--navy);
    transition: transform 0.3s ease, background 0.3s ease;
}

/* ACTIVE state - matrix ON */
body.theme-matrix .theme-toggle-btn {
    background: rgba(15, 255, 0, 0.08);
    border-color: #0F0;
    color: #6EE7A8;
    box-shadow: 0 0 10px rgba(15, 255, 0, 0.2);
}
body.theme-matrix .theme-toggle-btn .toggle-track {
    background: rgba(15, 255, 0, 0.3);
}
body.theme-matrix .theme-toggle-btn .toggle-thumb {
    transform: translateX(14px);
    background: #0F0;
    box-shadow: 0 0 6px #0F0;
}



.tag-pill {
    display: inline-block;
    padding: 0.4rem 1rem; /* Slightly larger padding */
    background-color: rgba(201, 151, 91, 0.1); /* Light tan */
    border: none;
    border-radius: var(--radius-pill);
    font-size: var(--text-xs);
    font-weight: 700;
    color: var(--gold-dark);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ==========================================================================
   COMPONENTS
   ========================================================================== */

/* Navigation */
.navbar {
    position: sticky;
    top: 0;
    z-index: 9999;
    background-color: var(--cream); /* Fallback for browsers without backdrop-filter support */
    border-bottom: 1px solid rgba(26, 27, 46, 0.05); /* Divider */
    padding: 1rem 4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

@supports (backdrop-filter: blur(24px)) or (-webkit-backdrop-filter: blur(24px)) {
    .navbar {
        background-color: rgba(245, 243, 238, 0.3); /* --cream with 30% opacity */
        backdrop-filter: blur(24px);
        -webkit-backdrop-filter: blur(24px);
    }
}
@media (max-width: 1200px) {
    /* No longer need max-width override since max-width is removed */
}

.nav-logo {
    font-family: var(--font-serif);
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--navy);
}
.nav-logo span {
    color: var(--gold);
}

.nav-menu-wrapper {
    display: contents;
}

.nav-links {
    position: relative;
    display: flex;
    background: rgba(26, 27, 46, 0.9); /* Dark background */
    padding: 0.4rem;
    border-radius: var(--radius-pill);
    border: 1px solid rgba(255, 255, 255, 0.2); /* Thin light border */
}
.nav-pill {
    position: absolute;
    top: 0.4rem;
    bottom: 0.4rem;
    left: 0;
    width: 0;
    background-color: var(--white);
    border-radius: var(--radius-pill);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
    pointer-events: none;
}
.nav-links a {
    position: relative;
    z-index: 2;
    padding: 0.4rem 1.2rem;
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-light-muted);
    transition: color 0.2s ease;
    border-radius: var(--radius-pill);
}
.nav-links a:hover,
.nav-links a.active {
    color: var(--navy);
}

.nav-toggle {
    display: none;
    font-size: var(--text-xl);
    color: var(--navy);
}

/* Hero Section */
main {
    padding-top: 90px; /* Offset for fixed navbar */
}
.hero {
    padding-top: 6rem;
    padding-bottom: 2rem; /* Reduced to tighten gap to scroll indicator */
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 4rem;
    align-items: center;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--navy);
    margin-bottom: 2rem;
    background: var(--white);
    padding: 0.4rem 1rem;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border);
}

.status-dot-wrap {
    position: relative;
    width: 8px;
    height: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.status-dot-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: #10B981;
    border-radius: 50%;
    animation: ping 2s cubic-bezier(0, 0, 0.2, 1) infinite;
    z-index: 1;
}
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #10B981; /* Green dot */
    position: relative;
    z-index: 2;
}

@keyframes ping {
    75%, 100% {
        transform: scale(2.5);
        opacity: 0;
    }
}

.hero-title {
    margin-bottom: 1rem;
    line-height: 1;
}
.hero-title-solid {
    display: block;
    font-family: var(--font-serif);
    font-size: var(--text-4xl);
    font-weight: 700;
    line-height: 1;
    color: var(--navy);
    margin-bottom: 0;
}
.hero-title-outline {
    display: block;
    font-family: var(--font-serif);
    font-size: var(--text-4xl);
    font-weight: 700;
    font-style: italic;
    color: transparent;
    -webkit-text-stroke: 1.5px var(--navy);
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-family: var(--font-serif);
    font-size: var(--text-2xl);
    color: var(--gold-dark);
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.hero-desc {
    font-size: var(--text-base);
    color: var(--text-muted);
    max-width: 500px;
    margin-bottom: 1.5rem;
}

.hero-location {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: var(--text-sm);
    color: var(--text-muted);
    margin-bottom: 2.5rem;
}
.hero-location svg {
    width: 14px;
    height: 14px;
    fill: var(--gold-dark);
}

.hero-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}
.hero-actions .btn-icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.hero-scroll {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    color: var(--text-muted);
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: 0.1em;
}
.hero-scroll svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.hero-visual {
    position: relative;
    max-width: 380px; /* Matched to the red square size */
    width: 100%;
    margin: 0 auto;
    aspect-ratio: 1; /* Perfectly square */
}
.hero-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 40px; /* Big smooth rounded corners */
    box-shadow: 0 30px 60px rgba(0,0,0,0.08); /* Soft glow behind image */
}

.float-card {
    position: absolute;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--white);
    padding: 0.8rem 1.2rem;
    border-radius: 100px; /* Pill shape for cards */
    display: flex;
    align-items: center;
    gap: 0.8rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
    z-index: 10;
}
.float-card--tl {
    top: 15%;
    left: -15%;
    animation: float 4s ease-in-out 0s infinite;
}
.float-card--br {
    bottom: 25%;
    right: -15%;
    animation: float 4s ease-in-out 1.5s infinite;
}
.float-pill {
    position: absolute;
    bottom: -5%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 0.5rem 1.2rem;
    border-radius: 100px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--navy);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid var(--white);
    z-index: 10;
}
.gold-dot {
    width: 8px;
    height: 8px;
    background-color: var(--gold);
    border-radius: 50%;
}
.float-icon-raw {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}
.float-text {
    display: flex;
    flex-direction: column;
}
.float-text strong {
    display: block;
    font-family: var(--font-sans);
    font-size: var(--text-base);
    font-weight: 800;
    color: var(--navy);
    line-height: 1.1;
}
.float-text span {
    font-size: var(--text-xs);
    color: var(--text-muted);
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.hero-scroll-indicator {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 1.5rem; /* Tighter gap */
    margin-bottom: 2rem; /* Tighter gap */
    grid-column: 1 / -1;
}
.hero-scroll-bounce {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    opacity: 0.4;
    animation: scroll-bounce 2s infinite;
}
@keyframes scroll-bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(8px);
    }
    60% {
        transform: translateY(4px);
    }
}

/* Dark Navy Section (Edge-to-edge) */
.dark-section {
    background-color: var(--navy);
    color: var(--text-light);
    padding: 6rem 0; /* vertical padding */
    width: 100%;
}
.dark-section .container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
}

/* Working On Banner */
.working-on-banner {
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 1.5rem 2.5rem;
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 4rem; /* Gap between banner and ABOUT ME label */
    width: 100%;
}
.working-on-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 100px;
    font-size: var(--text-xs);
    font-weight: 700;
    color: var(--gold-dark); /* Match screenshot */
    letter-spacing: 0.05em;
    white-space: nowrap;
    flex-shrink: 0;
}
.working-on-text {
    font-size: var(--text-sm);
    color: var(--text-light-muted);
    line-height: 1.6;
}
.working-on-text strong {
    color: var(--white);
}

@media (max-width: 900px) {
    .working-on-banner {
        flex-direction: column;
        align-items: flex-start;
        border-radius: var(--radius-xl);
        padding: 2rem;
        gap: 1.5rem;
        text-align: left;
    }
}

.about-grid {
    display: grid;
    grid-template-columns: 4fr 6fr; /* ~40/60 split */
    gap: 4rem;
    align-items: flex-start;
}
.about-headline {
    font-family: var(--font-serif);
    font-size: var(--text-3xl);
    line-height: 1.1;
    color: var(--white);
    font-weight: 800; /* Ensure same weight as desktop */
}
.gold-underline {
    width: 40px;
    height: 2px;
    background-color: var(--gold-dark);
    margin-top: 1.5rem;
}
.about-text p {
    font-size: var(--text-base);
    color: var(--text-light-muted);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}
.about-text strong {
    color: var(--white); /* Match screenshot */
    font-weight: 700;
}
.about-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 3rem; /* Generous gap */
}
.stat-box {
    background-color: rgba(255, 255, 255, 0.03); /* Lighter navy */
    border: 1px solid rgba(255, 255, 255, 0.08); /* Subtle border */
    border-radius: 24px;
    padding: 2rem;
}
.stat-box h4 {
    font-family: var(--font-serif);
    font-size: var(--text-stat);
    color: var(--gold-dark);
    margin-bottom: 0.5rem;
    line-height: 1;
}
.stat-box p {
    font-size: var(--text-sm);
    font-weight: 700;
    color: var(--white);
    margin-bottom: 0.5rem;
}
.stat-box span {
    font-size: var(--text-xs);
    color: var(--text-light-muted);
}

/* Projects & Services Cards */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 2.5rem; /* Larger gap */
}
.bento-item {
    grid-column: span 12;
}

/* Services Grid */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
}
@media (max-width: 1024px) {
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .grid-3 { grid-template-columns: 1fr; }
}

.service-card {
    background-color: var(--white);
    border-radius: 40px; /* Highly rounded */
    padding: 2.5rem;
    box-shadow: 0 4px 20px rgba(26, 27, 46, 0.02);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(26, 27, 46, 0.06);
}

.service-icon {
    color: var(--gold-dark);
    width: 24px;
    height: 24px;
    margin-bottom: 1.5rem;
}
.service-icon svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}
.service-card h3 {
    font-family: var(--font-serif);
    font-size: var(--text-lg);
    margin-bottom: 1rem;
    color: var(--navy);
    font-weight: 700;
}
.service-card p {
    color: var(--text-muted);
    font-size: var(--text-sm);
    line-height: 1.6;
    margin: 0;
}


@media (min-width: 900px) {
    .bento-wide { grid-column: span 8; }
    .bento-narrow { grid-column: span 4; }
    .bento-half { grid-column: span 6; }
    .bento-full { grid-column: span 12; }
}

.content-card {
    background-color: var(--white);
    border-radius: 40px; /* Highly rounded */
    padding: 3rem; /* More internal padding */
    box-shadow: 0 4px 20px rgba(26, 27, 46, 0.03);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.content-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(26, 27, 46, 0.08);
}

.card-accent-dot {
    position: absolute;
    top: 2rem;
    right: 2rem;
    width: 8px;
    height: 8px;
    background-color: var(--gold-dark);
    border-radius: 50%;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}
.card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: rgba(201, 151, 91, 0.1);
    color: var(--gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-xl);
    margin-bottom: 1.5rem;
}
.card-icon svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}
.content-card h3 {
    font-size: var(--text-xl);
    margin-bottom: 1rem;
}
.title-gold {
    color: var(--gold-dark);
}
.content-card p {
    color: var(--text-muted);
    font-size: var(--text-sm);
    margin-bottom: 2rem;
    flex-grow: 1;
}

.project-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
    margin-top: auto;
}

.btn-action {
    padding: 0.6rem 1.2rem;
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--navy);
    background-color: rgba(26, 27, 46, 0.05);
    border-radius: 100px;
    display: inline-flex;
    align-items: center;
    width: fit-content;
    transition: background-color 0.2s ease;
    border: none;
    cursor: pointer;
    font-family: inherit;
    text-decoration: none;
}
.btn-action:hover {
    background-color: rgba(26, 27, 46, 0.1);
    text-decoration: none;
}

.ai-features-list {
    margin-top: -1rem;
    margin-bottom: 2rem;
    padding-left: 1.5rem;
    color: var(--text-muted);
    font-size: var(--text-sm);
    line-height: 1.6;
}
.ai-features-list li {
    margin-bottom: 0.5rem;
}
.ai-features-list strong {
    color: var(--navy);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 4rem;
}
.projects-label {
    letter-spacing: 0.2em; /* Wider tracking */
}
.section-title {
    font-size: var(--text-3xl);
    font-weight: 800;
    margin-bottom: var(--space-2xl);
}
.view-all-btn {
    font-size: var(--text-sm);
    font-weight: 700;
    color: var(--navy);
    background-color: var(--white);
    border: none;
    box-shadow: 0 4px 12px rgba(26, 27, 46, 0.08);
    padding: 0.6rem 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    border-radius: var(--radius-pill);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.view-all-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(26, 27, 46, 0.12);
}

/* Enterprise Experience */
.enterprise-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 4rem;
    align-items: stretch; /* Forces equal height */
}

.client-list {
    display: flex;
    flex-direction: column;
}
.client-row {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border);
}
.client-emoji {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(26, 27, 46, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-lg);
    flex-shrink: 0;
}
.client-content {
    flex-grow: 1;
}
.client-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.25rem;
}
.client-header h4 {
    font-family: var(--font-serif);
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--navy);
}
.client-tag {
    font-size: var(--text-xs);
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    background: rgba(26, 27, 46, 0.05);
    border-radius: var(--radius-sm);
    letter-spacing: 0.05em;
    color: var(--text-muted);
}
.client-content p {
    font-size: var(--text-sm);
    color: var(--text-muted);
}
.client-arrow {
    color: var(--border);
}

.numbers-card {
    background-color: var(--navy);
    color: var(--text-light);
    border-radius: var(--radius-xl);
    padding: 4rem 3.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%; /* Ensure it spans full height of grid item */
}
.numbers-label {
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 0.5rem;
}
.number-item {
    padding-bottom: 2rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.number-item h4 {
    font-size: var(--text-stat);
    font-family: var(--font-serif);
    font-weight: 800;
    color: var(--gold);
    margin-bottom: 0.25rem;
    line-height: 1.1;
}
.number-item p {
    font-size: var(--text-sm);
    color: var(--text-light-muted);
}
.numbers-quote {
    margin-top: 1rem;
    padding-top: 1rem;
    font-family: var(--font-serif);
    font-style: italic;
    font-size: var(--text-base);
    color: var(--white);
    line-height: 1.6;
}

/* Testimonial Banner */
.testimonial-banner {
    width: 100%;
    margin: 0 auto;
    background: var(--white);
    padding: 3rem;
    border-radius: var(--radius-md); /* Softer than lg */
    text-align: left;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.testimonial-banner-text {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 400; /* Regular weight for editorial look */
    font-size: var(--text-lg); /* Smaller to wrap to 3 lines */
    line-height: 1.6;
    color: var(--navy);
    position: relative;
    padding-left: 2rem;
    margin: 0;
}
.testimonial-quote-mark {
    position: absolute;
    left: -0.5rem;
    top: -0.5rem;
    font-family: var(--font-serif);
    font-size: 4rem;
    color: var(--navy);
    line-height: 1;
    font-weight: 700;
}
.testimonial-banner-author {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 1rem;
    padding-left: 2rem;
}
.banner-author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gold);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-serif);
    font-weight: 700;
    font-size: var(--text-sm);
}
.banner-author-info {
    text-align: left;
    display: flex;
    flex-direction: column;
}
.banner-author-info strong {
    font-size: var(--text-sm);
    color: var(--navy);
}
.banner-author-info span {
    font-size: var(--text-xs);
    color: var(--text-muted);
}

/* FAQ */
.faq-list {
    max-width: 800px;
}
.faq-item {
    border-bottom: 1px solid rgba(26, 27, 46, 0.08); /* Thinner/lighter border */
}
.faq-item:first-child {
    border-top: 1px solid rgba(26, 27, 46, 0.08);
}
.faq-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
    cursor: pointer;
    font-size: var(--text-base);       /* Reduced font size */
    font-weight: 500;      /* Reduced font weight */
    color: var(--navy);    /* Ensure text is dark */
    list-style: none;
}
.faq-summary::-webkit-details-marker {
    display: none;
}
.faq-icon {
    color: var(--text-muted); /* Darker gray color for the plus */
    font-size: var(--text-lg);
    font-weight: 300;
    width: 28px;
    height: 28px;
    border: 1px solid rgba(26, 27, 46, 0.15); /* Circle border */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1; /* Keep '+' perfectly centered */
    transition: transform 0.3s ease, border-color 0.2s ease, color 0.2s ease;
}
details[open] .faq-icon {
    transform: rotate(45deg);
    border-color: var(--gold); /* Highlight circle when open */
    color: var(--gold-dark);
}
.faq-content {
    padding-bottom: 1.5rem;
    color: var(--text-muted);
    line-height: 1.6;
    font-size: var(--text-sm);
}

/* Footer / Contact */
.footer-band {
    background-color: var(--navy);
    color: var(--text-light);
    padding: 3rem 2rem 2rem;
    text-align: center;
}
.footer-band .section-label {
    justify-content: center;
    display: flex;
}
.footer-title {
    font-size: var(--text-3xl);
    margin-bottom: 1.5rem;
}
.footer-desc {
    max-width: 600px;
    margin: 0 auto 3rem;
    font-size: var(--text-base);
    color: var(--text-light-muted);
}
.footer-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 4rem;
}
.footer-info {
    font-size: var(--text-sm);
    color: var(--text-light-muted);
    margin-bottom: 4rem;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 4rem;
    font-size: var(--text-sm);
    color: var(--text-muted);
}
.footer-logo {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
}
.footer-logo strong {
    font-family: var(--font-serif);
    font-size: var(--text-lg);
    color: var(--navy);
}
.footer-logo strong span {
    color: var(--gold);
}
.footer-logo span {
    font-family: var(--font-sans);
    font-size: var(--text-sm);
    color: var(--text-muted);
}
.footer-links {
    display: flex;
    gap: 1.5rem;
}
.footer-links a {
    color: var(--text-muted);
}
.footer-links a:hover {
    color: var(--navy);
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 1024px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        gap: var(--space-xl);
    }
    .hero-actions {
        justify-content: center;
    }
    .hero-location {
        justify-content: center;
    }
    .hero-desc {
        margin: 0 auto 1.5rem;
    }
    .float-card--tl { left: -10px; }
    .float-card--br { right: -10px; }
    
    .about-grid {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }
    .dark-card {
        padding: var(--space-xl) var(--space-lg);
    }
    .working-on {
        flex-direction: column;
        gap: var(--space-sm);
    }
    .enterprise-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 1rem 1.5rem;
        flex-wrap: wrap;
    }
    .nav-links, .nav-cta {
        display: none;
    }

    /* ── Matrix Toggle → Compact pill next to hamburger on mobile ── */
    .theme-toggle-btn {
        margin-left: auto;
        margin-right: 0.6rem;
        padding: 0.3rem 0.6rem;
        gap: 0.35rem;
        border-radius: 999px;
        background: var(--white);
        border: 1.5px solid var(--border);
        font-size: 0;   /* hide any inherited text sizing */
        max-width: 150px;
        overflow: hidden;
        position: relative;
    }

    /* Ensure the toggle track (iOS-style switch) is visible and sized well for mobile */
    .theme-toggle-btn .toggle-track {
        display: block;
        transform: scale(0.9); /* Slightly scale down to fit the compact pill */
        transform-origin: left center;
        margin-right: 0.2rem;
    }

    /* Scrolling "Enter the Matrix" label */
    .theme-toggle-btn .toggle-label {
        display: inline-block;
        font-size: 11px;
        font-weight: 600;
        letter-spacing: 0.04em;
        color: var(--navy);
        white-space: nowrap;
        animation: scroll-label 6s linear infinite;
        padding-left: 100%;
        margin-top: 1px;
    }

    @keyframes scroll-label {
        0%   { transform: translateX(0); }
        100% { transform: translateX(-200%); }
    }

    /* ── Active state: Matrix ON ── */
    body.theme-matrix .theme-toggle-btn {
        background: rgba(15, 15, 15, 0.88);
        border-color: rgba(0, 255, 70, 0.5);
        box-shadow: 0 0 12px rgba(0, 255, 70, 0.2);
    }
    body.theme-matrix .theme-toggle-btn .toggle-label {
        color: #00ff46;
        text-shadow: 0 0 6px rgba(0, 255, 70, 0.4);
    }
    .nav-menu-wrapper.active {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        position: fixed;
        top: 0; left: 0;
        width: 100vw; height: 100vh;
        height: 100dvh;
        margin: 0; padding: 2rem;
        border-radius: 0;
        background-color: var(--cream);
        z-index: 10000;
        box-shadow: none; border: none;
        overflow: hidden;
        overscroll-behavior: none;
    }
    /* Only allow scrolling on very short screens if links don't fit */
    @media (max-height: 600px) {
        .nav-menu-wrapper.active {
            overflow-y: auto;
            justify-content: flex-start;
            padding-top: 5rem;
        }
    }
    
    .nav-menu-wrapper.active .nav-links {
        display: flex;
        flex-direction: column;
        align-items: center;
        background: none;
        border: none;
        padding: 0;
    }
    .nav-menu-wrapper.active .nav-pill {
        display: none;
    }
    .nav-menu-wrapper.active .nav-links a {
        font-family: var(--font-serif);
        font-size: var(--text-2xl);
        color: var(--navy);
        margin: var(--space-sm) 0;
        font-weight: 700;
        padding: 0;
    }
    .nav-menu-wrapper.active .nav-cta {
        display: inline-flex !important;
        margin-top: var(--space-lg);
        position: static;
        transform: none;
    }
    .nav-toggle {
        display: flex;
        z-index: 10001; 
        position: relative;
    }
    .nav-toggle.active {
        font-size: 0;
    }
    .nav-toggle.active::after {
        content: '\00d7';
        font-size: var(--text-3xl);
        color: var(--navy);
        background: rgba(26, 27, 46, 0.05);
        width: 44px; height: 44px;
        display: flex; align-items: center; justify-content: center;
        border-radius: 50%;
    }
    
    .card-grid {
        grid-template-columns: 1fr;
    }
    .bento-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }
    .bento-item { grid-column: 1 / -1; }
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-sm);
    }
    
    .footer-bottom {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: var(--space-md);
        padding: var(--space-2xl) var(--space-md) var(--space-lg);
    }
    .footer-logo { align-items: center; }
    .footer-links { flex-wrap: wrap; justify-content: center; gap: var(--space-sm); }
    
    .float-card {
        padding: var(--space-xs) var(--space-sm);
        display: flex !important;
    }
    .float-card--tl { left: -40px; top: 5%; }
    .float-card--br { right: -40px; bottom: 10%; }

    .float-icon {
        width: 30px;
        height: 30px;
    }
    .float-icon svg {
        width: 16px;
        height: 16px;
    }
    .float-text strong { font-size: var(--text-lg); }

    .hero-visual { max-width: 260px; margin: 0 auto; }
    
    body { overflow-x: hidden; }
    .site-boundary { overflow-x: clip; }

    /* --- NEW MOBILE FIXES --- */
    
    /* FIX 2: About stats collapse */
    .about-headline {
        font-size: var(--text-headline-mobile); /* Scaled to perfectly wrap to 3 lines on mobile */
    }
    .about-stats {
        grid-template-columns: 1fr; 
    }
    .stat-box {
        padding: var(--space-md);
    }
    .stat-box h4, .number-item h4 {
        font-size: var(--text-3xl); /* Scale down giant stats */
    }
    
    /* FIX: Hero padding and buttons */
    main {
        padding-top: 0; /* Remove desktop offset, sticky nav handles flow naturally */
    }
    .hero {
        padding-top: var(--space-xl); 
    }
    .hero-subtitle {
        font-size: var(--text-xl);
    }
    .hero-actions {
        flex-direction: column; 
        align-items: stretch;
        gap: var(--space-sm);
    }
    .hero-actions .btn {
        width: 100%;
        justify-content: center;
    }
    .footer-actions {
        flex-direction: column;
        align-items: stretch;
        gap: var(--space-sm);
    }
    .footer-actions .btn {
        width: 100%;
        justify-content: center;
    }
    .client-row {
        gap: var(--space-sm);
        padding: var(--space-md) 0;
        flex-direction: row;
    }
    .client-emoji {
        width: 40px; height: 40px; font-size: var(--text-lg);
    }
    .client-header {
        flex-wrap: wrap; align-items: center; gap: var(--space-xs);
    }
    
    .working-on-banner {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }
    
    #projects .section-header {
        align-items: flex-end;
        text-align: right;
        margin-top: var(--space-lg);
    }
    #projects .section-header .section-title {
        font-size: var(--text-2xl);
    }

    .ai-features-list {
        display: none;
    }
    
    .card-tags {
        gap: var(--space-2xs);
    }
    .card-tags .tag-pill {
        padding: var(--space-2xs) var(--space-xs);
        font-size: var(--text-2xs);
        font-weight: 500; /* Normal weight on mobile */
    }

    /* FIX: Section spacing reduction */
    .section-padding {
        padding-top: var(--space-xl);
        padding-bottom: var(--space-xl);
    }
    
    /* FIX: Generous spacing for specific section headers on mobile */
    #services, #enterprise, #faq, .footer-bottom {
        padding-top: var(--space-2xl);
    }
    
    .footer-title {
        font-size: var(--text-2xl); /* Prevent wrap to 2 lines */
    }
    
    .dark-section {
        padding: var(--space-xl) 0;
    }
    
    /* FIX: Card padding reduction */
    .content-card, .service-card, .numbers-card {
        padding: var(--space-md);
        border-radius: var(--radius-lg);
        height: auto;
    }
    
    .numbers-card {
        margin-bottom: var(--space-2xl); /* FIX: Explicitly push down next section on Safari mobile */
    }
    #enterprise .section-title {
        font-size: var(--text-3xl);
        font-weight: 800;
    }
    #enterprise .section-title em {
        font-size: var(--text-xl);
        font-weight: 400;
    }
    .enterprise-grid {
        align-items: start;
        gap: var(--space-lg);
    }
    
    /* FIX: Testimonial adjustments */
    .testimonial-banner {
        padding: var(--space-lg) var(--space-md);
        margin-top: var(--space-lg); /* FIX: Explicitly separate from previous section */
    }
    .testimonial-quote-mark {
        font-size: var(--text-3xl);
        left: 0;
        top: -0.5rem;
    }
    .testimonial-banner-text {
        padding-left: var(--space-md);
        font-size: var(--text-base);
    }
    .testimonial-banner-author {
        padding-left: var(--space-md);
    }
}

@media (max-width: 480px) {
    /* FIX: Container horizontal padding */
    .container {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }
    
    /* FIX: Float cards are now scaled to fit, no longer hidden */
}

/* ==========================================================================
   SCROLL ANIMATION STYLES
   ========================================================================== */
@media (prefers-reduced-motion: no-preference) {
    .reveal-init {
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 600ms cubic-bezier(0.4, 0, 0.2, 1), transform 600ms cubic-bezier(0.4, 0, 0.2, 1);
        will-change: opacity, transform;
    }
    
    .reveal-visible {
        opacity: 1;
        transform: translateY(0);
    }
    
    /* Stagger delays */
    .reveal-delay-1 { transition-delay: 80ms; }
    .reveal-delay-2 { transition-delay: 160ms; }
    .reveal-delay-3 { transition-delay: 240ms; }
    .reveal-delay-4 { transition-delay: 320ms; }
    .reveal-delay-5 { transition-delay: 400ms; }
    .reveal-delay-6 { transition-delay: 480ms; }
}

/* ==========================================================================
   MODAL STYLES
   ========================================================================== */
.video-modal-backdrop, .case-study-modal-backdrop {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(26, 27, 46, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.video-modal-backdrop.active, .case-study-modal-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.video-modal-container, .case-study-modal-container {
    position: relative;
    width: 90%;
    max-width: 800px;
    background-color: var(--cream);
    border-radius: var(--radius-md);
    padding: 1rem;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    max-height: 90vh;
    overflow-y: auto;
}

.case-study-modal-container {
    padding: 3rem 4rem;
}

.video-modal-backdrop.active .video-modal-container,
.case-study-modal-backdrop.active .case-study-modal-container {
    transform: scale(1);
}

.video-modal-close, .case-study-close-top {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 2rem;
    font-weight: 300;
    cursor: pointer;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.video-modal-close {
    top: -40px; right: 0; color: var(--white);
}

.case-study-close-top:hover { color: var(--navy); }
.video-modal-close:hover { color: var(--gold); }

.video-player {
    width: 100%;
    border-radius: 8px;
    display: block;
    background-color: #000;
}

.case-study-title {
    font-family: var(--font-serif);
    font-size: var(--text-2xl);
    color: var(--navy);
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.case-study-meta {
    font-size: var(--text-sm);
    color: var(--gold);
    font-weight: 600;
    margin-bottom: 2rem;
}

.case-study-section {
    margin-bottom: 2rem;
}

.case-study-section h5 {
    font-size: var(--text-lg);
    color: var(--navy);
    margin-bottom: 1rem;
}

.case-study-section p, .case-study-section ul {
    color: var(--text-muted);
    font-size: var(--text-base);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.case-study-section ul {
    padding-left: 1.5rem;
}

.case-study-section strong {
    color: var(--navy);
}

@media (max-width: 768px) {
    .case-study-modal-container { padding: 2rem 1.5rem; }
    .video-modal-close { top: -50px; right: -10px; }
}

@media (prefers-reduced-motion: reduce) {
    .video-modal-backdrop, .video-modal-container,
    .case-study-modal-backdrop, .case-study-modal-container {
        transition: none !important;
    }
}


/* ==========================================================================
   GALLERY MODAL (Strike First Screenshots)
   Reuses .video-modal-backdrop base — only gallery-specific overrides here
   ========================================================================== */
.gallery-modal-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    max-width: 420px;
    width: 92%;
}

.gallery-image {
    display: block;
    width: 100%;
    max-height: 78vh;
    object-fit: contain;
    border-radius: var(--radius-md);
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    background: #000;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.25);
    color: #fff;
    font-size: 2.5rem;
    line-height: 1;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, border-color 0.2s;
    backdrop-filter: blur(4px);
    z-index: 2;
}

.gallery-nav:hover { background: var(--gold); border-color: var(--gold); color: var(--navy); }
.gallery-prev { left: -3.75rem; }
.gallery-next { right: -3.75rem; }

.gallery-counter {
    font-size: var(--text-sm);
    color: rgba(255,255,255,0.7);
    font-family: var(--font-mono, monospace);
    letter-spacing: 0.05em;
}

@media (max-width: 600px) {
    .gallery-prev { left: -2.25rem; }
    .gallery-next { right: -2.25rem; }
    .gallery-nav { width: 2.25rem; height: 2.25rem; font-size: 1.75rem; }
}
