/* Hallmark | macrostructure: Pole (bespoke: hero + document sheet, ruled measure, spec sheet)
 * tone: confident, precise, quiet | anchor hue: 255 (blue)
 * nav: none (single page, one destination) | footer: colophon
 * enrichment: Tier A, CSS and inline SVG (voice waveform resolving into a plan sheet)
 * Hallmark | pre-emit critique: P4 H5 E4 S4 R5 V4
 *
 * Every colour and every font-family is a token from tokens.css. No inline styles in the
 * markup: the CSP carries no 'unsafe-inline' for style-src.
 */

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

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

html,
body {
  margin: 0;
  overflow-x: clip;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--text-md);
  line-height: 1.6;
  font-feature-settings: "cv11", "ss03";
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p,
ol,
dl,
dd,
figure {
  margin: 0;
  padding: 0;
}

ol {
  list-style: none;
}

.page {
  width: 100%;
  max-width: var(--page-max);
  margin-inline: auto;
  padding: var(--space-lg) var(--space-lg) var(--space-2xl);
  padding-inline: max(var(--space-lg), env(safe-area-inset-left)) max(var(--space-lg), env(safe-area-inset-right));
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ---- Masthead ---------------------------------------------------------- */

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding-block: var(--space-md) var(--space-2xl);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  color: inherit;
  text-decoration: none;
  min-height: 44px;
}

.mark {
  display: block;
  width: 40px;
  height: 40px;
  flex: none;
}

.mark__stop-a {
  stop-color: var(--mark-a);
}

.mark__stop-b {
  stop-color: var(--mark-b);
}

.mark__ink {
  fill: var(--accent-on);
}

.mark__stroke {
  stroke: var(--accent-on);
}

.wordmark {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 650;
  letter-spacing: -0.02em;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-xs) var(--space-md);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-pill);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}

.status__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

/* ---- Hero -------------------------------------------------------------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-2xl);
  align-items: center;
  padding-block-end: var(--space-3xl);
}

.hero__title {
  font-family: var(--font-display);
  font-size: var(--text-display);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.04em;
  text-wrap: balance;
  overflow-wrap: anywhere;
  min-width: 0;
}

.hero__lede {
  margin-block-start: var(--space-lg);
  max-width: 52ch;
  font-size: var(--text-lg);
  line-height: 1.55;
  color: var(--ink-muted);
}

.hero__note {
  margin-block-start: var(--space-xl);
  max-width: 52ch;
  padding-inline-start: var(--space-md);
  border-inline-start: 3px solid var(--accent);
  font-size: var(--text-md);
  color: var(--ink);
}

.hero__note-strong {
  font-weight: 650;
  color: var(--accent-ink);
}

@media (min-width: 60rem) {
  .hero {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: var(--space-3xl);
    padding-block-end: var(--space-4xl);
  }
}

/* ---- The sheet: voice resolving into a plan --------------------------- */

.sheet {
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sheet);
  overflow: hidden;
}

.sheet__voice {
  padding: var(--space-xl) var(--space-lg) var(--space-lg);
  background: var(--accent-wash);
  border-block-end: 1px solid var(--rule);
}

.wave {
  display: block;
  width: 100%;
  height: 72px;
  fill: var(--accent);
}

.wave rect {
  transform-box: fill-box;
  transform-origin: center;
  animation: wave var(--dur-wave) var(--ease-out) infinite alternate;
}

.wave rect:nth-child(4n + 1) {
  animation-duration: 1500ms;
}

.wave rect:nth-child(4n + 2) {
  animation-duration: 2100ms;
  animation-delay: -400ms;
}

.wave rect:nth-child(4n + 3) {
  animation-duration: 1750ms;
  animation-delay: -900ms;
}

.wave rect:nth-child(4n) {
  animation-duration: 2400ms;
  animation-delay: -1300ms;
}

@keyframes wave {
  from {
    transform: scaleY(0.4);
  }
  to {
    transform: scaleY(1);
  }
}

.sheet__plan {
  padding: var(--space-md) var(--space-lg) var(--space-lg);
}

.sheet__row {
  display: grid;
  gap: var(--space-xs);
  padding-block: var(--space-md);
  border-block-end: 1px solid var(--rule);
}

.sheet__row:last-child {
  border-block-end: 0;
}

.sheet__label {
  font-size: var(--text-xs);
  font-weight: 650;
  letter-spacing: 0.02em;
  color: var(--ink-muted);
}

