/* ==========================================================================
   Crellina — main.css
   Single source of truth for the Crellina platform site.
   Phase 1 build, May 2026.

   Color tokens trace directly to working-notes/01-brand-voice-summary.md §6.
   Typography uses Old Standard TT (Canva's "Old Standard" equivalent) for
   the wordmark, Cormorant Garamond for h1/h2 display headings, and Inter
   for body — per the Visual Identity Brief.
   ========================================================================== */


/* --------------------------------------------------------------------------
   1. Web fonts
   -------------------------------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Old+Standard+TT:wght@400;700&family=Cormorant+Garamond:wght@500;600;700&family=Inter:wght@400;500;600;700&display=swap');


/* --------------------------------------------------------------------------
   2. Design tokens
   -------------------------------------------------------------------------- */
:root {
    /* Brand palette — exact hex from Visual Identity Brief */
    --crellina-purple: #6B46C1;
    --deep-navy:       #1B1B3A;
    --warm-gold:       #C6993E;
    --soft-cream:      #F5F0E8;
    --light-purple:    #8B6FD4;
    --lavender-mist:   #E8E0F0;
    --twilight-blue:   #2C2C54;
    --white:           #FFFFFF;

    /* Functional aliases */
    --bg-dark:         var(--deep-navy);
    --bg-dark-2:       var(--twilight-blue);
    --bg-light:        var(--soft-cream);
    --bg-elevated:     rgba(232, 224, 240, 0.04); /* very subtle elevation on dark */

    --text-on-dark:    var(--white);
    --text-on-dark-2:  rgba(255, 255, 255, 0.72);
    --text-on-light:   var(--deep-navy);
    --text-on-light-2: #5C5C72;

    --accent:          var(--warm-gold);
    --primary-action:  var(--crellina-purple);

    --border-on-dark:  rgba(232, 224, 240, 0.12);
    --border-on-light: rgba(27, 27, 58, 0.10);

    /* Typography */
    --font-wordmark:   'Old Standard TT', 'Times New Roman', serif;
    --font-display:    'Cormorant Garamond', 'Old Standard TT', Georgia, serif;
    --font-body:       'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    /* Spacing scale */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.5rem;
    --space-6: 2rem;
    --space-7: 3rem;
    --space-8: 4rem;
    --space-9: 6rem;

    /* Layout */
    --max-content-width: 1200px;
    --max-prose-width:    720px;
    --nav-height:        72px;

    /* Motion */
    --transition-base: 200ms ease-out;
}


/* --------------------------------------------------------------------------
   3. Reset & base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.65;
    color: var(--text-on-dark);
    background: var(--bg-dark);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

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

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-base);
}

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

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


/* --------------------------------------------------------------------------
   4. Typography
   -------------------------------------------------------------------------- */
h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.18;
    margin: 0 0 var(--space-4);
    letter-spacing: -0.005em;
}

h1 { font-size: clamp(2.25rem, 1.5rem + 3.5vw, 3.75rem); font-weight: 600; }
h2 { font-size: clamp(1.75rem, 1.25rem + 2vw, 2.75rem); }
h3 { font-size: 1.4rem; }
h4 { font-size: 1.15rem; }

.eyebrow {
    font-family: var(--font-body);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.78rem;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: var(--space-3);
}

.lede {
    font-size: 1.2rem;
    color: var(--text-on-dark-2);
    max-width: var(--max-prose-width);
}


/* --------------------------------------------------------------------------
   5. Wordmark
       Implemented in CSS so it's swap-ready: replace the .wordmark contents
       with a designer-finished SVG and the rest of the site is untouched.
   -------------------------------------------------------------------------- */
.wordmark {
    font-family: var(--font-wordmark);
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--text-on-dark);
    display: inline-flex;
    align-items: flex-start;
    line-height: 1;
    text-transform: uppercase;
    white-space: nowrap;
}

.wordmark .word {
    position: relative;
    /* Wordmark text is white on dark, navy on light */
}

/* Double-L gold accent — a subtle underline beneath the LL pair only.
   The L letters themselves remain in the primary wordmark color. */
.wordmark .ll {
    position: relative;
    display: inline-block;
}

.wordmark .ll::after {
    content: "";
    position: absolute;
    left: 4%;
    right: 4%;
    bottom: -0.12em;
    height: 0.06em;
    background: var(--warm-gold);
    border-radius: 999px;
}

