/* Deep Dive Section - Inlined for immediate update */
.deep-dive-section {
    padding: 8rem 4rem;
    position: relative;
}

.deep-dive-header {
    text-align: center;
    margin-bottom: 5rem;
}

.deep-dive-header h2 {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    line-height: 1.1;
    max-width: 900px;
    margin: 0 auto 1.5rem;
}

.deep-dive-header h2 em {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 500;
    color: var(--accent);
}

.deep-dive-subtext {
    color: var(--text-secondary);
    font-size: 1.15rem;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.7;
}

.deep-dive-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.deep-dive-card {
    background: linear-gradient(145deg, rgba(20, 20, 20, 0.6) 0%, rgba(10, 10, 10, 0.8) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 3rem 2.5rem;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Glass shine effect */
.deep-dive-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.03), transparent);
    transition: 0.5s;
}

.deep-dive-card:hover::before {
    left: 100%;
}

.deep-dive-card:hover {
    transform: translateY(-8px);
    background: linear-gradient(145deg, rgba(30, 30, 30, 0.7) 0%, rgba(15, 15, 15, 0.9) 100%);
    border-color: rgba(212, 175, 55, 0.4);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6), 0 0 20px rgba(212, 175, 55, 0.1);
}

.deep-dive-card h3 {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 1.25rem;
    position: relative;
    z-index: 1;
}

.deep-dive-card h3 em {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 500;
    color: var(--text-secondary);
    display: block;
    margin-top: 0.2rem;
    font-size: 1.4rem;
}

.deep-dive-card:hover h3 em {
    color: var(--accent);
    text-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
    transition: all 0.3s ease;
}

.deep-dive-card p {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.65;
    position: relative;
    z-index: 1;
}

/* Mobile responsive */
@media (max-width: 900px) {
    .deep-dive-grid {
        grid-template-columns: 1fr;
    }
}

:root {
    --bg-primary: #000000;
    --bg-card: #0a0a0a;
    --bg-elevated: #112d27;
    --text-primary: #ffffff;
    --text-secondary: #b8c5c1;
    --accent: #d4af37;
    --accent-dim: rgba(212, 175, 55, 0.1);
    --font-display: 'Outfit', sans-serif;
    --font-serif: 'Playfair Display', serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-display);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
}


/* Navigation */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1.25rem 4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.logo {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.02em;
}

.logo span {
    color: var(--accent);
}

.mobile-menu-btn {
    display: none;
}

.nav-links {
    display: flex;
    gap: 0.25rem;
    align-items: center;
}

.nav-links a {
    color: var(--text-primary);
    text-decoration: none;
    padding: 0.6rem 1.2rem;
    border-radius: 100px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.nav-links a:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.nav-cta {
    background: transparent !important;
    border: 1px solid rgba(212, 175, 55, 0.4) !important;
    color: var(--text-primary) !important;
    font-weight: 600 !important;
    display: flex !important;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem 0.5rem 0.5rem 1.5rem !important;
    border-radius: 100px !important;
    transition: all 0.3s ease;
}

.nav-cta:hover {
    border-color: var(--accent) !important;
    background: rgba(212, 175, 55, 0.05) !important;
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.2);
    transform: translateY(-2px);
}

.nav-cta-icon {
    width: 32px;
    height: 32px;
    background: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--bg-primary);
}

/* Simplified Premium Dropdown */
.nav-item-group {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.nav-dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(5, 5, 5, 0.95);
    backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-top: 1px solid rgba(212, 175, 55, 0.4);
    border-radius: 16px;
    padding: 0.75rem;
    min-width: 260px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.8),
        0 0 0 1px rgba(255, 255, 255, 0.05),
        0 0 30px rgba(212, 175, 55, 0.1);
    /* Ambient Gold Glow */
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* Pointer Triangle */
.nav-dropdown::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 12px;
    height: 12px;
    background: #050505;
    border-top: 1px solid rgba(212, 175, 55, 0.4);
    border-left: 1px solid rgba(212, 175, 55, 0.4);
}

