/* ============================================
   BuildBank V18 — Polish & Deploy
   Full CSS cleanup. Scroll animations. Card effects.
   ============================================ */

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

:root {
    /* Vercel palette - Dark Mode (default) */
    --bg: #000000;
    --bg-subtle: #0a0a0a;
    --bg-muted: #111111;
    --bg-emphasis: #171717;

    --border: rgba(255, 255, 255, 0.12);
    --border-hover: rgba(255, 255, 255, 0.22);

    --text: #fafafa;
    --text-secondary: #a1a1a1;
    --text-tertiary: #666666;
    --text-muted: #AEAEB2;

    --accent: #ffffff;
    --accent-success: #22c55e;
    --accent-blue: #0070f3;

    /* Typography */
    --font-sans: 'Google Sans Flex', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'SF Mono', Consolas, monospace;

    /* Sizing */
    --container: 1200px;
    --nav-height: 64px;
    --radius-sm: 6px;
    --radius: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;

    /* Animation */
    --duration: 150ms;
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light Mode */
[data-theme="light"] {
    --bg: #ffffff;
    --bg-subtle: #fafafa;
    --bg-muted: #f5f5f5;
    --bg-emphasis: #eeeeee;

    --border: rgba(0, 0, 0, 0.1);
    --border-hover: rgba(0, 0, 0, 0.2);

    --text: #171717;
    --text-secondary: #666666;
    --text-tertiary: #a1a1a1;
    --text-muted: #8E8E93;

    --accent: #000000;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    overflow-x: hidden;
}

::selection {
    background: rgba(255, 255, 255, 0.2);
}

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

/* ============================================
   Typography
   ============================================ */

h1, h2, h3, h4 {
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.2;
    color: var(--text);
}

.section-headline {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 700;
    letter-spacing: -0.03em;
}

.section-subhead {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
    line-height: 1.6;
}

.section-header {
    margin-bottom: 40px;
}

.section-header-center {
    text-align: center;
}

.section-header-center .section-subhead {
    margin: 12px auto 0;
}

/* Extracted utility classes from inline styles */
.section-pretitle {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--text-muted);
    margin: 0 0 4px 0;
}

.color-muted {
    color: var(--text-muted);
}

.color-white {
    color: var(--text);
}

/* ============================================
   Navbar
   ============================================ */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    z-index: 1000;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--border);
}

.nav-container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 1rem;
    color: var(--text);
    text-decoration: none;
}

.logo-icon {
    opacity: 0.9;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Nav CTA - hidden on mobile until scroll */
.nav-cta {
    transition: opacity 0.2s ease;
}

@media (max-width: 640px) {
    .nav-cta {
        opacity: 0;
        pointer-events: none;
    }

    .nav-cta.visible {
        opacity: 1;
        pointer-events: auto;
    }
}

/* ============================================
   Buttons
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 40px;
    padding: 0 16px;
    font-family: var(--font-sans);
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: all var(--duration) var(--ease);
    text-decoration: none;
    white-space: nowrap;
}

.btn-sm {
    height: 36px;
    padding: 0 12px;
    font-size: 0.8125rem;
}

.btn-lg {
    height: 48px;
    padding: 0 24px;
    font-size: 0.9375rem;
}

.btn-primary {
    background: var(--text);
    color: var(--bg);
}

.btn-primary:hover {
    background: #e5e5e5;
}

.btn-secondary {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    border-color: var(--border-hover);
    background: var(--bg-subtle);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}

.btn-ghost:hover {
    color: var(--text);
}

/* Glassmorphic button */
.btn-glass {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.4),
        0 2px 8px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transform: translateY(0);
    transition: all 0.2s ease;
}

.btn-glass:hover {
    background: rgba(0, 0, 0, 0.7);
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.5),
        0 4px 12px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

/* Hero tag badge */
.hero-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent-blue);
    margin-bottom: 20px;
    padding: 10px 20px;
    background: rgba(0, 20, 40, 0.85);
    border-radius: 8px;
    border: 1px solid rgba(0, 112, 243, 0.15);
}

.hero-tag-sm {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    padding: 6px 12px;
}

/* ============================================
   V18 Hero
   ============================================ */