/* ™ — superscript, ~30% of wordmark height, warm gold */
.wordmark .tm {
    font-size: 0.3em;
    color: var(--warm-gold);
    margin-left: 0.06em;
    margin-top: 0.15em;
    align-self: flex-start;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0;
}

/* On-light variant — used in light-themed sections */
.wordmark--on-light .word,
.wordmark--on-light {
    color: var(--text-on-light);
}


/* --------------------------------------------------------------------------
   6. Layout helpers
   -------------------------------------------------------------------------- */
.container {
    max-width: var(--max-content-width);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--space-5);
    padding-right: var(--space-5);
}

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

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

.section-head {
    text-align: center;
    margin-bottom: var(--space-7);
    max-width: var(--max-prose-width);
    margin-left: auto;
    margin-right: auto;
}

.section-head h2 { margin-bottom: var(--space-3); }


/* --------------------------------------------------------------------------
   7. Navigation
   -------------------------------------------------------------------------- */
nav.site-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(27, 27, 58, 0.92);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--border-on-dark);
}

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

.nav-content .wordmark {
    font-size: 1.5rem;
}

.nav-links {
    display: flex;
    gap: var(--space-6);
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
}

.nav-link {
    font-size: 0.95rem;
    color: var(--text-on-dark-2);
    font-weight: 500;
    transition: color var(--transition-base);
}

.nav-link:hover, .nav-link.is-active { color: var(--white); }

.nav-link.cta {
    background: var(--crellina-purple);
    color: var(--white);
    padding: 0.55rem 1.1rem;
    border-radius: 6px;
    font-weight: 600;
}

.nav-link.cta:hover { background: var(--light-purple); color: var(--white); }

/* Hamburger (mobile) */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.4rem;
    flex-direction: column;
    gap: 5px;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--white);
    transition: transform var(--transition-base), opacity var(--transition-base);
}


/* --------------------------------------------------------------------------
   8. Buttons
   -------------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1.5rem;
    border-radius: 8px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.98rem;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background var(--transition-base), border-color var(--transition-base), color var(--transition-base), transform var(--transition-base);
}

.btn-primary {
    background: var(--crellina-purple);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--light-purple);
    color: var(--white);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border-color: var(--border-on-dark);
}

.btn-secondary:hover {
    border-color: var(--warm-gold);
    color: var(--warm-gold);
}

/* App-store badges have their own background (App Store has black, Google Play
   has black). The wrapping anchor should be transparent and unpadded so the
   badge sits naked on the page — matching the original Epic site. */
.btn-store {
    background: transparent;
    padding: 0;
    border: none;
}

.btn-store:hover { background: transparent; }

.cta-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4);
    margin-top: var(--space-5);
}

/* App-icon callout — sits above the App Store / Google Play badges so visitors
   know what icon to look for in the stores. */
.store-callout {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-top: var(--space-5);
}
.store-callout--centered {
    justify-content: center;
}
.app-icon-thumb {
    width: 56px;
    height: 56px;
    border-radius: 14px;          /* approximates iOS squircle on small sizes */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
    flex-shrink: 0;
}
.store-callout-label {
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-secondary, rgba(255, 255, 255, 0.7));
    font-weight: 500;
}


/* --------------------------------------------------------------------------
   9. Hero
   -------------------------------------------------------------------------- */
.hero {
    padding-top: var(--space-9);
    padding-bottom: var(--space-9);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(107, 70, 193, 0.25) 0%, transparent 55%),
        radial-gradient(ellipse at 80% 60%, rgba(139, 111, 212, 0.18) 0%, transparent 55%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: var(--space-8);
    align-items: center;
    max-width: var(--max-content-width);
    margin: 0 auto;
    padding: 0 var(--space-5);
}

.hero-text .tagline {
    font-family: var(--font-display);
    font-style: italic;
    font-size: 1.35rem;
    color: var(--warm-gold);
    margin-bottom: var(--space-4);
    letter-spacing: 0.005em;
}

.hero-text .hero-description {
    color: var(--text-on-dark-2);
    font-size: 1.1rem;
    max-width: 560px;
}

.hero-image-container { display: flex; justify-content: center; }
.splash-image { max-width: 100%; border-radius: 18px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45); }


/* --------------------------------------------------------------------------
   9b. Featured hero — full-bleed image background with overlaid text
   Used on pages where we have a hero painting that should dominate.
   Applied as: <header class="hero hero--featured" style="background-image: url(...)">

   The image file is pre-mirrored on disk (see -mirrored.jpg variants) so
   subjects appear on the right of the page where text gradient doesn't
   cover them.
   -------------------------------------------------------------------------- */