.nav-item-group:hover .nav-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(10px);
    /* Slight gap from nav */
}

.nav-dropdown a {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.85rem 1.25rem;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-dropdown a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
    padding-left: 1.5rem;
    /* Slide effect */
}

.nav-dropdown a:hover::after {
    content: '→';
    font-size: 0.8em;
    color: var(--accent);
    opacity: 0.8;
}

/* Hover Bridge */
.nav-item-group::after {
    content: '';
    position: absolute;
    top: 100%;
    left: -20px;
    right: -20px;
    height: 30px;
}

/* Solar Ambient Glow */
.ambient-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
    background: radial-gradient(ellipse at top right, #0a1f1a 0%, #000000 40%, #000000 100%);
}

.glow-orb {
    position: absolute;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.15) 0%, rgba(0, 0, 0, 0) 70%);
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.5;
    animation: moveGlow 25s infinite alternate ease-in-out;
    mix-blend-mode: screen;
}

.glow-orb:nth-child(1) {
    top: -30%;
    left: -10%;
    animation-delay: 0s;
    background: radial-gradient(circle, rgba(255, 69, 0, 0.12) 0%, rgba(0, 0, 0, 0) 70%);
}

.glow-orb:nth-child(2) {
    bottom: -20%;
    right: -20%;
    animation-delay: -10s;
    background: radial-gradient(circle, rgba(255, 183, 0, 0.08) 0%, rgba(0, 0, 0, 0) 70%);
}

@keyframes moveGlow {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(30px, 30px) scale(1.1);
    }
}

/* Ensure content sits above glow */
section,
footer,
.hero {
    position: relative;
    z-index: 1;
}


/* Hero Section - Split Layout */