.sheet__row--lead .sheet__label {
  color: var(--accent-ink);
}

.sheet__lines {
  display: grid;
  gap: 6px;
}

.sheet__lines i {
  display: block;
  height: 6px;
  border-radius: 3px;
  background: var(--rule);
}

.sheet__row--lead .sheet__lines i {
  background: var(--rule-strong);
}

.sheet__lines i.short {
  width: 62%;
}

.sheet__caption {
  padding: var(--space-sm) var(--space-lg) var(--space-md);
  border-block-start: 1px solid var(--rule);
  background: var(--paper-sunk);
  font-size: var(--text-xs);
  color: var(--ink-muted);
}

/* ---- Section heads ----------------------------------------------------- */

.section__head {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 650;
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin-block-end: var(--space-xl);
  text-wrap: balance;
}

.pole,
.inside {
  padding-block: var(--space-2xl);
  border-block-start: 1px solid var(--rule);
}

/* ---- The pole: three steps on a ruled measure ------------------------- */

.steps {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-xl);
}

.step {
  position: relative;
  padding-inline-start: var(--space-xl);
  max-width: var(--measure);
}

/* The measure itself: a ruled line with tick marks, drawn in CSS. */
.step::before {
  content: "";
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  width: 2px;
  background: repeating-linear-gradient(to bottom, var(--rule-strong) 0 1px, transparent 1px 8px);
  background-color: var(--rule);
}

.step__tick {
  position: absolute;
  inset-inline-start: -5px;
  inset-block-start: 0.5rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--paper);
}

.step__name {
  font-size: var(--text-lg);
  font-weight: 650;
  letter-spacing: -0.015em;
  line-height: 1.3;
  margin-block-end: var(--space-2xs);
}

.step p {
  color: var(--ink-muted);
}

@media (min-width: 48rem) {
  .steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-xl);
  }

  /* Horizontal on wider screens: the pole lies down. */
  .step {
    padding-inline-start: 0;
    padding-block-start: var(--space-xl);
  }

  .step::before {
    inset-block: 0 auto;
    inset-inline: 0;
    width: auto;
    height: 2px;
    background: repeating-linear-gradient(to right, var(--rule-strong) 0 1px, transparent 1px 8px);
    background-color: var(--rule);
  }

  .step__tick {
    inset-inline-start: 0;
    inset-block-start: -5px;
  }
}

/* ---- Spec sheet -------------------------------------------------------- */

.spec {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  border-block-start: 1px solid var(--rule-strong);
}

.spec__term {
  padding-block-start: var(--space-md);
  font-size: var(--text-sm);
  font-weight: 650;
  color: var(--accent-ink);
}

.spec__value {
  padding-block: var(--space-2xs) var(--space-md);
  border-block-end: 1px solid var(--rule);
  max-width: var(--measure);
}

@media (min-width: 48rem) {
  .spec {
    grid-template-columns: minmax(10rem, 14rem) minmax(0, 1fr);
    column-gap: var(--space-xl);
  }

  .spec__term,
  .spec__value {
    padding-block: var(--space-md);
    border-block-end: 1px solid var(--rule);
  }
}

/* ---- Colophon ---------------------------------------------------------- */

.colophon {
  margin-block-start: var(--space-2xl);
  padding-block-start: var(--space-lg);
  border-block-start: 1px solid var(--rule-strong);
  display: grid;
  gap: var(--space-xs);
}

.colophon__name {
  font-weight: 650;
}

.colophon__host {
  margin-inline-start: var(--space-xs);
  font-weight: 400;
  color: var(--ink-muted);
}

.colophon__legal {
  max-width: var(--measure);
  font-size: var(--text-sm);
  color: var(--ink-muted);
}

/* ---- Entrance (finite, so the gate can wait for it to settle) --------- */

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

.hero__copy > *,
.sheet {
  animation: rise var(--dur-enter) var(--ease-out) both;
}

.hero__copy > :nth-child(2) {
  animation-delay: 80ms;
}

.hero__copy > :nth-child(3) {
  animation-delay: 160ms;
}

.sheet {
  animation-delay: 120ms;
}

@media (prefers-reduced-motion: reduce) {
  .hero__copy > *,
  .sheet,
  .wave rect {
    animation: none;
  }
}

@media (max-width: 22.5rem) {
  .masthead {
    flex-wrap: wrap;
  }
}
