/* ==========================================================================
   home.css — webhatcher's own homepage. One stylesheet, no framework.

   Palette: tasks/2026-09-28-webhatcher-homepage/palettes.md § A (cobalt and yolk),
   Danny's choice 2026-09-28. Every colour below is a var(--…) from :root so B or C
   can be pasted over it later without touching the rest of the file (task §5.2).

   Loaded after assets/home/mechanics.css: mechanics.css's [data-in] rules live in
   @layer entrance, and nothing below is layered, so this file's :hover/:focus rules
   always win regardless of link order (mechanics.css's own header comment).
   ========================================================================== */

:root {
  /* -- colour: palette A, cobalt and yolk -------------------------------------- */
  --ink: #111827;
  --ink-deep: #0B1019;
  --fg: #0C0F16;
  --muted: #545F78;
  --cobalt: #2F5BFF;
  --cobalt-rgb: 47, 91, 255;
  --cobalt-hover: #284DD9;
  --yolk: #FFC23D;
  --bg: #FFFFFF;
  --paper: #F8F7F3;
  --card: #FFFFFF;
  --line: #E0E0E0;
  --on-dark-90: rgba(255, 255, 255, .90);
  --on-dark-60: rgba(255, 255, 255, .60);
  --on-dark-12: rgba(255, 255, 255, .12);

  /* -- type --------------------------------------------------------------------- */
  --display: 'Space Grotesk', system-ui, sans-serif;
  --body: 'Instrument Sans', system-ui, sans-serif;

  /* -- layout (layout-system skill) --------------------------------------------- */
  --content-max: 1200px;
  --pad-x: 16px;
  --pad-x-lg: 56px;
  --r-sm: 8px;
  --r-md: 12px;
  --r-pill: 999px;

  /* -- motion (design-reference/library/tokens/contract.json, unchanged) -------- */
  --m-in: 500ms;
  --m-unmask: 900ms;
  --m-draw: 700ms;
  --m-step: 60ms;
  --m-ease: cubic-bezier(.22, .61, .36, 1);
}

/* -- fonts: self-hosted, no third-party request -------------------------------- */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('assets/home/fonts/space-grotesk-500-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('assets/home/fonts/space-grotesk-500-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Instrument Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('assets/home/fonts/instrument-sans-400-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Instrument Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('assets/home/fonts/instrument-sans-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* -- reset ---------------------------------------------------------------------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.5;
  color: var(--fg);
  background: var(--bg);
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, p, ol, ul { margin: 0; }
.wrap { max-width: var(--content-max); margin-inline: auto; padding-inline: var(--pad-x); }
@media (min-width: 1200px) { .wrap { padding-inline: var(--pad-x-lg); } }

:focus-visible { outline: 2px solid var(--cobalt); outline-offset: 2px; }

/* -- the egg mark ----------------------------------------------------------------
   Inline in the header (24px) and footer (32px); assets/home/egg.svg is the same
   drawing standalone, for the favicon. currentColor lets it sit on a light or an
   ink band without a second copy. */
.egg { flex-shrink: 0; }
.egg__shell, .egg__crack { fill: none; stroke: currentColor; stroke-width: 2; }
.egg__crack { stroke-linecap: round; stroke-linejoin: round; }
.egg__yolk { fill: var(--yolk); }
.egg--sm { width: 24px; height: 24px; }
.egg--bg {
  position: absolute;
  width: 220px;
  height: 220px;
  color: var(--cobalt);
  opacity: .08;
  pointer-events: none;
}
.egg--bg .egg__yolk { display: none; }

/* -- header ----------------------------------------------------------------------- */
.hdr {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg);
  transition: box-shadow 300ms ease-out;
}
.hdr.is-stuck { box-shadow: 0 1px 0 var(--line); }
.hdr__in {
  max-width: var(--content-max);
  margin-inline: auto;
  padding: 14px var(--pad-x);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
@media (min-width: 1200px) { .hdr__in { padding-inline: var(--pad-x-lg); } }
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--display);
  font-weight: 500;
  font-size: 18px;
  letter-spacing: -0.01em;
}

