/* Home page only (site/pages/home.html). Linked after site.css and pages.css.
   Hero, promises, steps, uses (task M-Home), transcribed from the Main board (and HomePhone, HomeTablet, which import it).
   Tokens only: no colour, radius, shadow or duration value is invented here. Animation only under
   prefers-reduced-motion: no-preference, finite, duration tokens (PAGES-8); the loops (.float, .float-b, .sweep, .marquee)
   are site.css's and sit behind the pause buttons (.motion-toggle, decision D14).

   The page is a grid with three zones: a gutter at each edge (at least the page padding) and the 1240px content column
   between them. Every section sits in the content column; the promises bar spans all three, so it bleeds to the screen edges
   with nothing wider than the viewport. From 1024px the content column is split in two (a gap track between) so the hero can
   sit beside the page head: the head (eyebrow, h1, lede) and .hero__more share the left column, .hero__visual the right, and
   the left column is centred against it as the board's grid does. On a phone it is one column in source order. Vertical
   rhythm is the board's section padding, written as the margin between sections: --section-y, except under the hero
   (clamp(40px, 6vw, 80px)). */

.page--home {
  --home-gap: clamp(32px, 5vw, 72px);
  display: grid; gap: 0; max-width: none; margin-inline: 0; padding-inline: 0;
  grid-template-columns: [full-start] minmax(var(--page-pad), 1fr) [content-start] minmax(0, var(--container)) [content-end] minmax(var(--page-pad), 1fr) [full-end];
}
.page--home > * { grid-column: content; min-width: 0; }
.page--home > .promises { grid-column: full; }
.page--home > * + * { margin-top: var(--section-y); }
.page--home > .page-head { max-width: none; padding-top: 0; gap: 28px; }
.page--home > .hero__more { margin-top: 28px; }
.page--home > .hero__visual { margin-top: var(--home-gap); }
.page--home > .hero__visual + * { margin-top: clamp(40px, 6vw, 80px); }

/* — page head as the hero's headline: the shared hero size is pages.css [data-display="hero"] — */
.page--home .page-head h1, .page--home .page-head__lede { align-self: stretch; }
.page--home .page-head__lede { max-width: 540px; font-size: clamp(17px, 1.4vw, 20px); line-height: 1.5; color: var(--color-text-muted); }
.page--home .eyebrow-pill { line-height: normal; }
.page--home .eyebrow-pill .status-dot { box-shadow: 0 0 0 4px color-mix(in oklab, var(--color-signal) 20%, transparent); }

/* — hero: actions, points — */
.hero__more { display: flex; flex-direction: column; gap: 28px; }
.hero__more > * { margin: 0; }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }
.hero__actions .btn { min-height: 52px; padding: 0 var(--space-6); font-size: 16px; line-height: normal; }
.hero__actions .btn-highlight { border: 0; }
.hero__actions .btn-secondary { min-height: 54px; padding: 0 22px; gap: 0; }
.hero__actions .btn .icon { width: 18px; height: 18px; stroke-width: 2.2; }
.hero__points { display: flex; flex-wrap: wrap; gap: var(--space-5); padding: 0; list-style: none; font-size: 14px; line-height: normal; color: var(--color-text-muted); }
.hero__points li { display: flex; align-items: center; gap: var(--space-2); }
.hero__points .icon { width: 16px; height: 16px; stroke-width: 2.4; }

/* — hero art: one button, the whole panel pauses and resumes the loops — */
.hero__visual {
  position: relative; display: flex; align-items: center; justify-content: center; width: 100%; min-width: 0; margin: 0; padding: 0; border: 0;
  aspect-ratio: 1 / 1.02; overflow: hidden; border-radius: var(--radius-panel);
  background: var(--color-band); color: var(--color-on-band); box-shadow: var(--shadow-band);
}
/* The glow is a highlighter fill (a `.mark`, DESIGN-1c), faded at its edges by a mask: a fill, not a coloured background. */
.hero__glow, .hero__grid { position: absolute; inset: 0; margin: 0; padding: 0; border-radius: 0; }
.hero__glow { -webkit-mask-image: radial-gradient(60% 50% at 50% 55%, rgb(0 0 0 / .38), transparent 70%); mask-image: radial-gradient(60% 50% at 50% 55%, rgb(0 0 0 / .38), transparent 70%); }
.hero__grid {
  background-image: linear-gradient(var(--color-band-line) 1px, transparent 1px), linear-gradient(90deg, var(--color-band-line) 1px, transparent 1px);
  background-size: 40px 40px; opacity: .35;
  -webkit-mask-image: radial-gradient(70% 70% at 50% 50%, black 40%, transparent 100%); mask-image: radial-gradient(70% 70% at 50% 50%, black 40%, transparent 100%);
}
.hero__plate {
  position: relative; display: block; width: 58%; aspect-ratio: 1; box-sizing: border-box; padding: 6%;
  background: var(--color-qr-plate); border-radius: var(--radius-plate); box-shadow: var(--shadow-plate-hero);
}
.hero__plate svg { display: block; width: 100%; height: 100%; }
/* The sweep line: where it is not animated it rests under the code, and it moves only behind the pause button (site.css .sweep). */
.scan-line { position: absolute; inset-inline: 4%; height: 2px; background: var(--color-highlight); border-radius: 2px; box-shadow: 0 0 18px 2px var(--color-highlight); }

