/* =====================================================================
   CINEMATIC HOMEPAGE (/experience) — cinematic.css
   =====================================================================
   Apple/Samsung-style scroll experience: five full-screen scenic
   sections, big centered display type, and large translucent glass
   cards that are the star of the page. Loaded ONLY by
   templates/experience.html, and everything is scoped under
   .cinematic-home-page / .cinematic-home so it cannot leak into the
   rest of the site.

   Structure of this file:
     1. Page-level tokens + shell adjustments
     2. Shared section skeleton (backdrop, veil, content, type)
     3. Glass cards
     4. Buttons, scroll cue, outro
     5. Per-section scenery + tones (hero / work / story / future / together)
     6. Scroll-reveal + hero entrance animation
     7. Responsive: phones, tablets, and very large (4K) screens
     8. Reduced-motion fallback
   ===================================================================== */


/* -----------------------------------------------------------------
   1 · PAGE-LEVEL TOKENS + SHELL
   ----------------------------------------------------------------- */

.cinematic-home {
    /* One place to tune the whole page's look. */
    --cine-rail: min(92vw, 1760px);        /* content width — generous for 4K */
    --cine-radius: 28px;                   /* card corner radius (spec) */
    --cine-blur: 18px;                     /* card glass blur (spec) */
    --cine-curve: clamp(48px, 7vw, 130px); /* curved divider height */

    /* Ink = text color; each section overrides for its own scenery. */
    --cine-ink: #10213f;
    --cine-ink-soft: rgb(16 33 63 / 80%);
    --cine-accent: #0b63e5;

    /* Glass recipes (spec): light scenes get white glass, dark scenes
       get deep navy glass. Sections flip these via --dark modifier. */
    --cine-glass-bg: rgb(255 255 255 / 14%);
    --cine-glass-border: rgb(255 255 255 / 35%);
    --cine-glass-highlight: rgb(255 255 255 / 50%);
    --cine-glass-shadow: 0 26px 70px rgb(10 18 40 / 20%);

    font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
    color: var(--cine-ink);
    overflow-x: clip;
}

/* Pull the whole page up underneath the sticky site header so the
   aurora sky begins directly beneath it (JS measures the real header
   height into --cine-header-h; 81px is the desktop fallback). */
.cinematic-home-page .main-content {
    margin-top: calc(-1 * var(--cine-header-h, 81px));
    overflow: visible;
}

/* Dark page canvas so overscroll/rubber-banding never flashes white
   above the night-sky hero or below the sunset footer. */
body.cinematic-home-page {
    background: #060b18;
}

body.cinematic-home-page #chat-toggle {
    display: none !important;
}

body.cinematic-home-page .global-header {
    background: #f6f8fc;
    border-bottom-color: rgb(125 157 198 / 34%);
    box-shadow: 0 0.45rem 1.4rem rgb(10 27 54 / 10%);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}

body.cinematic-home-page .platform-nav__inner {
    width: 100%;
    min-height: 64px;
    gap: clamp(1.5rem, 2.8vw, 3.75rem);
}

body.cinematic-home-page .platform-brand__logo img {
    height: 2.2rem;
}

body.cinematic-home-page .platform-nav__links {
    justify-content: space-evenly;
    gap: clamp(1.15rem, 2.3vw, 3rem);
}

body.cinematic-home-page .platform-nav__links a {
    font-size: clamp(0.93rem, 0.85vw, 1.02rem);
}

body.cinematic-home-page .theme-menu__btn,
body.cinematic-home-page .sign-in-btn {
    min-height: 36px;
    border-radius: 12px;
}


/* -----------------------------------------------------------------
   2 · SECTION SKELETON
   Every major section is a full-viewport scene: an oversized photo
   layer (so parallax can drift it without showing edges), a gradient
   veil for text contrast, and centered content on top.
   ----------------------------------------------------------------- */

.cinematic-section {
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    min-height: 100svh;   /* stable full-screen on mobile browsers */
    display: flex;
    align-items: center;
    justify-content: center;
    /* Anchor jumps (Watch Overview, scroll cue) land just below the
       pinned site header instead of tucking the heading under it. */
    scroll-margin-top: calc(var(--cine-header-h, 81px) * 0.4);
}

/* Curtain backdrops (2026-07-10, Pete): each scene's photo is pinned to
   the viewport (position: fixed) and the SECTION acts as a window onto
   it via clip-path. Scrolling inside a chapter leaves the photo rock
   still — the text slides away while the scenery holds — and a new
   chapter wipes its own photo in at the boundary. Works on iOS too,
   unlike background-attachment: fixed. clip-path does not create a
   containing block, so the fixed layers stay viewport-anchored. */
.cinematic-section {
    clip-path: inset(0);
}

.cinematic-section .section-bg {
    position: fixed;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.cinematic-section .section-veil {
    position: fixed;
    inset: 0;
    pointer-events: none;
}

/* Full-bleed scene divider: keep each resting section square so the
   background fills all four viewport corners. */
.cinematic-section--curved {
    margin-top: 0;
    border-radius: 0;
    box-shadow: none;
}

.cinematic-section .section-content {
    position: relative;
    width: var(--cine-rail);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding-top: calc(var(--cine-curve) + clamp(56px, 8vh, 120px));
    padding-bottom: clamp(72px, 10vh, 150px);
}

/* Display type — the serif face the homepage already uses. */
.section-eyebrow {
    margin: 0 0 clamp(14px, 2.2vh, 26px);
    font-size: clamp(0.72rem, 0.85vw, 1.1rem);
    font-weight: 800;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--cine-accent);
}

/* style.css also styles .section-eyebrow (legacy hero pages) and its
   stone-theme rule carries higher specificity — if a visitor arrives
   with a Dark Slate theme saved, it would stamp a slate text-shadow on
   these. Match its specificity and switch it off for this page. */
body.cinematic-home-page[data-slate-photo="on"] .section-eyebrow {
    text-shadow: none;
}

.section-title {
    margin: 0;
    font-family: "Playfair Display", Georgia, serif;
    font-size: clamp(2.7rem, 5vw, 7.2rem);
    font-weight: 700;
    line-height: 1.02;
    letter-spacing: -0.015em;
    color: var(--cine-ink);
    text-wrap: balance;
}

.section-subtitle {
    margin: clamp(18px, 2.6vh, 30px) 0 0;
    max-width: clamp(560px, 46vw, 1020px);
    font-size: clamp(1.04rem, 1.25vw, 1.7rem);
    font-weight: 500;
    line-height: 1.65;
    color: var(--cine-ink-soft);
    text-wrap: balance;
}