/* -- buttons ------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding-inline: 22px;
  border-radius: var(--r-sm);
  font-family: var(--body);
  font-weight: 600;
  font-size: 15px;
  line-height: 1;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 200ms ease-out, color 200ms ease-out, border-color 200ms ease-out, transform 200ms ease-out;
}
.btn--filled { background: var(--cobalt); color: #fff; }
@media (hover: hover) {
  .btn--filled:hover { background: var(--cobalt-hover); transform: translateY(-1px); }
}
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
@media (hover: hover) {
  .btn--ghost:hover { background: var(--cobalt); color: #fff; border-color: var(--cobalt); }
}
.txt-link {
  color: var(--cobalt);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 200ms ease-out;
}
@media (hover: hover) { .txt-link:hover { color: var(--cobalt-hover); } }

/* -- hero ------------------------------------------------------------------------ */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: 72px 96px;
  text-align: center;
}
.hero .egg--bg { top: 8px; left: 50%; transform: translateX(-50%); }
.hero__in { position: relative; max-width: 720px; margin-inline: auto; padding-inline: var(--pad-x); }
.hero__h1 {
  font-family: var(--display);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.06;
  font-size: clamp(2.5rem, 1.76rem + 3.05vw, 4.5rem);
}
.hero__h1 { position: relative; z-index: 0; } /* a stacking context, so the yellow bar can sit behind the letters */
.hero__h1 .w {
  display: inline-block;
  overflow: hidden;           /* the mask each word slides up from behind */
  vertical-align: bottom;
  padding-bottom: .1em;       /* room for descenders inside the mask… */
  margin-bottom: -.1em;       /* …without moving the line */
}
.hero__h1 .w__i { display: inline-block; }
/* the yellow bar under "better": a pseudo-element, so it can be drawn with a transform */
.hero__h1 .u { position: relative; display: inline-block; }
.hero__h1 .u::after {
  content: '';
  position: absolute;
  z-index: -1;
  left: -.04em;
  right: -.04em;
  bottom: .1em;
  height: .3em;
  border-radius: .06em;
  background: var(--yolk);
  transform-origin: left center;
}

/* On load: each word slides up from behind its line, 80ms apart; as the last settles the bar
   draws under "better" like a pen stroke; the line and buttons follow. Readable inside ~1s.
   Danny's choice 2026-09-29 (slide-up + sweep) over blur-in, letter-by-letter and a highlighter pass.
   Only behind .js, so with the script blocked the headline is simply there. */
.js .hero__h1 .w__i {
  transform: translateY(110%);
  animation: hero-word 750ms cubic-bezier(.22, 1, .36, 1) forwards;
  animation-delay: calc(150ms + var(--i) * 80ms);
}
.js .hero__h1 .u::after {
  transform: scaleX(0);
  animation: hero-sweep 650ms cubic-bezier(.65, 0, .35, 1) 750ms forwards;
}
.js .hero__line,
.js .hero__cta {
  opacity: 0;
  transform: translateY(8px);
  animation: hero-soft 600ms var(--m-ease) forwards;
}
.js .hero__line { animation-delay: 700ms; }
.js .hero__cta { animation-delay: 820ms; }
@keyframes hero-word { to { transform: none; } }
@keyframes hero-sweep { to { transform: none; } }
@keyframes hero-soft { to { opacity: 1; transform: none; } }
.hero__line {
  margin-top: 20px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}
.hero__cta {
  margin-top: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
}

/* -- the dot grid: one sheet across the whole page ------------------------------------
   Every band (hero, demos, how it works, closing, footer) carries its own .dotgrid layer,
   because the demos, how-it-works and footer bands have solid fills that would hide a single
   page-wide layer. The layers read as one sheet: the same 22px pitch from each band's top-left
   corner, no fade at the band edges, and one pointer position shared by all of them (home.js
   sets --mx/--my on each layer in px, so the lit patch runs across a band join unbroken).
   Dark dots on the light bands, light dots on the navy ones. The hero's lit patch shows from
   the start (and drifts on a touch screen); elsewhere it appears once there is a pointer to
   follow. Under reduced motion, nothing follows and nothing drifts. */
