/* The home page's opening: one continuous scroll journey (approved 26.11.2026; method in
   .claude/skills/scroll-journey/SKILL.md, the standalone build in public/prototypes/journey/).
   Everything is scoped under .jr and its classes start with jr-, so nothing here touches the rest of the site.
   The beats are windows of one progress value, set as CSS variables on .jr-stage by journey.js. */
.jr { --jr-head: 76px; --jr-night: #0e0f12; --jr-gold: #c9a86a; --jr-gold-soft: #e6d2a6; height: 2200vh; background: var(--jr-night); color: #f2f0ea; }
/* pinned under the site's header; the largest viewport, so no strip of page shows when a phone's browser bar folds */
.jr-stage { position: sticky; top: var(--jr-head); height: calc(100vh - var(--jr-head)); height: calc(100lvh - var(--jr-head)); overflow: hidden; background: var(--jr-night); }
.jr-stage > * { position: absolute; }
.jr-film { inset: 0; width: 100%; height: 100%; }
/* the same room with the lamp off, laid exactly over the lit frame: the first picture and the last */
.jr-off { left: var(--fx); top: var(--fy); width: var(--fw); height: var(--fh); max-width: none; opacity: var(--dark); pointer-events: none; }
.jr-edge { left: 0; right: 0; top: 0; height: var(--eh, 0px); pointer-events: none; background: linear-gradient(var(--jr-night) 0, var(--jr-night) var(--ey, 0px), transparent 100%); }
.jr-edge-b { left: 0; right: 0; bottom: 0; height: 0; pointer-events: none; background: linear-gradient(transparent, var(--jr-night)); opacity: var(--ebo, 0); }
.jr-shade { inset: 0; pointer-events: none; background: var(--jr-night); opacity: var(--dim); }

/* the phone, laid on the photographed screen of the lift's last frame (measured: public/journey/keys/README.md) */
.jr-rig { left: var(--rx); top: var(--ry); width: var(--rw); height: var(--rh); perspective: 1500px; direction: rtl; }
.jr-dev { position: absolute; inset: 0; transform-style: preserve-3d; opacity: calc(1 - var(--dissolve));
  transform: rotateX(calc(var(--think) * 9deg)) rotateY(calc(var(--think) * -12deg)); }
.jr-shell { position: absolute; inset: -3.5%; border-radius: 15% / 7%; background: linear-gradient(145deg, #3a3631, #121212 40%, #2b2824);
  box-shadow: 0 60px 120px -30px #000; transform: translateZ(-14px); opacity: var(--shell); }
.jr-layer { position: absolute; inset: 0; border-radius: 13% / 6%; container-type: inline-size; transform: translateZ(calc(var(--think) * var(--d) * 1px)); opacity: var(--screen); }
/* the Dynamic Island, shown with the coded screen once the filmed phone has stopped (36.6% in, 2% down, 29% x 3.6%) */
.jr-island { position: absolute; left: 35.5%; top: 2%; width: 29%; height: 3.6%; border-radius: 999px; background: #050505;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04); transform: translateZ(1px); opacity: var(--screen); }
.jr-island::after { content: ""; position: absolute; right: 12%; top: 50%; width: 15%; aspect-ratio: 1; translate: 0 -50%; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #1b2433, #050505 70%); }
.jr-l0 { --d: 0; background: radial-gradient(120% 70% at 70% 0%, #2a2620, #121316 60%); }
.jr-l1 { --d: 60; inset: 9% 8% auto; height: 11%; display: grid; align-content: center; direction: ltr; text-align: right; }
.jr-l1 b { font: 700 13cqw/1 var(--font-display, sans-serif); } .jr-l1 i { display: block; width: 11cqw; height: 1cqw; margin: 0 0 3cqw auto; background: var(--jr-gold); }
.jr-l2 { --d: 120; inset: 24% 7% auto; display: grid; gap: 3cqw; justify-items: start; }
.jr-bub { max-width: 92%; padding: 2.6cqw 3.8cqw; border-radius: 5cqw; font-size: 4.6cqw; line-height: 1.35; background: rgba(255, 255, 255, 0.1); unicode-bidi: plaintext; }
.jr-me { background: var(--jr-gold); color: #15171b; font-weight: 600; min-height: 1.35em; }
.jr-me:empty { visibility: hidden; }
.jr-bot { justify-self: end; background: #1f9d55; color: #fff; opacity: var(--reply); transform: translateY(calc((1 - var(--reply)) * 3cqw)); }
.jr-l3 { --d: 190; inset: auto 7% 5%; display: grid; gap: 2.4cqw; opacity: calc(var(--screen) * var(--reply)); }
.jr-card { padding: 3.4cqw; border-radius: 4cqw; background: rgba(255, 255, 255, 0.08); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1); font-size: 4.2cqw; display: flex; justify-content: space-between; }
.jr-card em { font-style: normal; color: var(--jr-gold); font-weight: 700; }
.jr-fly { position: absolute; left: 50%; top: 50%; padding: 11px 16px; border-radius: 15px; white-space: nowrap; font: 600 15px/1 var(--font-body, sans-serif);
  background: rgba(30, 31, 36, 0.8); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14), 0 20px 40px -20px #000;
  opacity: clamp(0, calc(var(--think) * 1.8 - 0.5), 1);
  transform: translate(-50%, -50%) translate3d(calc(var(--fx2) * var(--think)), calc(var(--fy2) * var(--think)), calc(var(--think) * 320px)); }
.jr-fly::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-inline-end: 8px; border-radius: 50%; background: var(--jr-gold); vertical-align: middle; }

/* the code: it leaves the phone's screen and builds the browser, frame and page */
.jr-glyphs { inset: 0; width: 100%; height: 100%; opacity: calc(var(--code) * (1 - var(--real))); pointer-events: none; }
.jr-browser { left: var(--bx); top: var(--by); width: var(--bw); height: var(--bh); display: flex; flex-direction: column; overflow: hidden;
  border-radius: var(--br); background: #f3eee4; box-shadow: 0 50px 120px -40px #000; opacity: calc(var(--real) * (1 - var(--city))); }
.jr-bar { flex: none; height: var(--barh); overflow: hidden; display: flex; align-items: center; gap: 7px; padding-inline: 14px; direction: ltr; }
.jr-bar i { width: 10px; height: 10px; border-radius: 50%; background: #d7cfc0; }
.jr-bar span { margin-inline: auto; font-size: 12px; color: #8d8b85; }
.jr-browser img { flex: 1; min-height: 0; width: 100%; max-width: none; object-fit: cover; object-position: 50% 30%; filter: blur(calc(var(--city) * 6px)); }  /* no scaling: the city's first picture lies exactly under it */

/* the words sit on the right of the frame in both languages: the film is not mirrored, so its empty wall is always there */
.jr-title { z-index: 5; right: max(24px, 6vw); max-width: 11ch; margin: 0; font: 700 clamp(3rem, 7.4vw, 7rem)/0.92 var(--font-display, sans-serif); letter-spacing: 0; color: #f2f0ea; text-shadow: 0 10px 40px rgba(0, 0, 0, 0.6); pointer-events: none; }
.jr-title small { display: block; margin-top: 14px; max-width: 30ch; font: 400 clamp(1rem, 1.4vw, 1.15rem)/1.55 var(--font-body, sans-serif); color: #d8d4cb; text-shadow: 0 2px 12px #000; }
.jr-kicker { display: block; margin-bottom: 10px; font: 600 14px/1 var(--font-body, sans-serif); color: var(--jr-gold); }
.jr-t1 { top: 34%; opacity: var(--o1); } .jr-t2 { bottom: 10%; opacity: var(--o2); }
.jr-t3 { top: 30%; opacity: var(--o3); } .jr-t4 { bottom: 6%; font-size: clamp(2rem, 4.4vw, 3.8rem); max-width: none; opacity: var(--o4); }
.jr-t5 { bottom: 10%; opacity: var(--o5); } .jr-t6 { top: 28%; opacity: var(--end); }
.jr-t6 .btn { margin-top: 26px; pointer-events: auto; text-shadow: none; font: 700 17px/1 var(--font-body, sans-serif); white-space: nowrap; letter-spacing: 0; }

@media (max-width: 760px) {
  .jr-edge-b { height: 16%; }
  /* on a phone the clip fills the screen, so the words go where the picture is empty: the dark wall above the desk,
     and below the page once the browser fills the screen; the phone's own screen says its line */
  .jr-t1, .jr-t2, .jr-t6 { top: 9%; } .jr-t2 { bottom: auto; } .jr-t3 { display: none; } .jr-t5 { bottom: 7%; }
  .jr-title { max-width: 9ch; font-size: clamp(2.6rem, 12vw, 3.6rem); } .jr-title small { max-width: 26ch; }
  .jr-t4 { max-width: 14ch; font-size: clamp(1.8rem, 8vw, 2.4rem); }
  .jr-t6 .btn { white-space: nowrap; margin-top: 22px; }
  .jr-fly { font-size: 12px; padding: 8px 11px; }
}

/* reduced motion: no film to scroll through, one still with the words and the button */
.jr.jr-still { height: auto; }
.jr-still .jr-stage { position: relative; top: 0; }
.jr-still .jr-rig, .jr-still .jr-glyphs, .jr-still .jr-browser, .jr-still .jr-t2, .jr-still .jr-t3, .jr-still .jr-t4, .jr-still .jr-t5, .jr-still .jr-t1 { display: none; }

/* while the film plays the site's header steps aside: it floats over the top of the stage, hidden, so nothing sits above
   the film. Once the lamp is out (html.jr-head-in, set by journey.js) it drops in with a fade, and the footer's details
   rise in as the footer comes on screen (html.jr-foot-in). Other pages are untouched. A keyboard user who tabs into the
   header brings it back at any time. */
html.jr-playing .top { position: fixed; left: 0; right: 0; opacity: 0; transform: translateY(-110%); filter: blur(6px); pointer-events: none;
  transition: opacity 700ms cubic-bezier(0.2, 0.7, 0.2, 1), transform 700ms cubic-bezier(0.2, 0.7, 0.2, 1), filter 700ms, background-color 300ms, box-shadow 300ms; }
html.jr-playing.jr-head-in .top, html.jr-playing .top:focus-within { opacity: 1; transform: none; filter: none; pointer-events: auto; }
html.jr-playing .foot .cols > *, html.jr-playing .foot .legal, html.jr-playing .foot .huge { opacity: 0; transform: translateY(36px); filter: blur(6px);
  transition: opacity 800ms cubic-bezier(0.2, 0.7, 0.2, 1), transform 800ms cubic-bezier(0.2, 0.7, 0.2, 1), filter 800ms; }
html.jr-playing.jr-foot-in .foot .cols > *, html.jr-playing.jr-foot-in .foot .legal, html.jr-playing.jr-foot-in .foot .huge { opacity: 1; transform: none; filter: none; }
html.jr-playing .foot .cols > :nth-child(2) { transition-delay: 90ms; } html.jr-playing .foot .cols > :nth-child(3) { transition-delay: 180ms; }
html.jr-playing .foot .cols > :nth-child(4) { transition-delay: 270ms; } html.jr-playing .foot .legal { transition-delay: 360ms; }
html.jr-playing .foot .huge { transition-delay: 420ms; transition-duration: 1400ms; }

/* the stage now reaches the top of the screen; the words keep exactly the places they had under the bar (--jr-gap) */
.jr-t1 { top: calc(var(--jr-gap, 0px) + (100% - var(--jr-gap, 0px)) * 0.34); }
.jr-t3 { top: calc(var(--jr-gap, 0px) + (100% - var(--jr-gap, 0px)) * 0.30); }
.jr-t6 { top: calc(var(--jr-gap, 0px) + (100% - var(--jr-gap, 0px)) * 0.28); }
.jr-t2, .jr-t5 { bottom: calc((100% - var(--jr-gap, 0px)) * 0.10); } .jr-t4 { bottom: calc((100% - var(--jr-gap, 0px)) * 0.06); }
@media (max-width: 760px) {
  .jr-t1, .jr-t2, .jr-t6 { top: calc(var(--jr-gap, 0px) + (100% - var(--jr-gap, 0px)) * 0.09); }
  .jr-t2 { bottom: auto; } .jr-t5 { bottom: calc((100% - var(--jr-gap, 0px)) * 0.07); }
}
@media (prefers-reduced-motion: reduce) { html.jr-playing .top, html.jr-playing .foot * { transition: none !important; } }
