/* ===========================================================
   THEME TOKENS
   -----------------------------------------------------------
   All color, spacing, and image variables live here.
   - Per-theme background images for slides
   - Per-theme side vignettes used by slides (white in Scholar, black in Forge)
   =========================================================== */

:root {
    --contact-hero-image: none;
    --contact-hero-overlay: none;
    --radius: 20px;
    --gutter: 28px;
    --maxw: 1200px;
}

    :root[data-theme="scholar"] {
        --bg: #f9f6f3;
        --paper: #ffffff;
        --tint: #f6f0ff; /* soft lavender */
        --ink: #273040;
        --muted: #6a7586;
        --brand: #3a80ff; /* sky blue */
        --brand-2: #b68cff; /* soft purple */
        --accent: #5ab99b; /* success */
        --ember: #f5c078; /* warm highlight */
        --border: #e7e1dc;
        --shadow: 0 14px 40px rgba(22,16,9,.08);
        --ctaText: #fff;
        --contact-hero-image: url('images/ContactBackground_L.png');
        --contact-hero-overlay: linear-gradient(180deg, rgba(249,246,243,.92) 0%, rgba(249,246,243,0) 35%, rgba(249,246,243,.9) 100%);
        --landing-how-bg: url('/images/StudyingTogether_L.png');
        --landing-hard-bg: url('/images/Tired_L.png');
        --landing-beta-bg: url('/images/BetaTestBackground_L.png');
        /* Side-fade presets: fade TOWARD content side (to white) */
        --vignette-left: linear-gradient(90deg, rgba(249,246,243,.95) 0%, rgba(249,246,243,.88) 26%, rgba(249,246,243,0) 60%);
        --vignette-right: linear-gradient(270deg, rgba(249,246,243,.95) 0%, rgba(249,246,243,.88) 26%, rgba(249,246,243,0) 60%);
    }

    :root[data-theme="forge"] {
        --bg: #0e0f12;
        --paper: #14161b;
        --tint: #1b1e25;
        --ink: #eef2f8;
        --muted: #b9c0d4;
        --brand: #ff6b6b; /* ember red */
        --brand-2: #ff9f45; /* orange */
        --accent: #81c784; /* success */
        --ember: #ffd08c;
        --border: #222736;
        --shadow: 0 18px 46px rgba(0,0,0,.35);
        --ctaText: #000;
        --contact-hero-image: url('images/ContactBackground_D.png');
        --contact-hero-overlay: linear-gradient(180deg, rgba(8,7,12,.82) 0%, rgba(8,7,12,.76) 42%, rgba(12,10,16,.72) 100%);
        --landing-how-bg: url('/images/StudyingTogether_D.png');
        --landing-hard-bg: url('/images/Tired_D.png');
        --landing-beta-bg: url('/images/BetaTestBackground_D.png');
        /* Side-fade presets: fade TOWARD content side (to black) */
        --vignette-left: linear-gradient(90deg, rgba(8,7,12,.86) 0%, rgba(8,7,12,.76) 30%, rgba(8,7,12,0) 64%);
        --vignette-right: linear-gradient(270deg, rgba(8,7,12,.86) 0%, rgba(8,7,12,.76) 30%, rgba(8,7,12,0) 64%);
    }

/* ===========================================================
   BASE
   =========================================================== */

* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
    overflow: hidden; /* landing uses internal scroll logic */
}
/* Landing page: keep the stage fixed; footer is outside shell */
body.landing-body { overflow: hidden; }           /* lock document while on landing */
body.landing-body .window { overflow: hidden; }   /* you already have this */

/* stage owns scrolling */