@property --mx { syntax: '<length-percentage>'; inherits: true; initial-value: 50%; }
@property --my { syntax: '<length-percentage>'; inherits: true; initial-value: 40%; }
.hero, .band, .foot { position: relative; isolation: isolate; }
.dotgrid {
  --dot: rgba(17, 24, 39, .12);
  --dot-lit: rgba(var(--cobalt-rgb), .9);
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
.band--how .dotgrid,
.foot .dotgrid {
  --dot: rgba(255, 255, 255, .09);
  --dot-lit: rgba(150, 175, 255, .9);
}
.dots {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(var(--dot) 1.2px, transparent 1.6px);
  background-size: 22px 22px;
  background-position: 0 0;
}
.dots--lit {
  background-image: radial-gradient(var(--dot-lit) 1.6px, transparent 2px);
  -webkit-mask-image: radial-gradient(circle 260px at var(--mx) var(--my), #000, transparent 75%);
          mask-image: radial-gradient(circle 260px at var(--mx) var(--my), #000, transparent 75%);
  opacity: 0;
  transition: opacity 300ms ease-out;
}
.hero .dots--lit,
.dots-live .dots--lit { opacity: 1; }
@media (hover: none) { .hero .dots--lit { animation: dots-roam 14s ease-in-out infinite alternate; } }
@keyframes dots-roam {
  0%   { --mx: 20%; --my: 30%; }
  50%  { --mx: 75%; --my: 55%; }
  100% { --mx: 40%; --my: 75%; }
}
.js .hero .dotgrid { opacity: 0; animation: hero-bg 1200ms ease-out 200ms forwards; }
@keyframes hero-bg { to { opacity: 1; } }

/* -- section bands ---------------------------------------------------------------- */
.band { padding-block: 96px; }
.band--demos {
  background:
    radial-gradient(ellipse 70% 55% at 50% 0%, rgba(var(--cobalt-rgb), .07), transparent 70%),
    var(--paper);
}
.h2 {
  font-family: var(--display);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.15;
  font-size: clamp(2rem, 1.6rem + 1.4vw, 2.75rem);
  text-align: center;
}
.lead {
  margin: 12px auto 0;
  max-width: 480px;
  color: var(--muted);
  text-align: center;
  font-size: 16px;
  line-height: 1.6;
}

/* -- demo cards --------------------------------------------------------------- */
/* Each card is the page itself: a tall strip of the demo's homepage in a frame, its name in the bottom-left
   corner. On hover the strip scrolls up (the way a visitor would scroll the page) and settles; on leaving it
   scrolls back. The cards sit in the highlights carousel (the block at the end of this file); a line of its own
   ("Yours could be next") follows them. */
.demo-card {
  position: relative;
  display: block;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 500ms var(--m-ease), box-shadow 300ms ease-out;
}
@media (hover: hover) {
  a.demo-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 48px rgba(var(--cobalt-rgb), 0.18);
  }
}

.demo-card__thumb {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--paper);
  overflow: hidden;
}
.demo-card__thumb picture { display: block; }
.demo-card__thumb img {
  display: block;
  width: 100%;
  height: auto;   /* the strip is taller than the frame; the frame shows its top and the strip is what moves */
  transition: transform var(--scroll-t, 500ms) cubic-bezier(.5, 0, .3, 1);   /* 500ms back up; the way down is slower, below */
}
/* the way down takes 2.6s, the pace of a person scrolling a page (the effect Danny approved 2026-10-05, deliberately slower than
   the house 200/300/500 scale). It is set as a duration variable on the hover state, so the resting rule above owns the transition. */
@media (hover: hover) {
  a.demo-card:hover .demo-card__thumb img { --scroll-t: 2600ms; transform: translateY(-40%); }
}
a.demo-card:focus-visible .demo-card__thumb img { --scroll-t: 2600ms; transform: translateY(-40%); }

/* the name: a small dark pill in the bottom-left corner */
.demo-card__label {
  position: absolute;
  left: 12px;
  bottom: 12px;
  margin: 0;
  padding: 7px 13px;
  border-radius: var(--r-pill);
  background: rgba(17, 24, 39, .92);   /* --ink, a touch see-through */
  color: #fff;
  font-family: var(--body);
  font-weight: 600;
  font-size: 13px;
  line-height: 1;
  letter-spacing: 0.01em;
}
/* an arrow in a round node, bottom-right; with a mouse it appears on hover, on touch it is always there */
.demo-card__go {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 2px 10px rgba(17, 24, 39, .18);
  transition: opacity 200ms ease-out;
}
@media (hover: hover) {
  .demo-card__go { opacity: 0; }
  a.demo-card:hover .demo-card__go, a.demo-card:focus-visible .demo-card__go { opacity: 1; }
}

/* the invitation: not a card, a line of its own under the three. It links to nothing; the reader
   keeps scrolling to the enquiry form. */
.demos-next {
  margin: 72px 0 0;
  text-align: center;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.5rem, 1.25rem + 0.9vw, 2rem);
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--ink);
}

