/* Paul Walters Plumbing & Heating, Beetley near Dereham. A 3-scene 3D film mock-up
   (Tier 2C, ~/studio/assets/3d-playbook.md). One lead effect: at night a pipe is
   letting go in a kitchen; in the first 3 seconds the stopcock closes, the water
   stops, the floor clears and a warm lamp comes on. Then the camera follows the
   pipe to three "while you wait" stops, and the same room turns to daylight.

   Five colours (playbook "Colour palettes"):
     1 anchor  #0A1519  near-black with a cold cast (his own cover photo's dark tiles)
     2 neutral #EEF3F4  cool pale grey
     3 family  #0E5F74  deep water
     4 family  #62D0E6  bright water
     5 accent  #FFC247  the warm light: the call button and the lamp, nothing else
   The accent only ever sits on the anchor (on the neutral it is 1.4:1), so the
   header, the hero and the phone's bottom bar are anchor in both modes.
   Mobile first. */

@font-face {
  font-family: "Big Shoulders Display";
  src: url("assets/fonts/big-shoulders-display-800.woff2") format("woff2");
  font-weight: 800;
  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: "Shoulders Fallback";
  src: local("Arial Narrow Bold"), local("Arial Narrow"), local("Arial Bold"), local("Arial");
  font-weight: 800;
  size-adjust: 78%;
  ascent-override: 118%;
  descent-override: 26%;
  line-gap-override: 0%;
}

:root {
  color-scheme: light dark;

  --anchor: #0a1519;
  --anchor-up: #102227;
  --anchor-up2: #17323a;
  --anchor-deep: #050c0f;
  --neutral: #eef3f4;
  --deep: #0e5f74;
  --bright: #62d0e6;
  --lamp: #ffc247;
  --lamp-hover: #ffd27a;
  --lamp-deep: #9a742a;

  --paper: var(--neutral);
  --ink: var(--anchor);
  --ink-soft: #4a5356;
  --line: #c6d3d6;
  --sheet-alt: #dee9eb;
  --water: var(--deep);
  --wash: rgb(98 208 230 / 0.12);
  --focus: var(--anchor);
  --focus-gap: var(--neutral);
  --warn: #67572a;
  --mark: rgb(98 208 230 / 0.34);

  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-display: "Big Shoulders Display", "Shoulders Fallback", "Arial Narrow", "Segoe UI", system-ui, sans-serif;

  --gutter: clamp(1rem, 4vw, 3rem);
  --header-h: 3.5rem;
  --dock-h: 4.25rem;
  --gap: 0.5rem;
  --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.4rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: var(--anchor);
    --ink: var(--neutral);
    --ink-soft: #aeb5b7;
    --line: #25383e;
    --sheet-alt: var(--anchor-up);
    --water: var(--bright);
    --wash: rgb(98 208 230 / 0.07);
    --focus: var(--lamp);
    --focus-gap: var(--anchor);
    --warn: var(--lamp);
    --mark: rgb(98 208 230 / 0.26);
  }
}

*, *::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: 800; line-height: 0.96; letter-spacing: 0.005em; color: var(--ink); }
h2 { font-size: clamp(2.5rem, 1.5rem + 5vw, 5.2rem); }
ul, ol { list-style: none; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
i { 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 #1d2f35;
  --focus: var(--lamp);
  --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.5rem; min-height: 44px; text-decoration: none; min-width: 0; }
.logo-mark { flex: none; }
.mark-drop { fill: var(--bright); }
.mark-lamp { fill: var(--anchor); }
.logo-name { font-family: var(--font-display); font-weight: 800; font-size: 1.35rem; line-height: 0.9; letter-spacing: 0.01em; white-space: nowrap; }
.logo-trade { display: block; margin-top: 0.12rem; font-family: var(--font-sans); font-weight: 650; font-size: 0.7rem; letter-spacing: 0; color: #b9c4c6; }
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: 19.9rem) { .logo-trade { display: none; } }
@media (min-width: 40rem) { .label-long { display: inline; } .logo-name { font-size: 1.5rem; } .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(--lamp); color: var(--anchor); box-shadow: 0 3px 0 var(--lamp-deep); }
.btn-call:hover { background: var(--lamp-hover); }
.btn-call:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--lamp-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(--water); }
.btn-send:active { transform: scale(0.97); }
@media (prefers-color-scheme: dark) { .btn-send:hover { color: var(--anchor); } }

