/* =========================================================================
   Swift Beard Painters — Swift Painting Journey
   V1 static shell. Token-driven, no-JS-first, progressively enhanced.
   ========================================================================= */

@layer tokens, base, layout, scenes, responsive, motion;

/* ============================ TOKENS ============================ */
@layer tokens {
  @font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 400 600;
    font-display: swap;
    src: url("vendor/fonts/inter-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
  }
  @font-face {
    font-family: "Inter Tight";
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url("vendor/fonts/inter-tight-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
  }

  :root {
    /* Brand palette (locked from canonical reference) */
    --c-orange: #F2540B;
    --c-orange-soft: #FF7A3D;
    --c-navy: #0E1B24;
    --c-ink: #12202B;
    --c-white: #F7F4EF;
    --c-gold: #E9A45C;
    --c-sage: #8A9A7B;

    /* Functional */
    --c-bg: var(--c-navy);
    --c-text: var(--c-white);
    --c-muted: color-mix(in srgb, var(--c-white) 68%, transparent);
    --c-faint: color-mix(in srgb, var(--c-white) 42%, transparent);
    --c-line: color-mix(in srgb, var(--c-white) 16%, transparent);

    /* Type */
    --font-display: "Inter Tight", system-ui, -apple-system, sans-serif;
    --font-ui: "Inter", system-ui, -apple-system, sans-serif;

    /* Fluid type scale */
    --step-display-xl: clamp(2.75rem, 1.4rem + 6.5vw, 6rem);
    --step-display: clamp(2.1rem, 1.2rem + 4.4vw, 4.25rem);
    --step-lede: clamp(1.05rem, 0.95rem + 0.6vw, 1.4rem);
    --step-eyebrow: clamp(0.72rem, 0.68rem + 0.2vw, 0.82rem);

    /* Spacing */
    --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 */
    --rail-w: 132px;
    --header-h: 76px;
    --measure: 38rem;
    --radius: 14px;
    --radius-pill: 999px;

    /* Motion */
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    --dur-1: 0.2s; --dur-2: 0.45s; --dur-3: 0.8s;

    /* Z-index */
    --z-scrim: 1; --z-content: 2; --z-rail: 40; --z-header: 50;
    --z-mobile-progress: 45; --z-mobile-cta: 60; --z-skip: 100;
  }
}

/* ============================ BASE ============================ */
@layer base {
  *, *::before, *::after { box-sizing: border-box; }

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

  body {
    margin: 0;
    font-family: var(--font-ui);
    color: var(--c-text);
    background: var(--c-bg);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
  }

  img { display: block; max-width: 100%; height: auto; }
  a { color: inherit; text-decoration: none; }
  ol, ul { margin: 0; padding: 0; list-style: none; }
  blockquote { margin: 0; }

  h1, h2, p { margin: 0; }

  :focus-visible {
    outline: 3px solid var(--c-orange-soft);
    outline-offset: 3px;
    border-radius: 4px;
  }

  .skip-link {
    position: fixed;
    top: var(--space-3); left: var(--space-3);
    z-index: var(--z-skip);
    padding: var(--space-2) var(--space-4);
    background: var(--c-orange);
    color: #fff; font-weight: 600;
    border-radius: var(--radius-pill);
    transform: translateY(-150%);
    transition: transform var(--dur-2) var(--ease);
  }
  .skip-link:focus { transform: translateY(0); }

  /* Typography primitives */
  .display {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: var(--step-display);
    line-height: 1.02;
    letter-spacing: -0.02em;
    text-wrap: balance;
  }
  .display--xl { font-size: var(--step-display-xl); }

  .eyebrow {
    font-family: var(--font-ui);
    font-weight: 600;
    font-size: var(--step-eyebrow);
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--c-orange-soft);
    margin-bottom: var(--space-4);
  }

  .lede {
    font-size: var(--step-lede);
    color: var(--c-muted);
    max-width: var(--measure);
    margin-top: var(--space-5);
  }
  .lede--center { margin-inline: auto; }

  .geo {
    margin-top: var(--space-6);
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    color: var(--c-faint);
  }
  .geo--center { text-align: center; }
}

