/* The homepage film (SPEC_V3_1). Each scene keeps its source site's own background and its own type:
   fruits = Playfair Display italic + Inter Tight (v3.22: the devices opening is set in the site's own sans, like the hero) · v3.23: the makeover = Inter Tight (css/makeover.css) · car = Marcellus + Helvetica Neue.
   Nothing of ours sits over the frames except the text and the minimal header: no plates, glass, grain or veil. */
@font-face { font-family: 'Fr Playfair'; src: url('../fonts/playfair-display-wght-italic.woff2') format('woff2'); font-weight: 400 900; font-style: italic; font-display: swap; }
/* v3.23: the salon scene's Newsreader is retired with the salon turn (the makeover is set in Inter Tight, the site's own --sans) */
@font-face { font-family: 'Pt Inter'; src: url('../fonts/inter-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Pt Inter'; src: url('../fonts/inter-latin-500-normal.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Car Marcellus'; src: url('../fonts/marcellus-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }

.film { position: relative; height: 1390vh; background: #fff; }
.film .anchor { position: absolute; left: 0; top: calc(var(--at, 0) * 1vh); width: 1px; height: 1px; }
.film-stage { position: sticky; top: 0; height: 100vh; height: 100lvh; overflow: hidden; background: #fff; contain: layout paint; }   /* v3.20 §3: the large viewport, explicitly (iOS Safari: = 100vh; the frame is drawn to this height) */
.layer { position: absolute; inset: 0; }

/* SPEC_V3_2 §5 — classic "through colour" transitions: the outgoing scene stays put while the next scene's own background
   (its layer, opacity driven by film.js) fades in over it; then the incoming scene's content fades in with a slight
   settle (scale 1.03 -> 1). Layers are stacked in film order: hero < fruits < paint < car < white page. */
.l-fruits, .l-make, .l-car, .l-white { visibility: hidden; opacity: 0; will-change: opacity; }
.l-white { z-index: 4; background: #fff; }
.settle { transform-origin: 50% 50%; will-change: opacity, transform; }

/* scene 1 — the dessert site's studio (its .hero__bg / .hero__edge layers, same gradients and the same ellipse mask) */
.l-fruits { z-index: 1; }
.fr-bg, .fr-edge { position: absolute; inset: 0; background: radial-gradient(70% 70% at 12% 4%, #FBF7F5 0%, rgba(251, 247, 245, 0) 70%), radial-gradient(120% 100% at 50% 48%, #E3DAD4 0%, #DCD3CC 55%, #D4CBC4 100%); }
.fr-edge { -webkit-mask-image: radial-gradient(var(--erx, 50%) var(--ery, 50%) at var(--ex, 50%) var(--ey, 50%), rgba(0, 0, 0, 0) 62%, #000 100%), linear-gradient(to bottom, rgba(0, 0, 0, 0) calc(100% - 110px), #000 calc(100% - 12px));
  mask-image: radial-gradient(var(--erx, 50%) var(--ery, 50%) at var(--ex, 50%) var(--ey, 50%), rgba(0, 0, 0, 0) 62%, #000 100%), linear-gradient(to bottom, rgba(0, 0, 0, 0) calc(100% - 110px), #000 calc(100% - 12px)); pointer-events: none; }
.fr-cv { position: absolute; left: 0; top: 0; max-width: none; } /* wider than a tablet screen: never clamp (v3.1 bug: hard edge at 768) */
/* v3.19 (SPEC_V3_19): desktop = the floating devices. The layer is the video's own backdrop (film.js sets its colour from data/devices.json);
   the canvas fills the screen, so the dessert studio's gradient and ellipse edge are not used. v3.25 §3: the exit's scale + edge blur
   (.dv-cvb) is gone: the devices leave by the fly-in played backwards. */
.l-fruits.dv .fr-bg, .l-fruits.dv .fr-edge { display: none; }

/* scene 2 — v3.23 §2: the website makeover (css/makeover.css; its layer is the page's white) */

/* scenes 4–6 — the car site's paper */
.l-car { z-index: 3; background: #F9FAF4; } /* sampled from the car frames (drive + morph: rgb 249,250,244) */
.car-drive, .car-morph { position: absolute; will-change: opacity, transform; }
.car-drive canvas, .car-morph canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.car-drive { -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 1.5%, #000 98.2%, transparent 99.7%); mask-image: linear-gradient(to bottom, transparent 0, #000 1.5%, #000 98.2%, transparent 99.7%); }
.car-drive.is-v { -webkit-mask-image: none; mask-image: none; }
.car-drive { opacity: 0; }
.car-morph { opacity: 0;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 4%, #000 96%, transparent 100%), linear-gradient(to bottom, transparent 0, #000 2%, #000 94%, transparent 100%); -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent 0, #000 4%, #000 96%, transparent 100%), linear-gradient(to bottom, transparent 0, #000 2%, #000 94%, transparent 100%); mask-composite: intersect; }
.car-morph.is-v { -webkit-mask-image: linear-gradient(to right, transparent 0, #000 2%, #000 98%, transparent 100%), linear-gradient(to bottom, transparent 0, #000 3%, #000 97%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0, #000 2%, #000 98%, transparent 100%), linear-gradient(to bottom, transparent 0, #000 3%, #000 97%, transparent 100%); }

/* hero — white, one giant line, the italic "Scroll" cue */
.l-hero { z-index: 0; pointer-events: none; background: #fff; }
/* SPEC_V3_2 §1: ≈ 62 % of the v3.1 size (23.4 vw -> 14.6 vw), one line, centred, with white space all round; the centred
   line starts ≥ 20 % of the width in, far clear of the page dots' column (0–22 px) */
.hero-h { position: absolute; left: max(var(--g), 48px); right: max(var(--g), 48px); top: 50%; translate: 0 -50%; text-align: center; will-change: opacity; }
.hero-title { font: 600 clamp(56px, 14.6vw, 300px)/.86 var(--sans); letter-spacing: -.062em; color: var(--ink); white-space: nowrap; position: relative; display: inline-block; pointer-events: auto; }
.hero-title .ht-dom { display: inline-block; }
.hero-title.gl .ht-dom { color: transparent; }
.hero-title canvas { position: absolute; left: 0; top: 0; pointer-events: none; max-width: none; }
/* SPEC_V3_4 §9 A: the normal arrow over the headline and its hover canvas; the DOM text stays for screen readers / SEO */
.hero-title, .hero-title * { cursor: default; -webkit-user-select: none; user-select: none; }
/* SPEC_V3_4 §9 B: the intro overlay — absolutely placed over the reserved final line, so nothing shifts */
.ht-intro { display: none; }
html.intro .hero-title .ht-dom { color: transparent; }
html.intro .ht-intro, .ht-intro.ending { display: block; position: absolute; inset: 0; pointer-events: none; }
/* no font-swap shift: the overlay shows only once the headline font is in (intro.js adds .fonts-in) */
html.intro:not(.fonts-in) .ht-intro { visibility: hidden; }
.hi { position: absolute; top: 0; white-space: nowrap; }
.hi-a { left: 50%; translate: -50% 0; }
.hi-b { left: 0; }
.hi-b .ch { opacity: 0; }
.hi .ch { display: inline-block; white-space: pre; will-change: transform, opacity, filter; }
.ht-intro.ending { transition: opacity .28s ease; opacity: 0; }
.scroll-cue { position: absolute; right: var(--g); bottom: 22px; }
.scroll-cue i { font-size: 22px; }
.hero-index { position: absolute; left: var(--g); bottom: 22px; }
.hero-index i { font-size: 30px; }
@media (max-width: 767px) {
  /* v3.16 §2b (owner): ONE line, centred both ways, fit to the width: "It just clicks." measures 4.603 em at this weight and tracking
     (tools/v316_probe.py), so 19.55 vw makes the line 90 % of the screen at every phone width; no wrapping */
  .hero-h { top: 50%; left: 0; right: 0; text-align: center; }
  .hero-title { white-space: nowrap; max-width: none; font-size: 19.55vw; line-height: .86; letter-spacing: -.06em; }
  .hi-b { left: 0; right: 0; text-align: center; }
}

/* the text beats (word reveal driven by film.js) */
.beats { position: absolute; inset: 0; z-index: 5; pointer-events: none; }
.beat { position: absolute; visibility: hidden; }
.beat.on { visibility: visible; }
.beat .w { display: inline-block; vertical-align: top; padding-bottom: .12em; margin-bottom: -.12em; }   /* v3.6: no mask: words rise ≤ 20 px with a blur, never slide out of a box */
.beat .w > span { display: inline-block; will-change: transform, opacity, filter; transform: translate3d(0, 20px, 0); opacity: 0; }
/* v3.10 §1 (owner: variant B): the film's last point, a solid black button under the car (v3.11 §4: alone, the call line is gone).
   film.js places the block (top) from the car's real box; it fades/rises in with the scene's text, a little after the line. */
.b-cta { left: 50%; translate: -50% 0; top: 80vh; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; width: max-content; }
.b-cta .fbtn { pointer-events: auto; opacity: 0; display: inline-flex; align-items: center; gap: 22px; height: 62px; padding: 0 16px 0 30px; background: #0d0d0d; color: #fff; border-radius: 0;
  font: 700 15px/1 var(--sans); letter-spacing: .01em; text-transform: uppercase; text-decoration: none; transition: background-color .45s var(--ease); }
.b-cta .fbtn .fb-c { width: 30px; height: 30px; border-radius: 50%; background: #fff; color: #0d0d0d; display: grid; place-items: center; overflow: hidden; font-size: 15px; }
.b-cta .fbtn .fb-c svg { display: block; transition: transform .45s var(--ease); } /* ui-polish: an SVG arrow, centred exactly in the circle */
.b-cta .fbtn:hover, .b-cta .fbtn:focus-visible { background: var(--blue); }
.b-cta .fbtn:hover .fb-c svg, .b-cta .fbtn:focus-visible .fb-c svg { transform: translateX(4px); }
.b-cta .fbtn:focus-visible { outline: 2px solid #0d0d0d; outline-offset: 4px; }

.b-fruits { left: 50%; top: max(calc(var(--hdr) + 3vh), 12vh); width: min(86vw, 980px); translate: -50% 0; text-align: center; color: #3B2230; }
@media (min-width: 768px) { .b-fruits, .b-fruits .line { color: var(--ink); } }   /* v3.23 §1: desktop's clip is white now: the site's ink, like "It just clicks." (phones keep the beige clip and its ink) */
.b-fruits .head { font: 600 clamp(34px, 3.7vw, 60px)/1.08 var(--sans); letter-spacing: -.045em; }   /* v3.22 §2: the hero's face and weight ("It just clicks.": Inter Tight 600, tight tracking), not Playfair italic */
.b-fruits .line { font: 500 clamp(18px, 1.5vw, 23px)/1.45 'Inter Tight', sans-serif; letter-spacing: -.005em; color: #3B2230; max-width: 23em; margin: 0 auto; }
/* v3.19: desktop — "Looking / for a / website?" in three centred lines, large, in the devices' free gap (film.js measures it and sets
   --dh-top / --dh-size; v3.20: no rule, the line follows at --dl-top). The scene's own ink on the video's beige: 8.8 : 1. */
@media (min-width: 768px) {
  html:not(.rm) .b-fruits.dv { left: 0; top: 0; width: 100%; height: 100%; translate: none; }
  html:not(.rm) .b-fruits.dv .head { position: absolute; left: 50%; top: var(--dh-top, 26vh); translate: -50% 0; font-size: var(--dh-size, 7.5vw); line-height: .94; letter-spacing: -.045em; white-space: nowrap; }
  html:not(.rm) .b-fruits.dv .head .fl { display: block; width: max-content; margin: 0 auto; }
  html:not(.rm) .b-fruits.dv .line { position: absolute; left: 50%; top: var(--dl-top, 74vh); translate: -50% 0; width: max-content; margin: 0; font-size: clamp(18px, 1.25vw, 30px); }   /* ui-polish: the answer keeps up with the large question (2560: 30 px, was the film's 23) */
  .rm .b-fruits.dv { justify-content: center; padding-top: 0; }   /* v3.22: centred both ways on the settled still */
  .rm .b-fruits.dv .head .fl { display: block; }
  .rm .b-fruits.dv .head { font-size: clamp(44px, 6vw, 120px); line-height: .94; margin: 0 0 clamp(22px, 1.9vw, 44px); }
}

.b-make { left: max(44px, 5vw); top: 50%; translate: 0 -50%; width: 26vw; color: var(--ink); }   /* v3.23 §2: the left column; the window starts at 34vw (js/makeover.js) */
.b-make .head { font: 600 clamp(34px, 3.7vw, 60px)/1.02 var(--sans); letter-spacing: -.045em; text-wrap: balance; }   /* the hero's voice ("It just clicks.": Inter Tight 600, tight tracking), the film's headline size */
/* ui-polish: portrait tablets (taller than 1.15 x the width, as film.js isPortrait) stack: the headline centred at the top, the window below */
@media (min-width: 768px) and (max-aspect-ratio: 20/23) { html:not(.rm) .b-make { left: var(--g); right: var(--g); width: auto; top: calc(var(--hdr) + 6vh); translate: none; text-align: center; } html:not(.rm) .b-make .head { font-size: clamp(40px, 5.6vw, 64px); } }

.b-car { left: 6vw; top: max(calc(var(--hdr) + 5vh), 14vh); width: min(44vw, 680px); color: #111A21; }
.b-car .head { font: 400 clamp(34px, 3.7vw, 60px)/1.08 'Car Marcellus', 'Trajan Pro', Georgia, serif; letter-spacing: .005em; }
.b-car .line { font: 500 clamp(18px, 1.5vw, 23px)/1.45 'Helvetica Neue', Helvetica, 'Pt Inter', Arial, sans-serif; letter-spacing: -.005em; color: #1f2830; margin-top: 0; max-width: 23em; }   /* v3.9 §3: full ink */
/* SPEC_V3_3 chapter 5: "Built for the next step." sits centred and is uncovered behind the car — film.js sets --edge (px
   from the block's left) to the car's trailing edge each frame; left of it the words are masked, with a 64 px soft edge */
.b-away { left: 50%; top: 50%; translate: -50% -50%; width: min(80vw, 860px); text-align: center;
  -webkit-mask-image: linear-gradient(to right, transparent var(--edge, 99999px), #000 calc(var(--edge, 99999px) + 64px));
  mask-image: linear-gradient(to right, transparent var(--edge, 99999px), #000 calc(var(--edge, 99999px) + 64px)); }
.b-away .line { margin-left: auto; margin-right: auto; }
.b-morph { left: 50%; translate: -50% 0; width: min(88vw, 980px); text-align: center; top: max(calc(var(--hdr) + 3vh), 11vh); }
/* v3.10 §1: the last headline on one line on desktop: a wider block, the car scene's size scaled down only as far as needed (≥ 44 px) */
@media (min-width: 768px) { html:not(.rm) #beat-morphB { width: min(92vw, 1300px); } html:not(.rm) #beat-morphB .head { white-space: nowrap; font-size: clamp(44px, 3.7vw, 60px); } }
.b-morph .line { margin-left: auto; margin-right: auto; }
/* v3.9 §3: a short rule and a pause between headline and sub-line; it fades in with the line (film.js drives its opacity) */
.beat .rule { display: block; width: 36px; height: 1.5px; margin: 34px 0 22px; background: currentColor; opacity: 0; color: inherit; }
.beat .rule { background: color-mix(in srgb, currentColor 40%, transparent); }
.b-away .rule, .b-morph .rule { margin-left: auto; margin-right: auto; }

@media (max-width: 767px) {
  .b-fruits { top: calc(var(--hdr) + 5vh); width: calc(100vw - 2 * var(--g)); }   /* v3.15 §2: at the top, like the car */
  .b-fruits .head { font-size: clamp(28px, 8.4vw, 38px); }
  .b-make { left: var(--g); right: var(--g); width: auto; top: calc(var(--hdr) + 5vh); translate: none; text-align: center; }   /* v3.23: at the top, like the car; the window below */
  .b-make .head { font-size: clamp(28px, 8.4vw, 38px); }
  .b-car { left: var(--g); right: var(--g); width: auto; top: calc(var(--hdr) + 5vh); text-align: center; }
  .b-car .head { font-size: clamp(28px, 8.4vw, 38px); }
  .b-car .line { margin: 0 auto; font-size: clamp(17px, 4.5vw, 18px); }
  .beat .rule { margin: 24px auto 16px; }
  .b-fruits .line { font-size: clamp(17px, 4.5vw, 18px); }
  /* v3.20: the vertical devices clip fills the screen (film.js: cover, or 0.90-1.00 of it); "Looking / for a / website?" in three centred
     lines in the measured free centre (film.js placePhoneD sets --dh-top / --dh-size); the gap is only ~13 % of the screen high, so (owner) the
     line takes the nearest free band below (--dl-top / --dl-size: between the tablet and the bottom laptop on most phones); no rule */
  html:not(.rm) .b-fruits.dv { left: 0; top: 0; width: 100%; height: 100%; translate: none; }
  html:not(.rm) .b-fruits.dv .head { position: absolute; left: 50%; top: var(--dh-top, 42vh); translate: -50% 0; font-size: var(--dh-size, 8vw); line-height: .94; letter-spacing: -.045em; white-space: nowrap; }
  html:not(.rm) .b-fruits.dv .head .fl { display: block; width: max-content; margin: 0 auto; }
  /* v3.22: the gap is wide and short on phones, so film.js may set the headline in two lines ("Looking for a" / "website?") when that gives the larger type */
  .b-fruits.dv.two .head .fl:nth-child(-n+2) { display: inline; }
  html:not(.rm) .b-fruits.dv .line { position: absolute; left: 50%; top: var(--dl-top, 56vh); translate: -50% 0; width: max-content; margin: 0; font-size: var(--dl-size, 15px); line-height: 1.2; }
  .b-morph { translate: none; left: var(--g); width: auto; top: calc(var(--hdr) + 4vh); }
  .b-away { left: 50%; right: auto; width: calc(100vw - 2 * var(--g)); top: 50%; }
}
@media (min-width: 768px) and (max-width: 1100px) {
  .b-car { width: 60vw; }
  .b-away { left: 50%; width: 76vw; }
}

/* ---------- reduced motion: no scrubbing — every beat is a still key frame with its text, stacked ---------- */
.rm .film { height: auto; }
.rm .film-stage { position: relative; height: auto; overflow: visible; overflow-x: clip; contain: none; }
.rm .layer.l-fruits, .rm .film-stage > .layer.l-make, .rm .layer.l-car { display: none; }   /* v3.23: the makeover's layer moves into its block (film.js rmMakeover) */
.rm .l-hero { position: relative; height: 100vh; }
.rm .beats { position: relative; inset: auto; }
.rm .beat { position: relative; visibility: visible; inset: auto; translate: none; left: auto; top: auto; bottom: auto; width: auto; height: 100vh; min-height: 560px; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-start; padding: calc(var(--hdr) + 6vh) 6vw 0; text-align: left; }
.rm .beat > * { position: relative; z-index: 1; max-width: 640px; }
.rm .beat .w > span, .rm .beat .fbtn { transform: none !important; opacity: 1 !important; }
.rm .beat .still { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; max-width: none; }
.rm .b-fruits, .rm .b-morph { text-align: center; align-items: center; }
.rm .film .anchor#work { top: 100vh; }
@media (min-width: 768px) { .rm .b-away { padding-left: 54vw; } }
.rm .b-away { -webkit-mask-image: none; mask-image: none; } /* the still shows the car leaving on the left */
.rm .b-fruits { background: #DCD3CC; } .rm .b-make { background: #fff; } .rm .b-car { background: #F9FAF4; }
@media (min-width: 768px) { .rm .b-fruits { background: #fff; } }   /* v3.23: the white devices still */
.rm .beat .rule { opacity: 1 !important; } /* v3.9 §3 */
.rm .b-cta { height: auto; min-height: 0; padding: 28px 6vw 72px; align-items: center; background: #F9FAF4; } /* v3.10 §1 */
/* v3.10 §1: landscape phones (≤ 480 px tall): the last scene keeps headline, button and car; the sub-line and its rule step aside */
@media (orientation: landscape) and (max-height: 480px) { html:not(.rm) #beat-morphB .line, html:not(.rm) #beat-morphB .rule { display: none; } html:not(.rm) #beat-morphB { top: calc(var(--hdr) + 2px); left: 50%; right: auto; width: 92vw; translate: -50% 0; }
  html:not(.rm) #beat-morphB .head { white-space: nowrap; font-size: min(34px, 4.8vw); } /* ui-polish: one line, so the car keeps the room */ }
/* v3.10 (found while checking §1 under reduced motion; broken since the stills moved into a <picture>): the picture wrapper
   fills the beat, so the still behind the text has a size again */
.rm .beat > picture { position: absolute; inset: 0; z-index: 0; max-width: none; }
@media (max-width: 767px) {
  /* v3.20: reduced motion on phones — the settled devices still (set frame 61, cover in a 100vh box: the live scene's geometry) with the text
     where the live scene puts it (film.js placePhoneD sets the same variables): never over a device */
  .rm .b-fruits.dv { padding: 0; }
  .rm .b-fruits.dv .head { position: absolute; left: 50%; top: var(--dh-top, 42vh); translate: -50% 0; font-size: var(--dh-size, 7vw); line-height: .94; letter-spacing: -.045em; white-space: nowrap; max-width: none; }
  .rm .b-fruits.dv .head .fl { display: block; width: max-content; margin: 0 auto; }
  .rm .b-fruits.dv .line { position: absolute; left: 50%; top: var(--dl-top, 78vh); translate: -50% 0; width: max-content; margin: 0; font-size: var(--dl-size, 15px); line-height: 1.2; max-width: none; }
}

/* v3.23 §2, reduced motion: the makeover in the "before" block: the old site, then one cross-fade to the new site (the two headlines too) */
.rm .beat.b-make-rm { display: grid; align-content: start; justify-content: start; }
.rm .beat.b-make-rm > .l-make { position: absolute; inset: 0; max-width: none; visibility: visible; opacity: 1; z-index: 0; }
.rm .b-make-rm > .head { grid-area: 1 / 1; transition: opacity .9s ease; }
.rm .b-make-rm > .head-b, .rm .b-make-rm.is-new > .head:not(.head-b) { opacity: 0; }
.rm .b-make-rm.is-new > .head-b { opacity: 1; }
@media (min-width: 768px) { .rm .b-make-rm { align-content: center; } .rm .b-make-rm > .head { max-width: 30vw; } }
@media (max-width: 767px) { .rm .b-make-rm { justify-content: center; text-align: center; } }
