/* Bros Cafe · D · Kollázs — home only (loaded after shell.css). Three scenes: the hero (one screen), the act (a pinned
   stage: the scroll turns the cups, then brings in the two product cards) and the visit (normal flow).
   Logic: /home.js. Scene media is set in index.html (see the comment above <main>). */

:root {
  --scene-h: calc(100vh - var(--header-h) - var(--bottom-h));
  --peek: 46px;  /* how much of the next scene's tab shows at the bottom of the hero */
  --sw: 0px;     /* preview only: height of the variant switcher above the tab bar */
  --scrub: 1.2;  /* how many screens of scroll the pinned act takes */
}
@supports (height: 100svh) { :root { --scene-h: calc(100svh - var(--header-h) - var(--bottom-h)); } }

/* ---------- scene: a sheet of coloured paper; the next one slides over it ---------- */
.scene { position: relative; isolation: isolate; background: var(--wash); }
.scene--hero { height: var(--scene-h); min-height: 420px; }
.scene__in { position: absolute; inset: 0; overflow: hidden; display: flex; flex-direction: column; gap: clamp(10px, 1.8vh, 22px); padding: clamp(14px, 2.6vh, 34px) 0 calc(var(--peek) + 12px); transform-origin: 50% 0; }
.scene__head, .scene__foot { padding: 0 var(--pad); }
.scene__head .title, .scene__head .display { margin-top: 6px; }
.scene__head .fine { margin-top: 8px; }
.scene__head .title--lg { font-size: clamp(30px, 9.4vw, 60px); }
.scene__head .display { font-size: clamp(42px, 12vw, 76px); }
/* the "next" tab: the top edge of each scene, peeking over the one before it (home.js adds it) */
.scene__tab { position: absolute; z-index: 3; left: 0; right: 0; top: calc(var(--peek) * -1); height: calc(var(--peek) + 1px); display: flex; align-items: center; justify-content: center; gap: 8px; border-radius: 26px 26px 0 0; background: var(--wash); box-shadow: 0 -1.5px 0 var(--text); font: 700 13px/1 var(--sans); letter-spacing: .05em; color: var(--text); text-decoration: none; }
.scene__tab svg { width: 16px; height: 16px; transform: rotate(90deg); }
.scene__tab:active { filter: brightness(.95); }
.scene__tab.is-past { color: transparent; pointer-events: none; } /* its scene is on screen: only the rounded edge stays */
.visit > .scene__tab { top: -26px; height: 27px; font-size: 0; pointer-events: none; }
.visit > .scene__tab svg { display: none; }

/* films: the still first, the clip fades in over it */
.film video { opacity: 0; transition: opacity .6s linear; }
.film video.is-on { opacity: 1; }
.film video.is-top { z-index: 1; }

/* ---------- chips ---------- */
.status, .now { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; padding: 7px 14px 7px 12px; border: var(--edge); border-radius: var(--r-pill); background: var(--surface); box-shadow: 0 2px 0 var(--text); font: 650 14px/1.25 var(--sans); color: var(--text); text-align: left; text-decoration: none; transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.status:active, .now:active { transform: translateY(2px); box-shadow: 0 0 0 transparent; transition-duration: var(--tap); }
.status i { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--text-faint); }
.status.is-open i { background: var(--olive); box-shadow: 0 0 0 4px rgb(var(--olive-rgb) / .2); }
.status::after { content: "›"; margin-left: 1px; font-size: 18px; line-height: 1; color: var(--text-faint); }
.now { background: var(--glow-soft); max-width: 100%; }
.now__txt { min-width: 0; font-weight: 500; text-wrap: balance; }
.now__txt b { font-weight: 700; }
.now .new { flex: none; background: var(--text); color: var(--white); }
.status[hidden], .now[hidden] { display: none; }