.hero {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 0;
    position: relative;
    overflow: hidden;
    background: radial-gradient(circle at 10% 10%, var(--bg-elevated) 0%, #000000 60%);
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url('assets/images/grain.webp');
    opacity: 0.2;
    mix-blend-mode: overlay;
    pointer-events: none;
    z-index: 10;
}

/* Hero Left: Typography */
.hero-content {
    padding: 8rem 6rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    z-index: 20;
    position: relative;
}

.hero h1 {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 0.9;
}

.hero-span-we {
    font-family: var(--font-serif);
    font-weight: 400;
    font-size: clamp(3rem, 5vw, 4rem);
    color: #fff;
    margin-bottom: 0.5rem;
}

.hero-span-deliver {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 400;
    font-size: clamp(3.5rem, 6vw, 5rem);
    color: #fff;
    margin-bottom: 0.5rem;
}

.hero-span-results {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: clamp(5rem, 9vw, 8.5rem);
    color: #fff;
    text-transform: uppercase;
    letter-spacing: -0.04em;
    line-height: 0.8;
    margin-left: -4px;
}

.hero-cta-group {
    margin-top: 3rem;
    display: flex;
    gap: 1rem;
    align-items: center;
}

.hero-btn-primary {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    padding: 0.8rem 2rem;
    border-radius: 100px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.hero-btn-primary:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    background: transparent;
    border: 1px solid rgba(212, 175, 55, 0.4);
    padding: 0.75rem 0.75rem 0.75rem 2rem;
    border-radius: 100px;
    text-decoration: none;
    transition: all 0.3s ease;
    opacity: 0;
    animation: fadeIn 1s ease 0.7s forwards;
}

.hero-cta:hover {
    border-color: var(--accent);
    background: rgba(212, 175, 55, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.2);
}

.hero-cta span {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1.1rem;
}

.hero-cta .cta-icon {
    width: 40px;
    height: 40px;
    background: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.hero-cta .cta-icon span {
    color: var(--bg-primary);
    font-weight: 800;
    font-size: 1rem;
}

.hero-cta:hover .cta-icon {
    transform: scale(1.1);
}

.hero-brands {
    margin-top: 4rem;
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.hero-brands span {
    font-size: 0.75rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
}

.hero-brand-logos {
    display: flex;
    gap: 1rem;
    opacity: 0.5;
}

/* Hero Right: 3D Grid */
.hero-visual {
    position: relative;
    height: 100vh;
    overflow: hidden;
    mask-image: linear-gradient(to right, transparent, black 20%);
    -webkit-mask-image: linear-gradient(to right, transparent, black 20%);
}

.floating-grid {
    position: absolute;
    top: -20%;
    left: 0;
    width: 150%;
    height: 140%;
    display: flex;
    gap: 20px;
    transform: rotate(-12deg) translateX(0);
    transform-style: preserve-3d;
}

.grid-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Animation Directions */
.col-anim-up {
    animation: scrollUp 40s linear infinite;
}

.col-anim-down {
    animation: scrollDown 45s linear infinite;
}

.grid-item {
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    aspect-ratio: 9/12;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: grayscale(20%);
    transition: filter 0.3s ease;
}

.grid-item:hover img {
    filter: grayscale(0%);
}

@keyframes scrollUp {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(-50%);
    }
}

@keyframes scrollDown {
    0% {
        transform: translateY(-50%);
    }

    100% {
        transform: translateY(0);
    }
}

/* Logo Marquee - Moved/Adjusted */
.logos-section {
    padding: 3rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;
}

.logos-track {
    display: flex;
    animation: scroll 25s linear infinite;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.logo-item {
    flex-shrink: 0;
    padding: 0 3rem;
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-secondary);
    opacity: 0.5;
    transition: opacity 0.3s ease;
    white-space: nowrap;
}

/* Welcome Section */
.welcome-section {
    padding: 8rem 4rem;
    text-align: center;
}

.welcome-brand {
    color: var(--accent);
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    margin-bottom: 1.5rem;
}

.welcome-section h2 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 600;
    max-width: 800px;
    margin: 0 auto 1.5rem;
    line-height: 1.3;
}

.welcome-section h2 em {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 500;
}

.welcome-text {
    max-width: 600px;
    margin: 0 auto 2rem;
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.welcome-cta {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    background: transparent;
    border: 1px solid rgba(212, 175, 55, 0.4);
    padding: 0.75rem 0.75rem 0.75rem 2rem;
    border-radius: 100px;
    text-decoration: none;
    transition: all 0.3s ease;
    margin-top: 2rem;
}

.welcome-cta:hover {
    border-color: var(--accent);
    background: rgba(212, 175, 55, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.2);
}

.welcome-cta span {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1.1rem;
}

.welcome-cta .cta-icon {
    width: 40px;
    height: 40px;
    background: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.welcome-cta .cta-icon span {
    color: var(--bg-primary);
    font-weight: 800;
    font-size: 1rem;
}

/* Who We're Built For */
.built-for-section {
    padding: 8rem 4rem;
}

/* MOBILE OPTIMIZATIONS */
@media (max-width: 1024px) {

    /* General Padding Reduced */
    .deep-dive-section,
    .welcome-section,
    .built-for-section,
    .hero-content {
        padding: 4rem 1.5rem;
    }

    /* Hero Section Stacking */
    .hero {
        grid-template-columns: 1fr;
        min-height: auto;
        display: flex;
        flex-direction: column;
        padding-top: 5rem;
        /* Space for fixed nav */
    }

    .hero-content {
        align-items: center;
        text-align: center;
    }

    .hero h1 {
        align-items: center;
        width: 100%;
    }

    .hero-span-we {
        font-size: 2.5rem;
    }

    .hero-span-deliver {
        font-size: 3rem;
    }

    .hero-span-results {
        font-size: 4rem;
        line-height: 1;
    }

    /* Simplify Visuals for Performance */
    .hero-visual {
        height: 50vh;
        mask-image: linear-gradient(to bottom, transparent, black 10%);
        -webkit-mask-image: linear-gradient(to bottom, transparent, black 10%);
    }

    /* Stop heavy animation and hide grid to prevent overflow */
    .floating-grid {
        display: none;
        /* Hide completely to fix overflow/performance */
    }


    /* Ensure no horizontal scroll - Managed by mobile-safe-mode now */
    html,
    body {
        width: 100%;
        position: relative;
    }

    .hero-visual {
        display: none;
        /* Hide visual column mostly to let text shine */
    }

    .hero-brands {
        flex-direction: column;
        gap: 1rem;
        margin-top: 3rem;
    }

    .hero-brand-logos {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 768px) {

    /* Mobile Menu Button Visibility */
    .mobile-menu-btn {
        display: flex;
        /* Enforce flex */
        position: relative;
        z-index: 1002;
    }

    /* Navigation Adjustments */
    nav {
        padding: 1rem 1.5rem;
    }

    .logo {
        font-size: 1.2rem;
    }

    /* Section Padding Reductions */
    .hero-content {
        padding: 6rem 1.5rem 4rem 1.5rem;
        /* Ensure top padding clears nav */
    }

    .deep-dive-section,
    .built-for-section,
    .mastered-section,
    .portfolio-section,
    .comparison-section,
    .stats-section,
    .video-section,
    .about-section {
        padding: 4rem 1.5rem;
        /* Consistent smaller padding */
    }

    /* Hero Typography - Mobile Optimized */
    .hero-span-we {
        font-size: clamp(2rem, 8vw, 2.5rem);
    }

    .hero-span-deliver {
        font-size: clamp(2.5rem, 10vw, 3.5rem);
        margin-bottom: 0.25rem;
    }

    .hero-span-results {
        font-size: clamp(3.5rem, 14vw, 5rem);
        /* Responsive massive text but controlled */
        line-height: 0.9;
        margin-left: 0;
    }

    .hero-cta-group {
        flex-direction: column;
        width: 100%;
        gap: 1rem;
    }

    .hero-btn-primary,
    .hero-cta {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    /* Deep Dive Mobile */
    .deep-dive-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .deep-dive-card {
        padding: 2rem 1.5rem;
    }

    .deep-dive-header h2 {
        font-size: clamp(2rem, 8vw, 3rem);
    }

    .built-for-grid,
    .stats-grid,
    .portfolio-grid {
        grid-template-columns: 1fr;
    }

    .portfolio-grid {
        /* Maybe 2 cols for portfolio on tablets, 1 on mobile? Keeping 1 for safety on small screens */
        grid-template-columns: 1fr;
    }

    .comparison-row {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1.5rem;
        text-align: center;
        border-bottom: 2px solid rgba(255, 255, 255, 0.05);
    }

    .comparison-row.header {
        display: none;
        /* Hide header on mobile, too complex */
    }

    .comparison-cell {
        justify-content: center !important;
        padding: 0.5rem;
    }

    /* Emulate card stacking for comparison */
    .comparison-table {
        border: none;
        background: transparent;
    }

    .comparison-row {
        background: var(--bg-card);
        border-radius: 16px;
        margin-bottom: 1rem;
        border: 1px solid rgba(255, 255, 255, 0.05);
    }
}


.built-for-header {
    text-align: center;
    margin-bottom: 4rem;
}

.built-for-header h2 {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    line-height: 1.1;
}

.built-for-header h2 em {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 500;
}

.built-for-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.built-for-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    padding: 2.5rem;
    transition: all 0.4s ease;
}

.built-for-card:hover {
    border-color: rgba(212, 175, 55, 0.3);
    transform: translateY(-4px);
}

.built-for-card h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.built-for-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.built-for-card .tagline {
    color: var(--accent);
    font-size: 0.85rem;
    font-weight: 600;
    font-style: italic;
}

/* Deep Dive Section */
.deep-dive-section {
    padding: 8rem 4rem;
}

.deep-dive-header {
    text-align: center;
    margin-bottom: 4rem;
}

.deep-dive-header h2 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 700;
    line-height: 1.15;
    max-width: 900px;
    margin: 0 auto;
}

.deep-dive-header h2 em {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 500;
}

.deep-dive-subtext {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 700px;
    margin: 1.5rem auto 0;
}

.deep-dive-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.deep-dive-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    padding: 2.5rem;
    transition: all 0.4s ease;
}

.deep-dive-card:hover {
    border-color: rgba(212, 175, 55, 0.2);
    transform: translateY(-4px);
}

.deep-dive-card h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    line-height: 1.2;
}

.deep-dive-card h3 em {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 500;
    color: var(--text-secondary);
    display: block;
    font-size: 1.1rem;
}

.deep-dive-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-top: 1rem;
}