/* ============================ COMPONENTS / LAYOUT ============================ */
@layer layout {
  /* ---- Buttons ---- */
  .btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: 0.7em 1.25em;
    font-family: var(--font-ui);
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1;
    border-radius: var(--radius-pill);
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: transform var(--dur-1) var(--ease),
                background var(--dur-1) var(--ease),
                border-color var(--dur-1) var(--ease);
    white-space: nowrap;
  }
  .btn:hover { transform: translateY(-2px); }
  .btn__icon { font-size: 1.05em; line-height: 1; }
  .btn--lg { padding: 0.95em 1.6em; font-size: 1.02rem; }

  .btn--primary { background: var(--c-orange); color: #fff; }
  .btn--primary:hover { background: var(--c-orange-soft); }

  .btn--solid {
    background: color-mix(in srgb, var(--c-white) 92%, transparent);
    color: var(--c-navy);
  }
  .btn--solid:hover { background: #fff; }

  .btn--ghost {
    background: color-mix(in srgb, var(--c-navy) 35%, transparent);
    color: var(--c-white);
    border-color: var(--c-line);
    backdrop-filter: blur(6px);
  }
  .btn--ghost:hover { border-color: var(--c-white); }

  .cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    margin-top: var(--space-6);
  }
  .cta-row--center { justify-content: center; }

  /* ---- Header ---- */
  .site-header {
    position: fixed;
    inset: 0 0 auto 0;
    height: var(--header-h);
    z-index: var(--z-header);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 clamp(var(--space-4), 3vw, var(--space-7));
    background: linear-gradient(to bottom, color-mix(in srgb, var(--c-navy) 78%, transparent), transparent);
  }
  .brand { display: inline-flex; }
  .brand__chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 52px;
    padding: 0 var(--space-4);
    background: var(--c-white);
    border-radius: var(--radius-pill);
    box-shadow: 0 6px 20px color-mix(in srgb, #000 28%, transparent);
    transition: transform var(--dur-1) var(--ease);
  }
  .brand:hover .brand__chip { transform: translateY(-1px); }
  .brand__logo { height: 40px; width: auto; }
  .header-actions { display: flex; align-items: center; gap: var(--space-3); }

  /* ---- Desktop left rail ---- */
  .rail {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: var(--rail-w);
    z-index: var(--z-rail);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: var(--space-7);
    padding: var(--space-6) var(--space-5);
    background: linear-gradient(to right,
      color-mix(in srgb, var(--c-navy) 94%, transparent),
      color-mix(in srgb, var(--c-navy) 62%, transparent));
    border-right: 1px solid color-mix(in srgb, var(--c-white) 10%, transparent);
  }
  .rail__title {
    position: absolute;
    top: calc(var(--header-h) + var(--space-5));
    left: var(--space-5);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--c-muted);
  }
  .rail__list {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
  }
  /* connecting line */
  .rail__list::before {
    content: "";
    position: absolute;
    left: 4px; top: 6px; bottom: 6px;
    width: 3px;
    border-radius: 3px;
    background: color-mix(in srgb, var(--c-white) 14%, transparent);
  }
  .rail__list::after {
    content: "";
    position: absolute;
    left: 4px; top: 6px;
    width: 3px;
    border-radius: 3px;
    height: var(--rail-progress, 0%);
    background: linear-gradient(to bottom, var(--c-orange-soft), var(--c-orange));
    box-shadow: 0 0 12px color-mix(in srgb, var(--c-orange) 42%, transparent);
    transition: height var(--dur-3) var(--ease);
  }
  .rail__link {
    position: relative;
    display: flex;
    align-items: center;
    gap: var(--space-3);
    color: var(--c-faint);
    transition: color var(--dur-2) var(--ease);
  }
  .rail__dot {
    position: relative;
    z-index: 1;
    width: 13px; height: 13px;
    border-radius: 50%;
    background: var(--c-navy);
    border: 2px solid color-mix(in srgb, var(--c-white) 38%, transparent);
    transition: background var(--dur-2) var(--ease),
                border-color var(--dur-2) var(--ease),
                transform var(--dur-2) var(--ease),
                box-shadow var(--dur-2) var(--ease);
  }
  .rail__label {
    font-size: 0.84rem;
    font-weight: 500;
    letter-spacing: 0.03em;
  }
  .rail__link:hover { color: var(--c-white); }
  .rail__link:hover .rail__dot { border-color: var(--c-white); }

  .rail__node.is-active .rail__link { color: var(--c-white); }
  .rail__node.is-active .rail__label {
    font-weight: 600;
    color: var(--c-white);
  }
  .rail__node.is-active .rail__dot {
    background: var(--c-orange);
    border-color: var(--c-orange-soft);
    transform: scale(1.2);
    box-shadow:
      0 0 0 4px color-mix(in srgb, var(--c-orange) 24%, transparent),
      0 0 14px color-mix(in srgb, var(--c-orange) 38%, transparent);
  }
  .rail__node.is-done .rail__dot { background: var(--c-orange); border-color: var(--c-orange); }
  .rail__node.is-done .rail__label { color: var(--c-muted); }

  /* ---- Mobile top progress (placeholder; JS updates fill + label) ---- */
  .mobile-progress {
    display: none;
    position: fixed;
    top: calc(var(--header-h) + env(safe-area-inset-top, 0px));
    left: var(--space-3);
    right: var(--space-3);
    z-index: var(--z-mobile-progress);
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius);
    border: 1px solid color-mix(in srgb, var(--c-white) 14%, transparent);
    background: color-mix(in srgb, var(--c-navy) 68%, transparent);
    backdrop-filter: blur(12px);
    box-shadow: 0 10px 28px color-mix(in srgb, #000 28%, transparent);
  }
  .mobile-progress__track {
    flex: 1;
    height: 5px;
    border-radius: var(--radius-pill);
    background: color-mix(in srgb, var(--c-white) 12%, transparent);
    overflow: hidden;
  }
  .mobile-progress__fill {
    height: 100%;
    width: var(--mobile-progress, 12%);
    background: linear-gradient(90deg, var(--c-orange), var(--c-orange-soft));
    border-radius: var(--radius-pill);
    box-shadow: 0 0 10px color-mix(in srgb, var(--c-orange) 48%, transparent);
    transition: width var(--dur-3) var(--ease);
  }
  .mobile-progress__label {
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--c-white);
    min-width: 6.75em;
    text-align: right;
    white-space: nowrap;
  }

  /* ---- Mobile sticky CTA ---- */
  .mobile-cta {
    display: none;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: var(--z-mobile-cta);
    gap: var(--space-2);
    padding: var(--space-3);
    padding-bottom: calc(var(--space-3) + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--c-navy) 92%, transparent);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--c-line);
  }
  .mobile-cta__btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: 0.85em 0.5em;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: var(--radius-pill);
    background: color-mix(in srgb, var(--c-white) 10%, transparent);
    border: 1px solid var(--c-line);
  }
  .mobile-cta__btn--primary { background: var(--c-orange); border-color: var(--c-orange); color: #fff; }

  /* ---- Footer ---- */
  .site-footer {
    background: var(--c-ink);
    padding: var(--space-8) clamp(var(--space-4), 5vw, var(--space-9));
    padding-left: calc(var(--rail-w) + clamp(var(--space-4), 5vw, var(--space-9)));
  }
  .site-footer__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-5) var(--space-7);
  }
  .site-footer__chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 56px;
    padding: 0 var(--space-5);
    background: var(--c-white);
    border-radius: var(--radius-pill);
  }
  .site-footer__logo { height: 42px; width: auto; }
  .site-footer__contact {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-5);
    font-weight: 500;
  }
  .site-footer__contact a { color: var(--c-muted); transition: color var(--dur-1); }
  .site-footer__contact a:hover { color: var(--c-white); }
  .site-footer__legal {
    width: 100%;
    color: var(--c-faint);
    font-size: 0.82rem;
    border-top: 1px solid var(--c-line);
    padding-top: var(--space-5);
  }
}

