/*
 * Farmer360 landing page (farmer360.co.za). Layout A from the approved mock (scratchpad landing/mock/a/AC-*.html,
 * base.css, A-booking.html), with the intro film alone in a larger card (approved by Ariel, 12 November 2026).
 *
 * The hero fills the first screen; below it, "One day on the farm" (six chapters, from the approved mock in scratchpad
 * landing/below2/page.css), so the page scrolls.
 *
 * Two layouts:
 * - Wide (landscape, at least 960 x 560): positions are the 1440 x 900 mock's, in --u (one mock pixel).
 * - Stacked (portrait and small screens): a column, sized in --p (one pixel of the 390 px phone mock).
 * Under 560 px tall the hero may grow taller than the screen rather than clip.
 *
 * No inline styles anywhere (the CSP allows only this file); scripts set custom properties through the CSSOM.
 */

@font-face {
  font-family: "Geist";
  src: url("/fonts/Geist-Variable-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* The booking sheet's glass, as it reads over the dimmed page: the pinned footer's band matches it. */
  --bk-band: 242, 239, 231;
  --ink: #14201a;
  --ink-2: rgba(20, 32, 26, 0.68);
  /* Small text over the landscape ("by", footer): the mock's 0.55 and 0.6 are raised so they reach 4.5:1. */
  --ink-3: rgba(20, 32, 26, 0.76);
  --green: #2c7a31;
  --green-deep: #24672a;
  --cream: 250, 244, 234;
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
  --ease-soft: cubic-bezier(0.45, 0, 0.2, 1);
  --grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  --font: "Geist", -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, sans-serif;

  /* Stacked layout unit: one pixel of the 390 x 844 phone mock, within 0.9 and 1.45. From the small viewport height
     (svh), which holds still while a phone's address bar slides away and back, so nothing grows or shrinks as the
     page scrolls; app.js measures the same height (its .vh-probe). */
  --p: clamp(0.9px, min(calc(100vw / 390), calc(100vh / 760)), 1.45px);
}
@supports (height: 100svh) {
  :root {
    --p: clamp(0.9px, min(calc(100vw / 390), calc(100svh / 760)), 1.45px);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  overflow-x: clip;
  background: rgb(var(--cream));
}

html {
  scroll-behavior: auto;
}

body {
  font-family: var(--font);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern" 1;
}

h1,
h2,
p {
  margin: 0;
}

button {
  font: inherit;
  color: inherit;
  margin: 0;
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

img,
video,
canvas,
svg {
  display: block;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* app.js's measure of the height the layout is sized from (--p, .page, --u): the small viewport, or 100vh where svh is
   unknown. Invisible and out of the flow. */
.vh-probe {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 100vh;
  height: 100svh;
  visibility: hidden;
  pointer-events: none;
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

/* ---------------------------------------------------------------- scene */

/* The hero: one screen, with the scene behind it. */
.hero-wrap {
  position: relative;
  overflow: clip;
  background: rgb(var(--cream));
}

.scene {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: rgb(var(--cream));
  pointer-events: none;
}

/* The still photograph: sharp, static, full-bleed. No transform, no drift, no parallax: the camera never moves. */
.scene-intro,
.scene-depth,
.scene-drift {
  position: absolute;
  inset: 0;
}

.scene-poster,
.scene-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.scene-poster {
  background-image: var(--scene-poster);
  background-size: cover;
  background-repeat: no-repeat;
  background-position: var(--scene-pos);
}

/* The optional living-photograph loop (locked-off) crossfades in over the poster once it plays. */
.scene-video {
  object-fit: cover;
  object-position: var(--scene-pos);
  opacity: 0;
  transition: opacity 1.6s var(--ease-soft);
}

.scene-video.is-playing {
  opacity: 1;
}

.veil,
.motes,
.grain {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.grain {
  opacity: 0.05;
  background-image: var(--grain);
}

/* The terrace dissolves into the midday haze where chapter 1 begins. */
.hero-melt {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 9vh;
  background: linear-gradient(180deg, rgba(239, 232, 229, 0), #efe8e5 96%);
}

/* ---------------------------------------------------------------- page (stacked by default) */

.page {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100svh;
  padding: max(calc(24 * var(--p)), env(safe-area-inset-top)) max(calc(22 * var(--p)), env(safe-area-inset-right))
    max(calc(14 * var(--p)), env(safe-area-inset-bottom)) max(calc(22 * var(--p)), env(safe-area-inset-left));
}

/* Where each plate is anchored when the screen crops it (stacked; the wide layout resets these). On a portrait
   phone only about a third of the terrace's width shows: 80% frames the vineyard with the olive's branches at the
   right edge, clear of the text. */
:root {
  --scene-pos: 80% 70%;
}

[data-scene="lake"] {
  --scene-pos: 40% 60%;
}

.main {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

/*
 * The header (.top) is the first thing in <body>, the page's banner, laid over the hero where it always sat: in the
 * stacked layout at the top of the hero's padding, and the hero's column keeps its slot with a spacer of the header's
 * height (the taller of the 34 px Menu pill and the lockup, 24 --p). The wide layout places it below.
 */
:root {
  --top-h: max(34px, calc(24 * var(--p)));
}

.top {
  position: absolute;
  top: max(calc(24 * var(--p)), env(safe-area-inset-top));
  left: max(calc(22 * var(--p)), env(safe-area-inset-left));
  right: max(calc(22 * var(--p)), env(safe-area-inset-right));
}

.page::before {
  content: "";
  flex: none;
  height: var(--top-h);
}

/*
 * Lockup: the Farmer360 logo with "by pomodor" set close after it, smaller and lighter, on the same baseline as
 * "Farmer360". Inline layout so the pieces share one baseline: each image sits lowered by its own descent
 * (measured: the text baseline is 23.4 % up from the bottom of farmer360-lockup.svg and 23.5 % up from the bottom
 * of pomodor-wordmark.png). The sizes are set per layout with --lh (logo height), --by and --ph (wordmark height).
 */
.lockup {
  --lh: calc(24 * var(--p));
  --by: max(11px, calc(11 * var(--p)));
  --ph: calc(11.6 * var(--p));
  display: block;
  width: max-content;
  font-size: 0;
  line-height: 1;
  white-space: nowrap;
}

.lockup-f360 {
  display: inline-block;
  height: var(--lh);
  width: auto;
  vertical-align: calc(var(--lh) * -0.234);
}

.lockup-by {
  display: inline-block;
  margin-left: calc(var(--lh) * 0.3);
  font-weight: 500;
  font-size: var(--by);
  letter-spacing: 0.01em;
  color: var(--ink-3);
  vertical-align: baseline;
}

.lockup-pomodor {
  display: inline-block;
  height: var(--ph);
  width: auto;
  margin-left: calc(var(--by) * 0.3);
  vertical-align: calc(var(--ph) * -0.235);
  /* Lighter, in step with "by" (a logo, so outside the text contrast rule). */
  opacity: 0.76;
}

/* Hero */
.hero {
  flex: none;
  margin-top: calc(36 * var(--p));
  max-width: 640px;
}

.hero h1 {
  /* Three balanced lines on phones and tablets: "Streamlining / operations from / field to settlement." */
  max-width: 9.6em;
  font-size: min(calc(38 * var(--p)), 56px);
  font-weight: 620;
  letter-spacing: -0.028em;
  line-height: 1.02;
  text-wrap: balance;
}

.sub {
  margin-top: calc(14 * var(--p));
  font-size: max(15px, min(calc(15.5 * var(--p)), 19px));
  line-height: 1.5;
  letter-spacing: -0.005em;
  color: var(--ink-2);
  text-wrap: pretty;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: calc(10 * var(--p));
  margin-top: calc(20 * var(--p));
}

/*
 * Audience line, under the call to action: plain text, not a link. The four business types are set a little heavier
 * than "For" and the commas, the one cue that catches the eye. Its ink is measured against the photograph's own
 * pixels behind it (the hero check holds it at 4.5:1 or better): the subtext's tone is enough here; the wide layout
 * sits it over the darker vineyard, so it is darker there.
 */
.aud {
  --aud-ink: rgba(20, 32, 26, 0.72);
  --aud-key: rgba(20, 32, 26, 0.82);
  margin-top: calc(14 * var(--p));
  font-size: max(13.5px, min(calc(14 * var(--p)), 15px));
  line-height: 1.4;
  letter-spacing: -0.003em;
  color: var(--aud-ink);
  text-wrap: balance;
}

.aud-k {
  font-weight: 560;
  color: var(--aud-key);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: max(44px, min(calc(46 * var(--p)), 52px));
  padding: 0 calc(20 * var(--p));
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--font);
  font-weight: 600;
  font-size: max(15px, min(calc(15 * var(--p)), 16px));
  line-height: 1;
  letter-spacing: -0.005em;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
  transition:
    transform 0.35s var(--ease),
    box-shadow 0.35s var(--ease),
    background-color 0.25s ease;
}

.btn-primary {
  background: var(--green);
  color: #fff;
  box-shadow:
    0 10px 30px -10px rgba(30, 90, 35, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.btn-primary:hover {
  background: var(--green-deep);
  transform: translateY(-1px);
  box-shadow:
    0 16px 36px -12px rgba(30, 90, 35, 0.62),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-glass {
  padding: 0 calc(18 * var(--p));
  background: rgba(255, 255, 255, 0.55);
  color: var(--ink);
  border-color: rgba(255, 255, 255, 0.8);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  box-shadow: 0 8px 24px -12px rgba(40, 50, 30, 0.35);
}

.btn-glass:hover {
  background: rgba(255, 255, 255, 0.72);
  transform: translateY(-1px);
}

.btn-glass:active {
  transform: translateY(0);
  background: rgba(255, 255, 255, 0.64);
}


/* ---------------------------------------------------------------- the intro film's card */

/*
 * One card, Meet Farmer360 (approved by Ariel, 12 November 2026): app.js builds it in .cf-track (the poster, the
 * muted preview, the chip, the glass and the play button). Under it, the pill: the film's title and length, a hairline
 * and the quiet link to /product-demos. Phones: the card takes the content column, the title and length sit on it as
 * a chip and the link is one line under it.
 */
.cf {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  /* Any room left on tall screens is shared above the card and below the pill, not left under the pill. */
  justify-content: center;
}

/* The stage takes the room left under the text; the card fills the content column, or what that room allows. */
.cf-stage {
  position: relative;
  flex: 1 1 0;
  min-height: 150px;
  margin-top: calc(10 * var(--p));
  margin-inline: calc(-22 * var(--p));
  container-type: size;
  --cw: min(calc(100cqw - 44 * var(--p)), 148cqh);
  --r: 20px;
  --play: clamp(52px, calc(var(--cw) * 0.19), 68px);
}

.cf-track {
  position: absolute;
  inset: 0;
  perspective: calc(var(--cw) * 3.2);
  perspective-origin: 50% 50%;
}

/* The card, centred on the stage. app.js turns it a little toward the pointer (up to 4 degrees) and moves its glass
   sheen (--sheen-x, --sheen-y) while the pointer is over the stage. */
.cf-card {
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--cw);
  height: calc(var(--cw) * 0.5625);
  margin: calc(var(--cw) * -0.28125) 0 0 calc(var(--cw) * -0.5);
  --sheen-x: 50%;
  --sheen-y: 35%;
}

[data-motion="paused"] .cf-card {
  transition: transform 0.9s var(--ease-soft);
}

/* Contact shadow: a soft blurred ellipse on the ground under the card. It lives in the card's own transform, so it
   turns with the card. (Replaces the mock's floor reflection, which mirrored the promo's burned-in captions.) */
.cf-card::after {
  content: "";
  position: absolute;
  left: 7%;
  right: 7%;
  top: calc(100% + var(--cw) * 0.035);
  height: calc(var(--cw) * 0.075);
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(30, 40, 25, 0.3), rgba(30, 40, 25, 0.12) 55%, rgba(30, 40, 25, 0));
  filter: blur(calc(var(--cw) * 0.014));
  pointer-events: none;
}

.cf-face {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--r);
  overflow: hidden;
  background: #d9d6cf;
  cursor: pointer;
  box-shadow:
    0 40px 90px -30px rgba(30, 40, 25, 0.55),
    0 12px 30px -12px rgba(30, 40, 25, 0.35);
  -webkit-mask-image: -webkit-radial-gradient(white, black);
}

.cf-face:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 4px;
}

.cf-poster,
.cf-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cf-video {
  opacity: 0;
  transition: opacity 0.8s var(--ease-soft);
}

.cf-video.is-playing {
  opacity: 1;
}

/* The film's title and length on the card, phones only (below); decorative, as the button already says them. */
.cf-chip {
  display: none;
}

/* Glass: the mock's diagonal light plus a specular sheen that follows the pointer (--sheen-x, --sheen-y). */
.cf-shine {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at var(--sheen-x) var(--sheen-y), rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0) 45%),
    linear-gradient(115deg, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0) 35%);
  mix-blend-mode: soft-light;
  pointer-events: none;
}

.cf-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--play);
  height: var(--play);
  margin: calc(var(--play) / -2) 0 0 calc(var(--play) / -2);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 30px -8px rgba(0, 0, 0, 0.35);
  transition: transform 0.5s var(--ease);
}

.cf-play svg {
  width: 32%;
  height: 32%;
  margin-left: 7%;
}

.cf-face:hover .cf-play {
  transform: scale(1.07);
}

/* Pill under the card: the film's title and length, a hairline and the quiet link to the product demos. */
.cf-bar {
  flex: none;
  display: flex;
  justify-content: center;
}

.pill {
  display: flex;
  align-items: center;
  max-width: 100%;
  gap: 16px;
  min-height: 40px;
  padding: calc(10 * var(--p)) calc(20 * var(--p));
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.85);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  box-shadow: 0 14px 34px -18px rgba(30, 40, 25, 0.45);
}