/* ---------- 01 hero ---------- */
.hero__text { padding: 0 var(--pad); }
.hero__text .display { margin-top: 6px; font-size: clamp(40px, 13.8vw, 64px); }
.hero__text .eyebrow { font-size: clamp(10px, 2.7vw, 12px); letter-spacing: .1em; white-space: nowrap; }
.ln { display: block; width: fit-content; }
:lang(en) .hero__text .display { font-size: clamp(30px, 9.6vw, 46px); }
.hero__stage { position: relative; flex: 1; min-height: 0; margin: 0 var(--pad); }
.hero__frame { position: absolute; inset: 0; transform-origin: 50% 60%; }
.hero__frame .cut { position: absolute; inset: 0; }
.hero__frame .status { position: absolute; left: 14px; top: 14px; max-width: calc(100% - 28px); }
.hero__frame .now { position: absolute; left: 14px; bottom: 14px; max-width: calc(100% - 28px); }
/* the stamp sits on the photo's corner, never on the headline */
.stamp { position: absolute; z-index: 2; right: -10px; top: 66px; width: 88px; height: 88px; display: grid; place-items: center; border: var(--edge); border-radius: 50%; background: var(--glow); box-shadow: 0 2px 0 var(--text); }
.stamp svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.stamp text { font: 700 11.5px var(--sans); letter-spacing: .08em; text-transform: uppercase; fill: var(--text); }
.stamp img { width: 20px; height: auto; }
.hero__side { display: none; }
.hero__actions { padding: 0 var(--pad); flex-wrap: nowrap; }
.hero__actions .btn { flex: 1 1 0; padding-inline: 14px; }

/* ---------- 02 the act: cups, then the two extras ----------
   Base = the plain layout (reduced motion, Save-Data, ?still, very low screens): a row of cups you swipe, then the two
   cards. The pinned stage and the wheel are in the "motion" block at the end. */