body {
    background: radial-gradient(1100px 600px at 6% -10%, #ffe9db, transparent 55%), linear-gradient(180deg, var(--bg), var(--bg) 85%);
    color: var(--ink);
    font: 17px/1.7 ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,"Helvetica Neue",Arial;
    letter-spacing: .1px;
}

a {
    color: var(--brand);
    text-decoration: none;
}

    a:hover {
        opacity: .92;
    }

.container {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

/* ===========================================================
   APP SHELL (header / window / footer)
   - Footer row uses 'auto' so the new multi-row footer can grow
   =========================================================== */

:root {
    --headH: clamp(60px, 10vh, 92px);
}

.shell {
    position: relative;
    height: 100vh;
    display: grid;
    grid-template-rows: var(--headH) 1fr; /* header + full-height window */
}

.site-header {
    grid-row: 1;
    position: relative;
    z-index: 1000;
}

.site-footer {
    grid-row: 3;
}
/* not in grid anymore */

.window {
    position: relative;
    overflow: hidden; /* lock scroll inside landing track */
    height: 100%;
    min-height: 0;
}

body.landing-body .window {
    overflow: hidden;
}

/* ===========================================================
   NAVIGATION (header contents)
   =========================================================== */

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: .8rem;
    font-weight: 900;
    letter-spacing: .3px;
}

.mark {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    box-shadow: var(--shadow);
}

    .mark img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        padding: 4px;
        border-radius: inherit;
        display: block;
    }

.links {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

/* Mode switch */
.mode-switch {
    display: inline-flex;
    gap: 0;
    border: 1px solid var(--border);
    background: color-mix(in oklab, var(--paper) 80%, var(--tint));
    border-radius: 12px;
    padding: 2px;
    box-shadow: var(--shadow);
}

    .mode-switch button {
        all: unset;
        cursor: pointer;
        display: grid;
        place-items: center;
        width: 36px;
        height: 36px;
        border-radius: 10px;
        font-weight: 700;
        font-size: 1.05rem;
        line-height: 1;
        color: var(--ink);
    }

        .mode-switch button .icon {
            display: block;
        }

        :root[data-theme="scholar"] #mode-scholar,
        .mode-switch button.active[data-mode="scholar"] {
            background: linear-gradient(180deg,#3a80ff,#6b8bff);
            color: #fff;
            -webkit-text-stroke: .6px rgba(0,0,0,.55);
        }

        :root[data-theme="forge"] #mode-forge,
        .mode-switch button.active[data-mode="forge"] {
            background: linear-gradient(180deg,#ff6b6b,#ff9f45);
            color: #140a00;
            -webkit-text-stroke: .4px rgba(0,0,0,.35);
        }

.login-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 1rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    font-weight: 700;
    color: var(--ink);
    text-decoration: none;
    background: color-mix(in oklab, var(--paper) 88%, var(--tint));
    box-shadow: var(--shadow);
}

    .login-link:hover,
    .login-link:focus-visible {
        border-color: color-mix(in oklab, var(--brand) 40%, var(--border));
        color: var(--brand);
    }

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ===========================================================
   COMPONENTS (buttons, cards, type, small grids)
   =========================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 1.2rem;
    border-radius: 14px;
    border: 1px solid var(--border);
    font-weight: 800;
}

    .btn.primary {
        background: linear-gradient(180deg, var(--brand), var(--brand-2));
        border: 1px solid color-mix(in oklab, var(--brand) 65%, var(--brand-2));
        color: var(--ctaText);
    }

    .btn.ghost {
        background: transparent;
    }

    .btn.disabled {
        display: inline-block;
        background: #d3d3d3;
        color: #666;
        border: 1px solid #bbb;
        border-radius: 12px;
        padding: .9rem 1.1rem;
        font-weight: 800;
        cursor: not-allowed;
        pointer-events: none;
    }

.hero-card, .card {
    background: linear-gradient(180deg, var(--paper), var(--tint));
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
}

h1 {
    font-size: clamp(2.4rem,4.6vw,3.6rem);
    line-height: 1.08;
    margin: 0 0 22px;
}

h2 {
    font-size: clamp(1.8rem,3vw,2.4rem);
    margin: 0 0 14px;
}

.lead {
    color: var(--muted);
    font-size: 1.2rem;
    max-width: 64ch;
}

.hero-bullets {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 12px;
}

    .hero-bullets li {
        display: flex;
        gap: .75rem;
        align-items: flex-start;
        color: var(--muted);
        font-weight: 600;
    }

        .hero-bullets li::before {
            content: "";
            width: 10px;
            height: 10px;
            margin-top: .5rem;
            border-radius: 50%;
            background: linear-gradient(135deg, var(--brand), var(--brand-2));
            flex: 0 0 10px;
            box-shadow: 0 0 0 3px color-mix(in oklab, var(--paper) 80%, var(--tint));
        }

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 28px;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

/* ===========================================================
   CAROUSEL CORE  (inside .window)
   =========================================================== */

.window > .v-stack {
    position: absolute;
    inset: 0; /* top/right/bottom/left: 0 */
    overflow: hidden; /* no scrollbar on page */
}
.window > .v-stage {
    position: absolute;
    inset: 0; /* top/right/bottom/left = 0 */
    overflow: hidden; /* clip the track inside the window */
}

.v-track {
    position: absolute;
    inset: 0;
    transition: transform 600ms cubic-bezier(.2,.65,.2,1);
    will-change: transform;
    z-index: 0;
}

.v-slide {
    position: relative;
    height: 100%;
    isolation: isolate;
    overflow: hidden;
}

    .v-slide::before {
        content: "";
        position: absolute;
        inset: 0;
        z-index: -2;
        background-image: var(--slide-bg, none);
        background-size: cover;
        background-repeat: no-repeat;
        background-position: center;
        transform: scale(1.04);
        filter: saturate(1.05) contrast(1.08) brightness(.92);
        transition: transform 600ms cubic-bezier(.2,.65,.2,1), filter 600ms cubic-bezier(.2,.65,.2,1);
    }

    /* Vignette is fully configurable via --slide-vignette (per-slide) */
    .v-slide::after {
        content: "";
        position: absolute;
        inset: 0;
        z-index: -1;
        pointer-events: none;
        background: var(--slide-vignette, radial-gradient(120% 100% at 50% 40%, rgba(0,0,0,.22), rgba(0,0,0,0) 60%), linear-gradient(to bottom, rgba(0,0,0,0) 70%, rgba(0,0,0,.55)) );
    }

    .v-slide + .v-slide {
        box-shadow: 0 -1px 0 rgba(255,255,255,.06) inset;
    }

.v-dots {
    position: fixed;
    right: clamp(12px,3vw,28px);
    top: 50%;
    transform: translateY(-50%);
    display: grid;
    gap: 10px;
    z-index: 950;
}

.v-dot {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,.55);
    background: rgba(255,255,255,.32);
    cursor: pointer;
    transition: transform .2s ease, background .2s ease;
}

    .v-dot[aria-current="true"] {
        background: #fff;
        transform: scale(1.2);
    }

