/* ==========================================================================
   Aries Liaison - Basecamp-Inspired Design
   Warm, conversational, confident
   ========================================================================== */

/* --------------------------------------------------------------------------
   CSS Custom Properties (Design Tokens)
   -------------------------------------------------------------------------- */
:root {
    /* Basecamp-inspired Colors */
    --cream: #fffbf5;
    --cream-dark: #f5f0e8;
    --cream-darker: #e8e3db;
    --charcoal: #1d1d1d;
    --text: #333333;
    --text-muted: #666666;
    --text-light: #888888;
    --gold: #f5c518;
    --gold-hover: #e6b800;
    --gold-subtle: rgba(245, 197, 24, 0.15);
    --green: #28a745;
    --green-subtle: rgba(40, 167, 69, 0.1);
    --blue: #007bff;
    --red: #dc3545;

    /* Typography - Serif for headlines, Sans for body */
    --font-headline: Georgia, 'Times New Roman', serif;
    --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

    /* Font Sizes */
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 2rem;
    --text-4xl: 2.5rem;
    --text-5xl: 3.25rem;
    --text-6xl: 4rem;

    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;
    --space-32: 8rem;

    /* Layout */
    --container-narrow: 700px;
    --container-wide: 1100px;
    --header-height: 72px;

    /* Borders & Shadows */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-full: 9999px;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* --------------------------------------------------------------------------
   Reset & Base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: var(--font-body);
    font-size: var(--text-lg);
    line-height: 1.7;
    color: var(--text);
    background: var(--cream);
}

a {
    color: var(--charcoal);
    text-decoration: underline;
    text-decoration-color: var(--gold);
    text-underline-offset: 3px;
    transition: all 0.2s ease;
}

a:hover {
    color: var(--gold-hover);
}

img {
    max-width: 100%;
    height: auto;
}

/* --------------------------------------------------------------------------
   Typography
   -------------------------------------------------------------------------- */
h1,
h2,
h3,
h4 {
    font-family: var(--font-headline);
    font-weight: 700;
    line-height: 1.2;
    color: var(--charcoal);
}

h1 {
    font-size: clamp(var(--text-4xl), 5vw, var(--text-6xl));
    letter-spacing: -0.02em;
}

h2 {
    font-size: clamp(var(--text-3xl), 4vw, var(--text-5xl));
    letter-spacing: -0.01em;
}

h3 {
    font-size: var(--text-2xl);
}

p {
    margin-bottom: var(--space-4);
}

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

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

/* --------------------------------------------------------------------------
   Container & Layout
   -------------------------------------------------------------------------- */
.container {
    width: 100%;
    max-width: var(--container-wide);
    margin: 0 auto;
    padding: 0 var(--space-6);
}

.container-narrow {
    max-width: var(--container-narrow);
    margin: 0 auto;
    padding: 0 var(--space-6);
}

.section {
    padding: var(--space-24) 0;
}

.section-alt {
    background: var(--cream-dark);
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-4) var(--space-8);
    font-family: var(--font-body);
    font-size: var(--text-base);
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background: var(--gold);
    color: var(--charcoal);
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background: var(--gold-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    color: var(--charcoal);
}

.btn-secondary {
    background: var(--charcoal);
    color: white;
}

.btn-secondary:hover {
    background: #333;
    color: white;
}

.btn-outline {
    background: transparent;
    color: var(--charcoal);
    border: 2px solid var(--charcoal);
}

.btn-outline:hover {
    background: var(--charcoal);
    color: white;
}

.btn-large {
    padding: var(--space-6) var(--space-12);
    font-size: var(--text-lg);
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--cream);
    border-bottom: 1px solid var(--cream-darker);
    z-index: 1000;
    transition: box-shadow 0.3s ease;
}

.header.scrolled {
    box-shadow: var(--shadow-sm);
}

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

.logo {
    font-family: var(--font-headline);
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--charcoal);
    text-decoration: none;
}

.logo:hover {
    color: var(--charcoal);
}

.nav {
    display: flex;
    align-items: center;
    gap: var(--space-8);
}

.nav-link {
    font-size: var(--text-base);
    color: var(--text-muted);
    text-decoration: none;
}

.nav-link:hover {
    color: var(--charcoal);
}

.header-tagline {
    font-size: var(--text-sm);
    color: var(--text-muted);
}

.header-tagline a {
    color: var(--gold);
    font-weight: 600;
    text-decoration: none;
}

.header-tagline a:hover {
    color: var(--gold-hover);
    text-decoration: underline;
}

/* Mobile Menu */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: var(--space-2);
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--charcoal);
}

@media (max-width: 768px) {

    .nav,
    .header-cta .btn-outline {
        display: none;
    }

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

/* --------------------------------------------------------------------------
   Hero Section
   -------------------------------------------------------------------------- */
.hero {
    padding-top: calc(var(--header-height) + var(--space-16));
    padding-bottom: var(--space-24);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-12);
    align-items: center;
}