.act { --hl: var(--white); }
.act__stage { position: relative; display: grid; gap: clamp(30px, 6vh, 64px); padding: clamp(26px, 5vh, 56px) 0 clamp(40px, 7vh, 72px); }
.act__wash { display: none; }
.act__cups, .act__duo { display: flex; flex-direction: column; gap: clamp(10px, 1.8vh, 22px); min-width: 0; }
.act__duo { --hl: var(--blush); }
.ghost { display: none; position: absolute; z-index: -1; left: 0; top: 30%; font: 700 clamp(150px, 46vw, 420px)/1 var(--serif); font-variation-settings: "opsz" 144, var(--soft); letter-spacing: -.05em; color: rgb(255 255 255 / .36); white-space: nowrap; pointer-events: none; user-select: none; }
.cups { display: flex; gap: 14px; overflow-x: auto; padding: 16px var(--pad) 20px; scroll-snap-type: x mandatory; scroll-padding-inline: var(--pad); scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.cups::-webkit-scrollbar { display: none; }
.cups li { flex: none; width: clamp(150px, 46vw, 230px); scroll-snap-align: start; }
.cups li:nth-child(odd) { rotate: -2deg; }
.cups li:nth-child(even) { rotate: 1.6deg; }
.cup { position: relative; display: block; width: 100%; padding: 6px 6px 0; border-radius: var(--r-md); background: var(--surface); box-shadow: var(--shadow-md); color: var(--text); text-align: left; text-decoration: none; transition: transform var(--dur) var(--ease); }
.cup img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: calc(var(--r-md) - 5px); background: var(--cream-2); }
.cup__name { display: block; padding: 9px 6px 11px; font: 560 18px/1.1 var(--serif); font-variation-settings: "opsz" 30, var(--soft); letter-spacing: -.015em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cup__price { position: absolute; right: -6px; top: -8px; padding: 5px 10px; border: var(--edge); border-radius: var(--r-pill); background: var(--glow); box-shadow: 0 2px 0 var(--text); font: 700 12px/1.2 var(--sans); rotate: 5deg; }
.cup__price:empty { display: none; }
@media (hover: hover) { .cup:hover { transform: translateY(-6px) rotate(-1deg); } }
.cup:active { transform: scale(.96); transition-duration: var(--tap); }

/* the two extras: tappable cards. The text column is never clipped: the photo gives way first. */
.duo { display: grid; gap: 14px; padding: 0 var(--pad) 4px; }
.half { position: relative; display: grid; grid-template-columns: minmax(0, 36%) minmax(0, 1fr); min-height: 132px; border: var(--edge); border-radius: var(--r-lg); background: var(--wash); color: var(--text); text-decoration: none; box-shadow: 0 4px 0 var(--text); transition: translate var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.half__pic { margin: 9px 0 9px 9px; --tilt: -2.5deg; border-radius: var(--r-md); border-width: 4px; }
.half--b .half__pic { --tilt: 2.5deg; }
.half__txt { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 6px; min-width: 0; padding: 10px 12px 10px 16px; }
.half__name { font: 600 clamp(21px, 6.2vw, 44px)/1 var(--serif); font-variation-settings: "opsz" 60, var(--soft); letter-spacing: -.025em; overflow-wrap: anywhere; }
.half__line { font-size: clamp(14.5px, 1.35vw, 19px); line-height: 1.3; }
.half__fact { --tilt: -2deg; min-height: 26px; padding: 4px 10px; font-size: 12.5px; letter-spacing: .02em; text-transform: none; white-space: nowrap; }
.half .btn { min-height: 42px; margin-top: 4px; padding: 8px 16px; font-size: 14px; white-space: nowrap; }
@media (hover: hover) { .half:hover { translate: 0 -2px; box-shadow: 0 6px 0 var(--text); } }
.half:active { translate: 0 4px; box-shadow: 0 0 0 transparent; transition-duration: var(--tap); }

/* ---------- 03 the visit: the place, the loyalty card, our story ---------- */
.visit { z-index: 1; overflow-x: clip; }
.visit__in { display: grid; gap: clamp(18px, 3vh, 28px); max-width: calc(var(--max) + 2 * var(--pad)); margin: 0 auto; padding: 6px var(--pad) clamp(30px, 5vh, 56px); }
.place__text, .loy__text, .story__text { display: contents; }
.visit .scene__head { padding: 0; order: 1; }
.place__pics { order: 2; position: relative; height: clamp(190px, 36vh, 320px); margin: 4px 0 8px; }
.place__a { position: absolute; left: 0; top: 0; bottom: 0; width: 50%; --tilt: -3deg; }
.place__b { position: absolute; right: 0; top: 10%; bottom: 4%; width: 46%; --tilt: 3.5deg; }
.place__b img { object-position: 60% 50%; }
.place__tag { position: absolute; z-index: 2; left: 50%; bottom: -8px; translate: -50% 0; --tilt: -2deg; font-size: 12.5px; letter-spacing: .02em; text-transform: none; white-space: nowrap; }
.place__foot { order: 3; display: grid; gap: 8px; }
.place { font: 500 14.5px/1.45 var(--sans); color: var(--text); text-wrap: balance; }

/* the pass: a strip of ten stamps */
.loy { order: 4; display: grid; gap: 14px; padding: 18px 16px 20px; border-radius: var(--r-lg); background: var(--sage-mist); --hl: var(--white); }
.loy .title, .story .title { margin: 0; font-size: clamp(26px, 7vw, 40px); }
.loy .title { order: 1; }
.pass { order: 2; position: relative; display: grid; gap: 10px; width: 100%; max-width: 420px; padding: 13px 15px 14px; border: 1.5px solid var(--olive-deep); border-radius: 20px; background: var(--olive); color: var(--white); text-align: left; box-shadow: 0 4px 0 var(--olive-deep); rotate: -1.5deg; transition: scale var(--dur) var(--ease); }
.pass:active { scale: .97; transition-duration: var(--tap); }
.pass__top { display: flex; align-items: center; gap: 8px; }
.pass__top img { width: 16px; height: auto; }
.pass__top b { font: 600 17px/1 var(--serif); font-variation-settings: "opsz" 30, var(--soft); }
.pass__top span { margin-left: auto; font: 700 11px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; }
.pass__grid { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 5px; }
.pass__grid i { display: grid; place-items: center; aspect-ratio: 1; border-radius: 50%; border: 1.5px dashed rgb(255 255 255 / .7); }
.pass__grid i.on { border: 0; background: var(--cream); color: var(--olive-deep); }
.pass__grid svg { width: 62%; height: 62%; }
.pass__foot { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 12px; }
.pass__foot b { font: 600 16px/1.15 var(--serif); font-variation-settings: "opsz" 30, var(--soft); }
.pass__foot small { font: 600 13px/1.3 var(--sans); text-decoration: underline; text-decoration-color: rgb(255 255 255 / .7); text-underline-offset: 4px; }
.loy .actions { order: 3; }

.story { order: 5; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 10px 16px; align-items: center; --hl: var(--glow); }
.story__team { position: relative; grid-row: span 2; margin: 0; }
.story__team .cut { aspect-ratio: 3 / 2; --tilt: -2deg; border-width: 4px; }
.story__team figcaption { position: absolute; left: 8px; bottom: -12px; --tilt: 3deg; }
.story .eyebrow { align-self: end; }
.story .title { align-self: start; font-size: clamp(22px, 6vw, 40px); }
.story .body { grid-column: 1 / -1; margin-top: 8px; max-width: none; }

/* ---------- low phone screens (browser bars showing, small phones) ---------- */
@media (max-height: 760px) and (max-width: 899.98px) {
  .scene__head .fine, .hero__text .eyebrow { display: none; }
  .hero__text .display { font-size: clamp(36px, 12.4vw, 56px); }
  .scene__head .title--lg { font-size: clamp(27px, 8.2vw, 44px); }
  .scene__head .display { font-size: clamp(36px, 10.4vw, 56px); }
  .place { font-size: 13.5px; }
}
@media (max-height: 700px) and (max-width: 899.98px) { :root { --scrub: 1.05; } }
@media (max-height: 640px) and (max-width: 899.98px) {
  .stamp { display: none; }
  .act .eyebrow { display: none; }
}

/* ---------- scene index (desktop rail) ---------- */
.reel { display: none; }
.reel__name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }


/* ---------- detail panel: on phones a sheet with the shell's physics (BROS.shell.sheet) ---------- */
.panel { position: fixed; inset: auto 0 0 0; width: 100%; max-width: 560px; max-height: 88vh; max-height: 88dvh; margin: 0 auto; padding: 0; border: var(--edge); border-bottom: 0; border-radius: var(--r-lg) var(--r-lg) 0 0; background: var(--bg); color: var(--text); box-shadow: var(--shadow-lg); overflow: auto; overscroll-behavior: contain; }
.panel::backdrop { background: rgb(var(--text-rgb) / .34); opacity: var(--sheet-p, 1); }
.panel__grab { position: sticky; z-index: 3; top: 0; height: 34px; margin: 0 0 -34px; padding: 9px 0 0; background: none; }
.panel__grab::before { margin: 0 auto; background: rgb(var(--text-rgb) / .4); box-shadow: 0 0 0 1.5px rgb(255 255 255 / .7); }
.panel__close { position: sticky; z-index: 4; top: 10px; float: right; margin: 10px 10px -58px 0; display: grid; place-items: center; width: 48px; height: 48px; border: var(--edge); border-radius: 50%; background: var(--surface); color: var(--text); transition: transform var(--tap); }
.panel__close:active { transform: scale(.88); }
.panel__close svg { width: 22px; height: 22px; }
.panel__photo { width: 100%; aspect-ratio: 5 / 4; object-fit: cover; background: var(--cream-2); }
.panel__body { padding: 34px var(--pad-panel, 22px) calc(26px + var(--safe-b)); }
.panel__photo + .panel__body { padding-top: 22px; }
.panel__body > * + * { margin-top: 12px; }
.panel__title { font: 560 clamp(30px, 4vw, 40px)/1.02 var(--serif); font-variation-settings: "opsz" 60, var(--soft); letter-spacing: -.025em; padding-right: 52px; }
.panel__photo + .panel__body .panel__title { padding-right: 0; }
.panel__price { width: fit-content; padding: 5px 12px; border: var(--edge); border-radius: var(--r-pill); background: var(--glow); font: 700 14px/1.3 var(--sans); }
.panel__body .body { margin-top: 12px; max-width: none; font-size: 16px; }
.panel__tip { padding: 14px 16px; border-radius: var(--r-md); background: var(--sage-mist); font-size: 15px; line-height: 1.55; }
.panel__tip b { display: block; margin-bottom: 4px; font: 700 11px/1.4 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--olive-deep); }
.panel__body .actions { margin-top: 18px; }
.hours { width: 100%; border-collapse: collapse; font-size: 16px; }
.hours th, .hours td { padding: 12px 0; border-bottom: 1px solid var(--line); text-align: left; font-weight: 400; }
.hours td { text-align: right; font-variant-numeric: tabular-nums; }
.hours tr.is-today th, .hours tr.is-today td { font-weight: 700; color: var(--olive-deep); }
.panel__status { display: flex; align-items: center; gap: 10px; font: 650 15px/1.3 var(--sans); }
.panel__status i { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--text-faint); }
.panel__status.is-open i { background: var(--olive); box-shadow: 0 0 0 4px rgb(var(--olive-rgb) / .2); }
@media (min-width: 700px) {
  .panel { inset: 0; margin: auto; height: fit-content; max-width: 820px; border-bottom: var(--edge); border-radius: var(--r-lg); --pad-panel: 34px; }
  .panel__grab { display: none; }
  .panel--photo .panel__in { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
  .panel--photo .panel__photo { height: 100%; min-height: 420px; aspect-ratio: auto; }
  .panel--photo .panel__body { padding-top: 64px; align-self: center; }
  .panel:not(.panel--photo) { max-width: 520px; }
}
@media (prefers-reduced-motion: no-preference) and (min-width: 700px) {
  .panel[open] { animation: panel-in .3s var(--ease); }
  .panel[open]::backdrop { animation: panel-fade .25s linear; }
}
@keyframes panel-in { from { opacity: 0; transform: translateY(20px) scale(.98); } }
@keyframes panel-fade { from { opacity: 0; } }

/* ---------- desktop / landscape tablet ---------- */
@media (min-width: 900px) {
  :root { --peek: 0px; --scrub: 1.5; }
  .scene--hero { min-height: 580px; }
  .scene__tab { top: -26px; height: 27px; font-size: 0; pointer-events: none; }
  .scene__tab svg { display: none; }
  .scene__in { padding: clamp(24px, 5vh, 56px) max(var(--pad), calc((100vw - var(--max)) / 2)); justify-content: center; }
  .scene__head, .scene__foot, .hero__text, .hero__actions { padding-inline: 0; }
  .scene__head .title--lg { font-size: clamp(46px, 5vw, 78px); }
  .scene__head .display { font-size: clamp(60px, 7vw, 116px); }

  /* hero: type left, the 4:5 film as a tilted card right */
  .scene--hero .scene__in { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: 1fr auto auto 1fr; column-gap: clamp(50px, 8vw, 150px); row-gap: 30px; align-items: center; }
  .hero__text { grid-column: 1; grid-row: 2; }
  .hero__text .display { font-size: clamp(50px, 6.3vw, 104px); }
  .hero__text .eyebrow { font-size: 12px; letter-spacing: .16em; white-space: normal; }
  :lang(en) .hero__text .display { font-size: clamp(44px, 5vw, 80px); }
  .hero__actions { grid-column: 1; grid-row: 3; flex-wrap: wrap; }
  .hero__actions .btn { flex: none; min-height: 54px; padding-inline: 30px; font-size: 16px; }
  .hero__stage { grid-column: 2; grid-row: 1 / -1; flex: none; margin: 0; height: min(calc(var(--scene-h) - 110px), 700px, 52vw); min-height: 400px; aspect-ratio: 4 / 5; }
  .hero__frame { rotate: 2deg; }
  .stamp { right: auto; left: -62px; top: 30px; width: 124px; height: 124px; }
  .stamp img { width: 28px; }
  .hero__side { position: absolute; z-index: 2; left: -96px; bottom: 7%; width: 172px; --tilt: -6deg; }

  /* the act */
  .act__stage { padding-inline: max(var(--pad), calc((100vw - var(--max)) / 2)); }
  .cups { padding-inline: 4px; margin-inline: -4px; }
  .duo { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(18px, 2.4vw, 36px); padding-inline: 0; }
  .half { grid-template-columns: minmax(0, 40%) minmax(0, 1fr); min-height: 300px; }
  .half__pic { margin: 16px 0 16px 16px; border-width: 5px; }
  .half__txt { gap: 12px; padding: 24px clamp(18px, 2.4vw, 34px); }
  .half__name { font-size: clamp(24px, 2.3vw, 38px); }
  .half__fact { font-size: 14px; padding: 6px 14px; }
  .half .btn { min-height: 48px; margin-top: 8px; padding: 11px 22px; font-size: 15px; }

  /* the visit: collage left, text right; below them the card and the story side by side */
  .visit__in { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(30px, 5vh, 56px) clamp(40px, 6vw, 100px); align-items: center; padding-top: clamp(30px, 6vh, 70px); padding-bottom: clamp(50px, 8vh, 90px); }
  .place__text { display: grid; gap: 26px; }
  .place__pics { order: 0; height: min(calc(var(--scene-h) - 300px), 520px); min-height: 360px; margin: 0; }
  .place__a { left: 4%; width: 46%; }
  .place__b { right: 4%; width: 42%; }
  .place__tag { font-size: 14px; padding: 8px 16px; bottom: 4%; }
  .place__foot { gap: 14px; }
  .place { font-size: 17px; }
  .loy, .story { order: 0; align-self: stretch; }
  .loy { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 28px; padding: 30px; }
  .loy__text { display: grid; gap: 18px; }
  .loy .title, .story .title { font-size: clamp(28px, 2.6vw, 40px); }
  .pass { order: 0; padding: 18px 20px; rotate: -3deg; }
  .pass__grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 9px; }
  .story { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 28px; }
  .story__text { display: block; }
  .story__team { grid-row: auto; }
  .story .body { margin-top: 12px; }

  /* the index: a rail on the right edge */
  .reel { position: fixed; z-index: 40; right: 14px; top: calc(var(--header-h) + (100vh - var(--header-h)) / 2); transform: translateY(-50%); display: flex; flex-direction: column; align-items: center; width: 46px; padding: 8px 0 4px; border: var(--edge); border-radius: var(--r-pill); background: var(--surface); white-space: nowrap; }
  .reel[hidden] { display: none; }
  .reel ol { display: flex; flex-direction: column; }
  .reel a { position: relative; display: grid; place-items: center; width: 44px; height: 28px; text-decoration: none; }
  .reel a::before { content: ""; width: 8px; height: 8px; border-radius: var(--r-pill); background: rgb(var(--olive-rgb) / .4); transition: height var(--dur) var(--ease), background .2s; }
  .reel a:hover::before { background: var(--olive); }
  .reel a[aria-current="true"] { height: 38px; }
  .reel a[aria-current="true"]::before { height: 24px; background: var(--olive); }
  .reel a:hover .reel__name, .reel a:focus-visible .reel__name { right: 54px; top: 50%; width: auto; height: auto; overflow: visible; clip-path: none; transform: translateY(-50%); padding: 8px 14px; border: var(--edge); border-radius: var(--r-pill); background: var(--surface); font: 650 13px/1 var(--sans); color: var(--text); }
  .reel__next { display: grid; place-items: center; width: 36px; height: 36px; margin-top: 6px; border-radius: 50%; background: var(--olive); color: var(--on-accent); transition: transform var(--tap); }
  .reel__next:active { transform: scale(.88); }
  .reel__next svg { width: 16px; height: 16px; transform: rotate(90deg); transition: transform var(--dur) var(--ease); }
  .reel__next.is-up svg { transform: rotate(-90deg); }
  .reel__next span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
}
@media (min-width: 1100px) { .hero__side { display: block; } }