.hero-v15 {
    position: relative;
    background: var(--bg);
    overflow: hidden;
    padding: 24px;
    padding-top: calc(var(--nav-height) + 60px);
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero-bg-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(to right, rgba(255,255,255,0.10) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255,255,255,0.10) 1px, transparent 1px);
    background-size: 50px 50px;
    mask-image: radial-gradient(circle at 50% 50%, black 40%, transparent 100%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-headline {
    font-size: clamp(3.75rem, 11vw, 6rem);
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1.05;
    margin-bottom: 24px;
}

/* Smaller hero text variant */
.hero-smaller {
    font-size: clamp(3.25rem, 9vw, 5rem);
}

/* V3 style gradient text */
.hero-gradient {
    background: linear-gradient(180deg, #fff 0%, rgba(255,255,255,0.5) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subhead {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 560px;
    margin: 0 auto 40px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 80px;
}

/* ============================================
   The Mega-Grid (Geist Cards)
   ============================================ */

.mega-grid-section {
    padding: 80px 0;
    border-bottom: 1px solid var(--border);
    background: var(--bg);
}

/* Geist-section (process) */
.geist-section {
    padding: 80px 0;
    border-bottom: 1px solid var(--border);
    background: var(--bg);
}

.geist-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.geist-grid.grid-2-col {
    grid-template-columns: repeat(2, 1fr);
}

.grid-4-col { grid-template-columns: repeat(4, 1fr); }
.grid-3-col { grid-template-columns: repeat(3, 1fr); }
.grid-2-col { grid-template-columns: repeat(2, 1fr); }

@media (max-width: 1024px) {
    .grid-4-col { grid-template-columns: repeat(2, 1fr); }
    .grid-3-col { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .grid-4-col, .grid-3-col, .grid-2-col { grid-template-columns: 1fr; }
}

.geist-card {
    background: var(--bg);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 32px;
    min-height: 280px;
    position: relative;
    transition: background 0.2s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.geist-card:hover {
    background: var(--bg-subtle);
}

.card-dark {
    background: rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.08);
}

.card-dark:hover {
    border-color: rgba(0, 112, 243, 0.3);
}

.card-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
    color: var(--text);
}

.card-header p {
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-secondary);
    line-height: 1.6;
}

.card-visual-bottom {
    margin-top: 24px;
    margin-bottom: -32px;
    margin-left: -32px;
    margin-right: -32px;
    display: flex;
    justify-content: center;
    opacity: 0.9;
    min-height: 180px;
    align-items: center;
}

.card-visual-bottom img {
    max-width: 100%;
    height: auto;
    max-height: 250px;
    width: 100%;
}

/* Larger cards for AI/Expert section */
#ai-experts .geist-card {
    min-height: 360px;
    transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

/* First card (Instant Velocity) - starts dark grey */
#ai-experts .geist-card:first-child {
    background: var(--bg-subtle);
}

/* Second card (Expert Polish) - starts black */
#ai-experts .geist-card:last-child {
    background: var(--bg);
}

/* Hover swap: when hovering first card, it goes black */
#ai-experts .geist-card:first-child:hover {
    background: var(--bg);
}

/* Hover swap: when hovering second card, it goes dark grey */
#ai-experts .geist-card:last-child:hover {
    background: var(--bg-subtle);
}

/* When first card is hovered, second card swaps to dark grey */
#ai-experts .geist-grid:has(.geist-card:first-child:hover) .geist-card:last-child {
    background: var(--bg-subtle);
}

/* When second card is hovered, first card swaps to black */
#ai-experts .geist-grid:has(.geist-card:last-child:hover) .geist-card:first-child {
    background: var(--bg);
}

#ai-experts .card-visual-bottom {
    min-height: 220px;
}

#ai-experts .card-visual-bottom img {
    max-height: 250px;
    width: 100%;
}

/* Larger assets for Essentials section */
#essentials .card-visual-bottom {
    min-height: 220px;
}

#essentials .card-visual-bottom img {
    max-height: 250px;
    width: 100%;
}

#essentials .geist-card {
    min-height: 360px;
}

/* ============================================
   Process (Icon Grid)
   ============================================ */

#process {
    padding-top: 80px;
    padding-bottom: 80px;
}

.process-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 800px;
    margin: 0 auto;
}

.process-phase-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 24px;
    margin-bottom: 8px;
}

.process-phase-header:first-child {
    margin-top: 0;
}

.phase-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: rgba(255,255,255,0.4);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-family: var(--font-mono);
}

.phase-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
}