.hero--featured {
    padding: 0;
    min-height: 580px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    background-size: cover;
    background-position: center top; /* anchor to top so head/focal point isn't cropped */
    background-repeat: no-repeat;
}

/* Override the default .hero radial-gradient overlay with a left-weighted
   linear gradient that darkens the headline area. */
.hero--featured::before {
    background: linear-gradient(
        to right,
        rgba(15, 15, 30, 0.92) 0%,
        rgba(15, 15, 30, 0.78) 30%,
        rgba(15, 15, 30, 0.40) 55%,
        rgba(15, 15, 30, 0.05) 85%,
        rgba(15, 15, 30, 0.00) 100%
    );
}

.hero--featured .hero-content {
    grid-template-columns: 1fr;
    max-width: var(--max-content-width);
    padding: var(--space-9) var(--space-5);
    width: 100%;
}

.hero--featured .hero-text {
    max-width: 580px;
}

/* Hide the inline <img> when using the background-image approach */
.hero--featured .hero-image-container { display: none; }

@media (max-width: 820px) {
    .hero--featured {
        min-height: 500px;
    }
    /* On mobile, swap to top-to-bottom gradient for stacked layout */
    .hero--featured::before {
        background: linear-gradient(
            to bottom,
            rgba(15, 15, 30, 0.92) 0%,
            rgba(15, 15, 30, 0.78) 50%,
            rgba(15, 15, 30, 0.55) 100%
        );
    }
}


/* --------------------------------------------------------------------------
   10. Cards (shared)
   -------------------------------------------------------------------------- */
.card {
    background: var(--bg-elevated);
    border: 1px solid var(--border-on-dark);
    border-radius: 14px;
    padding: var(--space-5);
    transition: border-color var(--transition-base), transform var(--transition-base);
}

.card:hover { border-color: rgba(198, 153, 62, 0.4); }


/* --------------------------------------------------------------------------
   11. Two-products section (homepage)
   -------------------------------------------------------------------------- */
.products {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-6);
}

.product-card {
    padding: var(--space-7);
    background: linear-gradient(180deg, rgba(107, 70, 193, 0.08) 0%, rgba(27, 27, 58, 0.0) 100%);
    border: 1px solid var(--border-on-dark);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.product-card h3 {
    font-family: var(--font-display);
    font-size: 1.85rem;
    color: var(--warm-gold);
    margin-bottom: var(--space-2);
    letter-spacing: 0.01em;
}

.product-card .product-status {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--accent);
    font-weight: 600;
}

.product-card .product-link {
    margin-top: auto;
    font-weight: 600;
    color: var(--light-purple);
}

.product-card .product-link::after {
    content: " →";
    color: var(--accent);
}

.product-bridge {
    margin-top: var(--space-6);
    padding: var(--space-5) var(--space-6);
    border-left: 2px solid var(--warm-gold);
    background: rgba(198, 153, 62, 0.04);
    border-radius: 0 10px 10px 0;
    font-style: italic;
    color: var(--text-on-dark-2);
}


/* --------------------------------------------------------------------------
   12. Genre grid (responsive flow — solves the 13-tile problem)
   -------------------------------------------------------------------------- */
.genre-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--space-4);
}

.genre-card {
    position: relative;
    aspect-ratio: 4 / 3;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-on-dark);
    background: var(--bg-dark-2);
}

.genre-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 400ms ease-out;
}

.genre-card:hover img { transform: scale(1.05); }

.genre-card .genre-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(27, 27, 58, 0) 35%, rgba(27, 27, 58, 0.85) 100%);
    display: flex;
    align-items: flex-end;
    padding: var(--space-4);
}

.genre-card h3.genre-name {
    font-family: var(--font-display);
    color: var(--white);
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.genre-card.is-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(107, 70, 193, 0.25), rgba(43, 43, 84, 0.6));
    color: var(--text-on-dark-2);
    font-family: var(--font-display);
    font-style: italic;
    font-size: 1.2rem;
    padding: var(--space-4);
    text-align: center;
}


/* --------------------------------------------------------------------------
   13. Character cards
   -------------------------------------------------------------------------- */
.characters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-5);
}