/* very low screens (phone on its side): the hero grows with its content */
@media (max-height: 520px) {
  .scene--hero { height: auto; min-height: var(--scene-h); }
  .scene--hero .scene__in { position: relative; }
  .hero__stage { min-height: 300px; }
}

/* ==================== motion: the scroll drives it ====================
   [data-m] has an entry animation (--in, while its scene comes up) and an exit animation (--out, while the scene is
   covered by the next); --a/--b and --c/--d are where in that stretch it starts and ends (0–1).
   [data-s] is scrubbed while the act is pinned: one animation (--s) between --a and --b of the pinned stretch.
   Natively the scene's view timeline runs the keyframes (compositor); without scroll-driven animations home.js writes
   --pin / --pout / --p on the scene and the same keyframes are scrubbed through animation-delay. "still" has none of it.
   Only transform and opacity move. */
[data-m] { --in: m-none; --out: m-none; --a: 0; --b: 1; --c: 0; --d: 1; }
[data-s] { --s: m-none; --a: 0; --b: 1; }
.live.sda :is(.scene, .loy, .story) { view-timeline: --scene block; view-timeline-inset: var(--header-h) var(--bottom-h); }
.live.sda [data-m] { animation: linear both, linear forwards; animation-name: var(--in), var(--out); animation-timeline: --scene, --scene; animation-range: entry calc(var(--a) * 100%) entry calc(var(--b) * 100%), exit calc(var(--c) * 100%) exit calc(var(--d) * 100%); }
.live.no-sda [data-m] { animation: 1s linear both paused, 1s linear forwards paused; animation-name: var(--in), var(--out); animation-delay: calc(clamp(0, (var(--pin, 1) - var(--a)) / (var(--b) - var(--a)), 1) * -1s), calc((.0001 - clamp(0, (var(--pout, 0) - var(--c)) / (var(--d) - var(--c)), 1)) * 1s); }