.hero-content {
    text-align: left;
}

.hero-eyebrow {
    display: inline-block;
    padding: var(--space-2) var(--space-4);
    background: var(--gold-subtle);
    color: var(--text);
    font-size: var(--text-sm);
    font-weight: 600;
    border-radius: var(--radius-full);
    margin-bottom: var(--space-6);
}

.hero h1 {
    margin-bottom: var(--space-6);
}

.hero-subtitle {
    margin-bottom: var(--space-8);
    font-size: var(--text-xl);
    color: var(--text-muted);
}

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4);
    margin-bottom: var(--space-8);
}

.hero-signature {
    font-family: var(--font-headline);
    font-style: italic;
    color: var(--text-muted);
}

.hero-signature strong {
    font-style: normal;
    color: var(--charcoal);
}

.hero-illustration {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    /* For location badge */
}

.location-badge {
    position: absolute;
    bottom: 24px;
    left: 24px;
    background: rgba(255, 255, 255, 0.95);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--charcoal);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 1);
}

.hero-illustration img {
    max-width: 100%;
    height: auto;
    max-height: 600px;
    object-fit: cover;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

@media (max-width: 900px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: var(--space-8);
        text-align: center;
    }

    .hero-content {
        text-align: center;
        order: 2;
    }

    .hero-illustration {
        order: 1;
    }

    .hero-illustration img {
        max-height: 300px;
    }

    .hero-cta {
        justify-content: center;
    }
}

/* --------------------------------------------------------------------------
   Platform Section
   -------------------------------------------------------------------------- */
.platform {
    padding: var(--space-20) 0;
    background: linear-gradient(180deg, var(--cream) 0%, #ffffff 100%);
}

.platform-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: var(--space-16);
    align-items: center;
}

.platform-content {
    max-width: 520px;
}

.platform-eyebrow {
    display: inline-block;
    padding: var(--space-2) var(--space-4);
    background: var(--charcoal);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-4);
}

.platform h2 {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    color: var(--charcoal);
    margin-bottom: var(--space-4);
    line-height: 1.2;
}

.platform-description {
    font-size: 1.1rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: var(--space-8);
}

.platform-features {
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
    margin-bottom: var(--space-8);
}

.platform-feature {
    display: flex;
    align-items: flex-start;
    gap: var(--space-4);
}

.feature-icon {
    font-size: 1.5rem;
    line-height: 1;
    flex-shrink: 0;
}

.feature-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.feature-text strong {
    font-size: 1rem;
    color: var(--charcoal);
}

.feature-text span {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.platform-preview {
    display: flex;
    justify-content: center;
    align-items: center;
}

.platform-screenshot {
    width: 100%;
    max-width: 700px;
    border-radius: var(--radius-lg);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

@media (max-width: 1000px) {
    .platform-grid {
        grid-template-columns: 1fr;
        gap: var(--space-10);
        text-align: center;
    }

    .platform-content {
        max-width: 100%;
        order: 2;
    }

    .platform-preview {
        order: 1;
    }

    .platform-features {
        align-items: center;
    }

    .platform-feature {
        max-width: 400px;
        text-align: left;
    }
}

/*
   Problem Section
   -------------------------------------------------------------------------- */
.problem {
    background: var(--charcoal);
    color: white;
    padding: var(--space-24) 0;
}

.problem h2 {
    color: white;
    text-align: center;
    margin-bottom: var(--space-12);
}

.problem-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    max-width: 700px;
    margin: 0 auto;
}

.problem-item {
    font-size: var(--text-xl);
    padding-left: var(--space-8);
    position: relative;
    opacity: 0.9;
}

.problem-item::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--gold);
}

.problem-item strong {
    color: var(--gold);
}

/* --------------------------------------------------------------------------
   How It Works
   -------------------------------------------------------------------------- */
.how-it-works {
    padding: var(--space-32) 0;
}

.section-intro {
    text-align: center;
    max-width: 700px;
    margin: 0 auto var(--space-16);
}

.section-intro h2 {
    margin-bottom: var(--space-4);
}

.steps {
    display: flex;
    flex-direction: column;
    gap: var(--space-16);
    max-width: 1000px;
    margin: 0 auto;
}

.step {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: var(--space-8);
    align-items: center;
    padding: var(--space-8);
    background: var(--cream-dark);
    border-radius: var(--radius-lg);
}

.step:nth-child(even) {
    direction: rtl;
}

.step:nth-child(even)>* {
    direction: ltr;
}

.step-illustration {
    display: flex;
    justify-content: center;
    align-items: center;
}

.step-illustration img {
    max-width: 180px;
    height: auto;
    border-radius: var(--radius-md);
}