/* 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);
  font-family: var(--font-display); font-weight: 800; font-size: clamp(1.5rem, 1.2rem + 1.6vw, 2.3rem); line-height: 1;
  --focus: var(--lamp); --focus-gap: var(--anchor);
}
.call-plate .btn { font-family: var(--font-sans); }
@media (prefers-color-scheme: dark) { .call-plate { background: var(--anchor-deep); border: 1px solid var(--line); } }

/* --- 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 scene
   box is a window onto it, 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 500ms ease; }
/* A soft darkening at the screen's edges, like a lens. */
.film::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(120% 95% at 50% 45%, transparent 58%, rgb(5 12 15 / 0.34) 100%); }
html.film-capture .film::after { display: none; }
html.film-ready .film canvas { opacity: 1; }

/* Labels pinned to the 3D: neutral pills with anchor text pass in every frame.
   Decorative copies of the real list in the stage's card. */
.film-labels { position: fixed; inset: 0; z-index: 5; pointer-events: none; overflow: clip; }
.film-label {
  position: absolute; left: 0; top: 0;
  max-width: min(17rem, 72vw);
  padding: 0.4rem 0.8rem 0.45rem;
  background: var(--neutral);
  color: var(--anchor);
  border-radius: var(--radius);
  box-shadow: 0 8px 22px -8px rgb(0 0 0 / 0.7);
  font-size: var(--step--1); font-weight: 600; line-height: 1.3;
  opacity: 0;
  will-change: transform, opacity;
}
.film-label b { display: block; font-family: var(--font-display); font-size: 1.45rem; font-weight: 800; line-height: 1; margin-bottom: 0.15rem; }
.film-lead { position: absolute; left: 0; top: 0; height: 2px; background: var(--neutral); transform-origin: 0 50%; opacity: 0; box-shadow: 0 0 2px rgb(0 0 0 / 0.8); }
.film-lead::after { content: ""; position: absolute; right: -6px; top: -5px; width: 12px; height: 12px; border-radius: 50%; background: var(--bright); box-shadow: 0 0 0 2px var(--anchor); }
@media (min-width: 48rem) { .film-label b { font-size: 1.8rem; } .film-label { font-size: var(--step-0); padding: 0.5rem 1rem 0.55rem; } }

/* --- Hero: a bento grid on a dark band (both modes) ------------------------- */
.hero {
  position: relative;
  isolation: isolate;
  overflow: clip;
  background: var(--anchor-deep);
  color: var(--neutral);
  --focus: var(--lamp);
  --focus-gap: var(--anchor);
}
/* With the film on, the hero itself is see-through and every box but the scene
   is solid, so the scene box is a window onto the film behind. The gaps are
   filled by the grid's own outline shadows. */
