/* 4E Electrical, Dereham. A 3-scene 3D film mock-up (Tier 2C,
   ~/studio/assets/3d-playbook.md). One lead effect: a house at night trips, goes
   dark, and comes back on room by room in the first 3 seconds. Then the camera
   goes in at the front door to the fuse board for three jobs, and backs out into
   a warm morning.

   Five colours (playbook "Colour palettes"):
     1 anchor  #0E1013  his logo's black, softened to graphite
     2 neutral #F3F4F6  cool off-white
     3 family  #7A5712  deep gold
     4 family  #F2BE3A  bright gold (his logo's gold, turned up to lamp light)
     5 accent  #2F8FE8  cable blue: the call button and nothing else
   The call button always sits on the anchor, so the header, the hero and the
   phone's bottom bar are anchor in both modes.
   Hero layout: stepped frame (playbook "Hero layouts", layout 1).
   Mobile first. */

@font-face {
  font-family: "Space Grotesk";
  src: url("assets/fonts/space-grotesk-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
/* Size-matched stand-in while the font arrives, so the big headline doesn't reflow. */
@font-face {
  font-family: "Grotesk Fallback";
  src: local("Arial Bold"), local("Arial-BoldMT"), local("Arial");
  font-weight: 700;
  size-adjust: 99%;
  ascent-override: 98%;
  descent-override: 29%;
  line-gap-override: 0%;
}

:root {
  color-scheme: light dark;

  --anchor: #0e1013;
  --anchor-up: #1c1e21;
  --anchor-up2: #2a2d33;
  --anchor-deep: #08090b;
  --neutral: #f3f4f6;
  --deep: #7a5712;
  --bright: #f2be3a;
  --blue: #2f8fe8;
  --blue-hover: #5aa9f0;
  --blue-deep: #1b5a96;

  --paper: var(--neutral);
  --ink: var(--anchor);
  --ink-soft: #535457;
  --line: #cfd2d7;
  --sheet-alt: #e6e8ec;
  --gold: var(--deep);
  --wash: rgb(242 190 58 / 0.05);
  --focus: var(--anchor);
  --focus-gap: var(--neutral);
  --mark: rgb(242 190 58 / 0.45);

  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-display: "Space Grotesk", "Grotesk Fallback", "Segoe UI", system-ui, sans-serif;

  --gutter: clamp(1rem, 4vw, 3rem);
  --header-h: 3.5rem;
  --dock-h: 4.25rem;
  --step--1: clamp(0.875rem, 0.85rem + 0.1vw, 0.95rem);
  --step-0: clamp(1rem, 0.98rem + 0.15vw, 1.1rem);
  --step-1: clamp(1.15rem, 1.05rem + 0.5vw, 1.45rem);
  --radius: 0.2rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: var(--anchor);
    --ink: var(--neutral);
    --ink-soft: #aeb0b2;
    --line: #2a2d33;
    --sheet-alt: var(--anchor-up);
    --gold: var(--bright);
    --wash: rgb(242 190 58 / 0.04);
    --focus: var(--bright);
    --focus-gap: var(--anchor);
    --mark: rgb(242 190 58 / 0.24);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; scroll-padding-top: calc(var(--header-h) + 0.75rem); }
body {
  margin: 0;
  padding-bottom: var(--dock-h);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.55;
  overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul, ol, figure, fieldset, blockquote { margin: 0; padding: 0; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1; letter-spacing: -0.02em; color: var(--ink); }
h2 { font-size: clamp(2.1rem, 1.3rem + 4.2vw, 4.4rem); }
ul, ol { list-style: none; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
i { font-style: normal; }
q { quotes: "\201C" "\201D"; }
cite { font-style: normal; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  box-shadow: 0 0 0 3px var(--focus-gap);
  border-radius: 2px;
}

.wrap { width: min(100% - 2 * var(--gutter), 76rem); margin-inline: auto; }
.small { font-size: var(--step--1); color: var(--ink-soft); }
.nowrap { white-space: nowrap; }
.stars { letter-spacing: 0.08em; margin-left: 0.2rem; }

.skip-link {
  position: fixed; left: 0.75rem; top: -4rem; z-index: 60;
  padding: 0.75rem 1rem; background: var(--neutral); color: var(--anchor); font-weight: 700;
}
.skip-link:focus { top: 0.75rem; }

.demo-banner {
  position: relative; z-index: 11;
  padding: 0.4rem var(--gutter);
  background: var(--anchor-deep);
  color: var(--neutral);
  font-size: 0.8rem;
  line-height: 1.35;
  text-align: center;
}

/* --- Header: anchor in both modes, the call button always here ------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--anchor);
  color: var(--neutral);
  border-bottom: 1px solid var(--anchor-up2);
  --focus: var(--bright);
  --focus-gap: var(--anchor);
}
.header-inner {
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.logo { display: inline-flex; align-items: center; gap: 0.55rem; min-height: 44px; text-decoration: none; min-width: 0; }
.logo-mark { flex: none; }
.mark-box { fill: none; stroke: var(--neutral); stroke-width: 1.5; }
.mark-slot { fill: none; stroke: var(--neutral); stroke-width: 1.2; }
.mark-on { fill: var(--bright); }
.logo-name { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; line-height: 1; letter-spacing: -0.01em; white-space: nowrap; }
.logo-trade { display: block; margin-top: 0.2rem; font-family: var(--font-sans); font-weight: 650; font-size: 0.7rem; letter-spacing: 0; color: #b6b8bb; }
nav { display: none; }
.label-long { display: none; }
.nav-list { display: flex; align-items: center; gap: 0.1rem; }
.nav-list a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 0.65rem;
  font-size: var(--step--1); font-weight: 650; text-decoration: none; text-underline-offset: 0.3em;
}
.nav-list a:hover, .nav-list a:focus-visible { text-decoration: underline; text-decoration-thickness: 2px; text-decoration-color: var(--bright); }
@media (max-width: 21.9rem) { .logo-trade { display: none; } }
@media (min-width: 40rem) { .label-long { display: inline; } .logo-name { font-size: 1.3rem; } .logo-trade { font-size: 0.76rem; } }
@media (min-width: 64rem) { nav { display: block; } }

/* --- Buttons --------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.6rem 1.3rem;
  border: 2px solid transparent;
  border-radius: var(--radius);
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 160ms ease, transform 120ms ease, box-shadow 160ms ease, border-color 160ms ease;
  -webkit-tap-highlight-color: transparent;
}
.btn svg { fill: currentColor; flex: none; }
/* The one accent: the call button. Always on the anchor. */
.btn-call { background: var(--blue); color: var(--anchor); box-shadow: 0 3px 0 var(--blue-deep); }
.btn-call:hover { background: var(--blue-hover); }
.btn-call:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--blue-deep); }
.btn-small { min-height: 44px; padding: 0.4rem 0.85rem; font-size: var(--step--1); }
.btn-big { min-height: 56px; padding: 0.75rem 1.5rem; font-size: 1.1rem; }
/* The form's send button is not the call button, so it is not the accent. */
.btn-send { background: var(--ink); color: var(--paper); }
.btn-send:hover { background: var(--gold); color: var(--paper); }
.btn-send:active { transform: scale(0.97); }

/* The call button on a light sheet gets its own anchor plate. */
.call-plate {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem 1.5rem;
  padding: 1rem 1.15rem;
  background: var(--anchor);
  color: var(--neutral);
  border-radius: var(--radius);
  border-top: 3px solid var(--bright);
  font-family: var(--font-display); font-weight: 700; font-size: clamp(1.3rem, 1.05rem + 1.3vw, 2rem); line-height: 1.05; letter-spacing: -0.02em;
  --focus: var(--bright); --focus-gap: var(--anchor);
}
.call-plate .btn { font-family: var(--font-sans); letter-spacing: 0; }
@media (prefers-color-scheme: dark) { .call-plate { background: var(--anchor-deep); } }

/* --- The film ----------------------------------------------------------------
   One 3D world behind the whole page (film.js). The words never live in it:
   each section is a solid sheet that scrolls over the film, the hero's stepped
   panel is solid, and each later scene gets a "stage" where the film is the
   picture. Without the film (reduced motion, Save-Data, weak devices, no
   JavaScript) every scene shows a still frame rendered from the film. */
.film {
  position: fixed;
  inset: 0;
  z-index: -1;
  display: none;
  pointer-events: none;
  overflow: hidden;
  background: var(--anchor-deep);
}
html.film-on .film { display: block; }
.film canvas { display: block; width: 100%; height: 100%; opacity: 0; transition: opacity 400ms ease; }
html.film-ready .film canvas { opacity: 1; }

/* --- Hero: a stepped frame on a dark band (both modes) ----------------------
   The scene box holds the picture; the panel is the page's own graphite,
   cutting into the scene in steps, edged with one gold line. Phones: the scene
   on top, two wide shallow steps, the words in the notch below. */
.hero {
  --step-h: 14px;
  position: relative;
  isolation: isolate;
  overflow: clip;
  background: var(--anchor);
  color: var(--neutral);
  --focus: var(--bright);
  --focus-gap: var(--anchor);
}
html.film-on .hero { background: transparent; }
.hero-scene {
  position: relative;
  height: 38svh;
  min-height: 12.5rem;
  overflow: clip;
  background: var(--anchor-deep);
}
html.film-on .hero-scene { background: transparent; }
.hero-still, .frames, .fr { position: absolute; inset: 0; }
.hero-still img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; }
.frames { display: none; z-index: 1; overflow: hidden; }
.fr { background-size: cover; background-position: 50% 50%; }
html.film-on .frames { display: block; }
html.film-on .fr-a { background-image: url("assets/film/on-a.webp"); }
html.film-on .fr-b { background-image: url("assets/film/on-b.webp"); opacity: 0; }
html.film-on .fr-c { background-image: url("assets/film/on-c.webp"); opacity: 0; }
html.film-on .fr-d { background-image: url("assets/film/on-d.webp"); opacity: 0; }
html.film-on .fr-e { background-image: url("assets/film/on-e.webp"); opacity: 0; }
html.film-on .fr-f { background-image: url("assets/film/on-f.webp"); opacity: 0; }
@media (min-width: 64rem) and (min-aspect-ratio: 1/1) {
  /* Wide screens frame the house to the right of the steps: their own six frames. */
  html.film-on .fr-a { background-image: url("assets/film/onw-a.webp"); }
  html.film-on .fr-b { background-image: url("assets/film/onw-b.webp"); }
  html.film-on .fr-c { background-image: url("assets/film/onw-c.webp"); }
  html.film-on .fr-d { background-image: url("assets/film/onw-d.webp"); }
  html.film-on .fr-e { background-image: url("assets/film/onw-e.webp"); }
  html.film-on .fr-f { background-image: url("assets/film/onw-f.webp"); }
}
html.film-on .hero-still { z-index: 2; opacity: 0; }
/* The still film: every room lit, the trip, the dark, then the rooms back on
   two at a time. In step with the 3D's own opening (film.js INTRO_START, TRIP
   and ON), so when the 3D takes over part-way the house never goes dark again.
   Opacity and transform only. */
@media (prefers-reduced-motion: no-preference) {
  /* 0.4s + share × 2.6s. The trip is quick (it is a trip); the rooms come back
     a touch softer. */
  html.film-on .fr-b { animation: frame-in 0.1s steps(2, end) 0.74s both; }
  html.film-on .fr-c { animation: frame-in 0.12s linear 1.42s both; }
  html.film-on .fr-d { animation: frame-in 0.14s linear 1.84s both; }
  html.film-on .fr-e { animation: frame-in 0.14s linear 2.1s both; }
  html.film-on .fr-f { animation: frame-in 0.14s linear 2.5s both; }
  html.film-on .hero-still { animation: frame-in 0.2s linear 2.68s both; }
  html.film-on .frames, html.film-on .hero-still img { animation: settle 3.2s cubic-bezier(.2, .6, .2, 1) both; transform-origin: 55% 60%; }
  .h1-gold { animation: land 900ms cubic-bezier(.2, .7, .2, 1) 150ms both; }
}
.hero.is-paused .fr, .hero.is-paused .frames, .hero.is-paused .hero-still, .hero.is-paused .hero-still img { animation-play-state: paused; }
html.film-ready .frames, html.film-ready .hero-still { opacity: 0 !important; visibility: hidden; transition: opacity 300ms ease, visibility 0s linear 300ms; animation: none; }
@keyframes frame-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes settle { from { transform: scale(1.08); } to { transform: none; } }
@keyframes land { from { transform: translateY(0.2em); opacity: 0.4; } to { transform: none; opacity: 1; } }

.hero-steps { position: relative; z-index: 3; margin-top: calc(var(--step-h) * -2); }
.hero-panel, .hero-edge {
  clip-path: polygon(0 0, 42% 0, 42% var(--step-h), 73% var(--step-h), 73% calc(var(--step-h) * 2), 100% calc(var(--step-h) * 2), 100% 100%, 0 100%);
}
.hero-edge { position: absolute; inset: 0; background: var(--bright); transform: translate(0, -2px); }
/* The risers get their gold line too. */
.hero-edge::after { content: ""; position: absolute; inset: 0; background: var(--bright); transform: translate(2px, 0); }
.hero-panel { position: relative; background: var(--anchor); padding: calc(var(--step-h) * 2 + 0.7rem) var(--gutter) 1.1rem; }
.hero-where { font-size: var(--step--1); font-weight: 650; color: #b6b8bb; }
h1 { margin-top: 0.4rem; color: var(--neutral); font-size: clamp(2.1rem, min(12.4vw, 6.4svh), 3.5rem); line-height: 0.98; letter-spacing: -0.035em; }
.h1-line { display: block; }
.h1-gold { color: var(--bright); }
.btn-hero { margin-top: 0.9rem; width: 100%; min-height: 58px; font-size: 1.1rem; white-space: nowrap; }
.btn-hero svg { width: 22px; height: 22px; }
.call-n { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; letter-spacing: -0.01em; }
.tread-review { margin-top: 1.1rem; padding-left: 0.85rem; border-left: 3px solid var(--bright); }
.tread-review p { font-size: var(--step--1); line-height: 1.45; color: #dfe1e4; }
.tread-review mark { background: none; color: var(--neutral); font-weight: 800; }
.tread-review figcaption { margin-top: 0.4rem; font-size: 0.82rem; font-weight: 700; }
.tread-review .stars { color: var(--bright); }
.tread-facts { margin-top: 1.1rem; display: grid; grid-template-columns: auto 1fr; gap: 0.75rem 1.5rem; align-items: start; }
.fact { font-size: 0.82rem; line-height: 1.3; color: #c9cbce; }
.fact strong { display: block; font-family: var(--font-display); font-weight: 700; line-height: 1; color: var(--neutral); letter-spacing: -0.02em; }
.fact-rating strong { font-size: 2.6rem; color: var(--bright); }
.fact-hours strong { font-size: 1.35rem; margin-bottom: 0.3rem; }
.fact-rating span { display: block; max-width: 9rem; }

/* Tablets: the same order, with more air. */
@media (min-width: 40rem) {
  .hero { --step-h: 20px; }
  .hero-scene { height: 44svh; }
  .hero-panel { padding-bottom: 1.6rem; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 0 2.5rem; align-items: start; }
  h1 { font-size: clamp(3rem, 7.4vw, 4.6rem); }
  .btn-hero { width: auto; padding-inline: 1.6rem; }
  .tread-head { grid-row: span 2; }
  .tread-review { margin-top: 0.3rem; }
  .tread-review p { font-size: var(--step-0); }
}

/* Wide screens: a staircase. The tall first step carries the name, the
   headline and the call button; the second, Laura's review; the low third,
   the rating and the hours. The scene shows above and to the right. */
@media (min-width: 64rem) and (min-aspect-ratio: 1/1) {
  :root { --header-h: 3.75rem; }
  .hero { --s1: 41%; --s2: 66%; --y1: 52%; --y2: 76%; height: calc(100svh - var(--header-h) - 2rem); min-height: 34rem; }
  .hero-scene { position: absolute; left: var(--s1); right: 0; top: 0; height: var(--y2); min-height: 0; }
  .hero-steps { position: absolute; inset: 0; margin: 0; }
  .hero-panel, .hero-edge {
    clip-path: polygon(0 0, var(--s1) 0, var(--s1) var(--y1), var(--s2) var(--y1), var(--s2) var(--y2), 100% var(--y2), 100% 100%, 0 100%);
  }
  .hero-edge { transform: translate(0, -3px); }
  .hero-edge::after { transform: translate(3px, 3px); }
  .hero-panel { position: absolute; inset: 0; display: block; padding: 0; }
  .tread { position: absolute; margin: 0; }
  .tread-head { left: 0; top: 0; bottom: 0; width: var(--s1); padding: 0 clamp(1.25rem, 2.6vw, 3rem) 0 var(--gutter); display: flex; flex-direction: column; justify-content: center; }
  .hero-where { font-size: var(--step-0); }
  h1 { margin-top: 0.7rem; font-size: clamp(3rem, min(5vw, 10.5svh), 5.6rem); }
  .btn-hero { margin-top: clamp(1.2rem, 3.4svh, 2.2rem); align-self: flex-start; min-height: 68px; padding: 0.6rem 1.5rem; display: grid; grid-template-columns: auto auto; column-gap: 0.9rem; text-align: left; }
  .btn-hero svg { grid-row: 1 / 3; width: 30px; height: 30px; }
  .btn-hero .call-k { font-size: var(--step--1); line-height: 1.1; align-self: end; }
  .btn-hero .call-n { font-size: clamp(1.6rem, 2.1vw, 2.2rem); line-height: 1; align-self: start; }
  .tread-review { left: var(--s1); top: var(--y1); bottom: 0; width: calc(var(--s2) - var(--s1)); padding: 0 1.6rem 0 clamp(1.25rem, 2.2vw, 2.4rem); border-left: 0; display: flex; flex-direction: column; justify-content: center; }
  .tread-review p { font-size: clamp(0.95rem, 0.7rem + 0.5vw, 1.2rem); line-height: 1.42; }
  .tread-review figcaption { font-size: var(--step--1); margin-top: 0.6rem; }
  /* The fixed pause button sits over the far corner: keep the words clear of it. */
  .tread-facts { left: var(--s2); top: var(--y2); bottom: 0; right: 0; padding: clamp(0.9rem, 2.4svh, 1.5rem) 1rem 0 clamp(1.25rem, 2.2vw, 2.4rem); display: flex; align-items: flex-start; gap: clamp(1rem, 2vw, 2.2rem); }
  .fact-rating { display: flex; align-items: center; gap: 0.6rem; flex: none; }
  .fact-rating strong { font-size: clamp(2.6rem, 3.6vw, 3.6rem); }
  .fact-rating span { max-width: 6.5rem; }
  .fact-hours strong { font-size: clamp(1.2rem, 1.5vw, 1.6rem); white-space: nowrap; }
  .fact-hours span { display: block; max-width: 13rem; }
}
@media (min-width: 64rem) and (max-width: 79.99rem) and (min-aspect-ratio: 1/1) {
  .tread-facts { padding-right: 0.75rem; gap: 0.9rem; }
  .fact-hours { min-width: 0; }
  .fact-hours strong { white-space: normal; }
  .fact-hours span { display: none; }
  .fact-rating span { max-width: 5.5rem; }
}
@media (min-width: 64rem) and (min-aspect-ratio: 1/1) and (max-height: 42rem) {
  .tread-review p { font-size: var(--step--1); }
  .fact-hours span { display: none; }
}

/* --- Scene titles ------------------------------------------------------------ */
.scene-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.4rem, 11.5vw, 7.5rem);
  line-height: 0.9;
  letter-spacing: -0.04em;
  max-width: calc(100vw - 2 * var(--gutter));
  color: var(--neutral);
  white-space: nowrap;
  paint-order: stroke fill;
  -webkit-text-stroke: 0.07em var(--anchor);
  pointer-events: none;
  user-select: none;
}
.scene-title span { display: block; color: var(--bright); }
@media (prefers-reduced-motion: no-preference) {
  /* Slides in from the right and comes to rest at the left margin. It only ever
     moves right of its resting place, so it never runs off the left edge, and the
     slide is short on phones so it never runs off the right edge either (checked
     from 320px up). */
  .scene-title { --slide: 5vw; transform: translateX(calc((1 - var(--p, 1)) * var(--slide))); will-change: transform; }
  @media (min-width: 40rem) { .scene-title { --slide: 14vw; } }
}
.scene-title--hero { position: absolute; z-index: 3; right: 0.75rem; top: 0.55rem; font-size: clamp(1.25rem, 5.4vw, 3rem); }
/* The hero's title sits still in its box. */
.scene-title--hero { transform: none !important; }
@media (min-width: 64rem) and (min-aspect-ratio: 1/1) { .scene-title--hero { right: auto; left: 1.6rem; top: 1.2rem; font-size: clamp(2rem, 3.4vw, 3.4rem); } }

/* --- Stages ------------------------------------------------------------------ */
.stage { position: relative; overflow-x: clip; background: var(--anchor-deep); color: var(--neutral); --focus: var(--bright); --focus-gap: var(--anchor); }
html.film-on .stage { background: transparent; }
.stage-inner { position: relative; }
html.film-on .stage--board { height: 360svh; }
html.film-on .stage--day { height: 240svh; }
html.film-on .stage-inner {
  position: sticky;
  top: var(--header-h);
  height: calc(100svh - var(--header-h));
  overflow: clip;
}
html.film-on .stage-still { position: absolute; inset: 0; z-index: -1; }
html.film-on .stage-still img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
html.film-ready .stage-still { display: none; }
html:not(.film-on) .stage-still img { width: 100%; max-height: 80svh; object-fit: cover; object-position: 50% 40%; }

.scene-title--board, .scene-title--day { position: absolute; left: var(--gutter); top: 0.7rem; z-index: 1; }
html:not(.film-on) .scene-title--board, html:not(.film-on) .scene-title--day { top: 0.9rem; }

/* The stage's real words: a solid card low on the scene. */
.stage-card {
  position: absolute;
  z-index: 2;
  left: var(--gutter);
  right: var(--gutter);
  bottom: calc(var(--dock-h) + 0.75rem);
  max-width: 30rem;
  padding: 0.85rem 1rem 0.95rem;
  background: var(--neutral);
  color: var(--anchor);
  border-radius: var(--radius);
  border-top: 3px solid var(--bright);
  box-shadow: 0 18px 40px -20px rgb(0 0 0 / 0.8);
  --focus: var(--anchor); --focus-gap: var(--neutral);
}
html:not(.film-on) .stage-card { position: relative; left: auto; right: auto; bottom: auto; margin: -2.5rem var(--gutter) 2.5rem; }
.stage-card h2 { font-size: clamp(1.5rem, 1.2rem + 1.5vw, 2.2rem); color: var(--anchor); }
.stage-card > p { margin-top: 0.35rem; font-size: var(--step--1); font-weight: 600; color: #3b3d41; }
.day-card { max-width: 24rem; }

/* Three jobs: three cards, one per stop along the board. Each is a different
   job with its own words; the one the camera is on is open, the others fold
   down to their names on phones so the board stays in view. */
.jobs { margin-top: 0.6rem; display: grid; gap: 0.4rem; counter-reset: job; }
.jobs li { counter-increment: job; position: relative; padding: 0.55rem 0.7rem 0.6rem 2.6rem; border: 1px solid #c9ccd1; border-radius: var(--radius); transition: border-color 200ms ease, box-shadow 200ms ease, background-color 200ms ease; }
.jobs li::before {
  content: counter(job);
  position: absolute; left: 0.65rem; top: 0.55rem;
  width: 1.45rem; height: 1.45rem; border-radius: 2px;
  background: var(--anchor); color: var(--bright);
  font-family: var(--font-display); font-weight: 700; font-size: 0.85rem; display: grid; place-items: center;
}
.jobs h3 { font-size: 1.2rem; color: var(--anchor); line-height: 1.2; }
.jobs p { margin-top: 0.15rem; font-size: var(--step--1); line-height: 1.4; color: #2c2e32; }
.jobs .landlord { margin-top: 0.4rem; padding-top: 0.4rem; border-top: 1px solid #d5d7db; font-size: 0.84rem; }
.jobs .landlord a { font-weight: 700; text-underline-offset: 0.2em; display: inline-block; padding-block: 0.35rem; margin-block: -0.35rem; }
.jobs-also { margin-top: 0.55rem !important; font-size: 0.84rem !important; font-weight: 500 !important; }
.step-still { display: none; }
html:not(.film-on) .step-still { display: block; width: calc(100% + 3.3rem); max-width: none; margin: -0.55rem -0.7rem 0.6rem -2.6rem; border-radius: var(--radius) var(--radius) 0 0; }
html:not(.film-on) .jobs li:has(.step-still)::before { top: auto; margin-top: 0; position: absolute; }
/* With the film running, the card for the stop the camera is at stands out. */
html.film-on .jobs[data-at] li { border-color: #d5d7db; }
html.film-on .jobs[data-at="1"] li[data-step="1"],
html.film-on .jobs[data-at="2"] li[data-step="2"],
html.film-on .jobs[data-at="3"] li[data-step="3"] { border-color: var(--deep); box-shadow: inset 4px 0 0 var(--bright); }
@media (max-width: 63.99rem), (max-aspect-ratio: 1/1) {
  /* Folded cards keep their words in the page for screen readers and search;
     they are only clipped from view while another card is open. */
  html.film-on .jobs[data-at] li p { max-height: 0; margin: 0; padding: 0; border: 0; overflow: hidden; }
  html.film-on .jobs[data-at="1"] li[data-step="1"] p,
  html.film-on .jobs[data-at="2"] li[data-step="2"] p,
  html.film-on .jobs[data-at="3"] li[data-step="3"] p { max-height: none; margin-top: 0.15rem; overflow: visible; }
  html.film-on .jobs[data-at="3"] li[data-step="3"] .landlord { margin-top: 0.4rem; padding-top: 0.4rem; border-top: 1px solid #d5d7db; }
  html.film-on .jobs[data-at] ~ .jobs-also { display: none; }
  html.film-on .jobs[data-at] li { padding-block: 0.4rem; }
  html.film-on .jobs[data-at] li::before { top: 0.35rem; }
}

/* --- The dock: call and pause, always on screen ------------------------------ */
.dock {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: var(--dock-h);
  padding: 0.5rem max(var(--gutter), env(safe-area-inset-right)) max(0.5rem, env(safe-area-inset-bottom)) max(var(--gutter), env(safe-area-inset-left));
  background: var(--anchor);
  border-top: 1px solid var(--anchor-up2);
  --focus: var(--bright); --focus-gap: var(--anchor);
}
.dock-call { flex: 1 1 auto; min-width: 0; min-height: 52px; font-size: 1.05rem; padding-inline: 0.75rem; white-space: nowrap; }
/* Below 384px the number won't fit beside the pause button, so the bar just
   says "Call Lee". It still rings the mobile. */
@media (max-width: 23.99rem) { .dock-num { display: none; } }
.motion-toggle {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 48px;
  padding: 0.5rem 0.9rem;
  background: var(--anchor);
  color: var(--neutral);
  border: 2px solid var(--neutral);
  border-radius: 999px;
  font-size: var(--step--1);
  font-weight: 700;
  cursor: pointer;
  transition: transform 140ms ease, background-color 140ms ease;
}
.motion-toggle[hidden], html:not(.film-on) .motion-toggle { display: none; }
.motion-toggle:hover { background: var(--anchor-up2); }
.motion-toggle:active { transform: scale(0.95); }
.motion-toggle svg { fill: currentColor; }
.ml-long { display: none; }
.motion-toggle .icon-play { display: none; }
body:has(.hero.is-paused) .motion-toggle .icon-play { display: inline; }
body:has(.hero.is-paused) .motion-toggle .icon-pause { display: none; }
@media (prefers-reduced-motion: reduce) { .motion-toggle { display: none; } }

/* Desktops with a mouse: the header carries the call button, so the dock is
   only the pause button, bottom right. */
@media (min-width: 64rem) and (hover: hover) and (pointer: fine) {
  :root { --dock-h: 0rem; }
  .dock { left: auto; right: max(var(--gutter), env(safe-area-inset-right)); bottom: 0.9rem; min-height: 0; padding: 0; background: none; border: 0; }
  .dock-call { display: none; }
  .ml-long { display: inline; }
  .motion-toggle { box-shadow: 0 6px 16px -8px rgb(0 0 0 / 0.6); }
}
@media (min-width: 64rem) and (min-aspect-ratio: 1/1) {
  .stage-card { right: auto; bottom: 2rem; width: min(30rem, 36vw); }
  html.film-on .jobs-card { top: clamp(7.5rem, 23svh, 13rem); bottom: auto; }
  .scene-title--board, .scene-title--day { font-size: clamp(3rem, min(6.4vw, 11svh), 6.5rem); top: 1.1rem; }
}

/* --- Sections: solid sheets that slide over the film ------------------------ */
.section {
  position: relative; z-index: 1;
  padding-block: clamp(3.5rem, 8vw, 7rem);
  background: linear-gradient(165deg, var(--wash), transparent 50%) var(--paper);
}
.section-form, .section-proof, .section-contact { content-visibility: auto; contain-intrinsic-size: auto 900px; }

/* The form. */
.section-form { background: linear-gradient(195deg, var(--wash), transparent 55%) var(--sheet-alt); }
.form-layout { display: grid; gap: clamp(1.75rem, 4vw, 3rem); }
.form-lede { margin-top: 1rem; font-size: var(--step-1); line-height: 1.4; max-width: 32ch; }
.call-plate--side { margin-top: 1.5rem; max-width: 27rem; font-size: clamp(1.25rem, 1.05rem + 0.8vw, 1.6rem); }
.msg-form { display: grid; gap: 0.95rem; padding: clamp(1.1rem, 3vw, 2rem); border: 2px solid var(--ink); border-top: 5px solid var(--gold); border-radius: var(--radius); background: var(--paper); }
.field { min-width: 0; }
.field-row { display: grid; gap: 0.95rem; }
.msg-form label { display: block; font-weight: 800; font-size: var(--step--1); margin-bottom: 0.3rem; }
.optional { font-weight: 500; color: var(--ink-soft); }
input[type="text"], input[type="tel"], textarea {
  display: block; width: 100%; min-height: 48px; padding: 0.55rem 0.75rem;
  background: var(--paper);
  border: 2px solid var(--ink-soft);
  border-radius: var(--radius);
  transition: border-color 140ms ease, box-shadow 140ms ease;
}
textarea { resize: vertical; }
::placeholder { color: var(--ink-soft); opacity: 1; }
input:hover, textarea:hover { border-color: var(--ink); }
input[type="text"]:focus-visible, input[type="tel"]:focus-visible, textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; box-shadow: none; }
.field.is-valid input, .field.is-valid textarea { border-color: var(--gold); box-shadow: inset 4px 0 0 var(--gold); }
.field.is-invalid input, .field.is-invalid textarea { border-color: var(--ink); border-style: dashed; }
.field-msg { min-height: 1.3em; margin-top: 0.2rem; font-size: var(--step--1); font-weight: 700; color: var(--ink); }
/* The photo box: a dashed frame that turns solid once a photo is picked. */
.field-photo { padding: 0.8rem 0.9rem; border: 2px dashed var(--ink-soft); border-radius: var(--radius); transition: border-color 160ms ease, background-color 160ms ease; }
.field-photo:hover { border-color: var(--ink); }
.field-photo.has-photo { border-style: solid; border-color: var(--gold); box-shadow: inset 4px 0 0 var(--gold); }
input[type="file"] { display: block; width: 100%; max-width: 100%; min-height: 48px; font-size: var(--step--1); }
input[type="file"]::file-selector-button {
  min-height: 44px; margin-right: 0.75rem; padding: 0.4rem 0.9rem;
  background: var(--paper); color: var(--ink);
  border: 2px solid var(--ink); border-radius: var(--radius);
  font: inherit; font-weight: 800; cursor: pointer;
  transition: background-color 140ms ease, color 140ms ease;
}
input[type="file"]::file-selector-button:hover { background: var(--ink); color: var(--paper); }
.photo-note { margin-top: 0.3rem; font-size: var(--step--1); color: var(--ink-soft); }
.photo-thumb { display: block; margin-top: 0.6rem; width: 7.5rem; height: 5.6rem; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--line); }
.msg-form .btn { justify-self: start; }
.form-note { margin-top: -0.3rem; }
.form-done { padding: 0.9rem 1rem; border-left: 4px solid var(--gold); background: var(--sheet-alt); }
.form-done[hidden] { display: none; }
.form-done p + p { margin-top: 0.3rem; }
@media (min-width: 40rem) { .field-row { grid-template-columns: 1fr 1fr; } }
@media (min-width: 62rem) { .form-layout { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.15fr); align-items: start; } }

/* The proof: one big figure, three reviews as an editorial run, then what
   happens on the day. */
.nums { margin-top: clamp(1.5rem, 4vw, 3rem); }
.num { display: grid; gap: 0.4rem; align-items: end; }
.num-big { font-family: var(--font-display); font-weight: 700; font-size: clamp(7rem, 34vw, 15rem); line-height: 0.78; letter-spacing: -0.06em; color: var(--gold); font-variant-numeric: tabular-nums; }
.num-k { font-size: var(--step-1); font-weight: 650; line-height: 1.25; max-width: 20ch; }
@media (min-width: 48rem) { .num { grid-template-columns: auto 1fr; gap: 2rem; } .num-k { padding-bottom: 0.6rem; } }

.reviews-list { margin-top: clamp(2.5rem, 6vw, 5rem); display: grid; gap: clamp(1.75rem, 4vw, 3rem); }
.review blockquote p { font-size: clamp(1.05rem, 1rem + 0.4vw, 1.3rem); line-height: 1.45; font-weight: 500; }
.review--lead blockquote p { font-size: clamp(1.25rem, 1rem + 1.2vw, 1.9rem); line-height: 1.36; }
.review mark { background: var(--mark); color: inherit; font-weight: 700; padding: 0 0.12em; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.review figcaption { margin-top: 0.6rem; font-size: var(--step--1); font-weight: 700; color: var(--ink-soft); padding-left: 1.6rem; position: relative; }
.review figcaption::before { content: ""; position: absolute; left: 0; top: 0.65em; width: 1rem; height: 3px; background: var(--gold); }
.review .stars { color: var(--gold); }
@media (min-width: 62rem) {
  .reviews-list { grid-template-columns: 1fr 1fr; }
  .review--lead { grid-column: 1 / -1; max-width: 60rem; }
}

.visit { margin-top: clamp(3rem, 7vw, 5.5rem); }
.visit-title { font-size: clamp(1.6rem, 1.2rem + 2vw, 2.8rem); }
.visit-steps { margin-top: 1.25rem; border-top: 2px solid var(--ink); counter-reset: visit; }
.visit-steps li { counter-increment: visit; display: grid; grid-template-columns: 2.4rem 1fr; column-gap: 0.5rem; padding: 0.85rem 0; border-bottom: 1px solid var(--line); }
.visit-steps li::before { content: counter(visit); grid-row: 1 / 3; font-family: var(--font-display); font-weight: 700; font-size: clamp(1.5rem, 1.2rem + 1.5vw, 2.2rem); line-height: 1; color: var(--gold); }
.visit-steps strong { grid-column: 2; font-family: var(--font-display); font-weight: 700; font-size: clamp(1.3rem, 1.1rem + 1.2vw, 2rem); line-height: 1.1; letter-spacing: -0.02em; }
.visit-say { grid-column: 2; margin-top: 0.25rem; font-size: var(--step--1); color: var(--ink-soft); }
.visit-say cite { font-weight: 700; white-space: nowrap; }
.visit-note { margin-top: 0.75rem; }
@media (min-width: 56rem) {
  .visit-steps li { grid-template-columns: 3.2rem minmax(0, 1fr) minmax(0, 1fr); align-items: baseline; column-gap: 1.25rem; }
  .visit-steps li::before { grid-row: auto; }
  .visit-steps strong, .visit-say { grid-column: auto; margin-top: 0; }
}

.his-word { margin-top: clamp(2.5rem, 6vw, 4rem); padding: 1.1rem 1.2rem 1.15rem; border: 2px solid var(--ink); border-left: 6px solid var(--gold); border-radius: var(--radius); max-width: 52rem; }
.his-word p { font-size: var(--step-1); line-height: 1.4; font-weight: 600; }
.his-word footer { margin-top: 0.5rem; font-size: var(--step--1); font-weight: 700; color: var(--ink-soft); }
.section-proof .call-plate { margin-top: clamp(2.5rem, 6vw, 4rem); }

/* Contact strip. */
.section-contact { background: linear-gradient(165deg, var(--wash), transparent 50%) var(--sheet-alt); }
.contact-list { margin-top: 1.5rem; border-top: 2px solid var(--ink); }
.contact-list li { display: grid; grid-template-columns: 4.5rem 1fr; gap: 0.75rem; align-items: baseline; padding: 0.75rem 0; border-bottom: 1px solid var(--line); }
.contact-list li > :last-child { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.35rem, 1rem + 2vw, 2.6rem); line-height: 1.08; letter-spacing: -0.03em; min-width: 0; }
.contact-list a { text-underline-offset: 0.18em; text-decoration-color: var(--gold); text-decoration-thickness: 3px; display: inline-block; padding-block: 0.3rem; margin-block: -0.3rem; }
.contact-email { overflow-wrap: anywhere; }
.contact-k { color: var(--ink-soft); font-weight: 650; font-size: var(--step--1); }
.contact-note { margin-top: 0.75rem; }
@media (min-width: 48rem) { .contact-list li { grid-template-columns: 9rem 1fr; } }

.site-footer { position: relative; z-index: 1; padding-block: 1.5rem 1.75rem; background: var(--anchor-deep); color: var(--neutral); font-size: var(--step--1); --focus: var(--bright); --focus-gap: var(--anchor); }
.site-footer a { color: inherit; text-underline-offset: 0.2em; overflow-wrap: anywhere; display: inline-block; padding-block: 0.4rem; margin-block: -0.4rem; }
.site-footer .small { color: #b6b8bb; margin-top: 0.5rem; }

/* Scroll scenes. Visible in the HTML; only once script.js has set them up do
   they wait to arrive. Each reveal suits its content: the figure counts up,
   the reviews rise one by one, the steps and the contact lines step in. */
html.scenes-on [data-scene="quote"] { transform: translateY(1.5rem); opacity: 0; transition: transform 560ms cubic-bezier(.2,.7,.2,1), opacity 420ms ease; }
html.scenes-on [data-scene="quote"].is-in { transform: none; opacity: 1; }
html.scenes-on [data-scene="steps"] li { transform: translateX(-1.25rem); opacity: 0; transition: transform 480ms cubic-bezier(.2,.7,.2,1), opacity 360ms ease; }
html.scenes-on [data-scene="steps"] li:nth-child(2) { transition-delay: 90ms; }
html.scenes-on [data-scene="steps"] li:nth-child(3) { transition-delay: 180ms; }
html.scenes-on [data-scene="steps"] li:nth-child(4) { transition-delay: 270ms; }
html.scenes-on [data-scene="steps"].is-in li { transform: none; opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

@media print {
  .site-header, .film, .stage-still, .hero-still, .frames, .scene-title, .dock { display: none !important; }
}

/* Still-frame capture (film.js ?still=J): only the film shows. */
html.film-capture body > :not(.film) { visibility: hidden; }
html.film-capture .film { z-index: 1; }
html.film-capture .film canvas { transition: none; }
html.film-capture { scrollbar-width: none; }
html.film-capture::-webkit-scrollbar { display: none; }