/* the hero, while it is covered: the sheet sinks back, the film shrinks into a tilted card, the headline parts */
.scene--hero .scene__in { --out: m-recede; }
@keyframes m-recede { to { transform: translateY(26%) scale(.93); opacity: .5; } }
.hero__frame { --out: m-film-out; }
.ln--a { --out: m-part-l; --d: .8; }
.ln--b { --out: m-part-r; --d: .8; }
.hero__text .eyebrow { --out: m-fade; --d: .5; }
.stamp { --out: m-spin; }
.hero__side { --out: m-side-out; }
@keyframes m-film-out { to { transform: translateY(-9%) scale(.6) rotate(-9deg); } }
@keyframes m-part-l { to { transform: translateX(-46%); opacity: 0; } }
@keyframes m-part-r { to { transform: translateX(46%); opacity: 0; } }
@keyframes m-fade { to { opacity: 0; } }
@keyframes m-spin { to { transform: translateY(-60%) rotate(220deg); } }
@keyframes m-side-out { to { transform: translate(-40%, -120%) rotate(-40deg); } }

/* heads: rise into place, one line after the other */
.scene__head > [data-m] { --in: m-rise; --a: .3; --b: .95; }
.scene__head > [data-m]:nth-child(2) { --a: .38; --b: 1; }
.scene__head > [data-m]:nth-child(3) { --a: .46; --b: 1; }
@keyframes m-rise { from { transform: translateY(70px); opacity: 0; } }