/* -----------------------------------------------------------------
   3 · GLASS CARDS — the star of the page
   Wide, tall, centered content, frosted glass over the scenery.
   Four across on desktop, two on tablets, stacked on phones (see §7).
   ----------------------------------------------------------------- */

.glass-card-grid {
    width: 100%;
    margin-top: clamp(44px, 6.5vh, 92px);
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(16px, 1.5vw, 30px);
}

.glass-feature-card {
    min-height: clamp(290px, 36vh, 470px);
    padding: clamp(28px, 2.4vw, 54px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: clamp(12px, 1.6vh, 20px);
    text-align: center;

    border-radius: var(--cine-radius);
    background: var(--cine-glass-bg);
    border: 1px solid var(--cine-glass-border);
    box-shadow: var(--cine-glass-shadow),
                inset 0 1px 0 var(--cine-glass-highlight);
    -webkit-backdrop-filter: blur(var(--cine-blur)) saturate(1.35);
    backdrop-filter: blur(var(--cine-blur)) saturate(1.35);
    transition: transform 0.45s cubic-bezier(0.2, 0.6, 0.25, 1),
                box-shadow 0.45s cubic-bezier(0.2, 0.6, 0.25, 1);
}

.glass-feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 40px 90px rgb(10 18 40 / 28%),
                inset 0 1px 0 var(--cine-glass-highlight);
}

.glass-feature-card__icon {
    width: clamp(60px, 4.6vw, 92px);
    aspect-ratio: 1;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: color-mix(in srgb, var(--cine-accent) 16%, rgb(255 255 255 / 28%));
    border: 1px solid rgb(255 255 255 / 45%);
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 55%),
                0 12px 28px rgb(10 18 40 / 14%);
    margin-bottom: clamp(4px, 1vh, 10px);
}

.glass-feature-card__icon svg {
    width: 46%;
    height: 46%;
    fill: none;
    stroke: var(--cine-ink);
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.glass-feature-card__title {
    margin: 0;
    font-size: clamp(1.22rem, 1.5vw, 2rem);
    font-weight: 750;
    letter-spacing: -0.01em;
    color: var(--cine-ink);
}

.glass-feature-card__desc {
    margin: 0;
    max-width: 30ch;
    font-size: clamp(0.96rem, 1.05vw, 1.38rem);
    line-height: 1.55;
    color: var(--cine-ink-soft);
}


/* -----------------------------------------------------------------
   4 · BUTTONS, SCROLL CUE, OUTRO
   ----------------------------------------------------------------- */

.cinematic-hero__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: clamp(12px, 1.4vw, 22px);
    margin-top: clamp(28px, 4.4vh, 52px);
}

.cine-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: clamp(14px, 1.1vw, 21px) clamp(30px, 2.4vw, 48px);
    border-radius: 999px;
    font-size: clamp(0.98rem, 1vw, 1.32rem);
    font-weight: 700;
    letter-spacing: 0.01em;
    transition: transform 0.35s cubic-bezier(0.2, 0.6, 0.25, 1),
                box-shadow 0.35s, background-color 0.35s;
}

.cine-btn svg {
    width: 15px;
    height: 15px;
    fill: currentColor;
    stroke: none;
}

.cine-btn--primary {
    background: #ffffff;
    color: #0b1430;
    box-shadow: 0 18px 46px rgb(2 8 24 / 38%);
}

.cine-btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 26px 60px rgb(2 8 24 / 46%);
}