/* Mastered Section */
.mastered-section {
    padding: 8rem 4rem;
}

.mastered-header {
    text-align: center;
    margin-bottom: 4rem;
}

.mastered-header h2 {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    line-height: 1.1;
}

.mastered-header h2 em {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 500;
}

.mastered-subtext {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-top: 1rem;
}

/* Mastered Section - Carousel */
.mastered-grid {
    /* Now a carousel track container */
    display: flex;
    width: 100%;
    overflow: hidden;
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    padding: 2rem 0;
    margin: 0 -2rem;
    /* Negative margin to pull to edges if container has padding */
    width: calc(100% + 4rem);
}

.mastered-carousel-track {
    display: flex;
    gap: 1.5rem;
    animation: carouselScroll 40s linear infinite;
    padding-left: 1.5rem;
    /* Initial offset */
}

.mastered-grid:hover .mastered-carousel-track {
    animation-play-state: paused;
}

@keyframes carouselScroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.mastered-card {
    flex: 0 0 300px;
    /* Fixed width for carousel items */
    aspect-ratio: 9/16;
    border-radius: 24px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    text-decoration: none;
    display: block;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Responsive */
@media (max-width: 768px) {
    .mastered-card {
        flex: 0 0 260px;
    }
}

.mastered-card-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: left center;
    transition: transform 0.8s ease;
    filter: brightness(0.8);
}