@media (prefers-reduced-motion: reduce) {
    .v-track {
        transition: none;
    }
}

/* ===========================================================
   HERO (first slide)
   =========================================================== */

.hero {
    display: grid;
    gap: 36px;
    grid-template-columns: 1.1fr 1fr;
    align-items: center;
}

@media(max-width:980px) {
    .hero {
        grid-template-columns: 1fr;
    }
}

.hero-carousel {
    position: relative;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
    background: var(--tint);
    box-shadow: var(--shadow);
}

.hero-frame {
    display: none;
    min-height: 420px;
    background: #0f121a center/cover no-repeat;
}

    .hero-frame.active {
        display: block;
    }

.hero-dots {
    display: flex;
    gap: .6rem;
    justify-content: center;
    padding: .8rem;
}

.hero-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: color-mix(in oklab, var(--border) 65%, var(--paper));
    border: 1px solid var(--border);
}

    .hero-dot.active {
        background: var(--brand);
    }

/* ===========================================================
   CONTACT PAGE SECTION
   =========================================================== */

#contact {
    padding: clamp(56px, 8vw, 108px) 0 clamp(72px, 9vw, 120px);
}

.contact-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background: color-mix(in oklab, var(--paper) 82%, var(--tint));
}

    .contact-hero::before {
        content: "";
        position: absolute;
        inset: 0;
        z-index: 0;
        pointer-events: none;
        background-image: var(--contact-hero-overlay), var(--contact-hero-image);
        background-size: cover, cover;
        background-position: center, center;
        background-repeat: no-repeat;
        transform: scale(1.02);
        filter: saturate(1.02);
    }