.character-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border-on-dark);
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.character-image {
    width: 100%;
    height: 300px;
    object-fit: contain;
    background: rgba(232, 224, 240, 0.03);
}
@media (max-width: 520px) {
    .character-image { height: 260px; }
}

.character-card > .character-body {
    padding: var(--space-5);
}

.character-name {
    font-family: var(--font-display);
    color: var(--warm-gold);
    margin: 0 0 var(--space-1);
    font-size: 1.35rem;
    letter-spacing: 0.01em;
}

.character-title {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--light-purple);
    margin-bottom: var(--space-3);
    font-weight: 600;
}

.character-intro {
    color: var(--text-on-dark-2);
    font-size: 0.97rem;
    margin-bottom: var(--space-4);
}

.character-attributes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2);
    font-size: 0.85rem;
    color: var(--text-on-dark-2);
}

.character-attributes strong { color: var(--white); font-weight: 600; }


/* --------------------------------------------------------------------------
   14. Feature cards
   -------------------------------------------------------------------------- */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--space-5);
}

.feature-card {
    padding: var(--space-5);
    border-radius: 12px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-on-dark);
}

.feature-card .feature-title {
    font-family: var(--font-display);
    font-size: 1.3rem;
    color: var(--warm-gold);
    margin-bottom: var(--space-3);
    letter-spacing: 0.01em;
}

.feature-card p { color: var(--text-on-dark-2); margin-bottom: 0; }


/* --------------------------------------------------------------------------
   15. Personas (use cases)
   -------------------------------------------------------------------------- */
.personas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--space-5);
}

.persona-card {
    text-align: center;
    padding: var(--space-5);
    border-radius: 12px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-on-dark);
}

.persona-image {
    width: 100%;
    height: 250px;
    object-fit: contain;
    background: rgba(232, 224, 240, 0.03);
    border-radius: 10px;
    margin: 0 auto var(--space-4);
}

.persona-name {
    font-family: var(--font-display);
    font-size: 1.3rem;
    color: var(--warm-gold);
    margin-bottom: var(--space-1);
    letter-spacing: 0.01em;
}

.persona-role {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--light-purple);
    font-weight: 600;
    margin-bottom: var(--space-3);
}

.persona-body { color: var(--text-on-dark-2); font-size: 0.97rem; }

.persona-quote {
    margin-top: var(--space-4);
    padding: var(--space-3) var(--space-4);
    border-left: 2px solid var(--warm-gold);
    background: rgba(198, 153, 62, 0.05);
    border-radius: 0 8px 8px 0;
    font-family: var(--font-display);
    font-style: italic;
    color: var(--white);
    font-size: 1rem;
    line-height: 1.55;
}

.persona-card { text-align: left; }
.persona-card .persona-name { text-align: left; }


/* --------------------------------------------------------------------------
   16. Pricing
   -------------------------------------------------------------------------- */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--space-5);
}

.pricing-card {
    padding: var(--space-6) var(--space-5);
    border-radius: 14px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-on-dark);
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.pricing-card.is-featured {
    border-color: rgba(198, 153, 62, 0.55);
    background: linear-gradient(180deg, rgba(198, 153, 62, 0.06), rgba(27, 27, 58, 0));
}

.pricing-tier-name {
    font-family: var(--font-display);
    font-size: 1.45rem;
    color: var(--warm-gold);
    margin: 0;
    letter-spacing: 0.01em;
}

.pricing-price {
    font-family: var(--font-display);
    font-size: 2rem;
    color: var(--white);
}

.pricing-price .pricing-cadence {
    font-size: 0.85rem;
    color: var(--text-on-dark-2);
    font-family: var(--font-body);
}

.pricing-list {
    margin: 0;
    padding-left: 1.2rem;
    color: var(--text-on-dark-2);
    font-size: 0.95rem;
}

.pricing-list li { margin-bottom: var(--space-2); }


/* --------------------------------------------------------------------------
   17. "What sets us apart" — counter-positioning panel
   -------------------------------------------------------------------------- */
.contrast-panel {
    background: var(--soft-cream);
    color: var(--text-on-light);
    border-radius: 18px;
    padding: var(--space-8) var(--space-7);
}

.contrast-panel h2 { color: var(--deep-navy); }

.contrast-panel .contrast-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-6);
    margin-top: var(--space-5);
}

.contrast-panel .contrast-col h3 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    color: var(--deep-navy);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    margin-bottom: var(--space-3);
}

.contrast-panel .contrast-col h3.is-cool { color: var(--text-on-light-2); }