.mastered-card:hover .mastered-card-bg {
    transform: scale(1.1);
    filter: brightness(1.1);
}

/* Inner Glow */
.mastered-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 24px;
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.1);
    transition: all 0.5s ease;
    z-index: 5;
}

.mastered-card:hover::after {
    box-shadow: inset 0 0 20px rgba(212, 175, 55, 0.5);
    border-color: rgba(212, 175, 55, 0.4);
}

/* Portfolio Section */
.portfolio-section {
    padding: 8rem 0;
}

.portfolio-header {
    text-align: center;
    margin-bottom: 4rem;
    padding: 0 4rem;
}

.portfolio-header h2 {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    line-height: 1.1;
}

.portfolio-header h2 em {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 500;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    max-width: 1400px;
    margin: 0 auto;
}

.portfolio-card {
    aspect-ratio: 3/4;
    border-radius: 24px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    display: block;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    transition: all 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.portfolio-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    border-color: rgba(212, 175, 55, 0.4);
}

.portfolio-card-bg {
    position: absolute;
    inset: 0;
    transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
}

.portfolio-card:hover .portfolio-card-bg {
    transform: scale(1.12);
}

/* Subtle overlay to improve text legibility */
.portfolio-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom,
            transparent 40%,
            rgba(0, 0, 0, 0.6) 70%,
            rgba(0, 0, 0, 0.9) 100%);
    z-index: 1;
    transition: opacity 0.5s ease;
}

/* Shine effect on hover */
.portfolio-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right,
            transparent,
            rgba(255, 255, 255, 0.05),
            transparent);
    transform: skewX(-25deg);
    transition: 0.7s;
    z-index: 2;
}

.portfolio-card:hover::before {
    left: 125%;
}

.portfolio-card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem 1.8rem;
    z-index: 3;
    transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.portfolio-card:hover .portfolio-card-content {
    transform: translateY(-5px);
}

.portfolio-card h4 {
    font-family: var(--font-display);
    font-size: clamp(1.2rem, 2vw, 1.4rem);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
    letter-spacing: -0.01em;
}