.contact-hero-content {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    padding: 0 var(--gutter);
}

/* Cap the card height relative to the viewport and footer,
   and allow the form content inside to scroll if needed. */
.contact-card {
    max-width: 880px;
    max-height: 74vh; /* fits above the footer on most laptops */
    overflow: auto; /* internal scroll if inputs exceed the cap */
}



@media (min-width: 720px) {
    .contact-form-main {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 2rem;
    }
}
/* Contact base grid structure (required even when media queries change gaps/columns) */
.contact-form {
    display: grid;
    gap: 1.8rem;
}

.contact-form-main {
    display: grid;
    gap: 1.5rem;
}

.contact-column {
    display: grid;
    gap: 1.2rem;
}

.contact-field {
    display: grid;
    gap: 0.4rem;
}
    /* label above control */
    .contact-field input,
    .contact-field textarea {
        width: 100%;
    }
/* stretch controls */

@media (max-height: 820px) {
    .contact-card {
        max-height: unset;
    }

    .contact-field input, .contact-field textarea {
        padding: .6rem .85rem;
    }

    .contact-field textarea {
        min-height: 80px;
    }

    .contact-form {
        gap: 1.1rem;
    }

    .contact-form-main {
        gap: .9rem;
    }

    .contact-field {
        gap: .35rem;
    }

    .contact-field textarea {
        min-height: 96px;
    }
    /* down from 130–160px */
}


/* Desktop shrink (to reveal more artwork) */
@media (min-width: 1024px) {
    .contact-card {
        width: min(100%, 660px);
        padding: 20px;
        gap: 1.2rem;
    }

    .contact-form {
        gap: 1.2rem;
    }

    .contact-form-main {
        gap: 1rem;
    }

    .contact-field {
        gap: 0.35rem;
    }

    .contact-field input, .contact-field textarea {
        padding: 0.7rem 0.9rem;
    }

    .contact-field textarea {
        min-height: 130px;
    }

    .contact-submit .btn {
        min-width: 140px;
        padding: 0.85rem 1.1rem;
    }
}

/* ===========================================================
   SLIDE HELPERS & FEATURE LAYOUTS
   =========================================================== */

.v-center {
    height: 100%;
    display: grid;
    place-items: center;
    padding: 0 var(--gutter);
}

.v-top-right {
    height: 100%;
    display: grid;
    align-content: start;
    justify-items: end;
    padding: clamp(16px, 4vw, 48px);
}

.v-right-50 {
    height: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: var(--gutter);
    padding: 0 var(--gutter);
}

.v-left-50 {
    height: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: var(--gutter);
    padding: 0 var(--gutter);
}

.pills {
    display: flex;
    gap: .8rem;
    flex-wrap: wrap;
}

    .pills.vertical {
        flex-direction: column;
        align-items: stretch;
        gap: .6rem;
    }

.centered-stack {
    width: min(100%, 960px);
    display: grid;
    gap: 18px;
    text-align: center;
}

    .centered-stack .grid-3 {
        grid-template-columns: 1fr;
    }

    .centered-stack .card {
        text-align: left;
    }

/* Features (3-up then 2-up) */
.features-wrap {
    width: min(100%, 1100px);
    display: grid;
    gap: 24px;
    text-align: center;
    margin: 0 auto;
}

.features-row-3, .features-row-2 {
    display: grid;
    gap: 20px;
    justify-content: center;
}

.features-row-3 {
    grid-template-columns: repeat(3, minmax(260px, 1fr));
}

.features-row-2 {
    grid-template-columns: repeat(2, minmax(260px, 1fr));
}

#slide-features .v-center {
    padding-top: 0;
    padding-bottom: 0;
}

@media (max-width: 980px) {
    .features-row-3 {
        grid-template-columns: repeat(2, minmax(240px, 1fr));
    }

    .features-row-2 {
        grid-template-columns: minmax(240px, 1fr);
    }
}

@media (max-width: 600px) {
    .features-row-3, .features-row-2 {
        grid-template-columns: 1fr;
    }
}