.pill-title {
  min-width: 0;
  font-weight: 600;
  font-size: max(13px, min(calc(13.5 * var(--p)), 15px));
  line-height: 1.2;
  text-wrap: balance;
}

/* The title and its length each stay whole. */
.pill-name,
.pill-duration {
  white-space: nowrap;
}

.pill-duration {
  display: inline-block;
  font-weight: 500;
  /* The small-text ink (0.76): the mock's 0.68 dips just under 4.5:1 over the vineyard on phones. */
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

.pill-rule {
  flex: none;
  width: 1px;
  height: 18px;
  background: rgba(20, 32, 26, 0.16);
}

.demos-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: max(13.5px, min(calc(14 * var(--p)), 15px));
  font-weight: 560;
  letter-spacing: -0.006em;
  line-height: 1.2;
  white-space: nowrap;
  color: var(--ink);
  text-decoration: none;
}

/* A touch area of at least 44 px around the line of text (17.4 px at the smallest size, 18 px on phones). */
.demos-link::after {
  content: "";
  position: absolute;
  inset: -14px -10px;
}

.demos-link svg {
  width: 15px;
  height: 15px;
  flex: none;
  color: var(--green);
  transition: transform 0.3s var(--ease);
}

.demos-link:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.demos-link:hover svg {
  transform: translateX(3px);
}

.motion-toggle:active {
  transform: scale(0.94);
}

/* The hero's footer row: only the motion toggle, at the right (copyright, privacy and email are in the page footer). */
.foot {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  margin-top: 8px;
  font-weight: 500;
  font-size: max(11.5px, calc(11 * var(--p)));
  line-height: 1.3;
  color: var(--ink-3);
}

.foot-end {
  display: flex;
  align-items: center;
  gap: 10px;
}

.bk-privacy a {
  color: var(--green-deep);
  font-weight: 500;
  text-underline-offset: 2px;
}

/* Pause or play background motion (WCAG 2.2.2): a 32 px glass button with a 44 px touch area. */
.motion-toggle {
  position: relative;
  flex: none;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.55);
  color: var(--ink);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 6px 18px -10px rgba(40, 50, 30, 0.45);
  cursor: pointer;
  transition:
    background-color 0.25s ease,
    transform 0.2s var(--ease);
}

.motion-toggle::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
}

.motion-toggle:hover {
  background: rgba(255, 255, 255, 0.78);
}

.motion-toggle svg {
  width: 12px;
  height: 12px;
}

.motion-toggle .icon-resume {
  display: none;
  margin-left: 1px;
}

[data-motion="paused"] .motion-toggle .icon-pause {
  display: none;
}

[data-motion="paused"] .motion-toggle .icon-resume {
  display: block;
}

/* Phones and small screens (SMALL_SCREEN in config.js, the same query): no motion control, as nothing there moves
   for more than 5 seconds (app.js). app.js also sets hidden on it. Nothing else sits in the hero's footer row there,
   so the row takes no room from the first paint (the card has it) and the hero's layout never moves. */
@media (max-width: 900px) {
  .foot {
    margin-top: 0;
  }

  .motion-toggle {
    display: none;
  }
}

/* Phones: the pill's glass goes; only the link shows, as one quiet line under the card. The title stays in the page
   for screen readers and appears on the card as the chip. (.cf .pill: over the reduced-transparency fill too.) */