/* -- how it works ---------------------------------------------------------------- */
.band--how {
  position: relative;
  isolation: isolate;
  color: var(--on-dark-90);
  background:
    radial-gradient(ellipse 60% 70% at 85% 0%, rgba(var(--cobalt-rgb), .28), transparent 65%),
    radial-gradient(ellipse 50% 60% at 0% 100%, rgba(var(--cobalt-rgb), .14), transparent 65%),
    var(--ink);
}
/* fine grain over the navy, so it reads as a surface rather than a flat fill */
.band--how::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: .09;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.band--how .h2 { color: #fff; }
.steps {
  margin-top: 48px;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}
@media (min-width: 768px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 32px; } }
.step__n {
  display: block;
  font-family: var(--display);
  font-weight: 500;
  font-size: 40px;
  letter-spacing: -0.02em;
  color: var(--yolk);
}
.step h3 {
  margin-top: 12px;
  font-family: var(--display);
  font-weight: 500;
  font-size: 20px;
  letter-spacing: -0.01em;
  color: #fff;
}
.step p {
  margin-top: 8px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--on-dark-60);
}

/* -- closing band ------------------------------------------------------------ */
.band--close { text-align: center; scroll-margin-top: 72px; }
.band--close .small { margin-top: 16px; color: var(--muted); font-size: 13px; }