html.film-on .hero { background: transparent; }
.bento {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-areas:
    "head head"
    "scene scene"
    "rating hours"
    "review review";
  gap: var(--gap);
  padding: var(--gap);
}
.box {
  position: relative;
  z-index: 1;
  min-width: 0;
  border-radius: var(--radius);
  background: var(--anchor-up);
}
.box-head { grid-area: head; padding: 0.85rem 0.9rem 0.75rem; }
.hero-where { font-size: var(--step--1); font-weight: 650; color: #b9c4c6; }
h1 { margin-top: 0.35rem; color: var(--neutral); }
.h1-ask { display: block; font-size: clamp(1.45rem, 6.6vw, 2.6rem); color: var(--bright); line-height: 1; }
.h1-say { display: block; margin-top: 0.12em; font-size: clamp(3.4rem, min(19.5vw, 13svh), 7rem); line-height: 0.86; letter-spacing: 0; }

.box-scene {
  grid-area: scene;
  height: 40svh;
  min-height: 12rem;
  overflow: clip;
  background: var(--anchor-deep);
}
/* The window: with the film on, the scene box is see-through and its own huge
   shadow paints the rest of the hero (the gaps and edges round every box), so
   the film shows through this one box and nowhere else. */
html.film-on .box-scene { z-index: 0; background: transparent; box-shadow: 0 0 0 200vmax var(--anchor-deep); }
.box-scene::after { content: ""; position: absolute; inset: 0; z-index: 4; border-radius: var(--radius); box-shadow: inset 0 0 0 1px rgb(98 208 230 / 0.25); pointer-events: none; }
.hero-still, .frames, .fr { position: absolute; inset: 0; }
.hero-still img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; border-radius: var(--radius); }
.frames { display: none; z-index: 1; border-radius: var(--radius); overflow: hidden; }
.hero-still { border-radius: var(--radius); 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/leak-a.webp"); }
html.film-on .fr-a2 { background-image: url("assets/film/leak-a2.webp"); opacity: 0; }
html.film-on .fr-b { background-image: url("assets/film/leak-b.webp"); opacity: 0; }
html.film-on .fr-b2 { background-image: url("assets/film/leak-b2.webp"); opacity: 0; }
html.film-on .fr-c { background-image: url("assets/film/leak-c.webp"); opacity: 0; }
html.film-on .fr-c2 { background-image: url("assets/film/leak-c2.webp"); opacity: 0; }
html.film-on .fr-d { background-image: url("assets/film/leak-d.webp"); opacity: 0; }
html.film-on .hero-still { z-index: 2; opacity: 0; }
/* The still film: the leak stops, the floor clears, the lamp comes on. In step
   with the 3D's own opening (film.js INTRO_START and INTRO_END), so when the
   3D takes over mid-way the room never goes wet again. Opacity and transform
   only. */
@media (prefers-reduced-motion: no-preference) {
  /* Each frame finishes arriving at the moment the 3D shows the same thing
     (intro progress 0.15, 0.3, 0.42, 0.55, 0.68, 0.8 and 1 of 0.4s to 3.0s). */
  html.film-on .fr-a2 { animation: frame-in 0.3s linear 0.49s both; }
  html.film-on .fr-b { animation: frame-in 0.3s linear 0.88s both; }
  html.film-on .fr-b2 { animation: frame-in 0.3s linear 1.19s both; }
  html.film-on .fr-c { animation: frame-in 0.3s linear 1.53s both; }
  html.film-on .fr-c2 { animation: frame-in 0.25s linear 1.92s both; }
  html.film-on .fr-d { animation: frame-in 0.3s linear 2.18s both; }
  html.film-on .hero-still { animation: frame-in 0.45s linear 2.55s both; }
  html.film-on .frames, html.film-on .hero-still img { animation: settle 3.2s cubic-bezier(.2, .6, .2, 1) both; transform-origin: 60% 60%; }
  .h1-say { animation: land 900ms cubic-bezier(.2, .7, .2, 1) 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 400ms ease, visibility 0s linear 400ms; animation: none; }
@keyframes frame-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes settle { from { transform: scale(1.07); } to { transform: none; } }
@keyframes land { from { transform: translateY(0.18em); } to { transform: none; } }

.box-review { grid-area: review; padding: 0.8rem 0.9rem 0.85rem; background: var(--deep); color: var(--neutral); }
.box-review p { font-size: var(--step--1); line-height: 1.45; }
.box-review mark { background: none; color: inherit; font-weight: 800; }
.box-review figcaption { margin-top: 0.45rem; font-size: 0.82rem; font-weight: 700; display: flex; flex-wrap: wrap; align-items: center; gap: 0.1rem 0.5rem; }
.box-review .stars { color: var(--neutral); margin: 0; }
.more { margin-left: auto; padding-block: 0.6rem; margin-block: -0.6rem; text-underline-offset: 0.25em; }

.box-call { grid-area: call; display: none; }
.box-rating, .box-hours { padding: 0.7rem 0.9rem 0.8rem; font-size: 0.82rem; line-height: 1.3; color: #c9d3d5; }
.box-rating { grid-area: rating; }
.box-hours { grid-area: hours; }
.box-rating strong, .box-hours strong { display: block; font-family: var(--font-display); font-weight: 800; line-height: 0.95; color: var(--neutral); }
.box-rating strong { font-size: 3.1rem; color: var(--bright); }
.box-hours strong { font-size: 1.7rem; margin-bottom: 0.3rem; }

/* Tablets: the same order with the review beside the facts. */
@media (min-width: 40rem) {
  :root { --gap: 0.65rem; }
  .bento {
    grid-template-columns: repeat(6, 1fr);
    grid-template-areas:
      "head head head head head head"
      "scene scene scene scene scene scene"
      "review review review review rating rating"
      "review review review review hours hours";
  }
  .box-head { padding: 1.25rem 1.4rem 1.1rem; }
  .box-scene { height: 38svh; }
  .box-review { padding: 1.1rem 1.3rem; }
  .box-review p { font-size: var(--step-0); }
  .h1-say { font-size: clamp(4.5rem, 15vw, 8.5rem); }
}

/* Wide screens: the scene is the tall right-hand box; the words, the review,
   the call box and the facts are five different boxes round it. */
@media (min-width: 64rem) and (min-aspect-ratio: 1/1) {
  :root { --gap: 0.7rem; --header-h: 3.75rem; }
  .hero { min-height: calc(100svh - var(--header-h) - 2rem); display: grid; }
  .bento {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-template-rows: auto minmax(0, 1fr) auto;
    grid-template-areas:
      "head head head head head scene scene scene scene scene scene scene"
      "review review review review review scene scene scene scene scene scene scene"
      "call call call call call rating rating rating hours hours hours hours";
    min-height: 34rem;
  }
  .box-head { padding: clamp(1.2rem, 2.4vh, 2rem) clamp(1.3rem, 2vw, 2.2rem); }
  .h1-ask { font-size: clamp(1.9rem, 2.6vw, 3rem); }
  .h1-say { font-size: clamp(5rem, min(9.6vw, 17.5svh), 11rem); }
  .box-scene { height: auto; min-height: 0; }
  .box-review { display: flex; flex-direction: column; justify-content: center; padding: clamp(1rem, 2.2vh, 1.6rem) clamp(1.3rem, 2vw, 2.2rem); }
  .box-review p { font-size: clamp(1rem, 0.75rem + 0.55vw, 1.25rem); line-height: 1.42; }
  .box-review figcaption { font-size: var(--step--1); margin-top: 0.7rem; }
  .box-call {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    column-gap: 1rem;
    padding: 0.9rem clamp(1.3rem, 2vw, 2.2rem);
    background: var(--lamp);
    color: var(--anchor);
    text-decoration: none;
    transition: background-color 160ms ease, transform 140ms ease;
  }
  .box-call svg { grid-row: 1 / 3; fill: currentColor; }
  .box-call:hover { background: var(--lamp-hover); }
  .box-call:active { transform: scale(0.985); }
  .call-k { font-weight: 800; font-size: var(--step-0); line-height: 1.1; }
  .call-n { font-family: var(--font-display); font-weight: 800; font-size: clamp(2.6rem, 4.1vw, 4.4rem); line-height: 0.9; }
  .box-rating, .box-hours { display: flex; flex-direction: column; justify-content: center; padding: 0.8rem 1.2rem; font-size: var(--step--1); }
  .box-rating { flex-direction: row; align-items: center; justify-content: flex-start; gap: 0.8rem; }
  .box-rating strong { font-size: clamp(3.4rem, 5vw, 5rem); }
  .box-hours strong { font-size: clamp(1.8rem, 2.6vw, 2.6rem); }
  /* The fixed pause button sits over this corner: keep the words clear of it. */
  .box-hours { padding-right: 13rem; }
}
@media (min-width: 64rem) and (min-aspect-ratio: 1/1) and (max-height: 40rem) {
  .h1-say { font-size: clamp(3.5rem, 15svh, 6rem); }
  .box-review p { font-size: var(--step--1); }
}

/* --- Scene titles ------------------------------------------------------------ */
.scene-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.5rem, 12vw, 8.5rem);
  line-height: 0.86;
  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;
}
@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: 6vw; transform: translateX(calc((1 - var(--p, 1)) * var(--slide))); will-change: transform; }
  @media (min-width: 40rem) { .scene-title { --slide: 16vw; } }
}
.scene-title--hero { position: absolute; z-index: 3; left: 0.7rem; bottom: 0.45rem; font-size: clamp(1.7rem, 7.4vw, 4.6rem); }
/* The hero's title sits still in its box. */
.scene-title--hero { transform: none !important; }