.process-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.process-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.process-card:hover {
    border-color: var(--border-hover);
    background: var(--bg-subtle);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.process-card:hover .process-icon {
    color: var(--accent-blue);
}

.process-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.5);
    transition: color 0.3s ease;
}

.process-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.process-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

@media (max-width: 640px) {
    .process-row {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .process-phase-header {
        margin-top: 16px;
        margin-bottom: 4px;
    }

    .phase-label {
        font-size: 0.625rem;
    }

    .phase-name {
        font-size: 0.875rem;
    }

    .process-card {
        padding: 16px 8px;
    }

    .process-icon {
        width: 32px;
        height: 32px;
        margin-bottom: 8px;
    }

    .process-icon svg {
        width: 20px;
        height: 20px;
    }

    .process-title {
        font-size: 0.75rem;
    }

    .process-desc {
        font-size: 0.625rem;
    }
}

/* ============================================
   Timeline CTA
   ============================================ */

.timeline-cta {
    padding: 80px 0;
    border-bottom: 1px solid var(--border);
    text-align: center;
    background: var(--bg);
    position: relative;
    overflow: hidden;
}

.cta-bg-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(to right, rgba(255,255,255,0.10) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255,255,255,0.10) 1px, transparent 1px);
    background-size: 50px 50px;
    mask-image: radial-gradient(circle at 50% 50%, black 40%, transparent 100%);
    pointer-events: none;
}

.cta-container {
    position: relative;
    z-index: 1;
}

.cta-headline {
    font-size: clamp(2rem, 5vw, 2.75rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 12px;
}

.cta-subhead {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 540px;
    margin: 0 auto 32px;
    line-height: 1.7;
}

.cta-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.timeline-cta h3 {
    font-size: 2rem;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

/* ============================================
   Footer
   ============================================ */

.footer {
    padding: 80px 0 40px;
    border-top: 1px solid var(--border);
    background: var(--bg);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 80px;
}

.footer-brand h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.footer-col h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 16px;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul li a {
    font-size: 0.875rem;
    color: var(--text-tertiary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-col ul li a:hover {
    color: var(--text);
}

.footer-bottom {
    padding-top: 32px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 1024px) {
    .geist-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .nav-right .btn-ghost {
        display: none;
    }

    .hero {
        padding: 120px 24px 80px;
    }

    .hero-headline {
        font-size: clamp(2rem, 9vw, 2.75rem);
    }

    .hero-subhead {
        font-size: 0.95rem;
    }

    .geist-grid {
        grid-template-columns: 1fr;
        gap: 1px;
    }

    .geist-card {
        min-height: auto;
        padding: 24px;
    }

    /* Stack AI/Expert cards on mobile */
    .geist-grid.grid-2-col {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    /* Reduce section padding on mobile */
    .mega-grid-section {
        padding: 60px 0;
    }

    .section-header {
        margin-bottom: 32px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 16px;
    }
}

/* ============================================
   Modal
   ============================================ */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    padding: 24px;
}

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

.modal {
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: 16px;
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(20px);
    transition: transform 0.2s ease;
}

.modal-overlay.active .modal {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 24px 0;
}

.modal-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text);
}

.modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.modal-close:hover {
    background: var(--bg-muted);
    color: var(--text);
}

.modal-form {
    padding: 24px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 8px;
}

.form-group .optional {
    color: var(--text-secondary);
    font-weight: 400;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

input[type="text"],
input[type="email"],
input[type="tel"],
textarea,
select {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 0.9375rem;
    font-family: inherit;
    transition: border-color 0.15s ease;
}

select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 44px;
}

select option {
    background: var(--bg-subtle);
    color: var(--text);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--accent-blue);
}

input::placeholder,
textarea::placeholder {
    color: var(--text-secondary);
}

textarea {
    resize: vertical;
    min-height: 80px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 24px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.form-actions .btn {
    min-width: 120px;
}

@media (max-width: 640px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

.modal-calendly {
    max-width: 700px;
    max-height: 95vh;
}

.calendly-container {
    padding: 0 24px 24px;
}

.calendly-inline-widget {
    border-radius: 8px;
    overflow: hidden;
}

/* ============================================
   Light Mode Overrides
   ============================================ */

[data-theme="light"] body {
    background: var(--bg);
    color: var(--text);
}

[data-theme="light"] .navbar {
    background: rgba(255, 255, 255, 0.8);
}

[data-theme="light"] .logo {
    color: #000;
}

[data-theme="light"] .btn-primary {
    background: #000;
    color: #fff;
}

[data-theme="light"] .btn-primary:hover {
    background: #333;
}

[data-theme="light"] .btn-secondary {
    border-color: var(--border);
    color: var(--text);
}

[data-theme="light"] .btn-secondary:hover {
    background: var(--bg-muted);
}

[data-theme="light"] .btn-ghost {
    color: var(--text-secondary);
}

[data-theme="light"] .btn-ghost:hover {
    color: var(--text);
}

[data-theme="light"] .btn-glass {
    background: rgba(0, 0, 0, 0.05);
    border-color: var(--border);
    color: var(--text);
}

[data-theme="light"] .btn-glass:hover {
    background: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .hero-v15 {
    background: var(--bg);
}

[data-theme="light"] .hero-bg-grid {
    background-image:
        linear-gradient(to right, rgba(0,0,0,0.06) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(0,0,0,0.06) 1px, transparent 1px);
}

[data-theme="light"] .hero-headline {
    color: var(--text);
}

[data-theme="light"] .hero-tag {
    background: var(--bg-muted);
    border-color: var(--border);
    color: var(--text-secondary);
}

[data-theme="light"] .section-headline {
    color: var(--text);
}

[data-theme="light"] .geist-card {
    background: var(--bg);
}

[data-theme="light"] .geist-card:hover {
    background: var(--bg-subtle);
}

[data-theme="light"] .geist-grid {
    background: var(--border);
}

[data-theme="light"] .card-header h3 {
    color: var(--text);
}

[data-theme="light"] #ai-experts .geist-card:first-child {
    background: var(--bg-subtle);
}

[data-theme="light"] #ai-experts .geist-card:last-child {
    background: var(--bg);
}

[data-theme="light"] #ai-experts .geist-card:first-child:hover {
    background: var(--bg);
}

[data-theme="light"] #ai-experts .geist-card:last-child:hover {
    background: var(--bg-subtle);
}