/* ============================ SCENES ============================ */
@layer scenes {
  #story { position: relative; }

  .scene {
    position: relative;
    min-height: 100svh;
    display: flex;
    align-items: flex-end;
    padding: calc(var(--header-h) + var(--space-7))
             clamp(var(--space-5), 6vw, var(--space-9))
             var(--space-9);
    padding-left: calc(var(--rail-w) + clamp(var(--space-5), 4vw, var(--space-8)));
    overflow: hidden;
    isolation: isolate;
    /* dark base so match-cut dissolves resolve through navy, never white */
    background: var(--c-navy);
  }

  .scene__media {
    position: absolute;
    inset: 0;
    z-index: 0;
  }
  .scene__media { overflow: hidden; }
  .scene__media picture {
    display: block;
    width: 100%;
    height: 100%;
  }
  .scene__media--sequence picture {
    position: absolute;
    inset: 0;
  }
  .scene__media img {
    width: 100%;
    /* small vertical bleed so subtle parallax never exposes an edge */
    height: calc(100% + 32px);
    margin-top: -16px;
    object-fit: cover;
    object-position: center;
    will-change: transform;
  }

  /* ---- Registered sequence reveal (bedroom prep, feature wall) ----
     Pixel-registered frames stacked and crossfaded on scroll. No parallax
     bleed here — the frames must stay locked for clean registration. */
  .scene__media--sequence { background: var(--c-navy); }
  .scene__media .reveal-frame {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin-top: 0;
    object-fit: cover;
    object-position: center;
    opacity: 0;
    will-change: opacity;
  }
  /* graceful no-JS / reduced-motion: show the finished state */
  .scene__media .reveal-frame:last-child { opacity: 1; }

  /* Live stage caption that ticks through the registered states */
  .reveal-stage {
    display: inline-flex;
    align-items: center;
    gap: var(--space-3);
    margin-top: var(--space-5);
    font-family: var(--font-ui);
    font-weight: 600;
    font-size: 0.78rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--c-white);
  }
  .reveal-stage__dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--c-orange);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--c-orange) 26%, transparent);
  }

  .scene__scrim {
    position: absolute;
    inset: 0;
    z-index: var(--z-scrim);
    background:
      linear-gradient(to top,
        color-mix(in srgb, var(--c-navy) 88%, transparent) 0%,
        color-mix(in srgb, var(--c-navy) 55%, transparent) 32%,
        transparent 62%),
      linear-gradient(to right,
        color-mix(in srgb, var(--c-navy) 60%, transparent) 0%,
        transparent 55%);
  }
  .scene__scrim--strong {
    background:
      linear-gradient(to top,
        color-mix(in srgb, var(--c-navy) 92%, transparent) 0%,
        color-mix(in srgb, var(--c-navy) 70%, transparent) 45%,
        color-mix(in srgb, var(--c-navy) 35%, transparent) 100%);
  }

  .scene__content {
    position: relative;
    z-index: var(--z-content);
    max-width: var(--measure);
  }
  .scene__content--center {
    margin-inline: auto;
    text-align: center;
    max-width: 46rem;
  }

  /* Estimate checklist */
  .checklist {
    margin-top: var(--space-5);
    display: grid;
    gap: var(--space-2);
  }
  .checklist li {
    position: relative;
    padding-left: 1.8em;
    color: var(--c-muted);
    font-weight: 500;
  }
  .checklist li::before {
    content: "\2713";
    position: absolute;
    left: 0;
    color: var(--c-orange-soft);
    font-weight: 700;
  }

  /* Review card */
  .review-card {
    margin-top: var(--space-3);
    max-width: 34rem;
    padding: var(--space-6);
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--c-navy) 60%, transparent);
    border: 1px solid var(--c-line);
    backdrop-filter: blur(10px);
  }
  .stars { color: var(--c-gold); font-size: 1.3rem; letter-spacing: 0.15em; }
  .review-card__quote {
    margin-top: var(--space-4);
    font-family: var(--font-display);
    font-size: clamp(1.15rem, 1rem + 0.7vw, 1.5rem);
    line-height: 1.35;
    color: var(--c-white);
  }
  .review-card__author { margin-top: var(--space-4); color: var(--c-muted); font-weight: 500; }

  /* Scroll hint (scene 1) */
  .scroll-hint {
    position: absolute;
    z-index: var(--z-content);
    right: clamp(var(--space-5), 5vw, var(--space-9));
    bottom: var(--space-7);
    display: inline-flex;
    align-items: center;
    gap: var(--space-3);
    color: var(--c-muted);
    font-size: 0.74rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
  }
  .scroll-hint__chevron { animation: bob 1.8s var(--ease) infinite; }
  @keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(4px); } }

  .scene--cta { align-items: center; }

  /* Scene 1: push the van out of the headline column + deepen the text scrim
     so the painted van wordmark recedes behind the hero copy. */
  #scene-1 .scene__media img { object-position: 72% center; }
  #scene-1 .scene__scrim {
    background:
      linear-gradient(to top,
        color-mix(in srgb, var(--c-navy) 92%, transparent) 0%,
        color-mix(in srgb, var(--c-navy) 60%, transparent) 38%,
        transparent 66%),
      linear-gradient(to right,
        color-mix(in srgb, var(--c-navy) 78%, transparent) 0%,
        color-mix(in srgb, var(--c-navy) 30%, transparent) 42%,
        transparent 62%);
  }
}