/* the enquiry form: an opaque card, so the dot grid never runs behind the fields */
.enquiry {
  max-width: 560px;
  margin: 36px auto 0;
  padding: 28px;
  text-align: left;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.enquiry__row { display: grid; gap: 0 16px; }
@media (min-width: 640px) { .enquiry__row { grid-template-columns: 1fr 1fr; } }
.field { margin-bottom: 18px; }
.field label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 600; color: var(--ink); }
.field input, .field textarea {
  display: block;
  width: 100%;
  padding: 0 12px;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--muted);
  border-radius: var(--r-sm);
}
.field input { height: 46px; }
.field textarea { padding-block: 12px; line-height: 1.5; resize: vertical; min-height: 130px; }
.field input::placeholder, .field textarea::placeholder { color: var(--muted); opacity: .85; }
.field input:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--cobalt); outline-offset: 1px; border-color: var(--cobalt); }
.enquiry .btn { width: 100%; height: 48px; }
.enquiry .small { text-align: center; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* -- footer -------------------------------------------------------------------- */
.foot { background: var(--ink); color: var(--on-dark-60); padding-block: 40px; }
.foot__in {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}
@media (min-width: 640px) { .foot__in { flex-direction: row; justify-content: space-between; text-align: left; } }
.foot__brand { display: flex; align-items: center; gap: 8px; color: #fff; font-family: var(--display); font-weight: 500; font-size: 15px; }
.foot__link { color: var(--on-dark-60); text-decoration: underline; text-underline-offset: 3px; transition: color 200ms ease-out; }
@media (hover: hover) { .foot__link:hover { color: var(--on-dark-90); } }
.foot__copy { font-size: 13px; color: var(--on-dark-60); }

/* -- reduced motion -------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .btn--filled:hover, .btn--ghost:hover, a.demo-card:hover, a.demo-card:hover .demo-card__thumb img,
  a.demo-card:focus-visible .demo-card__thumb img {
    transform: none;
  }
  .js .hero__h1 .w__i, .js .hero__h1 .u::after, .js .hero__line, .js .hero__cta, .js .hero .dotgrid {
    animation: none;
    opacity: 1;
    transform: none;
  }
  .hero .dots--lit { animation: none; }
}

/* ==========================================================================
   scroll-linked motion for the rest of the page (Danny, 2026-10-05; reference: the way Apple's product
   pages tie motion to scroll position, described in our own words, nothing copied).
   Everything under .immerse hangs on a class that immerse.js adds and that is never present under reduced
   motion or with the script blocked: then none of the motion applies and the page is the plain one.
   The script writes --p (0 to 1) on the stage, --a and --d on each step; this file only turns those
   numbers into transform and opacity.
   ========================================================================== */

/* the markup added for the pinned stage is invisible in the plain page */
.how__glow, .how__line, .imm-br { display: none; }

:root { --r-lg: 20px; }   /* the corner scale's large step (8 / 12 / 20), for the sheets below */
.immerse { --hdr-h: 73px; --foot-h: 120px; }
.immerse .imm-br { display: inline; }

/* -- titles: every section title arrives the way the hero's does (the one Danny likes): each word slides up
   from behind its line, 80ms apart, and "next" in the line under the cards gets the yellow bar that "better"
   has in the hero, drawn once the words are in. This is not under .immerse: it is an entrance, it runs once
   (mechanics.js adds .is-in), and reduced motion shows the finished line at once. ------------------------- */
.words { position: relative; z-index: 0; }   /* a stacking context, so the yellow bar can sit behind the letters */
.words .w { display: inline-block; overflow: hidden; vertical-align: bottom; padding-bottom: .12em; margin-bottom: -.12em; }
.words .w__i { display: inline-block; }
.words .u { position: relative; display: inline-block; }
.words .u::after {
  content: '';
  position: absolute;
  z-index: -1;
  left: -.04em;
  right: -.04em;
  bottom: .1em;
  height: .3em;
  border-radius: .06em;
  background: var(--yolk);
  transform-origin: left center;
}
.js [data-in="words"] { opacity: 1; }
.js [data-in="words"] .w__i {
  transform: translateY(110%);
  transition: transform 750ms cubic-bezier(.22, 1, .36, 1);
  transition-delay: calc(var(--i) * 80ms);
}
.js [data-in="words"].is-in .w__i { transform: none; }
.js [data-in="words"] .u::after {
  transform: scaleX(0);
  transition: transform 650ms cubic-bezier(.65, 0, .35, 1);
  transition-delay: calc(var(--n, 4) * 80ms + 350ms);
}
.js [data-in="words"].is-in .u::after { transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js [data-in="words"] .w__i, .js [data-in="words"] .u::after { transform: none; transition: none; }
}
/* the lead under a title, and the form's fields, travel further and a beat later than the house 16px, so they read as arriving */
.js .lead[data-in="rise"] {
  transform: translateY(28px);
  transition: opacity 700ms var(--m-ease) 350ms, transform 700ms var(--m-ease) 350ms;
}
.js .lead[data-in="rise"].is-in { transform: none; }
.js .enquiry__fields[data-in="stagger"] > * { transform: translateY(26px); transition-duration: 700ms; }
.js .enquiry__fields[data-in="stagger"].is-in > * { transform: none; }

/* -- how it works: under each step, a label and one paragraph. They are in the plain page too, so nobody
   misses the content: three columns, each step's paragraph beneath it. No capitals, no bullets, tiles or
   boxes (Danny, 2026-10-05): the key phrases are picked out at full white against a dimmer paragraph, the
   way Apple's own page does it (it has no capitals anywhere; its labels are sentence case, about 19px, and
   its body copy is a muted tone with the key phrases at full strength). The body font is loaded at one
   weight only, so the emphasis is by tone, not by a faked bold. ------------------------------------------ */
.step__more { margin-top: 20px; text-align: left; }
.step__more .more__label { margin: 0; font-size: 19px; font-weight: 400; letter-spacing: -0.005em; line-height: 1.3; color: var(--yolk); }
.step__more .more__text { margin: 10px 0 0; font-size: 1.125rem; line-height: 1.5; color: var(--on-dark-60); }
.step__more .more__text strong { font-weight: 400; color: #fff; }
@media (min-width: 768px) { .step__main p { min-height: 3.2em; } }   /* two lines tall, so the three paragraphs start level in the plain page */

/* -- how it works, pinned: the band stays on screen while the three steps take turns. The steps are on
   the left; the paragraph for each is on the right and arrives with it. ------------------------------- */
.immerse .band--how {
  height: 250svh;
  padding: 0;
  margin-top: calc(-1 * var(--r-lg));   /* lap over the foot of the band above, so it reads as a sheet laid over it */
  position: relative;
  z-index: 2;
  overflow: clip;
  border-radius: var(--r-lg);
  background: var(--ink);
  box-shadow: 0 -24px 60px rgba(17, 24, 39, .10);
}
.immerse .how__stage {
  position: sticky;
  top: var(--hdr-h);
  height: calc(100svh - var(--hdr-h));
  display: flex;
  overflow: clip;
}
.immerse .how__glow {
  display: block;
  position: absolute;
  inset: -10% -20%;
  pointer-events: none;
  background:
    radial-gradient(ellipse 40% 50% at 82% 18%, rgba(var(--cobalt-rgb), .30), transparent 65%),
    radial-gradient(ellipse 36% 46% at 12% 92%, rgba(var(--cobalt-rgb), .16), transparent 65%);
  transform: translateX(calc(var(--p, 0) * -12%));
  will-change: transform;
}
.immerse .how__stage > .wrap {
  position: relative;
  width: 100%;
  display: grid;
  grid-template-rows: auto auto auto;
  align-content: center;                        /* heading, steps and progress line sit together as one group... */
  row-gap: clamp(22px, 4.5svh, 48px);           /* ...close, rather than pinned to the top, middle and bottom of the screen */
  padding-block: clamp(16px, 3svh, 32px);
}
.immerse .band--how .h2 { text-align: left; }
.immerse .steps { margin: 0; display: grid; grid-template-columns: 1fr; gap: 0; }
.immerse .step {
  grid-area: 1 / 1;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  column-gap: clamp(28px, 5vw, 80px);
  align-items: center;
  opacity: var(--a, 0);
}
.immerse .step:first-child { --a: 1; --d: 0; }
.immerse .step__main {
  transform: translateY(calc(var(--d, 0) * -6svh)) scale(calc(.88 + .12 * var(--a, 1)));
  transform-origin: left center;
  will-change: transform;
}
.immerse .step__more {
  margin-top: 0;
  max-width: 560px;
  transform: translate(calc(var(--d, 0) * -7vw), calc(var(--d, 0) * -10svh));   /* in from the right and below, out to the left and up: the two columns drift apart as one leaves */
  will-change: transform;
}
.immerse .step__more .more__text { font-size: clamp(1.0625rem, .95rem + .45vw, 1.3125rem); }
.immerse .step__n { font-size: clamp(4rem, 2rem + 7vw, 8.5rem); line-height: .9; }
.immerse .step h3 {
  margin-top: clamp(10px, 2svh, 20px);
  font-size: clamp(1.6rem, 1.05rem + 2.1vw, 2.9rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.immerse .step__main p { min-height: 0; margin: clamp(8px, 1.6svh, 14px) 0 0; max-width: 30ch; font-size: clamp(1rem, .94rem + .35vw, 1.2rem); }
.immerse .how__line { display: block; position: relative; width: min(100%, 440px); height: 2px; margin: 0; background: rgba(255, 255, 255, .16); }
.immerse .how__fill {
  position: absolute;
  inset: 0;
  background: var(--yolk);
  transform: scaleX(var(--p, 0));
  transform-origin: left center;
}
.immerse .how__tick {
  position: absolute;
  top: 50%;
  left: calc((var(--i) + .5) / 3 * 100%);
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -6px;
  border-radius: 50%;
  background: var(--ink);
  border: 2px solid rgba(255, 255, 255, .35);
  transition: background-color 250ms ease-out, border-color 250ms ease-out;
}
.immerse .how__tick.is-on { background: var(--yolk); border-color: var(--yolk); }

/* narrower than a laptop: the paragraph goes under the step */
@media (max-width: 899px) {
  .immerse .step { grid-template-columns: 1fr; row-gap: clamp(14px, 2.4svh, 24px); }
  .immerse .step__more { max-width: none; }
}
/* a phone: tighter, and the paragraph carries the words, so the short line under each title gives way */
@media (max-width: 599px) {
  .immerse .step__n { font-size: clamp(3rem, 2.2rem + 5vw, 4rem); }
  .immerse .step h3 { font-size: 1.45rem; margin-top: 6px; }
  .immerse .step__main p { display: none; }
}
/* a short screen (a laptop with the toolbars out, a phone on its side): drop what can go */
@media (max-height: 700px) {
  .immerse .step__main p { display: none; }
  .immerse .step__n { font-size: clamp(2.6rem, 2rem + 3vw, 4.5rem); }
}

/* -- the footer waits underneath the last band and is uncovered as the page ends ---------------- */
.immerse main { position: relative; z-index: 1; background: var(--bg); margin-bottom: var(--foot-h); border-radius: 0 0 var(--r-lg) var(--r-lg); }
.immerse .foot { position: fixed; left: 0; right: 0; bottom: 0; z-index: 0; }

/* ==========================================================================
   "Have a look around" as a highlights carousel (Danny, 2026-10-05; the pattern is Apple's "Get the highlights" strip,
   described in our own words): one large card centred, the cards either side showing a sliver at the screen edges, a
   rounded pager of dots under it (the current dot stretched into a pill). Swipe, scroll sideways, press a dot, or press
   a sliver to bring that card to the centre; the centred card opens the demo. It never moves by itself.
   The card hover is unchanged: the preview scrolls up, lifts, and the arrow node appears.
   ========================================================================== */
.hl {
  --slide: clamp(280px, calc(100vw - 80px), 1088px);   /* the content column on a laptop; a phone's width less a sliver each side */
  --gap: 12px;
  margin-top: 40px;
}
@media (min-width: 768px) { .hl { --gap: 20px; margin-top: 52px; } }

.hl__track {
  display: flex;
  gap: var(--gap);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  /* centres the first and last card; the vertical padding leaves room for the hover lift and its shadow,
     which an overflow container would otherwise cut off, and the negative margin gives that room back */
  padding: 28px calc((100% - var(--slide)) / 2) 40px;
  margin-block: -28px -40px;
}
.hl__track::-webkit-scrollbar { display: none; }
.hl__slide { flex: 0 0 var(--slide); scroll-snap-align: center; scroll-snap-stop: always; }

/* the card itself is the approved one (home.css .demo-card); here only its size, corners and frame change */
.hl .demo-card { border-radius: var(--r-lg); }
.hl .demo-card__thumb { aspect-ratio: 4 / 3; }
@media (min-width: 768px) {
  .hl .demo-card__thumb { aspect-ratio: 16 / 10; }   /* the shape of a laptop screen: the demo's first screen, as a visitor would meet it */
  .hl .demo-card__label { left: 20px; bottom: 20px; padding: 10px 18px; font-size: 16px; }
  .hl .demo-card__go { right: 20px; bottom: 20px; width: 44px; height: 44px; }
  .hl .demo-card__go svg { width: 18px; height: 18px; }
}

/* the pager: a rounded capsule of dots, the current one a pill */
.hl__ctl { display: flex; justify-content: center; margin-top: 28px; }
.hl__dots { display: flex; align-items: center; gap: 14px; height: 52px; padding-inline: 24px; border-radius: var(--r-pill); background: rgba(17, 24, 39, .06); }
.hl__dot {
  position: relative;
  appearance: none;
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: var(--r-pill);
  background: rgba(17, 24, 39, .32);
  cursor: pointer;
  transition: width 300ms var(--m-ease), background-color 300ms ease-out;
}
.hl__dot::before { content: ''; position: absolute; inset: -16px -7px; }   /* a finger-sized target around an 8px dot */
.hl__dot.is-on { width: 34px; background: rgba(17, 24, 39, .72); }
@media (hover: hover) {
  .hl__dot:not(.is-on):hover { background: rgba(17, 24, 39, .6); }
}
@media (prefers-reduced-motion: reduce) {
  .hl__dot { transition: none; }
}