[data-theme="light"] .process-card {
    background: var(--bg);
}

[data-theme="light"] .process-card:hover {
    background: var(--bg-subtle);
}

[data-theme="light"] .process-icon {
    color: var(--text-secondary);
}

[data-theme="light"] .process-title {
    color: var(--text);
}

[data-theme="light"] .phase-label {
    color: var(--text-tertiary);
}

[data-theme="light"] .phase-name {
    color: var(--text);
}

[data-theme="light"] .timeline-cta {
    background: var(--bg);
}

[data-theme="light"] .cta-bg-grid {
    background-image:
        linear-gradient(to right, rgba(0,0,0,0.06) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(0,0,0,0.06) 1px, transparent 1px);
}

[data-theme="light"] .cta-headline {
    color: var(--text);
}

[data-theme="light"] .footer {
    background: var(--bg-subtle);
}

[data-theme="light"] .footer-col h4 {
    color: var(--text);
}

[data-theme="light"] .modal {
    background: var(--bg);
}

[data-theme="light"] .modal-header h3 {
    color: var(--text);
}

[data-theme="light"] .modal-close {
    color: var(--text-secondary);
}

[data-theme="light"] .modal-close:hover {
    background: var(--bg-muted);
    color: var(--text);
}

[data-theme="light"] select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
}

/* Theme toggle button */
.theme-toggle {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
}

.theme-toggle:hover {
    background: var(--bg-subtle);
    color: var(--text);
}

.theme-toggle svg {
    width: 18px;
    height: 18px;
}

.theme-toggle .icon-moon {
    display: block;
}

.theme-toggle .icon-sun {
    display: none;
}

[data-theme="light"] .theme-toggle .icon-moon {
    display: none;
}

[data-theme="light"] .theme-toggle .icon-sun {
    display: block;
}

/* ============================================
   Scroll Animations
   ============================================ */

/* Base state: hidden, shifted down */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Hero entrance */
.hero-fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.hero-fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Grid fade — entire grid fades in as one unit */
.grid-reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.grid-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered card reveals — for process cards only */
.card-reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}

.card-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Card hover lift effect */
.geist-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.process-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    .fade-up,
    .hero-fade-in,
    .grid-reveal,
    .card-reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .geist-card,
    .process-card {
        transition: background 0.2s ease;
    }

    .geist-card:hover,
    .process-card:hover {
        transform: none;
        box-shadow: none;
    }
}