/* ============================ RESPONSIVE ============================ */
@layer responsive {
  /* ---- TABLET (768–1023px): keep a slim rail, stay desktop-like ---- */
  @media (min-width: 768px) and (max-width: 1023px) {
    :root { --rail-w: 108px; }

    .rail { gap: var(--space-6); padding: var(--space-6) var(--space-4); }
    .rail__label { font-size: 0.78rem; }
    .rail__title { font-size: 0.64rem; }
    .rail__node.is-active .rail__label { font-size: 0.8rem; }

    /* rail present → no phone chrome */
    .mobile-progress { display: none; }
    .mobile-cta { display: none; }

    .scene { padding-left: calc(var(--rail-w) + var(--space-6)); }
  }

  /* ---- PHONE (<768px): no rail, top progress + sticky CTA ---- */
  @media (max-width: 767px) {
    :root { --header-h: 64px; }

    .rail { display: none; }
    .mobile-progress { display: flex; }
    .mobile-cta { display: flex; }

    /* drop redundant header buttons; the sticky bar carries contact */
    .header-actions .btn--primary { display: none; }
    .header-call { display: none; }

    .scene {
      align-items: flex-end;
      padding:
        calc(var(--header-h) + 3.35rem + env(safe-area-inset-top, 0px))
        max(var(--space-5), env(safe-area-inset-right, 0px))
        calc(var(--space-9) + 72px + env(safe-area-inset-bottom, 0px))
        max(var(--space-5), env(safe-area-inset-left, 0px));
    }

    /* Mobile scene framing — composition tuned per beat */
    .scene__media img,
    .scene__media .reveal-frame {
      height: calc(100% + 52px);
      margin-top: -26px;
    }

    #scene-1 .scene__media img { object-position: 52% 30%; }
    #scene-2 .scene__media img { object-position: 44% 34%; }
    #scene-3 .scene__media .reveal-frame { object-position: 50% 38%; }
    #scene-4 .scene__media img { object-position: 50% 36%; }
    #scene-5 .scene__media .reveal-frame { object-position: 50% 36%; }
    #scene-6 .scene__media img { object-position: 54% 40%; }
    #scene-7 .scene__media img { object-position: 50% 32%; }
    #scene-8 .scene__media img { object-position: 58% 34%; }

    #scene-7 .scene__scrim {
      background:
        linear-gradient(to top,
          color-mix(in srgb, var(--c-navy) 94%, transparent) 0%,
          color-mix(in srgb, var(--c-navy) 68%, transparent) 40%,
          transparent 68%);
    }

    #scene-1 .scene__scrim {
      background:
        linear-gradient(to top,
          color-mix(in srgb, var(--c-navy) 94%, transparent) 0%,
          color-mix(in srgb, var(--c-navy) 62%, transparent) 36%,
          transparent 64%),
        linear-gradient(to right,
          color-mix(in srgb, var(--c-navy) 82%, transparent) 0%,
          color-mix(in srgb, var(--c-navy) 28%, transparent) 48%,
          transparent 68%);
    }
    .site-footer {
      padding-left: clamp(var(--space-4), 5vw, var(--space-7));
      padding-bottom: calc(var(--space-9) + 88px);
    }
    .scroll-hint { right: var(--space-5); }
  }

  @media (max-width: 600px) {
    .cta-row { width: 100%; }
    .cta-row .btn { flex: 1; justify-content: center; }
    .scroll-hint__text { display: none; }
    .review-card { padding: var(--space-5); }
  }

  /* Larger displays: a touch more breathing room */
  @media (min-width: 1600px) {
    :root { --measure: 42rem; }
  }
}