.portfolio-card span {
    font-size: 0.9rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
    opacity: 0.9;
}

/* Comparison Section */
.comparison-section {
    padding: 8rem 4rem;
}

.comparison-header {
    text-align: center;
    margin-bottom: 4rem;
}

.comparison-header h2 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.2;
}

.comparison-header h2 em {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 500;
}

.comparison-table {
    max-width: 1000px;
    margin: 0 auto;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.comparison-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.comparison-row:last-child {
    border-bottom: none;
}

.comparison-row.header {
    background: var(--bg-card);
}

.comparison-cell {
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.comparison-cell:first-child {
    justify-content: flex-start;
    color: var(--text-secondary);
}

.comparison-row.header .comparison-cell {
    font-weight: 600;
    color: var(--text-primary);
}

.comparison-cell.highlight {
    background: rgba(212, 175, 55, 0.05);
    color: var(--accent);
    font-weight: 600;
}

/* Mobile Comparison Slider */
.comparison-mobile-slider,
.mobile-swipe-hint {
    display: none;
}

@media (max-width: 768px) {
    .comparison-table {
        display: none;
    }

    .mobile-swipe-hint {
        display: block;
        text-align: right;
        padding: 0 5vw 0.5rem;
        font-family: var(--font-display);
        font-size: 0.8rem;
        color: var(--accent);
        text-transform: uppercase;
        letter-spacing: 0.1em;
        animation: pulseFade 2s infinite;
    }

    @keyframes pulseFade {

        0%,
        100% {
            opacity: 0.6;
        }

        50% {
            opacity: 1;
        }
    }

    .comparison-mobile-slider {
        display: flex;
        overflow-x: auto;
        gap: 1rem;
        padding: 1rem 5vw;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        /* Firefox */
    }

    .comparison-mobile-slider::-webkit-scrollbar {
        display: none;
        /* Chrome/Safari */
    }

    .comp-slide {
        flex: 0 0 85vw;
        scroll-snap-align: center;
        background: #151515 !important;
        /* Lighter background for contrast */
        border: 1px solid rgba(255, 255, 255, 0.2) !important;
        /* Brighter border */
        border-radius: 20px;
        padding: 2rem;
        display: flex;
        flex-direction: column;
        justify-content: center;
        box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
        /* Stronger shadow */
        min-height: 320px;
    }

    .comp-slide h3 {
        font-family: var(--font-display);
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
        text-align: center;
        line-height: 1.2;
    }

    .comp-slide h3 em {
        font-family: var(--font-serif);
        font-style: italic;
        color: var(--accent);
        font-weight: 400;
    }

    .comp-grid {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
    }

    .comp-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 1rem;
        background: rgba(255, 255, 255, 0.03);
        border-radius: 12px;
        font-size: 0.95rem;
        color: var(--text-secondary);
    }

    .comp-item.highlight {
        background: rgba(212, 175, 55, 0.1);
        border: 1px solid rgba(212, 175, 55, 0.3);
        color: #fff;
    }

    .comp-item .check {
        color: #4ade80;
        font-size: 1.2rem;
    }

    .comp-item .cross {
        color: #ef4444;
        /* Red for cross */
        font-size: 1.2rem;
        opacity: 0.6;
    }
}

.check {
    color: #4ade80;
    font-size: 1.2rem;
}

.cross {
    color: #666;
    font-size: 1.2rem;
}

/* Stats Section */
.stats-section {
    padding: 6rem 4rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.stat-item {
    padding: 2rem;
}

.stat-number {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    color: var(--accent);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1rem;
    color: var(--text-secondary);
}

/* Video Section */
.video-section {
    padding: 8rem 4rem;
}

.video-container {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
}

.video-label {
    text-align: center;
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.video-wrapper {
    aspect-ratio: 16/9;
    background: var(--bg-card);
    border-radius: 24px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
}

.play-button {
    width: 80px;
    height: 80px;
    background: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.play-button:hover {
    transform: scale(1.1);
    box-shadow: 0 0 60px rgba(212, 175, 55, 0.4);
}

.play-button::after {
    content: '';
    width: 0;
    height: 0;
    border-left: 24px solid var(--bg-primary);
    border-top: 14px solid transparent;
    border-bottom: 14px solid transparent;
    margin-left: 6px;
}

/* About / Team Section */
.about-section {
    padding: 8rem 4rem;
}

.about-content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    margin-bottom: 4rem;
}

.section-title em {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 500;
    color: var(--accent);
}

/* Team Marquee */
.team-marquee {
    width: 100%;
    overflow: hidden;
    padding: 2rem 0;
    position: relative;
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.team-track {
    display: flex;
    gap: 4rem;
    width: max-content;
    animation: teamScroll 60s linear infinite;
    padding-left: 4rem;
}

.team-track:hover {
    animation-play-state: paused;
}

@keyframes teamScroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.team-card {
    flex: 0 0 280px;
    /* Fixed width for text */
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.team-img-container {
    width: 140px;
    /* 30% smaller than 200px */
    height: 140px;
    border-radius: 50%;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 1.5rem;
}

.team-img {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center top;
    transition: transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.team-glow {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, transparent 0%, rgba(0, 0, 0, 0.4) 100%);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);

    transition: all 0.5s ease;
    pointer-events: none;
    z-index: 2;
}

/* Hover Effects */
.team-card:hover .team-img {
    transform: scale(1.05);
}

.team-card:hover .team-glow {
    box-shadow: inset 0 0 20px rgba(212, 175, 55, 0.2);
    border-color: rgba(212, 175, 55, 0.3);
}

.team-info h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    /* Slightly smaller header */
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.team-role {
    display: block;
    font-family: var(--font-serif);
    font-style: italic;
    color: var(--accent);
    font-size: 1rem;
    margin-bottom: 1rem;
}

.team-info p {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.9rem;
    /* Slightly smaller text */
    margin: 0 auto;
}

.team-info h3 {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.team-role {
    display: block;
    font-family: var(--font-serif);
    font-style: italic;
    color: var(--accent);
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.team-info p {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 1rem;
}

.about-footer-text p {
    font-size: 1.2rem;
    color: var(--text-primary);
    font-weight: 500;
    max-width: 600px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .team-card {
        flex: 0 0 250px;
        /* Slightly smaller on mobile */
    }

    .team-img-container {
        width: 120px;
        height: 120px;
    }
}



/* Contact Section */
.contact-section {
    padding: 8rem 4rem;
    text-align: center;
}

.contact-section h2 {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.contact-section h2 em {
    font-family: var(--font-serif);
    font-style: italic;
    color: var(--accent);
}

.contact-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--accent);
    color: var(--bg-primary);
    padding: 1.25rem 2.5rem;
    border-radius: 100px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.contact-cta:hover {
    transform: scale(1.05);
    box-shadow: 0 0 60px rgba(212, 175, 55, 0.4);
}

/* Footer */
footer {
    padding: 3rem 4rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-logo {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-primary);
}

.footer-logo span {
    color: var(--accent);
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--accent);
}

.footer-copy {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .hero {
        display: flex;
        flex-direction: column;
        padding-top: 6rem;
        height: auto;
        min-height: 100vh;
    }

    .hero-content {
        padding: 4rem 2rem;
        width: 100%;
        align-items: center;
        text-align: center;
    }

    .hero h1 {
        align-items: center;
    }

    .hero-visual {
        width: 100%;
        height: 50vh;
        mask-image: linear-gradient(to bottom, transparent, black 10%);
        -webkit-mask-image: linear-gradient(to bottom, transparent, black 10%);
    }

    .floating-grid {
        width: 150%;
        left: -25%;
        transform: rotate(-12deg) translateY(-10%);
    }

    .built-for-grid,
    .deep-dive-grid {
        grid-template-columns: 1fr;
    }

    .mastered-grid,
    .portfolio-grid,
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .comparison-row {
        grid-template-columns: 1.5fr 1fr 1fr 1fr;
    }
}


@media (max-width: 1024px) {

    .logos-section,
    .video-reel-section,
    .team-marquee {
        width: 100vw !important;
        margin-left: -1.5rem !important;
        padding-left: 1.5rem !important;
        overflow: hidden !important;
    }

    /* 9. Comparison Table Specifics */
    .comparison-cell {
        justify-content: center !important;
        padding: 0.5rem !important;
        text-align: center;
        border: none !important;
    }

    .comparison-row {
        background: var(--bg-card);
        border-radius: 12px;
        padding: 1.5rem;
        gap: 0.5rem;
        display: flex !important;
    }

    /* 10. Nav Dropdown Visibility Override */
    .nav-dropdown {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: static !important;
        transform: none !important;
        width: 100% !important;
        margin-top: 1rem;
    }

    .nav-item-group {
        flex-direction: column !important;
        align-items: center !important;
    }
}

/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

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

/* Staggered Delays */
.built-for-grid .reveal:nth-child(1),
.deep-dive-grid .reveal:nth-child(1),
.mastered-grid .reveal:nth-child(1),
.portfolio-grid .reveal:nth-child(1) {
    transition-delay: 0.1s;
}

.built-for-grid .reveal:nth-child(2),
.deep-dive-grid .reveal:nth-child(2),
.mastered-grid .reveal:nth-child(2),
.portfolio-grid .reveal:nth-child(2) {
    transition-delay: 0.2s;
}

.built-for-grid .reveal:nth-child(3),
.deep-dive-grid .reveal:nth-child(3),
.mastered-grid .reveal:nth-child(3),
.portfolio-grid .reveal:nth-child(3) {
    transition-delay: 0.3s;
}

.mastered-grid .reveal:nth-child(4),
.portfolio-grid .reveal:nth-child(4) {
    transition-delay: 0.4s;
}

.deep-dive-grid .reveal:nth-child(4) {
    transition-delay: 0.1s;
}

.deep-dive-grid .reveal:nth-child(5) {
    transition-delay: 0.2s;
}

.deep-dive-grid .reveal:nth-child(6) {
    transition-delay: 0.3s;
}

.location-badge {
    display: inline-block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--accent);
    opacity: 0.8;
    margin-bottom: 2rem;
    font-weight: 600;
    border: 1px solid rgba(212, 175, 55, 0.3);
    padding: 0.4rem 1rem;
    border-radius: 100px;
    background: rgba(212, 175, 55, 0.05);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

/* =========================================
   Tech Stack Marquee (Globalized)
   ========================================= */
.tech-stack-section {
    padding: 4rem 0 2rem;
    background: #000;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;
    overflow-x: hidden;
}

.tech-marquee {
    display: flex;
    width: 100%;
}

.tech-track {
    display: flex;
    gap: 4rem;
    width: max-content;
    animation: scrollTech 40s linear infinite;
}

.tech-track:hover {
    animation-play-state: paused;
}

.tech-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: rgba(255, 255, 255, 0.4);
    font-family: 'Helvetica Neue', sans-serif;
    font-weight: 500;
    font-size: 1.1rem;
    white-space: nowrap;
    transition: all 0.3s ease;
    cursor: default;
}

.tech-item svg {
    width: 28px;
    height: 28px;
    opacity: 0.6;
}

.tech-item:hover {
    color: #fff;
}

.tech-item:hover svg {
    opacity: 1;
    color: #d4af37;
    /* Gold accent */
}

@keyframes scrollTech {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* =========================================
   Mobile CTA Fix (Global)
   ========================================= */
.mobile-nav-cta {
    display: none;
    /* Hidden by default on desktop */
}

@media (max-width: 1024px) {
    .mobile-nav-cta {
        display: flex;
        /* Shown on mobile via mobile-menu.css, but useful fallback here */
    }
}