/* Span helper for 2-col grids */
.grid-2 > .span-2 {
    grid-column: 1 / -1;
}

@media (max-width: 980px) {
    .grid-2 > .span-2 {
        grid-column: auto;
    }
}

/* Quarter layout (for Beta) */
.v-quarters {
    height: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: var(--gutter);
    padding: clamp(12px, 4vw, 36px);
}

.qr-top-left {
    grid-area: 1 / 1;
    align-self: start;
    justify-self: start;
}

.qr-top-right {
    grid-area: 1 / 2;
    align-self: start;
    justify-self: end;
}

.qr-bot-left {
    grid-area: 2 / 1;
    align-self: end;
    justify-self: start;
}

.qr-bot-right {
    grid-area: 2 / 2;
    align-self: end;
    justify-self: end;
}

.beta-card {
    width: min(100%, 560px);
}

@media (max-width: 720px) {
    .v-quarters {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
        padding: 16px;
    }

    .qr-top-right, .qr-top-left, .qr-bot-left, .qr-bot-right {
        grid-area: auto / auto;
        justify-self: center;
        align-self: start;
    }

    .beta-card {
        width: min(100%, 520px);
    }
}

/* ===========================================================
   SLIDE-SPECIFIC BACKGROUNDS & VIGNETTES
   =========================================================== */

/* No vignette where there’s no image */
#slide-hero, #slide-features {
    --slide-vignette: none;
}

/* Beta: has BG but no vignette */
#slide-beta {
    --slide-bg: var(--landing-beta-bg);
    --slide-vignette: none;
}

/* Hard: content on left ⇒ fade on left */
#slide-hard {
    --slide-bg: var(--landing-hard-bg);
    --slide-vignette: var(--vignette-left);
}
/* === FIX 2: add breathing room + consistent gaps on the "Hard" slide === */
#slide-hard .container.section {
    /* top/bottom padding responsive to height */
    padding-block: clamp(24px, 6vh, 64px);
}
#slide-hard h2 {
    margin-bottom: 8px;
}

#slide-hard p.muted {
    margin-bottom: 18px;
}

#slide-hard .grid-1 {
    gap: 18px;
}

/* How/Different: content on right ⇒ fade on right */
#slide-how {
    --slide-bg: var(--landing-how-bg);
    --slide-vignette: var(--vignette-right);
}

/* Pricing: no vignette */
#slide-pricing {
    --slide-vignette: none;
}

/* Defensive: if no BG provided, disable vignette by default */
.v-slide:not([style*="--slide-bg"]) {
    --slide-vignette: none;
}

/* ===========================================================
   UTILITIES
   =========================================================== */

.mt-1 {
    margin-top: 1rem;
}

.mt-8 {
    margin-top: 8px;
}

.mt-12 {
    margin-top: 12px;
}

.mb-075 {
    margin-bottom: .75rem;
}

.w-full {
    width: 100%;
}

.ml-auto {
    margin-left: auto;
}

/* ===========================================================
   FOOTER LAYOUT (new, grid-based, auto-sized row)
   =========================================================== */

.site-footer {
    background: color-mix(in oklab, var(--paper) 86%, var(--tint));
    border-top: 1px solid var(--border);
    color: var(--ink);
}

/* Top: brand (1fr) + three columns (1fr) */
.footer-top {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(24px, 4vw, 48px);
    padding: clamp(32px, 5vw, 64px) 0;
    align-items: start;
}

.footer-brand .brand {
    display: inline-flex;
    align-items: center;
    gap: .8rem;
    font-weight: 900;
    letter-spacing: .3px;
    margin-bottom: .4rem;
}

.footer-brand .mark {
    width: 44px;
    height: 44px;
    border-radius: 12px;
}

    .footer-brand .mark img {
        padding: 4px;
        border-radius: inherit;
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

.footer-cols {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(18px, 2.6vw, 32px);
}

.foot-h {
    margin: 0 0 10px;
    font-size: .95rem;
    letter-spacing: .6px;
    text-transform: uppercase;
    color: color-mix(in oklab, var(--muted) 40%, var(--ink));
}

.foot-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: .55rem;
}

    .foot-list a {
        color: var(--ink);
    }

        .foot-list a:hover {
            opacity: .9;
        }