/* ============================ MOTION / A11Y ============================ */
@layer motion {
  /* Lenis smooth scroll (Phase 3 Wave 1) */
  html.lenis, html.lenis body { height: auto; }
  html.lenis.lenis-smooth { scroll-behavior: auto !important; }
  html.lenis-active .scene__media--camera {
    backface-visibility: hidden;
  }
  /* Floor-plane scale origin for push-in / push-out */
  #scene-1 .scene__media--camera { transform-origin: 72% 58%; }
  #scene-8 .scene__media--camera { transform-origin: 50% 52%; }
  /* Phase 3 Wave 2 — eastward travel (wall → hall → kitchen) */
  #scene-5 .scene__media--sequence.scene__media--camera,
  #scene-6 .scene__media--camera { transform-origin: 50% 65%; }
  #scene-7 .scene__media--camera { transform-origin: 50% 58%; }
  #scene-7 .scene__media--arrival {
    backface-visibility: hidden;
    transform-origin: 50% 58%;
  }

  @media (max-width: 767px) {
    #scene-1 .scene__media--camera { transform-origin: 64% 38%; }
    #scene-5 .scene__media--sequence.scene__media--camera,
    #scene-6 .scene__media--camera { transform-origin: 50% 42%; }
    #scene-7 .scene__media--camera { transform-origin: 50% 40%; }
    #scene-8 .scene__media--camera { transform-origin: 58% 45%; }
  }

  @media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
      animation-duration: 0.001ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 0.001ms !important;
    }
  }

  /* No-JS / pre-GSAP entrance (CSS-only). Once GSAP is active
     (html.gsap-ready) the JS owns reveals, so this is disabled to avoid
     double-animation. */
  @media (prefers-reduced-motion: no-preference) {
    html:not(.gsap-ready) .scene__content {
      animation: rise var(--dur-3) var(--ease) both;
    }
    @keyframes rise {
      from { opacity: 0; transform: translateY(18px); }
      to   { opacity: 1; transform: translateY(0); }
    }
  }
}