.hero__chip {
  position: absolute; display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: var(--radius-control);
  background: color-mix(in oklab, var(--color-band) 70%, white 10%); border: 1px solid var(--color-band-line); backdrop-filter: blur(8px);
  font-family: var(--font-mono); font-size: 12.5px; line-height: normal; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--color-on-band);
}
.hero__chip--top { inset-inline-start: 6%; top: 9%; }
.hero__chip--bottom { inset-inline-end: 6%; bottom: 9%; flex-direction: column; align-items: flex-start; gap: var(--space-1); padding: var(--space-3) 14px; font-family: var(--font-body); font-size: 13px; text-align: start; }
.status-dot.hero__dot { background: var(--color-signal-on-band); box-shadow: 0 0 0 4px color-mix(in oklab, var(--color-signal-on-band) 20%, transparent); }
.hero__kicker { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-band-muted); }
.hero__chip-text { font-family: var(--font-mono); font-size: 12.5px; }
/* The second chip's plain-words line under the address: it wraps, the address above it does not. */
.hero__chip-note { max-inline-size: 24ch; font-size: 12px; line-height: 1.4; white-space: normal; color: var(--color-band-muted); }

@media (min-width: 1024px) {
  .page--home {
    grid-template-rows: 1fr auto auto 1fr;
    grid-template-columns:
      [full-start] minmax(var(--page-pad), 1fr)
      [content-start left-start] minmax(0, calc((var(--container) - var(--home-gap)) / 2)) [left-end]
      var(--home-gap)
      [right-start] minmax(0, calc((var(--container) - var(--home-gap)) / 2)) [content-end right-end]
      minmax(var(--page-pad), 1fr) [full-end];
  }
  .page--home > .page-head { grid-column: left; grid-row: 2; }
  .page--home > .hero__more { grid-column: left; grid-row: 3; }
  .page--home > .hero__visual { grid-column: right; grid-row: 1 / span 4; align-self: center; margin-top: 0; }
}
@media (min-width: 721px) and (max-width: 1023px) {
  .hero__visual { aspect-ratio: 16 / 9; max-height: 460px; }
  .hero__plate { width: auto; height: 72%; }
}

/* — promises: the ticker bar, a band across the whole screen, one button over a track of tags —
   The track (.marquee, .ticker-dup) is site.css's: a static wrapped row until motion.js has run. */
.promises { position: relative; background: var(--color-surface); border-block: 1px solid var(--color-line); }
.promises__toggle { width: 100%; overflow: hidden; }
.promises .marquee { font-family: var(--font-mono); font-size: 13px; line-height: normal; color: var(--color-text-muted); }
.promises__item { display: inline-flex; align-items: center; gap: var(--space-3); padding: 0 var(--space-8); }
.promises__item .mark { padding: 2px 5px; font-size: 11px; }

/* — steps: three cards — */
.steps { gap: 48px; }
.steps__head { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); gap: var(--space-6); align-items: end; }
.steps__head .lede { max-width: 520px; justify-self: end; line-height: 1.5; }
.steps__list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: var(--space-5); margin: 0; padding: 0; list-style: none; }
.steps__card { gap: 18px; padding: 28px; }
.steps__card > * { margin: 0; }
.steps__number { align-self: flex-start; padding: 2px 5px; font-family: var(--font-mono); font-size: 11px; line-height: 1.3; }
.steps__title { font-family: var(--font-display); font-size: 26px; font-weight: var(--weight-bold); line-height: normal; letter-spacing: -0.02em; }
.steps__body { color: var(--color-text-muted); line-height: 1.5; }
.steps__extra { margin-top: auto; }
.steps__tags { display: flex; flex-wrap: wrap; gap: var(--space-2); padding: 0; list-style: none; }
.steps__tags li { padding: 6px var(--space-3); border: 1px solid var(--color-line); border-radius: var(--radius-pill); font-size: 13px; font-weight: var(--weight-medium); line-height: normal; }
.steps__tags--mono { font-family: var(--font-mono); font-size: 12px; color: var(--color-text-muted); }
.steps__tags--mono li { padding: 6px 10px; border-radius: var(--radius-mark); background: var(--color-bg); font-size: inherit; font-weight: var(--weight-regular); }
.steps__swatches { display: flex; align-items: center; gap: 10px; }
.steps__swatch { flex: none; width: 32px; height: 32px; border: 2px solid var(--color-surface); border-radius: 50%; box-shadow: 0 0 0 1px var(--color-line); }
.steps__pass { margin-inline-start: 6px; font-family: var(--font-mono); font-size: 12px; line-height: normal; color: var(--color-signal); }