/* Bottom copyright bar */
.footer-bottom {
    border-top: 1px solid var(--border);
    background: color-mix(in oklab, var(--paper) 92%, var(--tint));
    padding: 12px 0;
}

.foot-bottom-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 12px;
}

.foot-mini-brand {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    color: color-mix(in oklab, var(--muted) 65%, var(--ink));
    font-weight: 800;
}

.mark.small {
    width: 28px;
    height: 28px;
    border-radius: 8px;
}

    .mark.small img {
        padding: 3px;
        border-radius: inherit;
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

.foot-copy {
    text-align: center;
    color: color-mix(in oklab, var(--muted) 85%, var(--ink));
    font-size: .95rem;
}

/* Footer theming tweaks */
:root[data-theme="forge"] .site-footer {
    background: color-mix(in oklab, var(--paper) 75%, var(--tint));
}

:root[data-theme="forge"] .footer-bottom {
    background: color-mix(in oklab, var(--paper) 82%, var(--tint));
}

/* Footer responsive */
@media (max-width: 980px) {
    .footer-top {
        grid-template-columns: 1fr;
    }

    .footer-cols {
        grid-template-columns: repeat(2, minmax(0,1fr));
    }
}

@media (max-width: 640px) {
    .footer-cols {
        grid-template-columns: 1fr;
    }

    .foot-bottom-row {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 6px;
    }

    .foot-mini-brand {
        justify-content: center;
    }
}

/* ===========================================================
   RESPONSIVE TWEAKS (shared)
   =========================================================== */

@media (max-width:600px) {
    .container {
        padding: 0 18px;
    }

    .hero {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    h1 {
        font-size: clamp(1.8rem, 8vw, 2.4rem);
        margin-bottom: 18px;
    }

    .lead {
        font-size: 1rem;
        margin-bottom: 14px;
    }

    .hero-bullets {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .hero-card, .card {
        padding: 18px;
    }

    .btn-row, .pills {
        gap: .6rem;
    }

    .btn-row {
        flex-direction: column;
        align-items: stretch;
    }

        .btn-row .btn {
            width: 100%;
        }

    .hero-carousel {
        border-radius: 16px;
    }

    .hero-frame {
        min-height: auto;
        aspect-ratio: 16/9;
        background-size: cover;
        background-position: center;
    }

    .grid-2, .grid-3 {
        grid-template-columns: 1fr;
        gap: 18px;
    }
}

@media (max-width:360px) {
    h1 {
        font-size: clamp(1.6rem, 8.8vw, 2.2rem);
    }

    .lead {
        font-size: .95rem;
    }

    .btn {
        padding: .9rem 1rem;
        border-radius: 12px;
    }
}

/* Stack a slide/page into [ content grows | footer pinned bottom ] */
.v-stack {
    height: 100%;
    display: grid;
    grid-template-rows: 1fr auto;
}

/* Footer when used inside the window (i.e., not below the shell) */
.site-footer.inline {
    /* Background spans edge-to-edge even if nested in a centered container */
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

/* 4) Home (last slide): keep content centered in the first row of v-stack */
.v-stack > .v-center {
    height: 100%;
}

/* Contact row lives as row 1 inside .v-stack.
   Allow it to shrink and scroll instead of clipping under the footer. */
.v-stack > #contact.contact-hero {
    min-height: 0; /* critical: grid child may be shorter than content */
    overflow: auto;
    overscroll-behavior: contain; /* keep wheel/trackpad events contained */
    padding: clamp(24px, 6vh, 56px) 0;
}

/* Label + "Optional" badge styling (was removed during cleanup) */
.contact-field label {
    font-weight: 600;
    display: inline-flex; /* put the two spans on one line */
    align-items: baseline; /* baseline-align the badge with the text */
    gap: 0.5rem; /* <-- creates the space between Title and Optional */
}

.contact-field .optional {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}