.step-number {
    display: inline-block;
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: 700;
    color: var(--gold);
    background: var(--gold-subtle);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
    margin-bottom: var(--space-2);
}

.step-content h3 {
    margin-bottom: var(--space-3);
    font-size: var(--text-2xl);
}

.step-content p {
    color: var(--text-muted);
    margin: 0;
}

@media (max-width: 768px) {
    .step {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .step:nth-child(even) {
        direction: ltr;
    }

    .step-illustration {
        order: 0;
    }

    .step-illustration img {
        max-width: 150px;
    }
}

/* --------------------------------------------------------------------------
   Services Section
   -------------------------------------------------------------------------- */
.services {
    background: var(--cream-dark);
    padding: var(--space-32) 0;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-8);
    max-width: 900px;
    margin: 0 auto;
}

.service-item {
    background: var(--cream);
    padding: var(--space-8);
    border-radius: var(--radius-lg);
    border: 1px solid var(--cream-darker);
}

.service-item h3 {
    margin-bottom: var(--space-3);
    font-size: var(--text-xl);
}

.service-item p {
    color: var(--text-muted);
    margin: 0;
    font-size: var(--text-base);
}

@media (max-width: 600px) {
    .services-grid {
        grid-template-columns: 1fr;
    }
}

/* --------------------------------------------------------------------------
   Results / Stats
   -------------------------------------------------------------------------- */
.results {
    padding: var(--space-32) 0;
    text-align: center;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-8);
    margin-top: var(--space-12);
}

.stat {
    padding: var(--space-6);
}

.stat-number {
    font-family: var(--font-headline);
    font-size: var(--text-5xl);
    font-weight: 700;
    color: var(--charcoal);
    line-height: 1;
    margin-bottom: var(--space-2);
}

.stat-label {
    font-size: var(--text-base);
    color: var(--text-muted);
}

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

/* --------------------------------------------------------------------------
   Testimonials
   -------------------------------------------------------------------------- */
.testimonials {
    background: var(--cream-dark);
    padding: var(--space-32) 0;
}

.testimonial-card {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.testimonial-quote {
    font-family: var(--font-headline);
    font-size: var(--text-3xl);
    font-style: italic;
    color: var(--charcoal);
    line-height: 1.4;
    margin-bottom: var(--space-8);
}

.testimonial-quote::before {
    content: '"';
    color: var(--gold);
}

.testimonial-quote::after {
    content: '"';
    color: var(--gold);
}

.testimonial-author {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-4);
}

.testimonial-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
}

.testimonial-info {
    text-align: left;
}

.testimonial-name {
    font-weight: 700;
    color: var(--charcoal);
}

.testimonial-title {
    font-size: var(--text-sm);
    color: var(--text-muted);
}

/* Testimonial Navigation */
.testimonial-nav {
    display: flex;
    justify-content: center;
    gap: var(--space-4);
    margin-top: var(--space-8);
}

.testimonial-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--cream-darker);
    border: none;
    cursor: pointer;
    transition: background 0.2s ease;
}

.testimonial-dot.active {
    background: var(--gold);
}

/* --------------------------------------------------------------------------
   CTA Section
   -------------------------------------------------------------------------- */
.cta-section {
    background: var(--charcoal);
    color: white;
    padding: var(--space-24) 0;
    text-align: center;
}

.cta-section h2 {
    color: white;
    margin-bottom: var(--space-4);
}

.cta-section p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: var(--space-8);
    font-size: var(--text-xl);
}

/* --------------------------------------------------------------------------
   Contact Section
   -------------------------------------------------------------------------- */
.contact {
    padding: var(--space-32) 0;
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-16);
    max-width: 1000px;
    margin: 0 auto;
    align-items: start;
}

.contact-text h2 {
    margin-bottom: var(--space-4);
}

.contact-text p {
    color: var(--text-muted);
    margin-bottom: var(--space-6);
}

.contact-features {
    list-style: none;
}

.contact-features li {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-3);
    color: var(--text-muted);
}

.contact-features li::before {
    content: "✓";
    color: var(--green);
    font-weight: bold;
}

.contact-form {
    background: var(--cream-dark);
    padding: var(--space-8);
    border-radius: var(--radius-lg);
}

.form-group {
    margin-bottom: var(--space-4);
}

.form-label {
    display: block;
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--charcoal);
    margin-bottom: var(--space-2);
}

.form-input {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    font-size: var(--text-base);
    font-family: var(--font-body);
    border: 1px solid var(--cream-darker);
    border-radius: var(--radius-md);
    background: var(--cream);
    transition: border-color 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--gold);
}

@media (max-width: 768px) {
    .contact-wrapper {
        grid-template-columns: 1fr;
    }
}