.cine-btn--ghost {
    color: #ffffff;
    background: rgb(255 255 255 / 10%);
    border: 1px solid rgb(255 255 255 / 48%);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.cine-btn--ghost:hover {
    transform: translateY(-2px);
    background: rgb(255 255 255 / 18%);
}

/* Bouncing chevron pinned to the bottom of the hero. The next scene's
   curved dome overlaps the hero's last --cine-curve pixels, so the cue
   floats above that line or it would be buried under the dome. */
.scroll-cue {
    position: absolute;
    left: 50%;
    bottom: calc(var(--cine-curve) + clamp(18px, 3vh, 42px));
    translate: -50% 0;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: rgb(255 255 255 / 10%);
    border: 1px solid rgb(255 255 255 / 38%);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    animation: cine-cue-bob 2.4s ease-in-out infinite;
}

.scroll-cue svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

@keyframes cine-cue-bob {
    50% { transform: translateY(7px); }
}

/* Closing call to action under the community cards. */
.cinematic-outro {
    margin-top: clamp(44px, 7vh, 90px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.cinematic-outro__note {
    margin: 0;
    font-size: clamp(0.85rem, 0.9vw, 1.15rem);
    color: rgb(255 255 255 / 66%);
}


/* -----------------------------------------------------------------
   5 · THE FIVE SCENES
   Each section picks its backdrop, veil gradient, ink + accent.
   Phone-size backdrops are swapped in at the end of §7.
   ----------------------------------------------------------------- */

/* — 1 · HERO: dark aurora over a still lake — */
.cinematic-hero {
    --cine-ink: #f2f7ff;
    --cine-ink-soft: rgb(232 240 255 / 84%);
    --cine-accent: #8ef0c8;
    min-height: calc(100vh + var(--cine-header-h, 81px) + 72px);
    min-height: calc(100svh + var(--cine-header-h, 81px) + 72px);
}

.cinematic-hero .section-bg {
    background-image: url("../images/cinematic/hero-aurora.jpg");
    /* No Ken Burns drift: the hero and the Connect scene share this
       photo, and the seam only disappears if both paint identical,
       motionless pixels. */
}

/* The hero and Connect share the aurora photo AND this veil — both
   layers are viewport-fixed, so scrolling across the two scenes shows
   zero change in the sky. Only the content slides. */
.cinematic-hero .section-veil,
.cinematic-section--connect .section-veil {
    background: linear-gradient(180deg,
        rgb(2 6 16 / 44%) 0%,
        rgb(2 6 16 / 14%) 30%,
        rgb(3 6 18 / 26%) 62%,
        rgb(3 8 18 / 56%) 100%);
}

.cinematic-hero .section-content {
    padding-top: calc(var(--cine-header-h, 81px) + clamp(40px, 6vh, 90px));
    /* Reserve the bottom of the hero for the scroll cue + the next
       scene's dome, so the CTA buttons never collide with either. */
    padding-bottom: calc(var(--cine-curve) + clamp(92px, 13vh, 170px));
}

.cinematic-hero__title {
    margin: 0;
    font-family: "Playfair Display", Georgia, serif;
    font-size: clamp(3.1rem, 6.4vw, 9.4rem);
    font-weight: 700;
    line-height: 1.04;
    letter-spacing: -0.018em;
    color: var(--cine-ink);
    text-shadow: 0 4px 44px rgb(2 8 20 / 55%);
}

.cinematic-hero__title span {
    display: block;
}

/* The last line catches the aurora: gradient-filled lettering.
   text-shadow must stay off here — the fill is transparent and a
   shadow would smear straight through it. */
.cinematic-hero__title span:last-child {
    background: linear-gradient(100deg, #8ef0c8 5%, #6fd7e8 45%, #a68cff 95%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    text-shadow: none;
    padding-bottom: 0.08em;   /* keep the descender inside the clip box */
}

.cinematic-hero__lead {
    text-shadow: 0 2px 22px rgb(2 8 20 / 55%);
}

@keyframes cine-drift {
    from { transform: scale(1.03) translateY(-0.5%); }
    to   { transform: scale(1.09) translateY(0.8%); }
}

/* — 1B · THE CONNECTED EXPERIENCES: four rendered cards floating on
   the hero's aurora sky. It reuses the hero backdrop so the opening
   reads as one continuous scene; a darker veil in the lower half lets
   each card's near-black surround melt into the night rather than
   showing as a hard box. */
.cinematic-section--connect {
    --cine-ink: #f4f8ff;
    --cine-ink-soft: rgb(230 238 255 / 84%);
    --cine-accent: #ff9ecb;      /* pink, to echo the rendered cards */
}

.cinematic-section--connect .section-bg {
    background-image: url("../images/cinematic/hero-aurora.jpg");
}

/* No dome here — this scene flows straight out of the hero, so drop
   the curved-divider top padding and just breathe. */
.cinematic-section--connect .section-content {
    padding-top: clamp(72px, 11vh, 160px);
    padding-bottom: clamp(72px, 10vh, 150px);
}


.cinematic-section--connect .section-title,
.cinematic-section--connect .section-subtitle {
    text-shadow: 0 2px 30px rgb(2 8 20 / 60%);
}

/* Pink gradient lettering on "Your Story." — text-shadow must stay
   off (the fill is transparent; a shadow would smear through it,
   same as the hero's last headline line). */
.cinematic-section--connect .connect-accent {
    background: linear-gradient(100deg, #ff9ecb 8%, #d78bff 92%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    text-shadow: none;
}

/* Four rendered cards across (2×2 tablet, stacked phone — see §7). */
.connect-card-grid {
    width: 100%;
    margin-top: clamp(40px, 6vh, 88px);
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(14px, 1.4vw, 30px);
    align-items: start;
}

.connect-card {
    display: block;
    border-radius: var(--cine-radius);
    /* the render carries its own pink glow; a soft cast just lifts the
       tile off the sky. drop-shadow respects the rounded corners. */
    filter: drop-shadow(0 24px 54px rgb(2 5 18 / 60%));
    transition: transform 0.45s cubic-bezier(0.2, 0.6, 0.25, 1),
                filter 0.45s cubic-bezier(0.2, 0.6, 0.25, 1);
}

.connect-card img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--cine-radius);
}

.connect-card:hover {
    transform: translateY(-8px);
    filter: drop-shadow(0 34px 74px rgb(2 5 18 / 68%));
}

/* — 2 · YOUR WORK: bright mountain sunrise — */
.cinematic-section--work {
    --cine-ink: #17264a;
    --cine-ink-soft: rgb(23 38 74 / 82%);
    --cine-accent: #b45309;
}

.cinematic-section--work .section-bg {
    background-image: url("../images/cinematic/work-clouds.jpg");
}

.cinematic-section--work .section-veil {
    background: linear-gradient(180deg,
        rgb(255 255 255 / 30%) 0%,
        rgb(255 255 255 / 0%) 42%,
        rgb(35 46 84 / 16%) 100%);
}

.cinematic-work-chapter {
    position: relative;
    z-index: 1;
    margin-top: 0;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
}

.work-chapter-bg {
    position: sticky;
    top: 0;
    z-index: 0;
    height: 100vh;
    height: 100svh;
    margin-bottom: -100vh;
    margin-bottom: -100svh;
    pointer-events: none;
    background-image: url("../images/cinematic/work-clouds.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transform: translateZ(0);
}

.work-chapter-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
        rgb(255 255 255 / 34%) 0%,
        rgb(255 255 255 / 5%) 44%,
        rgb(35 46 84 / 18%) 100%);
}

.cinematic-work-chapter > .cinematic-section {
    position: relative;
    z-index: 1;
    background: transparent;
}

.cinematic-work-chapter .section-bg,
.cinematic-work-chapter .section-veil {
    display: none;
}

.cinematic-section--story,
.cinematic-section--future,
.cinematic-section--together {
    z-index: 2;
}

.cinematic-section--story,
.cinematic-section--future,
.cinematic-section--together {
    min-height: calc(100vh + var(--cine-curve));
    min-height: calc(100svh + var(--cine-curve));
}

/* Work follow-up: Ask Pete AI and Interview Me stay in the same scenic
   mountain world, then hand off horizontally during normal vertical scroll. */
.cinematic-section--work-ai {
    --work-ai-panel-gap: clamp(64px, 8vw, 170px);
    min-height: 315vh;
    min-height: 315svh;
    display: block;
    overflow: visible;
    margin-top: 0;
    border-radius: 0;
    box-shadow: none;
}

.cinematic-section--work-ai .section-veil {
    background: linear-gradient(180deg,
        rgb(255 255 255 / 44%) 0%,
        rgb(255 255 255 / 10%) 34%,
        rgb(255 246 230 / 10%) 68%,
        rgb(35 46 84 / 18%) 100%);
}

.work-ai-stage {
    position: sticky;
    top: var(--cine-header-h, 81px);
    z-index: 1;
    width: var(--cine-rail);
    min-height: calc(100svh - var(--cine-header-h, 81px));
    margin: 0 auto;
    padding: clamp(18px, 3vh, 48px) 0 clamp(24px, 4vh, 62px);
    display: grid;
    align-content: center;
    gap: clamp(18px, 3vh, 44px);
}

.cine-js .work-ai-stage {
    opacity: var(--work-ai-stage-opacity, 1);
    transform: translate3d(0, var(--work-ai-stage-y, 0px), 0);
    will-change: opacity, transform;
}

.work-ai-copy {
    max-width: min(980px, 86vw);
    margin: 0 auto;
    text-align: center;
}

.work-ai-copy .section-title {
    font-size: clamp(2.3rem, 4.1vw, 5.5rem);
}

.work-ai-copy .section-subtitle {
    max-width: min(860px, 88vw);
    margin-top: clamp(12px, 1.8vh, 24px);
    font-size: clamp(0.98rem, 1.08vw, 1.35rem);
    line-height: 1.55;
}

.work-ai-window {
    width: 100%;
    overflow: hidden;
    padding: 0;
    border-radius: calc(var(--cine-radius) + 8px);
    background: transparent;
    border: 0;
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}

.cine-js .work-ai-window.reveal.is-visible {
    opacity: var(--work-ai-window-opacity, 1);
    transform: translate3d(0, var(--work-ai-window-y, 0px), 0);
}

.work-ai-track {
    display: grid;
    grid-template-columns: repeat(2, 100%);
    column-gap: var(--work-ai-panel-gap);
    transform: translate3d(var(--work-ai-track-x, 0%), 0, 0);
    transition: transform 1350ms cubic-bezier(0.2, 0.72, 0.18, 1);
    will-change: transform;
}

.work-ai-panel {
    min-height: clamp(340px, 40vh, 620px);
    padding: clamp(22px, 2.35vw, 52px);
    display: grid;
    grid-template-columns: minmax(270px, 0.78fr) minmax(360px, 1.22fr);
    gap: clamp(18px, 2.5vw, 54px);
    align-items: stretch;
    border-radius: var(--cine-radius);
    background: rgb(255 255 255 / 17%);
    border: 1px solid rgb(255 255 255 / 40%);
    box-shadow: var(--cine-glass-shadow),
                inset 0 1px 0 rgb(255 255 255 / 52%);
    -webkit-backdrop-filter: blur(var(--cine-blur)) saturate(1.32);
    backdrop-filter: blur(var(--cine-blur)) saturate(1.32);
}

.work-ai-panel__lead {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    text-align: left;
}

.work-ai-kicker {
    margin: 0 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 16px;
    border-radius: 999px;
    background: rgb(255 255 255 / 30%);
    border: 1px solid rgb(255 255 255 / 44%);
    color: var(--cine-accent);
    font-size: 0.82rem;
    font-weight: 850;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.work-ai-panel h3 {
    margin: 0;
    max-width: 17ch;
    font-family: "Playfair Display", Georgia, serif;
    font-size: clamp(1.9rem, 2.55vw, 4.1rem);
    line-height: 1.02;
    letter-spacing: -0.01em;
    color: var(--cine-ink);
    text-wrap: balance;
}

.work-ai-panel__lead > p:not(.work-ai-kicker) {
    margin: clamp(14px, 1.7vh, 24px) 0 0;
    max-width: 46ch;
    font-size: clamp(0.96rem, 1vw, 1.26rem);
    line-height: 1.5;
    color: var(--cine-ink-soft);
}

.work-ai-actions {
    margin-top: clamp(18px, 2.6vh, 34px);
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.work-ai-actions .cine-btn {
    padding: 13px 24px;
    font-size: 0.98rem;
}

.work-ai-demo,
.work-ai-demo-stack {
    min-width: 0;
    display: grid;
    align-content: center;
    gap: clamp(10px, 1.2vw, 18px);
}

.work-ai-demo-stack {
    position: relative;
    min-height: clamp(250px, 27vh, 360px);
}

.work-ai-example {
    grid-area: 1 / 1;
    min-width: 0;
    display: grid;
    align-content: center;
    gap: clamp(10px, 1.2vw, 18px);
    transition: opacity 520ms ease, transform 620ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.work-ai-example--alt {
    opacity: 0;
    transform: translateY(22px);
    pointer-events: none;
}

.work-ai-panel--ask .work-ai-example--primary {
    opacity: calc(1 - var(--work-ai-ask-example, 0));
    transform: translateY(var(--work-ai-ask-primary-y, 0px));
}

.work-ai-panel--ask .work-ai-example--alt {
    opacity: var(--work-ai-ask-example, 0);
    transform: translateY(var(--work-ai-ask-alt-y, 22px));
}

.work-ai-panel--interview .work-ai-example--primary {
    opacity: calc(1 - var(--work-ai-interview-example, 0));
    transform: translateY(var(--work-ai-interview-primary-y, 0px));
}

.work-ai-panel--interview .work-ai-example--alt {
    opacity: var(--work-ai-interview-example, 0);
    transform: translateY(var(--work-ai-interview-alt-y, 22px));
}

.work-ai-question,
.work-ai-answer,
.work-ai-proof-strip,
.work-ai-score-row {
    border-radius: 22px;
    background: rgb(255 255 255 / 48%);
    border: 1px solid rgb(255 255 255 / 58%);
    box-shadow: 0 18px 46px rgb(10 18 40 / 11%),
                inset 0 1px 0 rgb(255 255 255 / 58%);
}

.work-ai-question,
.work-ai-answer {
    padding: clamp(12px, 1.1vw, 18px);
}

.work-ai-question span,
.work-ai-answer span {
    display: block;
    margin-bottom: 8px;
    color: var(--cine-accent);
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.work-ai-question strong {
    display: block;
    color: var(--cine-ink);
    font-size: clamp(0.98rem, 1.05vw, 1.28rem);
    line-height: 1.32;
}

.work-ai-answer p {
    margin: 0;
    color: var(--cine-ink-soft);
    font-size: clamp(0.86rem, 0.9vw, 1.02rem);
    line-height: 1.48;
}

.work-ai-proof-strip,
.work-ai-score-row {
    padding: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.work-ai-proof-strip span,
.work-ai-score-row span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgb(255 255 255 / 50%);
    border: 1px solid rgb(255 255 255 / 55%);
    color: var(--cine-ink);
    font-size: 0.78rem;
    font-weight: 750;
}

.work-ai-score-row strong {
    margin-right: 6px;
    color: var(--cine-accent);
    font-size: 1.2rem;
}

/* Cinematic Ask Pete AI popup: keep the shared chatbot logic, but make
   this page's opened panel feel connected to the in-section button. */
body.cinematic-home-page.cine-chat-anchored #chat-panel {
    left: var(--cine-chat-left, 28px);
    top: var(--cine-chat-top, 120px);
    right: auto;
    bottom: auto;
    width: min(420px, calc(100vw - 32px));
    max-height: min(650px, calc(100vh - var(--cine-chat-top, 120px) - 18px));
    border-radius: 24px;
    color: #17264a;
    background: rgb(255 255 255 / 24%);
    border: 1px solid rgb(255 255 255 / 48%);
    box-shadow: 0 28px 90px rgb(10 18 40 / 24%),
                inset 0 1px 0 rgb(255 255 255 / 62%);
    -webkit-backdrop-filter: blur(24px) saturate(1.35);
    backdrop-filter: blur(24px) saturate(1.35);
    transform-origin: top left;
}

body.cinematic-home-page.cine-chat-anchored #chat-header,
body.cinematic-home-page.cine-chat-anchored #chat-input-area {
    background: rgb(255 255 255 / 16%);
    border-color: rgb(255 255 255 / 34%);
}

body.cinematic-home-page.cine-chat-anchored #chat-header-text h3,
body.cinematic-home-page.cine-chat-anchored #chat-header-text p,
body.cinematic-home-page.cine-chat-anchored #chat-close,
body.cinematic-home-page.cine-chat-anchored .bot-message,
body.cinematic-home-page.cine-chat-anchored .suggestion-btn {
    color: #17264a;
}

body.cinematic-home-page.cine-chat-anchored .bot-message,
body.cinematic-home-page.cine-chat-anchored .suggestion-btn,
body.cinematic-home-page.cine-chat-anchored #chat-input {
    background: rgb(255 255 255 / 38%);
    border-color: rgb(255 255 255 / 48%);
}

body.cinematic-home-page.cine-chat-anchored #chat-input {
    color: #17264a;
}

/* Your Work proof chapter: story clouds remain still while the skills
   and timeline panels choreograph vertically, then horizontally. */

.cinematic-section--work-proof {
    --work-proof-panel-gap: clamp(64px, 8vw, 170px);
    min-height: 315vh;
    min-height: 315svh;
    display: block;
    overflow: visible;
    margin-top: 0;
    border-radius: 0;
    box-shadow: none;
}

.work-proof-stage {
    position: sticky;
    top: var(--cine-header-h, 81px);
    z-index: 1;
    width: var(--cine-rail);
    min-height: calc(100svh - var(--cine-header-h, 81px));
    margin: 0 auto;
    padding: clamp(18px, 3vh, 48px) 0 clamp(24px, 4vh, 62px);
    display: grid;
    align-content: center;
    gap: clamp(18px, 3vh, 44px);
}

.cine-js .work-proof-stage {
    opacity: var(--work-proof-stage-opacity, 1);
    transform: translate3d(0, var(--work-proof-stage-y, 0px), 0);
    will-change: opacity, transform;
}

.work-proof-copy {
    max-width: min(980px, 86vw);
    margin: 0 auto;
    text-align: center;
}

.work-proof-copy .section-title {
    font-size: clamp(2.3rem, 4.1vw, 5.5rem);
}

.work-proof-copy .section-subtitle {
    max-width: min(860px, 88vw);
    margin-top: clamp(12px, 1.8vh, 24px);
    font-size: clamp(0.98rem, 1.08vw, 1.35rem);
    line-height: 1.55;
}

.work-proof-window {
    width: 100%;
    overflow: hidden;
    border-radius: calc(var(--cine-radius) + 8px);
}

.cine-js .work-proof-window.reveal.is-visible {
    opacity: var(--work-proof-window-opacity, 1);
    transform: translate3d(0, var(--work-proof-window-y, 0px), 0);
}

.work-proof-track {
    display: grid;
    grid-template-columns: repeat(2, 100%);
    column-gap: var(--work-proof-panel-gap);
    transform: translate3d(var(--work-proof-track-x, 0%), 0, 0);
    transition: transform 1350ms cubic-bezier(0.2, 0.72, 0.18, 1);
    will-change: transform;
}

.work-proof-panel {
    min-height: clamp(350px, 42vh, 650px);
    padding: clamp(22px, 2.35vw, 52px);
    display: grid;
    grid-template-columns: minmax(250px, 0.62fr) minmax(420px, 1.38fr);
    gap: clamp(22px, 3vw, 64px);
    align-items: center;
    border-radius: var(--cine-radius);
    background: rgb(255 255 255 / 18%);
    border: 1px solid rgb(255 255 255 / 42%);
    box-shadow: var(--cine-glass-shadow),
                inset 0 1px 0 rgb(255 255 255 / 56%);
    -webkit-backdrop-filter: blur(var(--cine-blur)) saturate(1.28);
    backdrop-filter: blur(var(--cine-blur)) saturate(1.28);
}

.work-proof-panel__lead {
    min-width: 0;
    text-align: left;
}

.work-proof-panel h3 {
    margin: 0;
    max-width: 12ch;
    font-family: "Playfair Display", Georgia, serif;
    font-size: clamp(1.9rem, 2.55vw, 4.1rem);
    line-height: 1.02;
    color: var(--cine-ink);
    text-wrap: balance;
}

.work-proof-panel__lead > p:not(.work-ai-kicker) {
    margin: clamp(14px, 1.7vh, 24px) 0 0;
    max-width: 42ch;
    color: var(--cine-ink-soft);
    font-size: clamp(0.96rem, 1vw, 1.2rem);
    line-height: 1.52;
}

.work-skills-mini {
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}

.work-skill-chip {
    min-height: 84px;
    padding: 12px;
    display: grid;
    align-content: center;
    gap: 8px;
    border-radius: 14px;
    background: rgb(255 255 255 / 44%);
    border: 1px solid rgb(255 255 255 / 56%);
    box-shadow: 0 14px 34px rgb(40 18 64 / 10%),
                inset 0 1px 0 rgb(255 255 255 / 62%);
}

.work-skill-chip span {
    color: var(--cine-ink);
    font-size: 0.82rem;
    font-weight: 800;
    line-height: 1.2;
}

.work-skill-chip strong {
    color: var(--cine-accent);
    font-size: 1.25rem;
    line-height: 1;
}

.work-skill-chip--flip {
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    perspective: 900px;
}

.work-skill-chip__inner {
    position: relative;
    min-height: 84px;
    transform-style: preserve-3d;
    animation: work-skill-flip 8s ease-in-out infinite;
}

.work-skill-chip--delay .work-skill-chip__inner {
    animation-delay: 4s;
}

.work-skill-chip__face {
    position: absolute;
    inset: 0;
    padding: 12px;
    display: grid;
    align-content: center;
    gap: 8px;
    border-radius: 14px;
    background: rgb(255 255 255 / 46%);
    border: 1px solid rgb(255 255 255 / 58%);
    box-shadow: 0 14px 34px rgb(40 18 64 / 10%),
                inset 0 1px 0 rgb(255 255 255 / 62%);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.work-skill-chip__back {
    transform: rotateY(180deg);
}

.work-skill-chip__back span {
    font-size: 0.76rem;
    font-weight: 750;
}

@keyframes work-skill-flip {
    0%, 32%, 100% { transform: rotateY(0deg); }
    44%, 70% { transform: rotateY(180deg); }
}

.work-timeline-mini {
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(14px, 1.4vw, 22px);
}

.work-timeline-card {
    min-height: 260px;
    padding: clamp(16px, 1.4vw, 24px);
    display: flex;
    flex-direction: column;
    border-radius: 20px;
    background: rgb(255 255 255 / 44%);
    border: 1px solid rgb(255 255 255 / 56%);
    box-shadow: 0 18px 46px rgb(40 18 64 / 12%),
                inset 0 1px 0 rgb(255 255 255 / 62%);
}

.work-timeline-card > span {
    color: var(--cine-accent);
    font-size: 0.78rem;
    font-weight: 850;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.work-timeline-card h4 {
    margin: 14px 0 0;
    color: var(--cine-ink);
    font-size: clamp(1.08rem, 1.05vw, 1.45rem);
    line-height: 1.18;
}

.work-timeline-card p {
    margin: 12px 0 0;
    color: var(--cine-ink-soft);
    font-size: clamp(0.86rem, 0.9vw, 1.02rem);
    line-height: 1.5;
}

.work-timeline-card div {
    margin-top: auto;
    padding-top: 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.work-timeline-card strong {
    padding: 7px 10px;
    border-radius: 999px;
    background: rgb(255 255 255 / 46%);
    color: var(--cine-ink);
    font-size: 0.75rem;
}

/* — 3 · YOUR STORY: sunset lake panorama + four scenic photo cards —
   Rebuilt to Pete's Chapter-02 mockup: one dramatic sunset backdrop,
   and four cards that each carry their OWN scenic photo behind a dark
   veil, with white serif titles and rose accents. */
.cinematic-section--story {
    --cine-ink: #ffffff;
    --cine-ink-soft: rgb(255 255 255 / 84%);
    --cine-accent: #ff7cc0;
}

.cinematic-section--story .section-bg {
    background-image: url("../images/cinematic/story-sunset-bg.jpg");
}

.cinematic-section--story .section-veil {
    background: linear-gradient(180deg,
        rgb(28 12 40 / 55%) 0%,
        rgb(28 12 40 / 26%) 34%,
        rgb(18 8 30 / 58%) 100%);
}

/* White heading over the sunset needs a soft shadow to stay crisp. */
.cinematic-section--story .section-title,
.cinematic-section--story .section-subtitle {
    text-shadow: 0 2px 30px rgb(12 4 24 / 55%);
}

/* "Go beyond the résumé." — the larger serif tagline under the title. */
.section-subtitle--lead {
    margin-top: clamp(10px, 1.4vh, 18px);
    font-family: "Playfair Display", Georgia, serif;
    font-size: clamp(1.5rem, 2.1vw, 2.6rem);
    font-weight: 600;
    color: #ffffff;
}

.section-subtitle--lead + .section-subtitle {
    margin-top: clamp(10px, 1.4vh, 16px);
    font-size: clamp(0.98rem, 1.05vw, 1.32rem);
    color: rgb(255 255 255 / 80%);
}

/* ---- the four scenic story cards ---- */
.story-card-grid {
    width: 100%;
    margin-top: clamp(30px, 4.4vh, 60px);
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(16px, 1.6vw, 30px);
    align-items: stretch;
}

.story-card {
    position: relative;
    min-width: 0;
    min-height: clamp(460px, 54vh, 580px);
    padding: clamp(20px, 1.7vw, 30px);
    display: flex;
    flex-direction: column;
    gap: clamp(9px, 1.1vh, 14px);
    text-align: left;
    color: #ffffff;
    border-radius: var(--cine-radius);
    overflow: hidden;
    isolation: isolate;   /* keep the ::before veil below the content */
    border: 1px solid rgb(255 255 255 / 16%);
    box-shadow: 0 26px 70px rgb(10 6 26 / 42%);
    background-image: var(--card-img);
    background-size: cover;
    background-position: center;
    transition: transform 0.45s cubic-bezier(0.2, 0.6, 0.25, 1),
                box-shadow 0.45s cubic-bezier(0.2, 0.6, 0.25, 1);
}

/* Dark veil over each photo so the text always reads. */
.story-card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg,
        rgb(18 8 30 / 30%) 0%,
        rgb(18 8 30 / 56%) 50%,
        rgb(12 5 22 / 82%) 100%);
}

.story-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 36px 92px rgb(10 6 26 / 52%);
}

.story-card__icon {
    width: clamp(44px, 3vw, 56px);
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #ffffff;
    background: linear-gradient(150deg, #ff8fc7, #e34ba0);
    box-shadow: 0 10px 26px rgb(200 40 130 / 34%),
                inset 0 1px 0 rgb(255 255 255 / 40%);
}

.story-card__icon svg {
    width: 46%;
    height: 46%;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.story-card__title {
    margin: clamp(6px, 1vh, 12px) 0 0;
    font-family: "Playfair Display", Georgia, serif;
    font-size: clamp(1.4rem, 1.5vw, 2rem);
    line-height: 1.08;
    color: #ffffff;
}

.story-card__lead {
    margin: 0;
    font-size: clamp(0.9rem, 0.95vw, 1.14rem);
    font-weight: 650;
    line-height: 1.28;
    color: #ff9ecb;
}

.story-card__desc {
    margin: 0;
    font-size: clamp(0.8rem, 0.85vw, 1rem);
    line-height: 1.45;
    color: rgb(255 255 255 / 82%);
}

.story-card__list {
    margin: clamp(4px, 0.8vh, 10px) 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: clamp(7px, 0.9vh, 11px);
}

.story-card__list li {
    position: relative;
    padding-left: 18px;
    font-size: clamp(0.8rem, 0.85vw, 1rem);
    line-height: 1.3;
    color: rgb(255 255 255 / 90%);
}

.story-card__list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.5em;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #ff6fb4;
    box-shadow: 0 0 10px rgb(255 111 180 / 55%);
}

.story-card__foot {
    margin-top: auto;
    padding-top: clamp(12px, 1.6vh, 18px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-top: 1px solid rgb(255 255 255 / 18%);
    text-decoration: none;
}

.story-card__meta {
    min-width: 0;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: rgb(255 255 255 / 74%);
}

.story-card__go {
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #ffffff;
    background: rgb(255 255 255 / 12%);
    border: 1px solid rgb(255 255 255 / 30%);
    transition: background-color 0.3s, transform 0.3s, border-color 0.3s;
}

.story-card:hover .story-card__go {
    background: linear-gradient(150deg, #ff8fc7, #e34ba0);
    border-color: transparent;
    transform: translateX(2px);
}

.story-card__go svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ---- "Your story is living" closing bar ---- */
.story-living {
    width: 100%;
    margin-top: clamp(26px, 4vh, 48px);
    padding: clamp(16px, 1.6vw, 26px) clamp(20px, 2vw, 34px);
    display: flex;
    align-items: center;
    gap: clamp(14px, 1.6vw, 26px);
    border-radius: calc(var(--cine-radius) - 4px);
    background: rgb(28 12 40 / 46%);
    border: 1px solid rgb(255 255 255 / 20%);
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 16%),
                0 22px 60px rgb(10 6 26 / 40%);
    -webkit-backdrop-filter: blur(16px) saturate(1.2);
    backdrop-filter: blur(16px) saturate(1.2);
    text-align: left;
}

.story-living__icon {
    flex: 0 0 auto;
    width: 50px;
    height: 50px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #ff9ecb;
    background: rgb(255 255 255 / 10%);
    border: 1px solid rgb(255 255 255 / 22%);
}

.story-living__icon svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.story-living__text {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.story-living__text strong {
    font-family: "Playfair Display", Georgia, serif;
    font-size: clamp(1.15rem, 1.4vw, 1.7rem);
    color: #ff86c2;
}

.story-living__text span {
    font-size: clamp(0.86rem, 0.92vw, 1.08rem);
    color: rgb(255 255 255 / 80%);
    line-height: 1.4;
}

.story-living__btn {
    flex: 0 0 auto;
    margin-left: auto;
    gap: 10px;
    padding: 14px 26px;
    font-size: 1rem;
    background: linear-gradient(150deg, #ff8fc7, #e34ba0);
    color: #2a0c1e;
}

.story-living__arrow {
    width: 18px;
    height: 18px;
    fill: none !important;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* — 4 · YOUR FUTURE: golden valley sunrise — */
.cinematic-section--future {
    --cine-ink: #4a2c0a;
    --cine-ink-soft: rgb(74 44 10 / 82%);
    --cine-accent: #99540b;
}

.cinematic-section--future .section-bg {
    background-image: url("../images/cinematic/future-path.jpg");
}

.cinematic-section--future .section-veil {
    background: linear-gradient(180deg,
        rgb(255 240 208 / 26%) 0%,
        rgb(255 240 208 / 0%) 40%,
        rgb(94 58 18 / 20%) 100%);
}

/* — 5 · LET'S BUILD THIS TOGETHER: purple/pink community sunset —
   The one dark scene below the hero: light ink + dark navy glass. */
.cinematic-section--dark {
    --cine-ink: #f4f6ff;
    --cine-ink-soft: rgb(238 242 255 / 84%);
    --cine-accent: #ffb2c8;
    --cine-glass-bg: rgb(8 12 28 / 42%);
    --cine-glass-border: rgb(255 255 255 / 26%);
    --cine-glass-highlight: rgb(255 255 255 / 16%);
    --cine-glass-shadow: 0 26px 70px rgb(2 6 18 / 45%);
}

.cinematic-section--dark .section-title,
.cinematic-section--dark .section-subtitle {
    text-shadow: 0 2px 26px rgb(10 4 30 / 45%);
}

.cinematic-section--dark .glass-feature-card__icon {
    background: color-mix(in srgb, var(--cine-accent) 22%, rgb(255 255 255 / 8%));
    border-color: rgb(255 255 255 / 28%);
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 22%),
                0 12px 28px rgb(2 6 18 / 30%);
}

.cinematic-section--together .section-bg {
    background-image: url("../images/cinematic/together-summit.jpg");
}

/* The summit sky is bright blue, so darken the top and bottom more
   than the old purple sunset needed — the white heading and the dark
   glass cards both have to hold up over open daylight. */
.cinematic-section--together .section-veil {
    background: linear-gradient(180deg,
        rgb(10 8 30 / 62%) 0%,
        rgb(12 10 34 / 22%) 34%,
        rgb(10 8 28 / 30%) 60%,
        rgb(6 5 22 / 66%) 100%);
}


/* -----------------------------------------------------------------
   6 · MOTION — scroll reveals + hero entrance
   .cine-js is stamped on <html> by cinematic-home.js; without JS the
   page simply renders fully visible.
   ----------------------------------------------------------------- */

.cine-js .reveal {
    opacity: 0;
    transform: translateY(clamp(24px, 4vh, 44px));
    transition: opacity 0.9s cubic-bezier(0.2, 0.6, 0.25, 1),
                transform 0.9s cubic-bezier(0.2, 0.6, 0.25, 1);
    transition-delay: calc(var(--reveal-i, 0) * 95ms);
}

.cine-js .reveal.is-visible {
    opacity: 1;
    transform: none;
}

/* Heading trio reveals in order, then the cards sweep in after. */
.cine-js .section-eyebrow.reveal { --reveal-i: 0; }
.cine-js .section-title.reveal { --reveal-i: 1; }
.cine-js .section-subtitle.reveal { --reveal-i: 2; }

.cine-js .glass-card-grid .glass-feature-card.reveal {
    transition-delay: calc(250ms + var(--reveal-i, 0) * 110ms);
}

/* Hero entrance: pure CSS so the top of the page never depends on JS. */
@media (prefers-reduced-motion: no-preference) {
    .cinematic-hero .cine-fade {
        opacity: 0;
        animation: cine-fade-up 1s cubic-bezier(0.2, 0.6, 0.25, 1) forwards;
        animation-delay: calc(0.12s + var(--fade-i, 0) * 0.14s);
    }

    @keyframes cine-fade-up {
        from {
            opacity: 0;
            transform: translateY(30px);
        }

        to {
            opacity: 1;
            transform: none;
        }
    }
}


/* -----------------------------------------------------------------
   7 · RESPONSIVE
   ----------------------------------------------------------------- */

/* Tablets / small laptops: two cards per row. */
@media (max-width: 1100px) {
    .glass-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .story-card-grid,
    .connect-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .glass-feature-card {
        min-height: clamp(240px, 30vh, 340px);
    }

    .work-ai-panel {
        grid-template-columns: minmax(240px, 0.86fr) minmax(320px, 1.14fr);
    }

    .work-proof-panel {
        grid-template-columns: minmax(230px, 0.72fr) minmax(360px, 1.28fr);
    }

    .work-skills-mini {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .work-ai-panel,
    .work-proof-panel {
        grid-template-columns: minmax(0, 1fr);
        min-height: auto;
    }

    .work-ai-panel h3,
    .work-proof-panel h3 {
        max-width: 18ch;
    }

    .work-timeline-mini {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Very large displays (2K/4K): widen the rail so the scenes stay
   grand instead of leaving giant empty margins. Type and cards keep
   scaling through their vw-based clamps. */
@media (min-width: 2200px) {
    .cinematic-home {
        --cine-rail: min(86vw, 2460px);
    }
}

/* Phones: stack the cards, relax the full-height rule so sections
   size to their content, and swap in the portrait backdrops. */
@media (max-width: 760px) {
    .cinematic-section {
        min-height: 100svh;
    }

    .cinematic-section--curved {
        --cine-curve: 44px;
    }

    /* The phone header is two rows tall and stays pinned on this page,
       so give section headings extra clearance — otherwise an eyebrow
       can hide behind the sticky header right after an anchor jump. */
    .cinematic-section .section-content {
        padding-top: calc(var(--cine-curve) + var(--cine-header-h, 118px) + 28px);
    }

    .cinematic-hero .section-content {
        padding-top: calc(var(--cine-header-h, 118px) + 34px);
    }

    .glass-card-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
        margin-top: 34px;
    }

    .story-card-grid,
    .connect-card-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
        margin-top: 34px;
    }

    .glass-feature-card {
        min-height: 218px;
        padding: 26px 22px;
    }

    .story-card {
        min-height: auto;
        padding: 24px 20px;
        border-radius: 22px;
    }

    /* Stack the closing bar: icon+text, then a full-width button. */
    .story-living {
        flex-wrap: wrap;
        gap: 16px;
        padding: 22px 20px;
    }

    .story-living__btn {
        margin-left: 0;
        width: 100%;
    }


    /* Give the denser timeline/résumé cards a touch more room to breathe
       once they are full-width on a phone. */

    .cinematic-section--work-ai {
        min-height: auto;
        display: flex;
        overflow: hidden;
    }

    .cinematic-section--work-proof {
        min-height: auto;
        display: flex;
        overflow: hidden;
    }

    .work-ai-stage,
    .work-proof-stage {
        position: relative;
        top: auto;
        min-height: auto;
        width: var(--cine-rail);
        padding-top: calc(var(--cine-header-h, 118px) + 34px);
    }

    .work-ai-copy,
    .work-proof-copy {
        max-width: 100%;
        overflow-wrap: anywhere;
    }

    .work-ai-copy .section-eyebrow,
    .work-proof-copy .section-eyebrow {
        max-width: 100%;
        font-size: 0.68rem;
        letter-spacing: 0.14em;
        line-height: 1.35;
        text-wrap: balance;
    }

    .work-ai-copy .section-title,
    .work-proof-copy .section-title {
        max-width: min(100%, 8.6em);
        margin-inline: auto;
        font-size: clamp(1.85rem, 7vw, 2.1rem);
        line-height: 1.08;
        text-wrap: wrap;
        overflow-wrap: normal;
    }

    .work-ai-copy .section-subtitle,
    .work-proof-copy .section-subtitle {
        max-width: 100%;
        font-size: 1rem;
        line-height: 1.48;
    }

    .cine-js .work-ai-stage,
    .cine-js .work-ai-window.reveal.is-visible,
    .cine-js .work-proof-stage,
    .cine-js .work-proof-window.reveal.is-visible {
        opacity: 1;
        transform: none;
    }

    .work-ai-window,
    .work-proof-window {
        overflow: visible;
        padding: 0;
        background: transparent;
        border: 0;
        box-shadow: none;
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }

    .work-ai-track,
    .work-proof-track {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
        transform: none !important;
    }

    .work-ai-panel,
    .work-proof-panel {
        padding: 26px 20px;
        gap: 22px;
    }

    .work-ai-panel h3,
    .work-proof-panel h3 {
        font-size: clamp(2rem, 10vw, 3.1rem);
    }

    .work-ai-demo-stack {
        min-height: auto;
    }

    .work-ai-example,
    .work-ai-example--alt {
        grid-area: auto;
        opacity: 1 !important;
        transform: none !important;
        pointer-events: auto;
    }

    .work-skills-mini {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .work-skill-chip,
    .work-skill-chip__inner {
        min-height: 78px;
    }

    .work-ai-actions {
        width: 100%;
        flex-direction: column;
    }

    .work-ai-actions .cine-btn {
        width: 100%;
    }

    .cinematic-hero__actions {
        flex-direction: column;
        align-items: stretch;
        width: min(100%, 340px);
    }

    .section-subtitle {
        max-width: 92%;
    }

    .scroll-cue {
        width: 46px;
        height: 46px;
    }

    .cinematic-hero .section-bg { background-image: url("../images/cinematic/hero-aurora-m.jpg"); }
    .cinematic-section--connect .section-bg { background-image: url("../images/cinematic/hero-aurora-m.jpg"); }
    .work-chapter-bg { background-image: url("../images/cinematic/work-clouds-m.jpg"); }
    .cinematic-section--work .section-bg { background-image: url("../images/cinematic/work-clouds-m.jpg"); }
    .cinematic-section--story .section-bg { background-image: url("../images/cinematic/story-sunset-bg-m.jpg"); }
    .cinematic-section--future .section-bg { background-image: url("../images/cinematic/future-path-m.jpg"); }
    .cinematic-section--together .section-bg { background-image: url("../images/cinematic/together-summit-m.jpg"); }
}


/* -----------------------------------------------------------------
   8 · REDUCED MOTION — everything lands calm and visible.
   ----------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
    .cinematic-home .section-bg {
        animation: none !important;
        transform: none !important;
    }

    .cinematic-section--work-ai,
    .cinematic-section--work-proof {
        min-height: auto;
    }

    .work-ai-stage,
    .work-proof-stage {
        position: relative;
        top: auto;
    }

    .work-ai-window,
    .work-proof-window {
        overflow: visible;
    }

    .work-ai-track,
    .work-proof-track {
        grid-template-columns: minmax(0, 1fr);
        gap: clamp(16px, 2vw, 26px);
        transform: none !important;
        transition: none !important;
    }

    .work-ai-demo-stack {
        min-height: auto;
    }

    .work-ai-example,
    .work-ai-example--alt {
        grid-area: auto;
        opacity: 1 !important;
        transform: none !important;
    }

    .cine-js .reveal,
    .cine-js .work-ai-stage,
    .cine-js .work-ai-window.reveal.is-visible,
    .cine-js .work-proof-stage,
    .cine-js .work-proof-window.reveal.is-visible,
    .cinematic-hero .cine-fade {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
        animation: none !important;
    }

    .scroll-cue {
        animation: none;
    }

    .glass-feature-card,
    .cine-btn,
    .work-skill-chip__inner {
        transition: none;
        animation: none;
    }

    .glass-feature-card:hover,
    .cine-btn--primary:hover,
    .cine-btn--ghost:hover {
        transform: none;
    }
}