/* — uses: six tiles to real guides — */
.uses { gap: 40px; }
.uses__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--space-6); }
.uses__head .section-title { max-width: 14ch; }
.uses__all { display: inline-flex; align-items: center; gap: var(--space-2); min-height: var(--touch-min); font-weight: var(--weight-semibold); line-height: normal; }
.uses__all .icon, .use__arrow { flex: none; width: 18px; height: 18px; stroke-width: 2.2; }
.uses__defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.uses__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: var(--space-5); margin: 0; padding: 0; list-style: none; }
.uses__grid > li { display: flex; }
.use { display: flex; flex-direction: column; flex: 1; min-width: 0; overflow: hidden; border-radius: var(--radius-card); background: var(--color-surface); border: 1px solid var(--color-line); color: inherit; }
.use__art { position: relative; display: flex; align-items: center; justify-content: center; margin: 0; padding: 0; border-radius: 0; aspect-ratio: 4 / 3; }
.use__art--ink { background: var(--color-tile-ink); --use-kind: var(--color-tile-ink-fg); }
.use__art--paper { background: var(--color-tile-paper); --use-kind: var(--color-tile-paper-fg); }
.use__art--green { background: var(--color-tile-green); --use-kind: var(--color-tile-green-fg); }
.use__art--rust { background: var(--color-tile-rust); --use-kind: var(--color-tile-rust-fg); }
.use__art--band { background: var(--color-tile-band); --use-kind: var(--color-tile-band-fg); }
/* The highlighter tile is a `.mark` (DESIGN-1c): it brings the fill; the tile keeps the page's ink and its label the highlighter's ink. */
.use__art.mark { color: var(--color-text); }
.use__art.mark .use__kind { color: var(--color-on-highlight); }
.use__plate { width: 38%; aspect-ratio: 1; box-sizing: border-box; padding: 7%; background: var(--color-qr-plate); border-radius: var(--radius-control); box-shadow: var(--shadow-plate-tile); }
.use__plate svg { display: block; width: 100%; height: 100%; }
.use__kind { position: absolute; inset-inline-start: var(--space-4); bottom: 14px; font-family: var(--font-mono); font-size: 11px; line-height: normal; letter-spacing: 0.08em; text-transform: uppercase; color: var(--use-kind, inherit); }
.use__name { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); padding: 18px var(--space-5) var(--space-5); }
.use__title { font-size: 17px; font-weight: var(--weight-semibold); line-height: normal; }

@media (min-width: 721px) and (max-width: 1023px) {
  .steps__card:last-child { grid-column: 1 / -1; }
  .uses__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-4); }
  .use__name { padding: 14px var(--space-4) var(--space-4); }
}
@media (max-width: 720px) {
  .steps__list { gap: 10px; }
  .steps__card { display: grid; grid-template-columns: auto 1fr; gap: var(--space-2) var(--space-3); align-items: center; padding: var(--space-4); border-radius: var(--radius-well); }
  .steps__number { align-self: center; }
  .steps__title { font-size: 22px; }
  .steps__body { grid-column: 1 / -1; font-size: 15px; }
  .steps__extra { display: none; }
  .uses__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .use { border-radius: var(--radius-well); }
  .use__art { aspect-ratio: auto; height: 124px; }
  .use__plate { width: auto; height: 68px; padding: 6px; border-radius: var(--radius-item); }
  .use__kind { inset-inline-start: 10px; bottom: 8px; letter-spacing: 0.04em; }
  .use__name { padding: 10px var(--space-3) var(--space-3); }
  .use__title { font-size: 15px; line-height: 1.25; }
  .use__arrow { display: none; }
}

/* The lifecycle note under the board's button reads at the browser's normal line height. */
.page--home .timeline__version { line-height: normal; }

/* — motion: the head and the hero's lines rise in turn, finite, only where it is welcome — */
@media (prefers-reduced-motion: no-preference) {
  .page--home > .page-head > * { animation: rise var(--dur-enter) var(--ease-enter) both; }
  .page--home > .page-head > :nth-child(2) { animation: rise var(--dur-enter) var(--ease-enter) var(--delay-1) both; }
  .page--home > .page-head > :nth-child(3) { animation: rise var(--dur-enter) var(--ease-enter) var(--delay-2) both; }
  .hero__actions { animation: rise var(--dur-enter) var(--ease-enter) var(--delay-3) both; }
  .hero__points { animation: rise var(--dur-enter) var(--ease-enter) var(--delay-4) both; }
}