@media (max-width: 599px) {
  .cf .pill {
    padding: 0;
    min-height: 0;
    border: 0;
    background: none;
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .pill-title,
  .pill-rule {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .cf-bar {
    padding: 4px 0 calc(4 * var(--p));
  }

  .demos-link {
    font-size: 15px;
  }

  .cf-chip {
    display: block;
    position: absolute;
    z-index: 3;
    top: 10px;
    left: 10px;
    padding: 6px 11px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.7);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    backdrop-filter: blur(14px) saturate(140%);
    box-shadow: 0 8px 20px -12px rgba(30, 40, 25, 0.5);
    color: var(--ink);
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.003em;
    white-space: nowrap;
    pointer-events: none;
  }
}

/* Stacked veil: cream from the top, where the text sits, and a faint band under the footer (not in the mock:
   it keeps the small footer text at 4.5:1 over the terrace's dappled floor). */
.veil {
  background:
    linear-gradient(0deg, rgba(var(--cream), 0.55) 0, rgba(var(--cream), 0) 56px),
    linear-gradient(180deg, rgba(var(--cream), 0.84) 0%, rgba(var(--cream), 0.58) 45%, rgba(var(--cream), 0.12) 72%);
}

/* Tablets in portrait: a larger card, with room for its contact shadow; the pill a little further under it. */
@media (min-width: 600px) {
  .cf-stage {
    max-height: calc(360 * var(--p));
    --cw: min(76cqw, 148cqh);
  }

  .cf-bar {
    margin-top: calc(14 * var(--p));
  }
}

/* ---------------------------------------------------------------- wide layout */

@media (min-width: 960px) and (min-aspect-ratio: 6/5) and (min-height: 560px) {
  :root {
    /* One pixel of the 1440 x 900 mock. Text never goes below 86 % of it. */
    --u: min(calc(100vw / 1440), calc(100vh / 900));
    --ut: max(var(--u), 0.86px);
    --oy: max(0px, calc((100vh - 900 * var(--u)) / 2));
    --scene-pos: center;
  }
  @supports (height: 100svh) {
    :root {
      --u: min(calc(100vw / 1440), calc(100svh / 900));
      --oy: max(0px, calc((100svh - 900 * var(--u)) / 2));
    }
  }

  [data-scene="lake"] {
    --scene-pos: center 55%;
  }

  .page {
    display: block;
    padding: 0;
  }

  .page::before {
    content: none;
  }

  .top {
    left: calc(48 * var(--u));
    right: auto;
    top: calc(36 * var(--u));
  }

  .lockup {
    --lh: calc(38 * var(--u));
    --by: max(12px, calc(14 * var(--u)));
    --ph: calc(17 * var(--u));
  }

  .hero {
    position: absolute;
    z-index: 2;
    left: calc(84 * var(--u));
    top: calc(var(--oy) + 226 * var(--u));
    width: calc(460 * var(--u));
    max-width: none;
    margin: 0;
  }

  .hero h1 {
    /* Three balanced lines, clear of the card: "Streamlining / operations from field / to settlement." (19 November
       2026; the middle line needs 9.45em, so the headline's measure reaches 20 px past the subtext's column, still well
       clear of the card). The measure is in em, so the breaks are the same at every wide size. */
    width: 9.6em;
    max-width: none;
    font-size: calc(50 * var(--u));
  }

  .sub {
    margin-top: calc(22 * var(--ut));
    font-size: max(15px, calc(17.5 * var(--u)));
    /* The mock's 452 leaves the far card a few pixels away when the 15 px floor applies; 430 keeps its line breaks. */
    max-width: calc(430 * var(--u));
  }

  .actions {
    flex-wrap: nowrap;
    width: max-content;
    gap: calc(12 * var(--u));
    margin-top: calc(34 * var(--ut));
  }

  /* One line; it may run past the subtext's column, still well clear of the pill. */
  .aud {
    --aud-ink: rgba(20, 32, 26, 0.84);
    --aud-key: rgba(20, 32, 26, 0.9);
    margin-top: calc(18 * var(--ut));
    font-size: max(14px, calc(15 * var(--u)));
    white-space: nowrap;
  }

  .btn {
    height: max(44px, calc(52 * var(--u)));
    padding: 0 max(20px, calc(26 * var(--u)));
    font-size: max(15px, calc(16 * var(--u)));
  }

  .btn-block {
    padding: 0 20px;
  }

  /* The card is 720 mock pixels wide; its right edge sits 84 from the screen's edge, as the text sits 84 from the
     left. The stage and the bar are centred on the card; app.js places the bar on the line of Book a walkthrough, or
     32 px under the card's contact shadow when that is lower. */
  .cf-stage {
    position: absolute;
    left: calc(600 * var(--u));
    right: calc(48 * var(--u));
    top: calc(var(--oy) + 162 * var(--u));
    height: calc(420 * var(--u));
    min-height: 0;
    max-height: none;
    margin: 0;
    flex: none;
    --cw: calc(720 * var(--u));
    --r: calc(24 * var(--u));
    --play: max(56px, calc(88 * var(--u)));
  }

  .cf-track {
    perspective: calc(2200 * var(--u));
  }

  .cf-bar {
    position: absolute;
    left: calc(600 * var(--u));
    right: calc(48 * var(--u));
    top: calc(var(--oy) + 618 * var(--u));
    margin: 0;
  }

  .pill {
    gap: calc(18 * var(--u));
    padding: max(10px, calc(12 * var(--u))) max(20px, calc(24 * var(--u)));
  }

  .pill-title {
    font-size: max(13.5px, calc(14.5 * var(--u)));
  }

  .demos-link {
    font-size: max(13.5px, calc(14.5 * var(--u)));
  }

  .foot {
    position: absolute;
    left: calc(48 * var(--u));
    right: calc(48 * var(--u));
    /* The text keeps the mock's line (18 px up at 1440); the 32 px toggle is centred on it. */
    bottom: max(6px, calc(18 * var(--u) - 8px));
    justify-content: flex-end;
    margin: 0;
    font-size: max(12px, calc(12 * var(--u)));
  }

  .veil {
    background:
      linear-gradient(0deg, rgba(var(--cream), 0.55) 0, rgba(var(--cream), 0) calc(64 * var(--u))),
      linear-gradient(90deg, rgba(var(--cream), 0.8) 0%, rgba(var(--cream), 0.4) 36%, rgba(var(--cream), 0) 55%),
      linear-gradient(180deg, rgba(var(--cream), 0.35), rgba(var(--cream), 0) 30%);
  }

  [data-scene="lake"] .veil {
    background:
      linear-gradient(0deg, rgba(var(--cream), 0.55) 0, rgba(var(--cream), 0) calc(64 * var(--u))),
      linear-gradient(90deg, rgba(var(--cream), 0.7) 0%, rgba(var(--cream), 0.3) 36%, rgba(var(--cream), 0) 55%),
      linear-gradient(180deg, rgba(var(--cream), 0.25), rgba(var(--cream), 0) 30%);
  }
}

/* Short screens (phones in landscape): the hero grows rather than clip anything. */
@media (max-height: 559px) {
  .page {
    height: auto;
    min-height: 100vh;
    min-height: 100svh;
  }

  .main,
  .cf {
    flex: none;
  }

  .cf-stage {
    flex: none;
    height: 220px;
    max-height: none;
    --cw: min(71.8cqw, 139cqh, 360px);
  }
}

/* ---------------------------------------------------------------- opening sequence */

@keyframes rise {
  from {
    opacity: 0;
    transform: translate3d(0, 12px, 0);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes word-rise {
  from {
    transform: translate3d(0, 110%, 0);
  }
  to {
    transform: none;
  }
}

/* Reduced motion, or motion paused at load (config.js sets .no-intro): a plain fade, nothing moves. */
.no-intro .top,
.no-intro .hero h1,
.no-intro .sub,
.no-intro .actions,
.no-intro .aud,
.no-intro .cf-stage,
.no-intro .cf-bar,
.no-intro .foot {
  animation: fade-in 0.6s var(--ease) both;
}

/*
 * The opening sequence (.intro), about 1.6 s, once. Everything holds on its first keyframe until app.js adds
 * .intro-run (fonts ready), then: the scene settles, the lockup fades in, the headline rises word by word through a
 * mask (60 ms apart), the subtext, the call to action and the audience line follow, the card flies in from depth,
 * then the pill and the footer.
 */
/* The scene fades in softly; no zoom, no blur, no dolly. */
.intro .scene-intro {
  animation: fade-in 0.9s var(--ease-soft) both;
}

.intro .top {
  animation: fade-in 0.7s 0.1s var(--ease) both;
}

.intro .hero h1:not(.is-split) {
  opacity: 0;
}

.intro.intro-run .hero h1:not(.is-split) {
  opacity: 1;
  transition: opacity 0.6s var(--ease);
}

.intro .hero h1 .w {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  /* Room for the descenders inside the mask, given back to the line. */
  padding-bottom: 0.1em;
  margin-bottom: -0.1em;
}

.intro .hero h1 .wi {
  display: inline-block;
  animation: word-rise 0.9s calc(0.18s + var(--i, 0) * 60ms) var(--ease) both;
}

.intro .sub {
  animation: rise 0.9s 0.5s var(--ease) both;
}

.intro .actions {
  animation: rise 0.9s 0.6s var(--ease) both;
}

.intro .aud {
  animation: rise 0.9s 0.7s var(--ease) both;
}

.intro .cf-bar {
  animation: rise 0.8s 1s var(--ease) both;
}

.intro .foot {
  animation: fade-in 0.8s 1.1s var(--ease) both;
}

.intro:not(.intro-run) .top,
.intro:not(.intro-run) .hero h1 .wi,
.intro:not(.intro-run) .sub,
.intro:not(.intro-run) .actions,
.intro:not(.intro-run) .aud,
.intro:not(.intro-run) .cf-card,
.intro:not(.intro-run) .cf-bar,
.intro:not(.intro-run) .foot {
  animation-play-state: paused;
}

/* The card waits far back and transparent, then lands in place. Backwards fill only: once landed, the card's own
   transform (the pointer tilt) applies again. */
@keyframes card-land {
  from {
    opacity: 0;
    transform: translate3d(0, 0, calc(var(--cw) * -1.4));
  }
}

.intro .cf-card {
  animation: card-land 1.05s 0.45s var(--ease) backwards;
}

/* ================================================================ one day on the farm (below the hero)
 *
 * Six chapters, each a full-bleed photograph at a later hour, dissolving into the next through the sky. Layouts follow
 * the hero's: wide in --u, stacked in --p. Motion: transform and opacity only, set off by app.js (.is-in) as each
 * block comes into view; the photographs never move. Reduced motion shows everything at once.
 */

:root {
  --t01: #efe8e5;
  --t12: #c0a878;
  --t23: #85795a;
  --t3n: #111826;
  --t34: #0c1724;
  --t4n: #0b1826;
  --t45: #d2bec5;
  --t56: #a98a84;
  --t6s: #dcb7a0;
  --t6n: #22170f;

  --ink-1: #14201a;
  --ink-2b: rgba(20, 32, 26, 0.8);
  --light-1: #fbfaf7;
  --light-2: rgba(251, 250, 247, 0.84);
  --green-live: #2c9a3a;

  --stars: url("/media/day/stars.png?v=20261123");
}

/* ---------------------------------------------------------------- shared chapter anatomy */

.day {
  position: relative;
  display: block;
}

.ch {
  position: relative;
  isolation: isolate;
  overflow: clip;
  color: var(--ink-1);
  background: linear-gradient(180deg, var(--top) 0%, var(--top) 20%, var(--bot) 80%, var(--bot) 100%);
  --ft: 15%;
  --fb: 12%;
  --pos: 50% 50%;
}

.ch-stage {
  position: relative;
}

.ch-scene {
  position: absolute;
  inset: 0;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 var(--ft), #000 calc(100% - var(--fb)), transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0, #000 var(--ft), #000 calc(100% - var(--fb)), transparent 100%);
}

.ch-scene picture {
  display: contents;
}

.ch-img,
.ch-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--pos);
}

/* Each still is loaded as the visitor nears its chapter (app.js) and shows once decoded, so it never paints in
   strips. The photograph itself never moves. */
.ch-img {
  opacity: 0;
  transition: opacity 0.6s var(--ease-soft);
}

.ch-img.is-loaded {
  opacity: 1;
}

/* A living photograph (config.js CHAPTERS), when there is one: a locked-off loop over the still, crossfading in
   once it plays. */
.ch-video {
  opacity: 0;
  transition: opacity 1.6s var(--ease-soft);
}

.ch-video.is-playing {
  opacity: 1;
}

.ch-shade,
.ch-grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.ch-shade {
  background: var(--shade, none);
}

.ch-grain {
  opacity: 0.05;
  background-image: var(--grain);
}

.ch-anno {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

.ch-copy {
  position: relative;
  z-index: 3;
}

.ch-title {
  margin: 0;
  font-weight: 620;
  letter-spacing: -0.03em;
  line-height: 1.03;
  text-wrap: balance;
}

.ch-line {
  margin: 0;
  line-height: 1.5;
  letter-spacing: -0.005em;
  text-wrap: pretty;
  color: var(--line, var(--ink-2b));
  max-width: 38em;
}

/* The sky between chapters: plain light, with grain so the gradient never bands. */
.band {
  position: relative;
  display: block;
  background: var(--sky);
}

.band::before,
.band::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.band::after {
  opacity: 0.05;
  background-image: var(--grain);
}

/* ---------------------------------------------------------------- entrance moments (transform and opacity only) */

.rv {
  opacity: 0;
  transform: translate3d(0, 22px, 0);
  transition:
    opacity 1s var(--ease) var(--d, 0s),
    transform 1.2s var(--ease) var(--d, 0s);
}

.is-in .rv {
  opacity: 1;
  transform: none;
}

/* ---------------------------------------------------------------- pins: a dot on the thing, a hairline, a glass tag */

.pin {
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  transform: translate3d(var(--x, -999px), var(--y, -999px), 0);
  --pin-ink: rgba(20, 32, 26, 0.6);
}

.pin-dot {
  position: absolute;
  left: -5px;
  top: -5px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff;
  box-shadow:
    0 0 0 1.5px var(--pin-ink),
    0 2px 8px rgba(20, 30, 20, 0.35);
  transform: scale(0);
  transition: transform 0.42s var(--ease) var(--d, 0s);
}

.pin-dot::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 50%;
  border: 1.5px solid #fff;
  opacity: 0;
}

.pin-line {
  position: absolute;
  left: -0.5px;
  bottom: 5px;
  width: 1px;
  height: calc(var(--lead, 60px) - 5px);
  background: var(--pin-ink);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.55);
  transform: scaleY(0);
  transform-origin: 50% 100%;
  transition: transform 0.49s var(--ease) calc(var(--d, 0s) + 0.09s);
}