/* --------------------------------------------------------------------------
   About Us / Team Section
   -------------------------------------------------------------------------- */
.about {
    padding: var(--space-32) 0;
    background: var(--cream);
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-8);
    max-width: 1000px;
    margin: 0 auto;
}

.team-member {
    text-align: center;
    padding: var(--space-6);
}

.team-photo {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center calc(50% - 20px);
    margin-bottom: var(--space-4);
    border: 4px solid var(--cream-dark);
    box-shadow: var(--shadow-md);
}

.team-member h3 {
    font-size: var(--text-xl);
    margin-bottom: var(--space-1);
}

.team-role {
    font-size: var(--text-base);
    color: var(--gold);
    font-weight: 600;
    margin-bottom: var(--space-3);
}

.team-bio {
    font-size: var(--text-base);
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
}

@media (max-width: 768px) {
    .team-grid {
        grid-template-columns: 1fr;
        gap: var(--space-12);
    }

    .team-photo {
        width: 180px;
        height: 180px;
    }
}

/* --------------------------------------------------------------------------
   FAQ Section
   -------------------------------------------------------------------------- */
.faq {
    padding: var(--space-32) 0;
    background: var(--cream-dark);
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--cream);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-4);
    overflow: hidden;
    border: 1px solid var(--cream-darker);
}

.faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-6);
    font-family: var(--font-body);
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--charcoal);
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    transition: background 0.2s ease;
}

.faq-question:hover {
    background: var(--cream-dark);
}

.faq-icon {
    font-size: var(--text-2xl);
    font-weight: 400;
    color: var(--gold);
    transition: transform 0.3s ease;
}

.faq-item.open .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.open .faq-answer {
    max-height: 500px;
}

.faq-answer p {
    padding: 0 var(--space-6) var(--space-6);
    color: var(--text-muted);
    line-height: 1.7;
    margin: 0;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.footer {
    background: var(--cream-dark);
    border-top: 1px solid var(--cream-darker);
    padding: var(--space-12) 0;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: var(--container-wide);
    margin: 0 auto;
    padding: 0 var(--space-6);
}

.footer-logo {
    font-family: var(--font-headline);
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--charcoal);
    text-decoration: none;
}

.footer-links {
    display: flex;
    gap: var(--space-6);
}

.footer-link {
    font-size: var(--text-sm);
    color: var(--text-muted);
    text-decoration: none;
}

.footer-link:hover {
    color: var(--charcoal);
}

.footer-copy {
    font-size: var(--text-sm);
    color: var(--text-light);
}

@media (max-width: 768px) {
    .footer-inner {
        flex-direction: column;
        gap: var(--space-4);
        text-align: center;
    }

    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* --------------------------------------------------------------------------
   Animations
   -------------------------------------------------------------------------- */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-in {
    animation: fadeIn 0.6s ease forwards;
}

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

/* --------------------------------------------------------------------------
   Scroll Expansion Hero Styles
   -------------------------------------------------------------------------- */
.scroll-expand-container {
    height: 300vh;
    /* Allow sufficient scroll distance */
    position: relative;
    background-color: var(--cream);
}

.scroll-expand-sticky {
    position: sticky;
    top: 0;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Background Image Layer */
.scroll-expand-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 1;
    /* Starts hidden, fades in or out */
    transition: opacity 0.1s linear;
}

.scroll-expand-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.scroll-expand-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    /* Darkens background for text visibility */
    z-index: 1;
}

/* Expanding Media Card Layer */
.expand-media-wrapper {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
    /* Allow clicks to pass through if needed */
}

.expand-media-card {
    position: relative;
    width: 300px;
    /* Initial start width */
    height: 400px;
    /* Initial start height */
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: 0px 0px 50px rgba(0, 0, 0, 0.3);
    /* Transition is handled by JS for scroll sync, but we want smooth color/shadow */
    transition: box-shadow 0.3s ease;
}

.expand-media-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.expand-media-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    opacity: 0.7;
    /* Fades out as expanding */
    transition: opacity 0.1s linear;
}

/* Text Content Layer */
.expand-text-content {
    position: relative;
    z-index: 20;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    padding: var(--space-4);
    pointer-events: auto;
    /* Enable buttons */
}

/* Mix blend mode for text over images */
/* Mix blend mode for text over images */
.mix-blend-text {
    color: white;
    mix-blend-mode: difference;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.hero-eyebrow {
    background: var(--charcoal);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* When expanded, maintain visibility */
.immersive-mode .mix-blend-text,
.immersive-mode .hero-eyebrow,
.immersive-mode .hero-signature strong {
    color: white;
    /* difference mode handles contrast */
}

.immersive-mode .hero-signature {
    color: rgba(255, 255, 255, 0.8);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .expand-media-card {
        width: 250px;
        height: 350px;
    }
}

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