/* --- Stages ------------------------------------------------------------------ */
.stage { position: relative; overflow-x: clip; background: var(--anchor-deep); color: var(--neutral); --focus: var(--lamp); --focus-gap: var(--anchor); }
html.film-on .stage { background: transparent; }
.stage-inner { position: relative; }
html.film-on .stage--wait { height: 360svh; }
html.film-on .stage--warm { 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--wait, .scene-title--warm { position: absolute; left: var(--gutter); top: 0.6rem; z-index: 1; }

/* 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: 31rem;
  padding: 0.85rem 1rem 0.95rem;
  background: var(--neutral);
  color: var(--anchor);
  border-radius: var(--radius);
  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.7rem, 1.3rem + 1.8vw, 2.6rem); color: var(--anchor); }
.stage-card p { margin-top: 0.3rem; font-size: var(--step--1); font-weight: 600; color: #3a4447; }
.advice-note { padding-left: 0.6rem; border-left: 3px solid var(--deep); }
.wait-steps { margin-top: 0.65rem; display: grid; gap: 0.5rem; font-size: var(--step--1); line-height: 1.38; counter-reset: step; }
.wait-steps li { counter-increment: step; position: relative; padding-left: 2rem; transition: opacity 200ms ease; }
.wait-steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 1.45rem; height: 1.45rem; border-radius: 50%;
  background: var(--deep); color: var(--neutral);
  font-weight: 800; font-size: 0.8rem; display: grid; place-items: center;
}
.wait-steps strong { display: block; }
.wait-steps a { font-weight: 800; text-underline-offset: 0.25em; display: inline-block; padding-block: 0.5rem; margin-block: -0.5rem; }
.step-still { display: none; }
html:not(.film-on) .step-still { display: block; width: 100%; margin: 0.4rem 0 0.5rem -2rem; max-width: calc(100% + 2rem); width: calc(100% + 2rem); border-radius: var(--radius); }
/* With the film running, the step the camera is at stands out. */
html.film-ready .wait-steps[data-at] li { opacity: 0.55; }
html.film-ready .wait-steps[data-at="1"] li[data-step="1"],
html.film-ready .wait-steps[data-at="2"] li[data-step="2"],
html.film-ready .wait-steps[data-at="3"] li[data-step="3"] { opacity: 1; }
.warm-card { max-width: 24rem; }

/* --- 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 #1d2f35;
  --focus: var(--lamp); --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 (it pushed Pause off
   a 360px phone), so the bar just says "Call Paul". 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); }
  .stage-card { bottom: 2rem; right: auto; }
}

/* --- 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 55%) var(--paper);
}
.section-work, .section-form, .section-contact { content-visibility: auto; contain-intrinsic-size: auto 900px; }

/* The proof: two big figures, then three reviews as an editorial run. */
.nums { margin-top: clamp(1.5rem, 4vw, 3rem); display: grid; gap: 1.5rem 3rem; }
.num { display: grid; gap: 0.2rem; }
.num-big { font-family: var(--font-display); font-weight: 800; font-size: clamp(6rem, 30vw, 15rem); line-height: 0.8; color: var(--water); font-variant-numeric: tabular-nums; }
.num-k { font-size: var(--step-1); font-weight: 650; line-height: 1.25; max-width: 18ch; }
@media (min-width: 48rem) { .nums { grid-template-columns: auto 1fr; align-items: start; } .num-big { font-size: clamp(8rem, 17vw, 15rem); } }

.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.2rem, 1rem + 1vw, 1.75rem); line-height: 1.38; }
.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; border-radius: 2px; background: var(--water); }
.review--lead { scroll-margin-top: calc(var(--header-h) + 1.5rem); }
@media (min-width: 62rem) {
  .reviews-list { grid-template-columns: 1fr 1fr; }
  .review--lead { grid-column: 1 / -1; max-width: 62rem; }
}
.section-proof .call-plate { margin-top: clamp(2.5rem, 6vw, 4.5rem); }