.tag {
  position: absolute;
  left: var(--tx, -16px);
  bottom: var(--lead, 60px);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  padding: 7px 12px 7px 10px;
  border-radius: 999px;
  font-size: max(12px, calc(13.5 * var(--u, 1px)));
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.005em;
  color: var(--ink-1);
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.85);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    0 14px 34px -18px rgba(50, 60, 30, 0.55);
  opacity: 0;
  transform: translate3d(0, 8px, 0);
  transition:
    opacity 0.49s var(--ease) calc(var(--d, 0s) + 0.3s),
    transform 0.63s var(--ease) calc(var(--d, 0s) + 0.3s);
}

.tag b {
  font-weight: 650;
}

.tag-live {
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green-live);
  box-shadow: 0 0 0 3px rgba(44, 154, 58, 0.16);
}

.tag-warn .tag-live {
  background: #c26a12;
  box-shadow: 0 0 0 3px rgba(194, 106, 18, 0.16);
}

.is-in .pin-dot {
  transform: scale(1);
}

.is-in .pin-dot::after {
  animation: ping 1.5s calc(var(--d, 0s) + 0.24s) var(--ease-soft) 2 both;
}

.is-in .pin-line {
  transform: scaleY(1);
}

.is-in .tag {
  opacity: 1;
  transform: none;
}

@keyframes ping {
  0% {
    opacity: 0.85;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(3.2);
  }
}

/* ---------------------------------------------------------------- chapter 1: midday, the orchard */

.ch1 {
  --top: var(--t01);
  --bot: var(--t12);
  --ft: 16%;
  --fb: 11%;
}

/* ---------------------------------------------------------------- chapter 2: afternoon, from above */

.ch2 {
  --top: var(--t12);
  --bot: var(--t23);
  --ft: 9%;
  --fb: 9%;
  --pos: 100% 50%;
}

.parcel {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--w, 0);
  height: var(--h, 0);
  transform: translate3d(var(--x, -999px), var(--y, -999px), 0);
  border-radius: calc(10 * var(--u, 1px));
}

.parcel-edge {
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

/* Switched on: a lit pane of glass laid over the field. */
.parcel.is-lit .parcel-edge {
  border: 1.5px solid rgba(255, 255, 255, 0.95);
  background: linear-gradient(150deg, rgba(255, 252, 240, 0.26), rgba(255, 246, 220, 0.1));
  -webkit-backdrop-filter: brightness(1.1) saturate(1.18);
  backdrop-filter: brightness(1.1) saturate(1.18);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.22),
    0 0 0 1px rgba(60, 40, 10, 0.12),
    0 18px 40px -22px rgba(60, 40, 10, 0.5);
  opacity: 0;
  transform: scale(0.985);
  transition:
    opacity 0.63s var(--ease) var(--d, 0s),
    transform 0.7s var(--ease) var(--d, 0s);
}

/* Not switched on: only a faint outline. */
.parcel.is-off .parcel-edge {
  border: 1px dashed rgba(255, 255, 255, 0.62);
  opacity: 0;
  transition: opacity 0.63s var(--ease) var(--d, 0s);
}

.is-in .parcel .parcel-edge {
  opacity: 1;
  transform: none;
}

.plabel {
  position: absolute;
  left: 0;
  top: 0;
  transform: translate3d(var(--x, -999px), var(--y, -999px), 0);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  padding: 6px 11px 6px 9px;
  border-radius: 999px;
  font-size: max(12px, calc(13 * var(--u, 1px)));
  font-weight: 560;
  line-height: 1.2;
  letter-spacing: -0.005em;
  color: var(--ink-1);
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(255, 255, 255, 0.88);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    0 12px 30px -16px rgba(60, 40, 10, 0.6);
  opacity: 0;
  transition: opacity 0.56s var(--ease) var(--d, 0s);
}

.plabel i {
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green-live);
  box-shadow: 0 0 0 3px rgba(44, 154, 58, 0.18);
}

.plabel.is-off {
  font-weight: 500;
  color: rgba(20, 32, 26, 0.82);
  background: rgba(255, 255, 255, 0.5);
  border-color: rgba(255, 255, 255, 0.55);
  box-shadow: 0 10px 26px -18px rgba(60, 40, 10, 0.5);
}

.plabel.is-off i {
  background: transparent;
  box-shadow: inset 0 0 0 1.5px rgba(20, 32, 26, 0.55);
}

.is-in .plabel {
  opacity: 1;
}

/* ---------------------------------------------------------------- dusk */