/* the visit: two photos slide together, the address label drops on top; the card and the story rise */
.place__a { --in: m-pic-l; --a: .1; --b: .9; }
.place__b { --in: m-pic-r; --a: .2; --b: .95; }
.place__tag { --in: m-drop; --a: .7; --b: 1; }
.place__foot { --in: m-rise; --a: .4; --b: 1; }
.loy, .story { --in: m-rise; --a: .1; --b: .7; }
@keyframes m-pic-l { from { transform: translate(-70%, 24%) rotate(-16deg); } }
@keyframes m-pic-r { from { transform: translate(80%, 34%) rotate(18deg); } }
@keyframes m-drop { from { transform: translateY(-80px) rotate(-18deg) scale(1.5); opacity: 0; } }

/* ---------- the act, pinned: the stage stays on screen for --scrub screens of scroll ----------
   0 – .58 the wheel of cups turns (every cup passes the middle) · .56 – .8 the wheel sinks, the paper turns blush ·
   .66 – .96 the two cards come in from the sides and meet · the rest is a hold. */
@media (min-height: 521px) {
  .live .act { height: calc(var(--scene-h) * (1 + var(--scrub))); }
  .live .act__stage { position: sticky; top: var(--header-h); display: block; height: var(--scene-h); padding: 0; overflow: hidden; overflow: clip;
    --cw: clamp(140px, min(62vw, calc((var(--scene-h) - var(--sw) - 205px) * .7)), 320px); /* cup card width */
    --ch: calc(var(--cw) * 1.25 + 44px); --R: calc(var(--cw) * 5); --step: 13.2deg; /* card height, wheel radius, angle between two cups */
    --w0: 0; --w1: calc(1 - var(--n)); /* the wheel's turn, in cups: from the first in the middle to the last */ }
  .live .act__wash { display: block; position: absolute; inset: 0; background: var(--blush-soft); --s: s-fade-in; --a: .58; --b: .8; }
  .live .ghost { display: block; --s: s-drift; }
  .live .act__cups, .live .act__duo { position: absolute; inset: 0; padding: clamp(14px, 2.6vh, 34px) 0 calc(12px + var(--sw)); }
  .live .act__duo { pointer-events: none; }
  .live .half { pointer-events: auto; }
  .live .act__head { --s: s-up-out; --a: .56; --b: .68; }
  .live .act__foot { position: relative; z-index: 2; text-align: center; --s: s-fade-out; --a: .54; --b: .62; }
  .live .wheel { position: relative; flex: 1; min-height: 0; display: grid; place-items: center; --s: s-sink; --a: .56; --b: .76; }
  .live .wheel__slot { position: relative; width: var(--cw); height: var(--ch); transform-origin: 50% var(--R); --in: m-wheel-in; --a: .1; --b: 1; }
  .live .cups { position: absolute; left: 50%; top: var(--R); display: block; width: 0; height: 0; margin: 0; padding: 0; overflow: visible; --s: s-wheel; --a: .03; --b: .58; }
  .live .cups li { position: absolute; left: calc(var(--cw) / -2); top: 0; width: var(--cw); rotate: none; transform-origin: 50% 0; transform: rotate(calc(var(--i) * var(--step))) translateY(calc(var(--R) * -1)); }
  .live .act__duo .eyebrow { --s: s-rise; --a: .68; --b: .8; }
  .live .act__duo .title { --s: s-rise; --a: .7; --b: .84; }
  .live .act__duo .duo { flex: 1; min-height: 0; grid-template-rows: repeat(2, minmax(0, 1fr)); }
  .live .half { min-height: 0; }
  .live .half--a { --s: s-from-l; --a: .66; --b: .9; }
  .live .half--b { --s: s-from-r; --a: .72; --b: .96; }

  .live.sda [data-s] { animation: var(--s) linear both; animation-timeline: --scene; animation-range: contain calc(var(--a) * 100%) contain calc(var(--b) * 100%); }
  .live.no-sda [data-s] { animation: var(--s) 1s linear both paused; animation-delay: calc(clamp(0, (var(--p, 0) - var(--a)) / (var(--b) - var(--a)), 1) * -1s); }
}
@keyframes m-wheel-in { from { transform: rotate(calc(var(--step) * 2.4)); } }
@keyframes s-wheel { from { transform: rotate(calc(var(--step) * var(--w0))); } to { transform: rotate(calc(var(--step) * var(--w1))); } }
@keyframes s-sink { to { transform: translateY(46%) scale(.86); opacity: 0; } }
@keyframes s-drift { from { transform: translateX(34%); } to { transform: translateX(-52%); } }
@keyframes s-fade-in { from { opacity: 0; } }
@keyframes s-fade-out { to { opacity: 0; } }
@keyframes s-up-out { to { transform: translateY(-46px); opacity: 0; } }
@keyframes s-rise { from { transform: translateY(60px); opacity: 0; } }
@keyframes s-from-l { from { transform: translateX(-100vw) rotate(-9deg); } }
@keyframes s-from-r { from { transform: translateX(100vw) rotate(9deg); } }