.contrast-panel ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
    color: var(--text-on-light-2);
}

.contrast-panel ul li {
    padding: var(--space-2) 0;
    border-bottom: 1px solid var(--border-on-light);
}


/* --------------------------------------------------------------------------
   18. Social / community
   -------------------------------------------------------------------------- */
.social-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--space-4);
    margin-top: var(--space-5);
}

.social-tile {
    padding: var(--space-4);
    text-align: center;
    border: 1px solid var(--border-on-dark);
    border-radius: 10px;
    font-weight: 500;
    transition: border-color var(--transition-base), background var(--transition-base);
}

.social-tile:hover {
    border-color: var(--warm-gold);
    background: rgba(198, 153, 62, 0.06);
}

/* Disabled / pending tile (e.g. Instagram pending platform approval). Visually
   muted, no hover, no pointer cursor. */
.social-tile--pending {
    opacity: 0.55;
    cursor: default;
}
.social-tile--pending:hover {
    border-color: var(--border-on-dark);
    background: transparent;
}
.social-tile--pending small {
    display: block;
    font-size: 0.78rem;
    font-weight: 400;
    margin-top: 0.15rem;
    color: var(--text-on-dark-2);
}


/* --------------------------------------------------------------------------
   19. Footer
   -------------------------------------------------------------------------- */
footer.site-footer {
    background: #15152C;
    border-top: 1px solid var(--border-on-dark);
    padding: var(--space-8) 0 var(--space-6);
    color: var(--text-on-dark-2);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: var(--space-6);
    margin-bottom: var(--space-6);
}

.footer-grid h4 {
    font-family: var(--font-body);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--white);
    margin-bottom: var(--space-3);
}

.footer-grid ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-grid li { padding: var(--space-1) 0; font-size: 0.92rem; }

.footer-legal {
    border-top: 1px solid var(--border-on-dark);
    padding-top: var(--space-5);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: var(--space-3);
    font-size: 0.82rem;
}

.footer-grid .footer-blurb {
    font-size: 0.92rem;
    max-width: 320px;
    margin-top: var(--space-3);
}


/* --------------------------------------------------------------------------
   20. Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 820px) {
    /* Tighten section padding on mobile so vertical rhythm doesn't dominate */
    section { padding: var(--space-8) 0; }

    .hero-content { grid-template-columns: 1fr; text-align: center; }
    .hero-text .hero-description { margin-left: auto; margin-right: auto; }
    .cta-buttons { justify-content: center; }

    /* Hero text scales down for mobile readability */
    .hero-text .tagline { font-size: 1.15rem; }
    .hero-text .hero-description { font-size: 1rem; }

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

    /* Pricing grid stacks on mobile — detail cards need full width to read */
    .pricing-grid { grid-template-columns: 1fr; }

    /* Image height reductions to reduce vertical scroll on mobile */
    .character-image { height: 260px; }

    /* Card padding tighter on mobile */
    .pricing-card { padding: var(--space-5) var(--space-4); }

    /* Store-callout centres and wraps neatly on narrower screens */
    .store-callout { justify-content: center; flex-wrap: wrap; text-align: center; }

    .nav-links {
        display: none;
        position: absolute;
        top: var(--nav-height);
        left: 0;
        right: 0;
        flex-direction: column;
        background: var(--deep-navy);
        padding: var(--space-5);
        gap: var(--space-4);
        border-bottom: 1px solid var(--border-on-dark);
    }
    .nav-links.is-open { display: flex; }
    .hamburger { display: flex; }
}

@media (max-width: 520px) {
    section { padding: var(--space-7) 0; }
    .footer-grid { grid-template-columns: 1fr; }
    .character-attributes { grid-template-columns: 1fr; }

    /* CTA buttons stack full-width on narrow phones so they're easy to tap */
    .cta-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    .cta-buttons .btn,
    .cta-buttons .btn-store {
        width: 100%;
        justify-content: center;
    }

    /* Slightly smaller hero h1 for very narrow screens (clamp already handles
       most of the scaling, this just nudges the low end down a touch) */
    .hero-text h1 { font-size: 1.95rem; }

    /* App-store badges shrink so two fit side-by-side comfortably */
    .btn-store img { height: 36px; }

    /* App-icon thumb stays visible but smaller */
    .app-icon-thumb { width: 48px; height: 48px; border-radius: 12px; }

    .character-image { height: 240px; }
}