.band-dusk {
  height: 34vh;
  --sky: linear-gradient(180deg, var(--t23) 0%, #a8835a 20%, #a76d5c 42%, #634a63 63%, #272b45 83%, var(--t3n) 100%);
}

.band-dusk::before {
  background-size: 600px 600px;
  opacity: 0.8;
  -webkit-mask-image: linear-gradient(180deg, transparent 55%, #000 100%);
  mask-image: linear-gradient(180deg, transparent 55%, #000 100%);
}

/* The stars load with the chapters, once the visitor scrolls near them (app.js sets .is-near). */
.band.is-near::before {
  background-image: var(--stars);
}

/* ---------------------------------------------------------------- chapter 3: night, the packhouse */

.ch3 {
  --top: var(--t3n);
  --bot: var(--t34);
  --ft: 12%;
  --fb: 14%;
  --line: var(--light-2);
  color: var(--light-1);
}

.msg {
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  transform: translate3d(var(--x, -999px), var(--y, -999px), 0);
}

.msg-dot {
  position: absolute;
  left: -5px;
  top: -5px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff7e6;
  box-shadow:
    0 0 0 1.5px rgba(255, 255, 255, 0.55),
    0 0 14px rgba(255, 230, 180, 0.6);
  transform: scale(0);
  transition: transform 0.42s var(--ease) 0.21s;
}

.msg-lead {
  position: absolute;
  background: rgba(255, 255, 255, 0.6);
  transition: transform 0.49s var(--ease) 0.3s;
}

/* Wide: the card sits to the left of the bay, joined by a horizontal hairline. */
.msg[data-mode="left"] .msg-lead {
  right: 5px;
  top: -0.5px;
  height: 1px;
  width: calc(var(--gap, 40px) - 5px);
  transform: scaleX(0);
  transform-origin: 100% 50%;
}

.msg[data-mode="left"] .msg-card {
  right: var(--gap, 40px);
  top: 0;
  transform: translate3d(0, calc(-50% + 10px), 0);
}

/* Stacked: the card sits above the bay, joined by a vertical hairline. */
.msg[data-mode="above"] .msg-lead {
  left: -0.5px;
  bottom: 5px;
  width: 1px;
  height: calc(var(--gap, 40px) - 5px);
  transform: scaleY(0);
  transform-origin: 50% 100%;
}

.msg[data-mode="above"] .msg-card {
  left: var(--cx, -150px);
  bottom: var(--gap, 40px);
  transform: translate3d(0, 10px, 0);
}

.msg-card {
  position: absolute;
  width: var(--cw, 330px);
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 12px;
  row-gap: 0;
  padding: 14px 16px 14px 14px;
  border-radius: 18px;
  color: var(--light-1);
  background: rgba(16, 22, 34, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.2);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 24px 50px -22px rgba(0, 0, 0, 0.7);
  opacity: 0;
  transition:
    opacity 0.56s var(--ease) 0.45s,
    transform 0.7s var(--ease) 0.45s;
}

.msg-mark {
  grid-row: 1 / span 2;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  padding: 3px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.92);
}

.msg-text {
  margin: 0;
  font-size: max(14px, calc(15 * var(--u, 1px)));
  font-weight: 520;
  line-height: 1.38;
  letter-spacing: -0.008em;
  text-wrap: pretty;
}

.msg-sent {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 8px 0 0;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  font-size: max(12px, calc(12.5 * var(--u, 1px)));
  font-weight: 500;
  line-height: 1.3;
  color: rgba(251, 250, 247, 0.84);
  opacity: 0;
  transform: translate3d(0, 6px, 0);
  transition:
    opacity 0.56s var(--ease) 1.44s,
    transform 0.63s var(--ease) 1.44s;
}

.msg-sent svg {
  flex: none;
  width: 14px;
  height: 14px;
  color: #7fd98a;
}

.is-in .msg-dot {
  transform: scale(1);
}

.is-in .msg[data-mode="left"] .msg-lead {
  transform: scaleX(1);
}

.is-in .msg[data-mode="above"] .msg-lead {
  transform: scaleY(1);
}

.is-in .msg-card {
  opacity: 1;
}

.is-in .msg[data-mode="left"] .msg-card {
  transform: translate3d(0, -50%, 0);
}

.is-in .msg[data-mode="above"] .msg-card {
  transform: none;
}

.is-in .msg-sent {
  opacity: 1;
  transform: none;
}

/* A second message of the night (Ariel, 19 November 2026): the same card, beneath the first, a beat later. Wide:
   10 px under the first, which stays centred on the hairline (app.js measures both cards: --mh1, --mh2). Stacked:
   the first stays above the bay where it was, and the second sits just under the bay, so neither climbs into the
   chapter's words. */
.msg[data-mode="left"] .msg-card.msg-card-next {
  top: calc(var(--mh1, 0px) / 2 + 10px + var(--mh2, 0px) / 2);
}

.msg[data-mode="above"] .msg-card.msg-card-next {
  top: 22px;
  bottom: auto;
}

.msg-card-next {
  transition-delay: 0.87s;
}

.msg-card-next .msg-sent {
  transition-delay: 1.74s;
}

/* ---------------------------------------------------------------- the settlement chapter: late night, the office */

/* Between chapter 3 and chapter 4 (Ariel, 19 and 20 November 2026): the night sky both share above and below it, so
   it dissolves into each like every chapter; the words on the dark wall, the five points as tags on the desk. */
.ch-stl {
  --top: var(--t34);
  --bot: var(--t34);
  --ft: 14%;
  --fb: 16%;
  --line: var(--light-2);
  color: var(--light-1);
  /* It overlaps chapter 3 above and chapter 4 below by 2 px, over the same night colour, so no sliver of the page's
     light ground can show at a seam that falls between device pixels (iOS Safari, 20 November 2026). */
  margin-block: -2px;
}

/* The heading's second tone, as the solution pages' two-tone statement. */
.stl-b {
  color: rgba(251, 250, 247, 0.56);
}

/* ---------------------------------------------------------------- chapter 4: deep night, trust */

.ch4 {
  --top: var(--t34);
  --bot: var(--t4n);
  --ft: 12%;
  --fb: 34%;
  --line: var(--light-2);
  color: var(--light-1);
  background: linear-gradient(180deg, var(--top) 0%, var(--bot) 30%, var(--bot) 100%);
}

.trust {
  position: relative;
  z-index: 3;
}

.trust-col h3 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.012em;
  line-height: 1.3;
  color: var(--light-1);
}

.trust-col p {
  margin: 0;
  line-height: 1.58;
  letter-spacing: -0.003em;
  color: rgba(251, 250, 247, 0.8);
  text-wrap: pretty;
}

/* ---------------------------------------------------------------- before dawn */

.band-predawn {
  height: 40vh;
  --sky: linear-gradient(180deg, var(--t4n) 0%, #15223a 20%, #2e3352 40%, #615775 60%, #a38b9e 80%, var(--t45) 100%);
}

.band-predawn::before {
  background-size: 600px 600px;
  opacity: 0.75;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 50%);
  mask-image: linear-gradient(180deg, #000 0%, transparent 50%);
}

/* ---------------------------------------------------------------- chapter 5: dawn, roles */

.ch5 {
  --top: var(--t45);
  --bot: var(--t56);
  --ft: 13%;
  --fb: 13%;
}

.role-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.role-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 15px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  background: rgba(255, 255, 255, 0.36);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  font-family: var(--font);
  font-size: max(13px, calc(14 * var(--u, 1px)));
  font-weight: 540;
  letter-spacing: -0.005em;
  white-space: nowrap;
  color: rgba(20, 32, 26, 0.84);
  cursor: pointer;
  transition:
    background-color 0.45s var(--ease),
    border-color 0.45s var(--ease),
    color 0.45s var(--ease),
    box-shadow 0.45s var(--ease);
}

.role-tab:hover {
  background: rgba(255, 255, 255, 0.55);
}

.role-tab[aria-selected="true"] {
  color: var(--ink-1);
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(255, 255, 255, 0.95);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 10px 26px -14px rgba(90, 50, 60, 0.55);
}

/* A taller touch target than the 36 px pill. */
.role-tab::after {
  content: "";
  position: absolute;
  inset: -4px 0;
}

/* Every one-liner sits in the same grid cell, so the block always holds the height of the longest one at the
   current width: a shorter line never pulls the screen below it up. */
.role-lines {
  display: grid;
}

.role-line {
  grid-area: 1 / 1;
  margin: 0;
  font-weight: 520;
  line-height: 1.4;
  letter-spacing: -0.012em;
  color: var(--ink-1);
  text-wrap: balance;
  opacity: 0;
  visibility: hidden;
  transform: translate3d(0, 6px, 0);
  transition:
    opacity 0.4s var(--ease),
    transform 0.5s var(--ease),
    visibility 0s linear 0.4s;
}

.role-line.is-on {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition:
    opacity 0.6s var(--ease) 0.18s,
    transform 0.8s var(--ease) 0.18s,
    visibility 0s;
}

.win-wrap {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translate3d(0, 24px, 0);
  transition:
    opacity 1.1s var(--ease) 0.35s,
    transform 1.3s var(--ease) 0.35s;
}

.is-in .win-wrap {
  opacity: 1;
  transform: none;
}

/* Each role's screen is a window standing in the valley, its foot on the mist. All six share one frame (an
   aspect-ratio box, so its space is held before the image loads): a tab switch never moves or resizes anything. */
.win {
  position: absolute;
  left: var(--bx, 50%);
  top: var(--by, 80%);
  margin: 0;
  width: var(--ww);
  aspect-ratio: 1200 / 760;
  transform: translate3d(-50%, calc(-100% + 12px), 0) scale(0.985);
  transform-origin: 50% 100%;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.45s var(--ease),
    transform 0.6s var(--ease),
    visibility 0s linear 0.45s;
}

.win.is-on {
  opacity: 1;
  visibility: visible;
  transform: translate3d(-50%, -100%, 0);
  transition:
    opacity 0.75s var(--ease) 0.12s,
    transform 0.95s var(--ease) 0.12s,
    visibility 0s;
}

.win picture {
  display: block;
  height: 100%;
}

.win img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--wr, 16px);
  border: 1px solid rgba(255, 255, 255, 0.72);
  background: #eef2f8;
  box-shadow:
    0 44px 90px -34px rgba(80, 40, 55, 0.6),
    0 14px 32px -14px rgba(80, 40, 55, 0.38);
}

.win-shine {
  position: absolute;
  inset: 0;
  border-radius: var(--wr, 16px);
  background: linear-gradient(115deg, rgba(255, 255, 255, 0.32) 0%, rgba(255, 255, 255, 0) 34%);
  mix-blend-mode: soft-light;
  pointer-events: none;
}

/* Contact shadow on the mist, as under the hero's film cards. */
.win::after {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  top: calc(100% + 10px);
  height: 18px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(70, 40, 50, 0.32), rgba(70, 40, 50, 0.1) 55%, rgba(70, 40, 50, 0));
  filter: blur(6px);
}

/* ---------------------------------------------------------------- sunrise */