/* phones, pinned: short screens drop the button (the whole card is the link) so the price always fits */
@media (min-height: 521px) and (max-width: 899.98px) {
  .live .half .btn { display: none; }
  .live .half::after { content: "→"; position: absolute; right: 14px; bottom: 9px; font: 700 18px/1 var(--sans); }
}
@media (min-height: 780px) and (max-width: 899.98px) {
  .live .half .btn { display: inline-flex; }
  .live .half::after { content: none; }
}
/* desktop, pinned: a wider, flatter wheel (five cups on screen), the cards side by side */
@media (min-height: 521px) and (min-width: 900px) {
  .live .act__stage { padding-inline: 0;
    --cw: clamp(190px, min(17vw, calc((var(--scene-h) - 330px) * .62)), 300px); --R: calc(var(--cw) * 5.2); --step: 12.6deg;
    --w0: -1.5; --w1: calc(2.5 - var(--n)); }
  .live .act__cups, .live .act__duo { padding: clamp(24px, 5vh, 56px) max(var(--pad), calc((100vw - var(--max)) / 2)); }
  .live .act__duo { justify-content: center; }
  .live .act__head { text-align: center; }
  .live .act__head .title, .live .act__head .fine { margin-inline: auto; }
  .live .act__duo .duo { flex: none; height: min(100% - 190px, 520px); grid-template-rows: none; }
  .live .ghost { top: auto; bottom: -.16em; font-size: clamp(300px, 34vw, 560px); }
}

/* first paint: the hero arrives once, quickly; after that everything belongs to the scroll */
.live .hero__text, .live .hero__stage, .live .hero__actions { animation: hero-in .7s var(--ease) both; }
.live .hero__stage { animation-delay: .08s; }
.live .hero__actions { animation-delay: .16s; }
@keyframes hero-in { from { opacity: 0; transform: translateY(26px); } }
