/* Best & Fast Inc · home (v0.4): one pinned stage, the scroll is a day on the road.
   Night over the map, dawn rises, the truck rolls, day, golden hour, dusk, night again.
   Loaded after style.css on index.html only. */
body.home {
  --bg: #050807;
  --paper: var(--c-eef2ee);
  --deep: var(--c-0b2a1e);
  --orange: var(--c-ff914e);
  --yellow: var(--c-ffc21a);
  --line: color-mix(in srgb, var(--c-eef2ee) 12%, transparent);
  --head: 'Archivo', 'Arial Black', system-ui, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  background: var(--bg); color: var(--paper);
}
.home ::selection { background: var(--orange); color: var(--c-140700); }

/* ---------------- buttons: pill + round arrow, the fill slides up on hover */
.btn {
  --b-fg: var(--fg, var(--c-eef2ee)); --b-inv: var(--inv, #050807);
  position: relative; isolation: isolate; overflow: hidden; display: inline-flex; align-items: center; gap: 14px;
  height: 52px; padding: 0 7px 0 24px; border-radius: 999px; white-space: nowrap; pointer-events: auto;
  font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--b-fg); border: 1px solid color-mix(in oklab, var(--b-fg) 32%, transparent);
  transition: color .35s, border-color .35s;
}
.btn::before { content: ''; position: absolute; inset: -1px; z-index: -1; border-radius: inherit; background: var(--orange); transform: translateY(102%); transition: transform .55s var(--ease); }
.btn i { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in oklab, var(--b-fg) 12%, transparent); transition: transform .5s var(--ease), background .35s; }
.btn i::before {
  content: ''; width: 12px; height: 12px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 10 10 2M4 2h6v6' fill='none' stroke='%23000' stroke-width='1.5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 10 10 2M4 2h6v6' fill='none' stroke='%23000' stroke-width='1.5'/%3E%3C/svg%3E") center / contain no-repeat;
}
.btn:hover { color: var(--c-140700); border-color: transparent; }
.btn:hover::before { transform: none; }
.btn:hover i { transform: rotate(45deg); background: color-mix(in srgb, var(--c-140700) 14%, transparent); }
.btn-solid { background: var(--b-fg); color: var(--b-inv); border-color: transparent; }
.btn-solid i { background: color-mix(in oklab, var(--b-inv) 12%, transparent); }
.btn.on-land { --b-fg: var(--c-eef2ee); --b-inv: #050807; }
.btns { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------------- header */
.home .site-header { top: 0; align-items: flex-start; padding: 24px var(--pad); }
.home .site-header .logo { height: 88px; }
.home .nav { position: absolute; left: 30vw; top: 30px; flex-direction: column; align-items: flex-start; gap: 9px; }
.home .nav a { font-size: 12px; letter-spacing: .1em; opacity: 1; color: color-mix(in srgb, var(--c-eef2ee) 62%, transparent); transition: color .25s, padding .35s var(--ease); }
.home .nav a:hover { color: var(--paper); padding-left: 8px; }
.home .nav a[aria-current="page"] { color: var(--paper); }
.home .nav a[aria-current="page"]::before { content: ''; display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--orange); margin: 0 9px 2px 0; vertical-align: middle; }
.home .header-cta { margin-left: auto; }
.home .burger { background: var(--paper); }
.home .burger span { background: var(--bg); }
/* desktop: ONE fixed header for the whole page. It is laid out as the compact bar; src/home/header.js
   morphs it from the big hero layout (large logo, menu as a column) into the bar with the scroll,
   transforms only. No second header, no class swap, nothing slides in. */
@media (min-width: 769px) {
  .home .site-header, .home.hdr-fixed .site-header {
    position: fixed; top: 0; z-index: 40; height: 130px; padding: 0 var(--pad); align-items: center; animation: none;
    --hk: clamp(0, (var(--hL, 0) - .38) * 5, 1);
    --hc: color-mix(in oklab, var(--c-04150e) calc(var(--hk) * 100%), var(--c-eef2ee)); /* near-black green: the menu reads on the deep blue top of the sky too */
    --fg: var(--hc); --inv: color-mix(in oklab, var(--c-f7f2e8) calc(var(--hk) * 100%), #050807);
  }
  .home .site-header .logo, .home.hdr-fixed .site-header .logo { height: 100px; transform-origin: 0 0; } /* no will-change: a layer kept at the compact size would be blurred when scaled up */
  .home .nav, .home.hdr-fixed .nav { top: 50%; height: 20px; margin-top: -10px; transform: none; flex-direction: row; align-items: center; gap: 30px; }
  .home .nav a { line-height: 20px; will-change: transform; }
  .home .nav a, .home.hdr-fixed .nav a { color: var(--hc); }
  .home .nav a:hover { padding-left: 0; color: var(--hc); opacity: .7; }
  .home .header-cta { will-change: transform; }
  /* client, 29 Nov: the light logo on the dark "is not showing fully": the colour logo in every state, on its paper disc */
  .home .logo-swap .on-light { opacity: 1; }
  .home .logo-swap .on-dark { opacity: 0; }
}

.home .ld-bg { background: var(--c-f7f2e8); } /* client, 1 Dec: the loader in the site colours, not dark */
.home .ld-mark { height: 22vmin; }

/* ---------------- the story: one sticky stage, everything in it is driven by scroll */
.story { position: relative; height: 1545vh; }
/* phones (owner, 1 Dec): the stage and the story measured in the LARGE viewport (lvh), which does not change when
   the browser's bars show or hide; main.js takes the story's screen height from the stage itself */
@supports (height: 1lvh) {
  @media (max-width: 768px) {
    .story { height: 1545lvh; }
    .stage { height: 100lvh; }
  }
}
/* phones with the page's own scroll box (js/common.js): the bars never move, so a screen of the story is exactly
   the visible height (--vp-h, measured), and the stage's foot (the hero's buttons) is never under a bar */
html.has-scroller .story { height: calc(var(--vp-h, 100svh) * 15.45); }
html.has-scroller .stage, html.has-scroller #stage { height: var(--vp-h, 100svh); bottom: auto; }   /* #stage: style.css sets the stage fixed at 100% by its id */ /* (S_END + 2) screens: the last one is the cover by the ordinary site, see src/home/main.js */
.stage {
  /* --L (0 dark sky .. 1 light sky) comes from the scroll loop; text on the sky follows it */
  --L: 0; --hz: 120%;
  --fg: color-mix(in oklab, var(--c-0b2a1e) calc(var(--L) * 100%), var(--c-eef2ee));
  --fg2: color-mix(in oklab, var(--fg) 66%, transparent);
  --fg3: color-mix(in oklab, var(--fg) 20%, transparent);
  --acc: color-mix(in oklab, var(--c-cf4f17) calc(var(--L) * 100%), var(--c-ff914e));
  --inv: color-mix(in oklab, var(--c-f7f2e8) calc(var(--L) * 100%), #050807);
  position: sticky; top: 0; height: 100vh; overflow: hidden; color: var(--fg); background: var(--bg);
}
.sky {
  position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(to bottom, var(--st, #020504) 0%, var(--sm, var(--c-040b08)) calc(var(--hz) * .56), var(--sh, var(--c-0c2419)) var(--hz), var(--sh, var(--c-0c2419)) 100%);
}
.stars { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }
.sun {
  position: absolute; left: 0; top: 0; z-index: 2; width: 13vmin; height: 13vmin; margin: -6.5vmin 0 0 -6.5vmin; border-radius: 50%;
  background: var(--sun-c, #fff); opacity: 0; pointer-events: none; will-change: transform, opacity;
  /* the sun GLOWS: a hot core, a wide halo and a huge soft wash into the sky */
  box-shadow:
    0 0 2.2vmin 0.4vmin #fff,
    0 0 9vmin 3vmin color-mix(in srgb, var(--sun-c, #fff) 62%, transparent),
    0 0 26vmin 10vmin color-mix(in srgb, var(--sun-c, #fff) 30%, transparent),
    0 0 60vmin 26vmin color-mix(in srgb, var(--sun-c, #fff) 13%, transparent);
}
.stage .giant {
  position: absolute; left: 0; top: auto; bottom: calc(100% - var(--hz) - .5vh); z-index: 3; white-space: nowrap; pointer-events: none; user-select: none;
  font-family: var(--head); font-weight: 800; font-stretch: 125%; text-transform: uppercase; font-size: 31vh; line-height: .74; letter-spacing: -.01em;
  color: color-mix(in oklab, var(--fg) 9%, transparent); opacity: 0; will-change: transform;
}
#world { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 4; opacity: 0; }
/* the film (frames rendered in Blender, src/home/film.js): the full frame sits under the giant word,
   the land is drawn again above it from a mask; the film has its own sky, sun and stars */
.stage.film #world { z-index: 2; opacity: 1; }
.stage.film .sky, .stage.film .stars, .stage.film .sun { display: none; }

.ch { position: absolute; inset: 0; z-index: 10; pointer-events: none; visibility: hidden; }
.ch a, .ch button { pointer-events: auto; }
.ch h2 { margin: 0; }
.stage .kicker { color: var(--acc); margin: 0 0 20px; }
.stage .g { color: color-mix(in oklab, var(--fg) 34%, transparent); }
.stage .o { color: var(--acc); }
.stage .ln { display: block; overflow: hidden; padding-bottom: .06em; }
.stage .ln > span { display: block; will-change: transform; }
.on-land { color: var(--c-eef2ee); }

/* 01 hero */
.home .hero-copy { position: absolute; left: var(--pad); top: auto; bottom: 9vh; max-width: min(820px, 56vw); will-change: transform, opacity; }
/* a low, wide window: the words are drawn smaller so they stay clear of the header's logo (main.js fitHero sets
   --fit only there); on the parts, not the block, so the shade behind them (::before) keeps its size */
.home .hero-copy > * { zoom: var(--fit, 1); }
.hero-copy h1 { font-size: clamp(40px, 4.25vw, 84px); font-stretch: 112%; font-weight: 800; line-height: .94; letter-spacing: -.012em; white-space: nowrap; }
/* kinetic type: characters rise out of the line mask one after another (hero: on load, by CSS;
   the giant titles: by the scroll loop) */
.stage .c { display: inline-block; transform-origin: 0 100%; will-change: transform; }
.home .hero-copy .lines .ln > span { transform: none; transition: none; }
.hero-copy h1 .c { transform: translateY(112%) rotate(8deg); transition: transform 1.15s var(--ease); transition-delay: calc(var(--l) * 120ms + var(--i) * 26ms + 60ms); }
.loaded .hero-copy h1 .c { transform: none; }
/* headings that wipe in from the left with a soft edge; --p runs 0% .. 130% */
.wipe { -webkit-mask-image: linear-gradient(90deg, #000 calc(var(--p, 0%) - 24%), transparent var(--p, 0%)); mask-image: linear-gradient(90deg, #000 calc(var(--p, 0%) - 24%), transparent var(--p, 0%)); }
.q .w { opacity: .16; }
.hero-text { color: var(--fg2); max-width: 450px; margin: 28px 0 32px; font-size: 16px; line-height: 1.55; }
.hero-copy .kicker, .hero-text, .hero-copy .btns { opacity: 0; transform: translateY(14px); transition: opacity .9s ease .5s, transform 1s var(--ease) .5s; }
.loaded .hero-copy .kicker, .loaded .hero-text, .loaded .hero-copy .btns { opacity: 1; transform: none; }
/* V1 and V2 open on the daylight frame (no dark start, client 29 Nov): the sky gives the title dark ink, but the
   line under it and the outline button sit on the dark grass below the horizon, so they take the land ink
   (V3 moves its line onto the grass too, see the V3 block below). Desktop only: the phone layout is not touched yet */
@media (min-width: 769px) {
  html:root .home .hero-text { color: color-mix(in srgb, var(--c-eef2ee) 92%, transparent); text-shadow: 0 1px 14px color-mix(in srgb, var(--c-030c08) 45%, transparent); }
  html:root .home .hero-copy .btn-line { --b-fg: var(--c-eef2ee); --b-inv: #050807; border-color: color-mix(in srgb, var(--c-eef2ee) 55%, transparent); }
}
.home .scroll-hint { position: absolute; left: auto; right: var(--pad); bottom: 27vh; margin: 0; color: var(--fg2); display: flex; align-items: center; gap: 12px; } /* above the trailer, over dark land */
.scroll-hint i { width: 1px; height: 34px; background: linear-gradient(var(--orange), transparent); animation: bf-drop 1.8s ease-in-out infinite; transform-origin: top; }
@keyframes bf-drop { 0% { transform: scaleY(0); } 60% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }

/* 02 lights on */
.lights-title {
  position: absolute; left: var(--pad); top: 13vh;
  font-size: clamp(64px, 10vw, 196px); font-stretch: 62%; font-weight: 800; line-height: .84; letter-spacing: -.005em;
}
.lights-side { position: absolute; right: var(--pad); top: 15vh; width: min(370px, 26vw); color: var(--fg2); font-size: 16px; line-height: 1.6; will-change: transform, opacity; }
.lights-side b { display: block; color: var(--fg); font-weight: 500; }
.live { display: flex; align-items: center; gap: 10px; color: var(--acc); margin: 26px 0 0; }
.live i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: bf-blink 1.6s ease-in-out infinite; }
@keyframes bf-blink { 50% { opacity: .2; } }
.stats { position: absolute; left: var(--pad); bottom: 7vh; display: flex; gap: clamp(30px, 5.4vw, 92px); list-style: none; margin: 0; padding: 0; }
.stage .stats li { display: block; padding: 0; border: 0; will-change: transform, opacity; }
.stats b { display: block; font-family: var(--head); font-weight: 700; font-stretch: 62%; font-size: clamp(40px, 4.4vw, 76px); line-height: 1; }
.stage .stats span { display: block; margin-top: 12px; max-width: none; font-family: var(--mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: color-mix(in srgb, var(--c-eef2ee) 70%, transparent); }

/* 03 services */
.svc-track { position: absolute; left: 0; top: 14vh; display: flex; align-items: flex-start; gap: clamp(28px, 3.2vw, 60px); padding: 0 var(--pad); will-change: transform; }
.svc-head { flex: 0 0 auto; width: min(640px, 46vw); margin-right: 5vw; }
/* style.css still has the v0.2 two-column grid for .svc-head: on the stage it is one column */
.stage .svc-head { display: block; }
.stage .svc-head h2 span { display: inline; }
.svc-head h2 { font-size: clamp(30px, 3.5vw, 62px); line-height: .98; }
.stage .svc { position: relative; flex: 0 0 auto; width: clamp(240px, 19.5vw, 310px); border-left: 1px solid var(--fg3); padding: 2px 0 6px 22px; pointer-events: auto; will-change: transform, opacity; }
.stage .svc::before { content: ''; position: absolute; left: -1px; top: 0; width: 1px; height: 100%; background: var(--acc); transform: scaleY(0); transform-origin: top; transition: transform .6s var(--ease); }
.stage .svc:hover::before { transform: none; }
.stage .svc h3 { transition: transform .5s var(--ease); }
.stage .svc:hover h3 { transform: translateX(6px); }
.stage .svc h3 { font-size: clamp(17px, 1.35vw, 22px); margin-bottom: 12px; }
.stage .svc p { color: var(--fg2); font-size: 14.5px; line-height: 1.55; margin: 0; }
.svc-all { position: absolute; left: 50%; bottom: 6vh; transform: translateX(-50%); }
/* text that slides out to the left fades at the edge instead of being cut by it */
.ch-svc { -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 9vw); mask-image: linear-gradient(90deg, transparent 0, #000 9vw); }

/* 04 bird's eye: the camera looks straight down, the road is a vertical band in the middle of the
   screen. The text sits on two clean paper panels left and right (the reference's top-down format),
   so nothing from the scene ever runs under the letters (client, 25 Nov: "not really readable"). */
.how-veil {
  position: absolute; inset: 0; opacity: 0; pointer-events: none;
  background: linear-gradient(90deg,
    var(--st, var(--c-f7f2e8)) 0, var(--st, var(--c-f7f2e8)) 34.5vw, transparent 37.5vw,
    transparent 62.5vw, var(--st, var(--c-f7f2e8)) 65.5vw, var(--st, var(--c-f7f2e8)) 100%);
}
.how-head { position: absolute; left: var(--pad); top: 13vh; width: min(30vw, 460px); will-change: transform, opacity; }
.how-head h2 { font-size: clamp(26px, 2.7vw, 50px); line-height: 1.02; }
.how-steps { position: absolute; inset: 0; list-style: none; margin: 0; padding: 0; }
.how-steps li { position: absolute; width: min(25vw, 380px); border-top: 1px solid var(--fg3); padding-top: 18px; will-change: transform, opacity; }
.how-steps li:nth-child(1) { left: var(--pad); top: 47vh; }
.how-steps li:nth-child(2) { right: var(--pad); top: 15vh; }
.how-steps li:nth-child(3) { right: var(--pad); top: 50vh; }
.how-steps li::before { content: ''; position: absolute; left: 0; top: -1px; height: 2px; width: 100%; background: var(--acc); transform: scaleX(var(--on, 0)); transform-origin: left; }
.how-steps .mono { display: block; color: var(--acc); margin-bottom: 14px; }
.how-steps h3 { font-size: clamp(17px, 1.5vw, 24px); margin-bottom: 10px; }
.how-steps p { color: color-mix(in oklab, var(--fg) 86%, transparent); font-size: 16px; line-height: 1.55; margin: 0; max-width: 340px; }

/* 05: warm golden haze under the big quotes while the camera climbs. Translucent on purpose:
   the words stay readable, the aerial world below keeps breathing through it. */
.q-veil {
  position: absolute; inset: 0; opacity: 0; pointer-events: none;
  background: linear-gradient(to bottom,
    color-mix(in srgb, var(--sm, var(--c-ffc587)) 72%, var(--c-fff3e2)) 0%,
    color-mix(in srgb, var(--sm, var(--c-ffc587)) 55%, var(--c-fff3e2) 18%) 42%,
    transparent 74%);
}

/* 05 quotes */
.ch-quotes > .kicker { position: absolute; left: var(--pad); top: 14vh; }
.q-stack { position: absolute; left: var(--pad); top: 20vh; width: min(1040px, 74vw); }
.q { position: absolute; left: 0; top: 0; margin: 0; will-change: transform, opacity; }
.q blockquote { margin: 0; font-family: var(--head); font-weight: 500; font-stretch: 100%; font-size: clamp(24px, 3.1vw, 54px); line-height: 1.1; letter-spacing: -.01em; }
.q figcaption { color: var(--fg); margin-bottom: 24px; text-transform: uppercase; letter-spacing: .08em; }
.q figcaption b { color: var(--acc); font-weight: 500; margin-right: 14px; }

/* speed + HUD */
.speed { position: absolute; left: var(--pad); bottom: 22px; z-index: 12; color: var(--fg2); opacity: 0; } /* bottom left: the fixed header owns the top */
.speed b { font-family: var(--head); font-weight: 700; font-stretch: 62%; font-size: 40px; line-height: 1; color: var(--fg); margin-right: 6px; letter-spacing: 0; vertical-align: -6px; }
.hud { position: absolute; right: var(--pad); bottom: 26px; z-index: 12; display: grid; gap: 10px; justify-items: end; color: var(--fg2); opacity: 0; transition: opacity .6s; }
.hud b { color: var(--fg); font-weight: 500; }
.hud em { font-style: normal; margin-left: 10px; color: var(--acc); }
.hud i { display: block; width: 190px; height: 2px; background: var(--fg3); }
.hud i b { display: block; height: 100%; width: 100%; background: var(--orange); transform-origin: left; transform: scaleX(0); }
.intro-done .hud { opacity: 1; }

/* ---------------- header ink follows the sky like the stage text (--hL comes from the scroll loop) */
.logo-swap { position: relative; }
/* client, 1 Dec: no paper disc inside the orange ring any more (it came in on 29 Nov), the logo stands
   on the sky as it is, like on the inner pages */
@media (min-width: 769px) {
  .home .logo-swap img { position: relative; }
  .home .logo-swap .on-light { position: absolute; }
}
.logo-swap .on-light { position: absolute; left: 0; top: 0; opacity: 0; }
@media (min-width: 769px) {
  /* the paper bar under the header while the paper panels are on screen (top view and the reasons):
     the logo sits on the left panel and the menu over the road strip, one ink reads on both */
  .home .site-header::before {
    content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background: var(--hbar-c, var(--c-f7f2e8)); opacity: var(--hbar, 0);
    box-shadow: 0 1px 0 rgba(17, 17, 17, calc(var(--hbar, 0) * .08));
  }
}
/* the film (desktop): small text over the sky in full ink (the 66 % ink read 2-3.5:1 on a blue sky),
   labels that were orange on the sky in ink too; the speed readout and the chapter counter sit on the
   ground and carry their own ink (--gL from the scroll loop: 0 on the land, 1 on a paper panel) */
.stage.film .lights-side, .stage.film .svc p, .stage.film .live { color: var(--fg); }
.stage.film .live i { background: var(--orange); }
.stage.film .speed, .stage.film .hud {
  --gL: 0;
  --fg: color-mix(in oklab, var(--c-0b2a1e) calc(var(--gL) * 100%), var(--c-eef2ee));
  --fg2: color-mix(in oklab, var(--fg) 78%, transparent);
  --fg3: color-mix(in oklab, var(--fg) 24%, transparent);
  --acc: color-mix(in oklab, var(--c-cf4f17) calc(var(--gL) * 100%), var(--c-ff914e));
}

/* ---------------- phones */
@media (max-width: 768px) {
  .home .site-header { padding: 16px var(--pad); }
  .home .site-header .logo { height: 62px; }
  .home .burger { top: 16px; } /* fixed (css/style.css): level with the top of the home header */
  .home .header-cta { display: none; }
  .home .nav { position: fixed; left: 0; top: 0; gap: 6px; background: var(--bg); }
  .home .nav a { font-size: 44px; letter-spacing: 0; color: var(--paper); }
  .home .hero-copy { right: var(--pad); bottom: 7vh; max-width: none; }
  .hero-copy h1 { font-size: 9.4vw; font-stretch: 84%; }
  .hero-copy .kicker { font-size: 9.5px; letter-spacing: .06em; white-space: nowrap; }
  .hero-text { font-size: 14px; margin: 18px 0 22px; }
  .home .scroll-hint, .hud em { display: none; }
  .hud { bottom: 14px; } .hud i { width: 96px; }

  .btn { height: 48px; padding-left: 20px; }
  .btn i { width: 34px; height: 34px; }

  .lights-title { font-size: 18vw; top: 8vh; white-space: nowrap; }
  .lights-side { left: var(--pad); right: var(--pad); width: auto; top: calc(8vh + 18vw * 1.72 + 16px); font-size: 14px; }
  .live { margin-top: 12px; }
  .stats { display: grid; grid-template-columns: repeat(4, auto); gap: 16px; bottom: 6vh; right: var(--pad); justify-content: space-between; }
  .stats b { font-size: 9.4vw; }
  .stats span { font-size: 8.5px; letter-spacing: .06em; margin-top: 6px; max-width: 70px; }

  .svc-track { top: 11vh; }
  .svc-head { width: 80vw; }
  .svc-head h2 { font-size: 8vw; }
  .stage .svc { width: 66vw; }
  /* owner, 1 Dec: on a phone the word stood on the horizon, i.e. behind the truck and the trees, and at 9% ink it
     could not be seen: it rises into the open sky between the cards and the truck, a little darker */
  .stage .giant { font-size: 17vh; bottom: calc(100% - var(--hz) + 9vh); color: color-mix(in oklab, var(--fg) 15%, transparent); }

  /* owner, 1 Dec: the work process and the reasons on the phone sit on ONE paper panel that slides down
     from the top (the desktop's side panels turned on their side); the top view keeps the truck in the lower
     half below it (src/home/film_three.js, CAMS_TALL). Was: a blurred band of the old night sky. */
  .how-veil, .q-veil {
    opacity: 1 !important; inset: 0 0 auto 0; height: var(--how-ph, 57vh); /* --how-ph: measured by main.js */ -webkit-mask-image: none; mask-image: none;
    background: var(--c-f7f2e8); box-shadow: 0 1px 0 color-mix(in srgb, var(--c-0b2a1e) 10%, transparent), 0 12px 30px color-mix(in srgb, var(--c-04150e) 16%, transparent);
    will-change: transform;
  }
  .how-veil { transform: translateY(calc((var(--kl, 0) - 1) * 101%)); }
  .q-veil { transform: translateY(calc((var(--k, 0) - 1) * 101%)); }
  .how-head { top: max(11vh, 88px); width: auto; right: var(--pad); }
  .how-head h2 { font-size: 7.4vw; line-height: 1.02; }
  .how-steps { position: absolute; inset: auto; left: var(--pad); right: var(--pad); top: calc(max(11vh, 88px) + 7.4vw * 2.04 + 18px); display: grid; grid-template-columns: 1fr; gap: 12px; }
  .how-steps li { position: static; width: auto; padding-top: 10px; }
  .how-steps .mono { display: inline; margin-right: 10px; font-size: 10px; }
  .how-steps h3 { display: inline; font-size: 15px; }
  .how-steps p { display: block; margin-top: 5px; font-size: 13px; line-height: 1.4; max-width: none; }

  /* each reason stands on the same line at the foot of the panel (they differ in length), so the paper
     above and below it stays about even */
  .q-stack { top: calc(var(--how-ph, 57vh) - 40px); width: auto; right: var(--pad); }
  .q { top: auto; bottom: 0; }
  .q figcaption { margin-bottom: 16px; }
  .q blockquote { font-size: 7.4vw; line-height: 1.12; }
  /* the chapter counter stays on the land (light ink); the desktop darkens it over its right paper panel */
  .stage.film .hud { --gL: 0 !important; }

  .speed { top: 16px; } .speed b { font-size: 30px; }
}
@media (prefers-reduced-motion: reduce) {
  .scroll-hint i, .live i { animation: none; }
}

/* ================= v0.8 quality pass (desktop only: the phone is tuned at the very end) =========
   No soft gradient seams anywhere. Text over the scene sits on crisp paper panels that slide in
   from the screen edge (the reference's top-down format), the sun is a real light source with a
   smooth falloff (no box-shadow rings), the sky glows around the sun and is dithered against banding. */
@media (min-width: 769px) {
  /* --k (0..1) comes from the scroll loop: 0 = panels outside the screen, 1 = in place */
  .how-veil, .q-veil { opacity: 1 !important; background: none; }
  .how-veil::before, .how-veil::after, .q-veil::before, .q-veil::after {
    content: ''; position: absolute; top: 0; bottom: 0; background: var(--st, var(--c-f7f2e8));
    will-change: transform;
  }
  .how-veil::before { left: 0; width: 36vw; transform: translateX(calc((var(--kl, 0) - 1) * 101%)); box-shadow: 1px 0 0 color-mix(in oklab, var(--fg) 12%, transparent), 0 0 34px rgba(0, 0, 0, .1); }
  .how-veil::after { right: 0; width: 36vw; transform: translateX(calc((1 - var(--kr, 0)) * 101%)); box-shadow: -1px 0 0 color-mix(in oklab, var(--fg) 12%, transparent), 0 0 34px rgba(0, 0, 0, .1); }
  .q-veil::before { left: 0; width: var(--qw, 46vw); transform: translateX(calc((var(--k, 0) - 1) * 101%)); box-shadow: 1px 0 0 color-mix(in oklab, var(--fg) 12%, transparent), 0 0 34px rgba(0, 0, 0, .1); }
  /* the work process's right panel carries on through the climb (owner, 28 Nov) and slides out high up */
  .q-veil::after { right: 0; width: 36vw; transform: translateX(calc((1 - var(--kr, 0)) * 101%)); box-shadow: -1px 0 0 color-mix(in oklab, var(--fg) 12%, transparent), 0 0 34px rgba(0, 0, 0, .1); }
  .q-stack { width: calc(46vw - var(--pad) * 2); max-width: 640px; }
  .q:not(:last-child) { max-width: calc(36vw - var(--pad) * 2); }   /* read while the left panel is still 36 vw */
  .q blockquote { font-size: clamp(24px, 2.5vw, 46px); }

  /* the sun: a white-hot core with a soft limb, one smooth bloom around it (many stops, no ring),
     and a flat atmospheric glare along the horizon that grows as the sun gets low */
  .sun {
    box-shadow: none;
    background: radial-gradient(circle closest-side, var(--c-fffdf6) 0%, var(--c-fff8e6) 46%, color-mix(in srgb, var(--sun-c, #fff) 70%, #fff) 80%, color-mix(in srgb, var(--sun-c, #fff) 90%, #fff) 94%, color-mix(in srgb, var(--sun-c, #fff) 0%, transparent) 100%);
  }
  .sun::before, .sun::after { content: ''; position: absolute; left: 50%; top: 50%; pointer-events: none; border-radius: 50%; }
  .sun::before {
    width: 900%; height: 900%; margin: -450% 0 0 -450%;
    background: radial-gradient(circle closest-side,
      color-mix(in srgb, var(--sun-c, #fff) 62%, transparent) 0%,
      color-mix(in srgb, var(--sun-c, #fff) 44%, transparent) 6%,
      color-mix(in srgb, var(--sun-c, #fff) 26%, transparent) 13%,
      color-mix(in srgb, var(--sun-c, #fff) 14%, transparent) 24%,
      color-mix(in srgb, var(--sun-c, #fff) 7%, transparent) 40%,
      color-mix(in srgb, var(--sun-c, #fff) 3%, transparent) 62%,
      transparent 100%);
  }
  .sun::after {
    width: 1500%; height: 140%; margin: -70% 0 0 -750%; opacity: var(--low, 0);
    background: radial-gradient(closest-side, color-mix(in srgb, var(--sun-c, #fff) 34%, transparent) 0%, color-mix(in srgb, var(--sun-c, #fff) 10%, transparent) 45%, transparent 100%);
  }
  /* the sky is brightest around the sun near the horizon (forward scattering), and a fine grain
     keeps the long gradients from breaking into bands */
  .sky::before, .sky::after { content: ''; position: absolute; inset: 0; pointer-events: none; }
  .sky::after {
    opacity: var(--sun-on, 0);
    background: radial-gradient(ellipse 58vw 38vh at var(--sx, 50%) var(--hz), color-mix(in srgb, var(--sun-c, #fff) 46%, transparent) 0%, color-mix(in srgb, var(--sun-c, #fff) 16%, transparent) 42%, transparent 100%);
  }
  /* headings wipe in with a narrow edge, not a quarter-width blur */
  .wipe { -webkit-mask-image: linear-gradient(90deg, #000 calc(var(--p, 0%) - 5%), transparent var(--p, 0%)); mask-image: linear-gradient(90deg, #000 calc(var(--p, 0%) - 5%), transparent var(--p, 0%)); }
  .sky::before {
    opacity: .06; mix-blend-mode: overlay; z-index: 1;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  }
}

/* 24/7 dispatch support: the letters rise out of each line one after another (timed, eased), the
   orange line follows; scrolled back above it they drop away fast */
.lights-title .ln { display: block; overflow: hidden; padding-bottom: .06em; margin-bottom: -.06em; }
.lights-title .c { display: inline-block; transform: translate3d(0, 112%, 0); opacity: 0; will-change: transform; transition: transform .45s cubic-bezier(.55, 0, .75, 0), opacity .3s ease; }
.lights-title.in .c {
  transform: none; opacity: 1;
  transition: transform 1.1s cubic-bezier(.16, 1, .3, 1) calc(var(--l, 0) * .14s + var(--i, 0) * .028s), opacity .7s ease calc(var(--l, 0) * .14s + var(--i, 0) * .028s);
}
@media (prefers-reduced-motion: reduce) { .lights-title .c { transform: none; opacity: 1; transition: none; } }

/* the work process on the paper panels (owner, 28 Nov: maximum quality, room and time to read).
   Two rows on one grid: the title and step 02 share the top line, step 01 and step 03 the lower one;
   the title is sized to fit the 36 vw panel (the wipe mask cut what overflowed its box); the second
   line is the client's green; wider text columns, 17-18 px body with air */
@media (min-width: 769px) {
  .how-head { top: max(15vh, 124px); width: calc(36vw - 2 * var(--pad)); }
  .how-head h2 { font-size: clamp(26px, 2.3vw, 46px); line-height: 1.04; letter-spacing: 0; }
  .stage.film .how-head h2 .g, .how-head h2 .g { color: var(--c-ff7a34); }   /* Best & Fast: the logo pink (the old green had turned mid blue) */
  .how-steps li { width: min(calc(36vw - 2 * var(--pad)), 460px); padding-top: 22px; }
  .how-steps li:nth-child(1) { left: var(--pad); top: max(52vh, 380px); }
  .how-steps li:nth-child(2) { right: auto; left: calc(64vw + var(--pad)); top: max(15vh, 124px); }
  .how-steps li:nth-child(3) { right: auto; left: calc(64vw + var(--pad)); top: max(52vh, 380px); }
  .how-steps .mono { margin-bottom: 16px; font-size: 11.5px; letter-spacing: .1em; }
  .how-steps h3 { font-size: clamp(19px, 1.55vw, 28px); line-height: 1.12; margin-bottom: 14px; }
  .how-steps p { font-size: clamp(16px, 1.02vw, 18.5px); line-height: 1.62; max-width: 40ch; color: color-mix(in oklab, var(--fg) 82%, transparent); }
}
/* short desktop windows (under 700 px tall): the steps tighten a little so the lower row clears the
   speed readout and the chapter counter */
@media (min-width: 769px) and (max-height: 700px) {
  .how-steps h3 { font-size: 18px; margin-bottom: 10px; }
  .how-steps p { font-size: 15px; line-height: 1.5; }
  .how-steps .mono { margin-bottom: 12px; }
  .how-steps li { padding-top: 16px; }
}

/* V2 (owner 29.11, src/home/film_three.js): the live scene draws its sky on its own canvas under the giant
   word and the land on #world above it, so the word passes behind the land as in the film */
html:root .stage.film #world { z-index: 4; }

/* ---------------- owner, 30 Nov */
/* "Scroll to start the day" could hardly be seen on any version (thin 11 px letters straight on the grass or
   the sky). Now a small pill of its own in the site's deep green, light letters, at the bottom centre of the
   first screen: it reads on any picture and stands clear of the title, the buttons and the corners.
   Phones keep it hidden, as before. */
@media (min-width: 769px) {
  .home .scroll-hint {
    left: 50%; right: auto; top: auto; bottom: 22px; transform: translateX(-50%); z-index: 13;
    height: 40px; padding: 0 20px 0 18px; gap: 11px; border-radius: 999px; white-space: nowrap;
    background: color-mix(in srgb, var(--c-04150e) 90%, transparent); color: var(--c-eef2ee); font-size: 11px; letter-spacing: .12em;
    box-shadow: 0 6px 18px color-mix(in srgb, var(--c-04150e) 22%, transparent);
  }
  .home .scroll-hint i { height: 16px; width: 1.5px; background: linear-gradient(var(--orange), color-mix(in srgb, var(--c-ff914e) 15%, transparent)); }
}

/* ---------------- phone, owner 1 Dec (the phone now runs V2 too) */
@media (max-width: 768px) {
  /* the colour logo in the header, as on the desktop (it showed the white one) */
  .home .logo-swap .on-light { opacity: 1; }
  .home .logo-swap .on-dark { opacity: 0; }
  /* the first screen's words sit low, on the grass and the trailer: a soft dark shade rises behind them and
     everything in it takes light ink (dark green on dark grass could not be read at all) */
  .home .hero-copy::before {
    content: ''; position: absolute; z-index: -1; pointer-events: none;
    /* the words rise by 22vh as the story starts and the shade goes with them: it runs 60vh further down
       than the screen, so its foot never comes into view as a hard line (owner, 1 Dec) */
    left: calc(-1 * var(--pad)); right: calc(-1 * var(--pad)); top: -90px; bottom: -67vh;
    background: linear-gradient(to bottom, color-mix(in srgb, var(--c-04100b) 0%, transparent) 0, color-mix(in srgb, var(--c-04100b) 62%, transparent) 150px, color-mix(in srgb, var(--c-04100b) 82%, transparent) 330px, color-mix(in srgb, var(--c-04100b) 82%, transparent) 100%);
  }
  .home .hero-copy h1 { color: var(--c-eef2ee); }
  .home .hero-copy .hero-text { color: color-mix(in srgb, var(--c-eef2ee) 90%, transparent); text-shadow: 0 1px 10px color-mix(in srgb, var(--c-030c08) 50%, transparent); }
  .home .hero-copy .btn-solid { --b-fg: var(--c-eef2ee); --b-inv: var(--c-0b2a1e); }
  .home .hero-copy .btn-line { --b-fg: var(--c-eef2ee); --b-inv: #050807; border-color: color-mix(in srgb, var(--c-eef2ee) 55%, transparent); color: var(--c-eef2ee); }
}

/* short phones (iPhone SE and the like): the steps' short texts would fill 70% of the screen and leave the
   truck a sliver; there only the step names stay on the panel (owner, 1 Dec) */
@media (max-width: 768px) and (max-height: 720px) {
  .how-steps p { display: none; }
  .q blockquote { font-size: 6.2vw; }
}

/* owner, 1 Dec (Android): the page is drawn edge to edge from the start (viewport-fit=cover in every page's
   viewport tag: Chrome then draws under its gesture bar and leaves it see-through). What sits at the stage's
   foot keeps clear of that bar (env(safe-area-inset-bottom) is its height; 0 where there is none) */
@media (max-width: 768px) {
  .hud { bottom: calc(14px + env(safe-area-inset-bottom, 0px)); }
  .svc-all { bottom: calc(6vh + env(safe-area-inset-bottom, 0px)); }
  .home .hero-copy { bottom: calc(7vh + env(safe-area-inset-bottom, 0px)); }
}

/* ---------------- Best & Fast, 4 Dec (client: in the new colours the first screen's words are hard to
   read: navy on the dark tree line, crimson on the grass, the white menu on bright clouds). Desktop now does what
   the phone does: a soft shade in the palette's deepest ink rises from the bottom-left corner behind the words
   and moves and fades with them, and everything on it takes light ink with the logo's pink. The menu stays as it
   was (owner, 4 Dec: the halo and the bolder weight were too much). */
@media (min-width: 769px) {
  .home .hero-copy::before {
    content: ''; position: absolute; z-index: -1; pointer-events: none;
    /* the words rise as the story starts and the shade goes with them: it runs 61vh below the screen's foot, so
       its own foot never shows as a line; the centre stays on the screen's bottom-left corner */
    left: calc(-1 * var(--pad)); bottom: -70vh; width: 100vw; height: 182vh;
    /* (owner, 4 Dec: no band under the menu along the top edge, only this shade from the bottom-left corner) */
    background: radial-gradient(100vw 112vh at 0 calc(100% - 61vh),
      color-mix(in srgb, var(--c-04100b) 82%, transparent) 0%, color-mix(in srgb, var(--c-04100b) 70%, transparent) 30%,
      color-mix(in srgb, var(--c-04100b) 46%, transparent) 52%, color-mix(in srgb, var(--c-04100b) 18%, transparent) 74%,
      color-mix(in srgb, var(--c-04100b) 0%, transparent) 100%);
  }
  .home .hero-copy h1 { color: var(--c-eef2ee); text-shadow: 0 2px 24px color-mix(in srgb, var(--c-030c08) 40%, transparent); }
  .home .hero-copy h1 .o { color: var(--c-ff7a34); }
  .home .hero-copy .kicker { color: var(--c-ff7a34); text-shadow: 0 1px 10px color-mix(in srgb, var(--c-030c08) 60%, transparent); }
  html:root .home .hero-text { color: var(--c-eef2ee); }
  .home .hero-copy .btn-solid { background: var(--c-ff7a34); color: #fff; }
  .home .hero-copy .btn-solid i { background: color-mix(in srgb, #fff 20%, transparent); }
  .home .hero-copy .btn-solid::before { background: var(--c-eef2ee); }
  .home .hero-copy .btn-solid:hover { color: var(--c-0b2a1e); }
  html:root .home .hero-copy .btn-line { border-color: color-mix(in srgb, var(--c-eef2ee) 70%, transparent); color: var(--c-eef2ee); }
}