.band-sunrise {
  height: 26vh;
  --sky: linear-gradient(180deg, var(--t56) 0%, #bb9a8c 40%, #cfa792 72%, var(--t6s) 100%);
}

/* ---------------------------------------------------------------- chapter 6: sunrise, the terraces again */

.ch6 {
  --top: var(--t6s);
  --bot: var(--t6n);
  --ft: 14%;
  --fb: 20%;
}

.ch-cta {
  display: flex;
  justify-content: center;
}

/* The page footer sits after <main> (one main landmark), laid over the foot of chapter 6: .site holds main and the
   footer, and chapter 6 is the last thing in main, so the bottom of .site is the bottom of chapter 6. */
.site {
  position: relative;
}

.pfoot {
  position: absolute;
  z-index: 3;
  display: flex;
  align-items: center;
  color: rgba(255, 255, 255, 0.86);
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.3;
}

.pfoot .lockup {
  --lh: 24px;
  --by: 12px;
  --ph: 12px;
}

.pfoot .lockup-by {
  color: rgba(255, 255, 255, 0.8);
}

.pfoot .lockup-pomodor {
  opacity: 0.86;
}

.pfoot-links {
  display: flex;
  gap: 22px;
}

.pfoot a {
  display: inline-block;
  padding: 14px 0;
  margin: -14px 0;
  color: inherit;
  text-decoration: none;
  text-underline-offset: 2px;
}

.pfoot a:hover {
  text-decoration: underline;
}

.pfoot a:focus-visible {
  outline-color: #fff;
}

.pfoot-copy {
  margin: 0;
  color: rgba(255, 255, 255, 0.8);
}

/* ================================================================ wide layout */

@media (min-width: 960px) and (min-aspect-ratio: 6/5) and (min-height: 560px) {
  .ch {
    height: max(100vh, 600px);
  }

  .ch-stage {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: max(100vh, 600px);
  }

  .ch-copy {
    position: absolute;
  }

  .ch-title {
    font-size: calc(50 * var(--u));
  }

  .ch-line {
    margin-top: calc(20 * var(--ut));
    font-size: max(15px, calc(18 * var(--u)));
  }

  /* 1: text left, in the sky. */
  .ch1 .ch-copy {
    left: calc(84 * var(--u));
    top: calc(176 * var(--u));
    width: calc(800 * var(--u));
  }

  .ch1 .ch-title {
    max-width: 15.5em;
  }

  /* 2: text right, on the stubble. */
  .ch2 .ch-copy {
    left: var(--ax, calc(968 * var(--u)));
    top: calc(316 * var(--u));
    width: calc(420 * var(--u));
  }

  .ch2 .ch-line {
    color: var(--ink-1);
  }

  .ch2 {
    --shade:
      radial-gradient(ellipse 7% 12% at 69% 56%, rgba(226, 190, 128, 0.7), rgba(226, 190, 128, 0) 100%),
      linear-gradient(90deg, rgba(255, 236, 196, 0) 64%, rgba(255, 236, 196, 0.24) 76%, rgba(255, 236, 196, 0.3) 100%);
  }

  /* 3: text left, in the night sky. */
  .ch3 {
    --shade: radial-gradient(ellipse 50% 40% at 22% 36%, rgba(10, 16, 28, 0.55), rgba(10, 16, 28, 0) 76%);
  }

  .ch3 .ch-copy {
    left: calc(84 * var(--u));
    top: calc(196 * var(--u));
    width: calc(560 * var(--u));
  }

  .ch3 .ch-title {
    max-width: 10em;
  }

  .ch3 .msg-card {
    --cw: max(290px, calc(330 * var(--u)));
  }

  /* Settlement: the words on the dark wall, left like chapters 3 and 4. */
  .ch-stl {
    --pos: 72% 50%;
    --ft: 22%;
    --shade: radial-gradient(ellipse 46% 44% at 20% 38%, rgba(10, 16, 28, 0.5), rgba(10, 16, 28, 0) 76%);
  }

  .ch-stl .ch-copy {
    left: calc(84 * var(--u));
    top: calc(196 * var(--u));
    width: calc(520 * var(--u));
  }

  .ch-stl .ch-title {
    max-width: 10.4em;
  }

  /* 4: the photograph full-bleed; the words along its lower third, over the terraces at night. */
  .ch4 {
    --pos: 0% 50%;
    --fb: 9%;
    --shade:
      linear-gradient(0deg, rgba(8, 18, 30, 0.94) 0%, rgba(8, 18, 30, 0.8) 18%, rgba(8, 18, 30, 0.42) 36%, rgba(8, 18, 30, 0) 56%),
      radial-gradient(ellipse 52% 32% at 20% 46%, rgba(8, 18, 30, 0.74), rgba(8, 18, 30, 0) 76%);
  }

  .ch4 .ch-copy {
    left: calc(84 * var(--u));
    top: calc(320 * var(--u));
    width: calc(720 * var(--u));
  }

  .ch4 .ch-title {
    max-width: 11.5em;
  }

  .ch4 .ch-line {
    color: var(--light-1);
  }

  .trust {
    position: absolute;
    left: calc(84 * var(--u));
    right: calc(84 * var(--u));
    top: calc(624 * var(--u));
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    column-gap: calc(44 * var(--u));
  }

  .trust-col {
    padding-top: calc(18 * var(--u));
    border-top: 1px solid rgba(255, 255, 255, 0.26);
  }

  .trust-col h3 {
    font-size: max(15px, calc(16.5 * var(--u)));
  }

  .trust-col p {
    margin-top: calc(10 * var(--u));
    font-size: max(13.5px, calc(14.5 * var(--u)));
  }

  /* 5: text and tabs left, the window right. */
  .ch5 .ch-copy {
    left: calc(84 * var(--u));
    top: calc(112 * var(--u));
    width: calc(570 * var(--u));
  }

  .ch5 {
    --shade: radial-gradient(ellipse 54% 52% at 18% 46%, rgba(236, 214, 218, 0.5), rgba(236, 214, 218, 0) 74%);
  }

  .role-tabs {
    margin-top: calc(28 * var(--ut));
    gap: calc(8 * var(--u));
  }

  .role-tab {
    height: max(34px, calc(38 * var(--u)));
    padding: 0 max(13px, calc(16 * var(--u)));
  }

  .role-lines {
    margin-top: calc(26 * var(--ut));
  }

  .role-line {
    font-size: max(16px, calc(20 * var(--u)));
  }

  .win {
    --ww: calc(660 * var(--u));
    --wr: calc(16 * var(--u));
  }

  /* 6: centred in the gold sky; the footer on the shaded foot of the terrace. */
  .ch6 {
    --shade: linear-gradient(0deg, rgba(34, 23, 15, 0.92) 0%, rgba(34, 23, 15, 0.55) 9%, rgba(34, 23, 15, 0) 22%);
  }

  .ch6 .ch-copy {
    left: 50%;
    top: calc(196 * var(--u));
    width: calc(900 * var(--u));
    margin-left: calc(-450 * var(--u));
    text-align: center;
  }

  .ch6 .ch-title {
    font-size: calc(54 * var(--u));
    max-width: 12.5em;
    margin-inline: auto;
  }

  .ch-cta {
    margin-top: calc(34 * var(--ut));
  }

  .pfoot {
    left: calc(48 * var(--u));
    right: calc(48 * var(--u));
    bottom: calc(26 * var(--u));
    gap: 28px;
  }

  .pfoot-links {
    margin-left: auto;
  }
}

/* ================================================================ stacked layout (phones, portrait tablets) */

@media not all and (min-width: 960px) and (min-aspect-ratio: 6/5) and (min-height: 560px) {
  .ch {
    display: flex;
    flex-direction: column;
  }

  .ch-copy {
    order: 0;
    padding: calc(64 * var(--p)) max(16px, calc(22 * var(--p))) calc(10 * var(--p));
  }

  .ch-stage {
    order: 1;
    width: 100%;
    height: var(--sh, calc(440 * var(--p)));
  }

  .ch-title {
    font-size: min(calc(32 * var(--p)), 44px);
  }

  .ch-line {
    margin-top: calc(12 * var(--p));
    font-size: max(15px, min(calc(15.5 * var(--p)), 19px));
  }

  .tag {
    font-size: 11.5px;
    gap: 6px;
    padding: 5px 9px 5px 8px;
  }

  .tag-live {
    width: 6px;
    height: 6px;
  }

  .plabel {
    font-size: 11px;
    gap: 5px;
    padding: 4px 8px 4px 7px;
  }

  .plabel i {
    width: 6px;
    height: 6px;
  }

  /* 1 */
  .ch1 {
    --sh: calc(440 * var(--p));
    --pos: 61% 50%;
    --ft: 18%;
    --fb: 12%;
  }

  .ch1 .ch-copy {
    padding-top: calc(40 * var(--p));
  }

  /* 2: the words first, on a calm band of warm stubble flowing on from chapter 1's foot; then the aerial, turned to
     portrait and shown from the top to just past the road (the open stubble below it is left out), with its labels.
     The band deepens toward the orchard's tone and the aerial's top fades in over a matching ground, so there is no
     edge between them. */
  .ch2 {
    --pos: 50% 0%;
    --ft: 16%;
    --fb: 6%;
    --band-end: #b89d6c;
    --shade: none;
  }

  .ch2 .ch-copy {
    padding-top: calc(56 * var(--p));
    padding-bottom: calc(24 * var(--p));
    background: linear-gradient(180deg, var(--t12) 0%, var(--t12) 35%, var(--band-end) 100%);
  }

  .ch2 .ch-stage {
    height: calc(100vw * 2752 / 1536 * 0.8);
    background: linear-gradient(180deg, var(--band-end) 0%, #8a8160 calc(var(--ft) * 0.6), #6a6850 var(--ft), rgba(106, 104, 80, 0) calc(var(--ft) + 2%));
  }

  .ch2 .ch-line {
    color: var(--ink-1);
  }

  /* 3 */
  .ch3 {
    --sh: calc(520 * var(--p));
    --pos: 92% 50%;
    --ft: 10%;
  }

  .ch3 .msg-card {
    --cw: calc(300 * var(--p));
    padding: 12px 14px 12px 12px;
    column-gap: 10px;
  }

  .ch3 .msg-text {
    font-size: 14px;
  }

  /* Settlement: its own phone photograph, the desk at the foot; the words over the dark wall at the top (as chapter
     4's over its stars). */
  .ch-stl {
    --sh: min(calc(100vw * 2064 / 1152), max(calc(100vh * 1.1), 640px));
    --pos: 50% 100%;
    --ft: 8%;
    --fb: 12%;
    /* From nothing at the very top, so its first row is exactly chapter 3's last. */
    --shade: linear-gradient(180deg, rgba(8, 18, 30, 0) 0%, rgba(8, 18, 30, 0.62) 6%, rgba(8, 18, 30, 0.34) 26%, rgba(8, 18, 30, 0) 42%);
  }

  .ch-stl .ch-copy {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
  }

  /* 4: words over the stars, the four points beneath the terrace. */
  .ch4 {
    --sh: calc(600 * var(--p));
    --pos: 74% 50%;
    --ft: 8%;
    --fb: 26%;
    /* From nothing at the very top, so its first row is exactly the settlement chapter's last. */
    --shade: linear-gradient(180deg, rgba(8, 18, 30, 0) 0%, rgba(8, 18, 30, 0.76) 4%, rgba(8, 18, 30, 0.58) 34%, rgba(8, 18, 30, 0) 58%);
  }

  .ch4 .ch-copy {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    padding-top: calc(70 * var(--p));
  }

  .trust {
    order: 2;
    display: grid;
    gap: calc(26 * var(--p));
    margin-top: calc(-40 * var(--p));
    padding: 0 max(16px, calc(22 * var(--p))) calc(60 * var(--p));
  }

  .trust-col {
    padding-top: calc(16 * var(--p));
    border-top: 1px solid rgba(255, 255, 255, 0.22);
  }

  .trust-col h3 {
    font-size: 16px;
  }

  .trust-col p {
    margin-top: 8px;
    font-size: 14.5px;
  }

  /* 5: the screen sits right under the one-liner, the full width of the text column, the dawn valley around and
     below it. */
  .ch5 {
    --winw: min(calc(100vw - 2 * max(16px, calc(22 * var(--p)))), 520px);
    --sh: calc(var(--winw) * 900 / 720 + 64px);
    --pos: 70% 50%;
    --ft: 16%;
  }

  .role-tabs {
    margin-top: calc(22 * var(--p));
    gap: 7px;
  }

  .role-tab {
    height: 34px;
    padding: 0 12px;
    font-size: 13px;
  }

  .role-lines {
    margin-top: calc(18 * var(--p));
  }

  .role-line {
    font-size: 16.5px;
  }

  .win {
    --ww: var(--winw);
    --wr: 14px;
    left: 50%;
    top: 14px;
    aspect-ratio: 720 / 900;
    transform: translate3d(-50%, 12px, 0) scale(0.985);
    transform-origin: 50% 0;
  }

  .win.is-on {
    transform: translate3d(-50%, 0, 0);
  }

  /* 6: the words in the gold sky, over the photograph. */
  .ch6 {
    --sh: calc(720 * var(--p));
    --pos: 80% 60%;
    --ft: 12%;
    --fb: 24%;
    --shade: linear-gradient(0deg, rgba(34, 23, 15, 0.95) 0%, rgba(34, 23, 15, 0.7) 16%, rgba(34, 23, 15, 0) 40%);
  }

  .ch6 .ch-copy {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    text-align: center;
    padding-top: calc(104 * var(--p));
  }

  .ch6 .ch-title {
    max-width: 10em;
    margin-inline: auto;
  }

  .ch-cta {
    margin-top: calc(24 * var(--p));
  }

  .pfoot {
    left: max(16px, calc(22 * var(--p)));
    right: max(16px, calc(22 * var(--p)));
    bottom: calc(22 * var(--p));
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .band-dusk {
    height: 26vh;
  }

  .band-predawn {
    height: 30vh;
  }

  .band-sunrise {
    height: 18vh;
  }
}

/* ---------------------------------------------------------------- reduced motion: everything simply appears */

@media (prefers-reduced-motion: reduce) {
  .ch-img,
  .ch-video,
  .rv,
  .tag,
  .pin-dot,
  .pin-line,
  .parcel-edge,
  .plabel,
  .msg-dot,
  .msg-lead,
  .msg-card,
  .msg-sent,
  .win-wrap,
  .win,
  .role-line,
  .role-tab {
    transition-duration: 0.01s !important;
    transition-delay: 0s !important;
    animation: none !important;
  }

  .pin-dot::after {
    animation: none !important;
  }

  /* Every moment in its final state from the first paint, whether or not it has been scrolled to. */
  .day .rv,
  .day .tag {
    opacity: 1;
    transform: none;
  }

  .day .pin-dot,
  .day .pin-line,
  .day .msg-dot,
  .day .msg .msg-lead {
    transform: none;
  }

  .day .parcel .parcel-edge,
  .day .plabel,
  .day .msg-card,
  .day .win-wrap {
    opacity: 1;
  }

  .day .msg-sent,
  .day .win-wrap {
    opacity: 1;
    transform: none;
  }

  .day .parcel.is-lit .parcel-edge,
  .day .msg[data-mode="above"] .msg-card {
    transform: none;
  }

  .day .msg[data-mode="left"] .msg-card {
    transform: translate3d(0, -50%, 0);
  }
}

/* ---------------------------------------------------------------- the settlement chapter without JavaScript */

/* Its words and its five points show without JavaScript (the cards simply do not open): the tags, which app.js would
   pin on the desk, stand in a column instead. */
@media (scripting: none) {
  .ch-stl .rv,
  .ch-stl .tag {
    opacity: 1;
    transform: none;
  }

  .ch-stl .ch-anno {
    inset: auto auto auto max(16px, calc(22 * var(--p)));
    top: 54%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .ch-stl .pin {
    position: static;
    width: auto;
    height: auto;
    transform: none;
  }

  .ch-stl .pin-dot,
  .ch-stl .pin-line,
  .ch-stl .lbl-plus {
    display: none;
  }

  .ch-stl .tag {
    position: static;
  }
}

/* Settlement on squarer wide screens (4:3, 3:2): the crop moves right so the archive box and the phone stay in. */
@media (min-width: 960px) and (min-aspect-ratio: 6/5) and (max-aspect-ratio: 3/2) and (min-height: 560px) {
  .ch-stl {
    --pos: 88% 50%;
  }
}

@media (scripting: none) and (min-width: 960px) and (min-aspect-ratio: 6/5) and (min-height: 560px) {
  .ch-stl .ch-anno {
    left: calc(84 * var(--u));
    top: calc(520 * var(--u));
  }
}

/* ---------------------------------------------------------------- lightbox */

dialog {
  color: var(--ink);
}

.lightbox {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: hidden;
}

.lightbox::backdrop {
  background: rgba(10, 14, 11, 0.8);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.lb-stage {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  padding: max(64px, env(safe-area-inset-top)) clamp(12px, 4vw, 64px) clamp(16px, 4vh, 48px);
}

.lb-frame {
  position: relative;
  width: min(100%, 1280px, calc((100dvh - 120px) * 16 / 9));
  aspect-ratio: 16 / 9;
}

.lb-video {
  width: 100%;
  height: 100%;
  border-radius: 16px;
  background: #000;
  box-shadow: 0 40px 120px -20px rgba(0, 0, 0, 0.6);
}

.lb-close {
  position: absolute;
  right: 0;
  bottom: calc(100% + 12px);
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  cursor: pointer;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transition: background-color 0.25s ease;
}

.lb-close svg {
  width: 16px;
  height: 16px;
}

.lb-close:hover {
  background: rgba(255, 255, 255, 0.24);
}

.lb-close:active,
.bk-close:active {
  transform: scale(0.94);
}

/* End card: over the film's last frame, the lockup and the one next step, plus a way to watch again. The field is
   near solid, so the film's own end title never shows through. */
.lb-end {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 30px;
  border-radius: 16px;
  background: radial-gradient(ellipse 75% 70% at 50% 45%, rgba(26, 38, 30, 0.95), rgba(10, 14, 11, 0.985));
  -webkit-backdrop-filter: blur(18px) saturate(120%);
  backdrop-filter: blur(18px) saturate(120%);
  animation: fade-in 0.6s var(--ease) both;
}

.lb-end .lockup {
  --lh: 28px;
  --by: 12.5px;
  --ph: 13.5px;
}

.lb-end .lockup-by {
  color: rgba(255, 255, 255, 0.72);
}

.lb-end .lockup-pomodor {
  opacity: 0.8;
}

.lb-end[hidden] {
  display: none;
}

.lb-end-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  padding: 0 16px;
}

.lb-end .btn {
  height: 52px;
  padding: 0 26px;
  font-size: 16px;
}

/* Glass on a dark ground: white text on a light veil (the cream glass turns grey here). */
.lb-end .btn-glass {
  padding: 0 22px 0 18px;
  gap: 8px;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.34);
  box-shadow: none;
}

.lb-end .btn-glass:hover {
  background: rgba(255, 255, 255, 0.22);
}

.lb-end .btn-glass:focus-visible,
.lb-end .btn-primary:focus-visible {
  outline-color: #fff;
}

@media (max-width: 560px) {
  .lb-end {
    gap: 18px;
  }

  .lb-end .lockup {
    --lh: 22px;
    --by: 11px;
    --ph: 11.5px;
  }

  .lb-end .btn {
    height: 46px;
    padding: 0 20px;
    font-size: 15px;
  }

  .lb-end-actions {
    gap: 10px;
  }
}

.icon-again {
  width: 16px;
  height: 16px;
}

.lb-close:focus-visible {
  outline-color: #fff;
}

/* ---------------------------------------------------------------- booking dialog */

.booking {
  position: fixed;
  width: min(480px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  margin: auto;
  --bk-x: 34px;
  --bk-bottom: 28px;
  padding: 34px var(--bk-x) 0;
  overflow: auto;
  overscroll-behavior: contain;
  /* Fields scrolled into view stop above the sticky footer (its height is measured by app.js). */
  scroll-padding-bottom: var(--bk-footer, 150px);
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  background: rgba(252, 249, 243, 0.88);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  backdrop-filter: blur(24px) saturate(150%);
  box-shadow: 0 50px 120px -30px rgba(20, 30, 15, 0.55);
}

.booking::backdrop {
  background: rgba(30, 36, 28, 0.28);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.bk-close {
  position: absolute;
  right: 20px;
  top: 18px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(20, 32, 26, 0.07);
  color: var(--ink-2);
  cursor: pointer;
}

/* A 44 px touch target around the 30 px circle. */
.bk-close::after {
  content: "";
  position: absolute;
  inset: -7px;
}

.bk-close svg {
  width: 14px;
  height: 14px;
}

.bk-close:hover {
  background: rgba(20, 32, 26, 0.12);
  color: var(--ink);
}

.bk-title:focus {
  outline: none;
}

.bk-title {
  font-weight: 640;
  font-size: 28px;
  line-height: 1.1;
  letter-spacing: -0.02em;
  padding-right: 36px;
}

.bk-lede {
  margin-top: 10px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink-2);
}

.field {
  margin-top: 16px;
}

.field:first-child {
  margin-top: 22px;
}

.field label {
  display: block;
  font-weight: 600;
  font-size: 13px;
  line-height: 1.3;
}

.field-optional {
  font-weight: 500;
  color: var(--ink-2);
  margin-left: 4px;
}

.field input,
.field textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 0 14px;
  height: 46px;
  border-radius: 12px;
  border: 1px solid rgba(20, 32, 26, 0.14);
  background: #fff;
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 400;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.field textarea {
  height: auto;
  min-height: 74px;
  padding: 12px 14px;
  line-height: 1.45;
  resize: vertical;
}

.field input::placeholder,
.field textarea::placeholder {
  /* The mock's 0.38 is raised so the example text reaches 4.5:1 on white. */
  color: rgba(20, 32, 26, 0.6);
  opacity: 1;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(44, 122, 49, 0.22);
}

.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] {
  border-color: #b3261e;
}

.field input[aria-invalid="true"]:focus,
.field textarea[aria-invalid="true"]:focus {
  box-shadow: 0 0 0 3px rgba(179, 38, 30, 0.18);
}

.field-error {
  margin-top: 6px;
  font-size: 12.5px;
  line-height: 1.4;
  font-weight: 500;
  color: #a1221b;
}

/* The honeypot: not rendered at all (bots that read the HTML still see the field and fill it). */
.hp {
  display: none;
}

/*
 * The privacy line, any failure message and "Request a call" stay pinned to the bottom of the sheet while the
 * fields scroll. The band and its soft top fade appear only when the sheet scrolls (.is-scrollable, set by
 * app.js); the fade goes once the last field is in view (.at-end).
 */
.bk-footer {
  position: sticky;
  bottom: 0;
  z-index: 1;
  margin: 0 calc(-1 * var(--bk-x));
  padding: 16px var(--bk-x) var(--bk-bottom);
}

.booking.is-scrollable .bk-footer {
  background: rgb(var(--bk-band));
}

.bk-footer::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  height: 28px;
  background: linear-gradient(to bottom, rgba(var(--bk-band), 0), rgb(var(--bk-band)));
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.booking.is-scrollable:not(.at-end) .bk-footer::before {
  opacity: 1;
}

.bk-privacy {
  margin-top: 0;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--ink-2);
}

.bk-failure {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(179, 38, 30, 0.08);
  color: #8c1d17;
  font-size: 13.5px;
  line-height: 1.45;
  font-weight: 500;
}

.bk-failure a {
  font-weight: 600;
}

.btn-block {
  display: flex;
  width: 100%;
  height: 52px;
  margin-top: 16px;
  font-size: 16px;
}

.btn-block:hover {
  transform: none;
}

.spinner {
  display: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  animation: spin 0.8s linear infinite;
}

.is-sending .spinner {
  display: block;
}

.is-sending.btn {
  cursor: progress;
  opacity: 0.92;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.bk-done {
  display: grid;
  justify-items: center;
  text-align: center;
  padding: 18px 8px var(--bk-bottom);
}

.bk-done[hidden],
.bk-view[hidden] {
  display: none;
}

.bk-check {
  width: 64px;
  height: 64px;
}

.bk-check-ring {
  stroke: var(--green);
  stroke-width: 2;
  stroke-dasharray: 151;
  stroke-dashoffset: 151;
  animation: draw 0.7s 0.05s var(--ease) forwards;
}

.bk-check-tick {
  stroke: var(--green);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 34;
  stroke-dashoffset: 34;
  animation: draw 0.45s 0.55s var(--ease) forwards;
}

@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}

.bk-done-text {
  margin-top: 18px;
  max-width: 300px;
  font-size: 20px;
  line-height: 1.35;
  font-weight: 600;
  letter-spacing: -0.012em;
}

.bk-done-text:focus {
  outline: none;
}

.bk-done .btn {
  margin-top: 26px;
  min-width: 140px;
}

/* Dialog entrance (where supported). */
.booking[open],
.lightbox[open] {
  opacity: 1;
  transform: none;
  transition:
    opacity 0.35s var(--ease),
    transform 0.45s var(--ease);
}

@starting-style {
  .booking[open] {
    opacity: 0;
    transform: translate3d(0, 14px, 0) scale(0.985);
  }
  .lightbox[open] {
    opacity: 0;
  }
}

/* Phones: the booking form is a bottom sheet. */
@media (max-width: 560px) {
  /* --vv-height and --kb come from app.js (visualViewport): with the on-screen keyboard open the sheet sits above
     it and shrinks to what is visible, so "Request a call" stays on screen. */
  .booking {
    width: 100%;
    --bk-x: 22px;
    --bk-bottom: max(22px, env(safe-area-inset-bottom));
    max-height: calc(var(--vv-height, 100dvh) - 12px);
    margin: auto 0 var(--kb, 0px);
    padding: 28px var(--bk-x) 0;
    border-radius: 26px 26px 0 0;
    border-bottom: 0;
  }

  @starting-style {
    .booking[open] {
      opacity: 1;
      transform: translate3d(0, 40%, 0);
    }
  }

  .bk-title {
    font-size: 25px;
  }
}

/* Short screens: a tighter rhythm so more of the form shows above the pinned button; inputs stay 44 px. */
@media (max-height: 700px) {
  .booking {
    padding-top: 24px;
  }

  .bk-close {
    top: 14px;
  }

  .bk-title {
    font-size: 23px;
  }

  .bk-lede {
    margin-top: 6px;
    font-size: 14.5px;
    line-height: 1.45;
  }

  .field {
    margin-top: 10px;
  }

  .field:first-child {
    margin-top: 16px;
  }

  .field input,
  .field textarea {
    margin-top: 4px;
    height: 44px;
  }

  .field textarea {
    height: 64px;
    min-height: 64px;
    padding: 9px 14px;
  }

  .field-error {
    margin-top: 4px;
  }

  .bk-footer {
    padding-top: 12px;
  }

  .bk-privacy {
    font-size: 12px;
  }

  .btn-block {
    height: 48px;
    margin-top: 10px;
  }
}

/* iOS zooms into inputs under 16 px. */
@media (pointer: coarse) {
  .field input,
  .field textarea {
    font-size: 16px;
  }
}

/* ---------------------------------------------------------------- reduced motion */

@media (prefers-reduced-motion: reduce) {
  .top,
  .hero h1,
  .sub,
  .actions,
  .aud,
  .cf-stage,
  .cf-bar,
  .foot {
    animation-name: fade-in;
    animation-duration: 0.6s;
  }

  .cf-card,
  .cf-play,
  .demos-link svg,
  .btn,
  .motion-toggle {
    transition: none;
  }

  .btn-primary:hover,
  .btn-glass:hover {
    transform: none;
  }

  .bk-check-ring,
  .bk-check-tick {
    animation: none;
    stroke-dashoffset: 0;
  }

  .spinner {
    animation-duration: 2.4s;
  }

  @starting-style {
    .booking[open] {
      transform: none;
    }
  }
}

@media (prefers-reduced-transparency: reduce) {
  .btn-glass,
  .pill,
  .cf-chip,
  .motion-toggle,
  .booking {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: #fbf8f2;
  }
}

/* ---------------------------------------------------------------- reading pages (privacy.html) */

html.doc,
html.doc body {
  height: auto;
  overflow: auto;
}

.doc-page {
  max-width: 680px;
  margin: 0 auto;
  padding: max(40px, env(safe-area-inset-top)) 24px 72px;
}

.doc-home {
  display: inline-block;
  text-decoration: none;
}

.doc-page h1 {
  margin-top: 48px;
  font-size: clamp(32px, 5vw, 44px);
  font-weight: 620;
  line-height: 1.08;
  letter-spacing: -0.024em;
}

.doc-page h2 {
  margin-top: 34px;
  font-size: 19px;
  font-weight: 620;
  letter-spacing: -0.01em;
}

.doc-page p,
.doc-page li {
  margin-top: 10px;
  font-size: 16.5px;
  line-height: 1.62;
  color: var(--ink-2);
}

.doc-page ul {
  margin: 10px 0 0;
  padding-left: 1.2em;
}

.doc-page a {
  color: var(--green-deep);
  text-underline-offset: 2px;
}

.doc-updated {
  margin-top: 40px;
  font-size: 14px;
}

.doc-back {
  margin-top: 18px;
}

.doc-back a {
  display: inline-block;
  padding: 11px 0;
  font-weight: 500;
}