/* The planned work: his words, a plain list, his photos big and uneven. */
.section-work { background: linear-gradient(195deg, var(--wash), transparent 60%) var(--sheet-alt); }
.work-layout { display: grid; gap: clamp(2rem, 5vw, 4rem); }
.work-lede { margin-top: 1.25rem; padding-left: 1rem; border-left: 4px solid var(--water); }
.work-lede p { font-size: var(--step-1); line-height: 1.35; font-weight: 600; }
.work-lede footer { margin-top: 0.4rem; font-size: var(--step--1); font-weight: 700; color: var(--ink-soft); }
.work-list { margin-top: 1.5rem; border-top: 2px solid var(--ink); }
.work-list li { padding: 0.7rem 0; border-bottom: 1px solid var(--line); font-family: var(--font-display); font-weight: 800; font-size: clamp(1.5rem, 1.2rem + 1.5vw, 2.2rem); line-height: 1.05; }
.work-words .small { margin-top: 0.9rem; }
.work-photos { display: grid; grid-template-columns: 5fr 7fr; gap: 0.6rem; align-items: start; }
.work-photos figure { position: relative; overflow: hidden; border-radius: var(--radius); background: var(--anchor-up); }
.work-photos img { width: 100%; height: 100%; object-fit: cover; }
.ph-a { grid-row: span 2; }
.ph-a img { aspect-ratio: 316 / 701; }
.ph-b img { aspect-ratio: 526 / 640; }
.ph-c img { aspect-ratio: 1; }
.work-photos figcaption {
  position: absolute; left: 0.45rem; right: 0.45rem; bottom: 0.45rem;
  padding: 0.35rem 0.6rem 0.4rem;
  background: var(--anchor); color: var(--neutral);
  border-radius: calc(var(--radius) - 1px);
  font-size: 0.8rem; font-weight: 600; line-height: 1.3;
}
@media (min-width: 62rem) {
  .work-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); align-items: start; }
  .work-photos { position: sticky; top: calc(var(--header-h) + 1.5rem); gap: 0.75rem; }
  .work-photos figcaption { font-size: var(--step--1); }
}

/* The form. */
.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: 30ch; }
.call-plate--side { margin-top: 1.5rem; font-size: clamp(1.4rem, 1.1rem + 1vw, 1.8rem); max-width: 26rem; }
.msg-form { display: grid; gap: 0.95rem; padding: clamp(1.1rem, 3vw, 2rem); border: 2px solid var(--ink); 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; }
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(--water); box-shadow: inset 4px 0 0 var(--water); }
.field.is-invalid input, .field.is-invalid textarea { border-color: var(--warn); border-style: dashed; }
.field-msg { min-height: 1.3em; margin-top: 0.2rem; font-size: var(--step--1); font-weight: 700; color: var(--warn); }
.msg-form .btn { justify-self: start; }
.form-note { margin-top: -0.3rem; }
.form-done { padding: 0.9rem 1rem; border-left: 4px solid var(--water); 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; } }

/* Contact strip. */
.section-contact { background: linear-gradient(165deg, var(--wash), transparent 55%) var(--sheet-alt); }
.contact-list { margin-top: 1.5rem; border-top: 2px solid var(--ink); }
.contact-list li { display: grid; grid-template-columns: 5.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: 800; font-size: clamp(1.6rem, 1.2rem + 2.2vw, 3rem); line-height: 1.02; overflow-wrap: anywhere; }
.contact-list a { text-underline-offset: 0.18em; text-decoration-color: var(--water); text-decoration-thickness: 3px; display: inline-block; padding-block: 0.3rem; margin-block: -0.3rem; }
.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(--lamp); --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: #b9c4c6; 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 figures count up, the
   reviews rise one by one, the list steps in line by line, his photos open out. */
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: 60ms; }
html.scenes-on [data-scene="steps"] li:nth-child(3) { transition-delay: 120ms; }
html.scenes-on [data-scene="steps"] li:nth-child(4) { transition-delay: 180ms; }
html.scenes-on [data-scene="steps"] li:nth-child(5) { transition-delay: 240ms; }
html.scenes-on [data-scene="steps"] li:nth-child(6) { transition-delay: 300ms; }
html.scenes-on [data-scene="steps"] li:nth-child(7) { transition-delay: 360ms; }
html.scenes-on [data-scene="steps"] li:nth-child(8) { transition-delay: 420ms; }
html.scenes-on [data-scene="steps"].is-in li { transform: none; opacity: 1; }
html.scenes-on [data-scene="photos"] figure { clip-path: inset(14% 14% 14% 14% round var(--radius)); transition: clip-path 720ms cubic-bezier(.2,.7,.2,1); }
html.scenes-on [data-scene="photos"] li:nth-child(2) figure { transition-delay: 110ms; }
html.scenes-on [data-scene="photos"] li:nth-child(3) figure { transition-delay: 220ms; }
html.scenes-on [data-scene="photos"].is-in figure { clip-path: inset(0 0 0 0 round var(--radius)); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

@media print {
  .site-header, .film, .film-labels, .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; }
