/* AZP Global: "The Term Sheet". Tokens mirror DESIGN.md (canonical OKLCH, hex values). */

/* Self-hosted fonts (latin subset). Schibsted Grotesk is variable: one file covers 400-700. */
@font-face {
  font-family: "Schibsted Grotesk";
  src: url("fonts/schibsted-grotesk-latin-var.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("fonts/jetbrains-mono-500-latin.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light dark;

  /* Color */
  --paper: #f9fafc;          /* oklch(0.985 0.003 250) */
  --surface: #f0f3f6;        /* oklch(0.962 0.005 250) */
  --hairline: #d8dbdf;       /* oklch(0.89 0.006 250) */
  --ink: #161b20;            /* oklch(0.22 0.012 250) */
  --muted: #53595f;          /* oklch(0.46 0.012 250) */
  --green: #0b7643;          /* oklch(0.50 0.12 155) */
  --green-hover: #006133;    /* oklch(0.43 0.11 155) */
  --green-tint: #e0f5e6;     /* oklch(0.95 0.03 155) */
  --green-ink: #006133;
  --on-green: #f9fafc;

  /* Type */
  --font-sans: "Schibsted Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --text-display: clamp(2.5rem, 5.2vw, 4.25rem);
  --text-headline: clamp(1.875rem, 3.4vw, 2.75rem);
  --text-clause: clamp(1.5rem, 2.6vw, 2rem);
  --text-email: clamp(1.25rem, 3.6vw, 2.5rem);
  --text-lede: clamp(1.0625rem, 1.4vw, 1.25rem);
  --text-title: 1.25rem;
  --text-wordmark: 1.1875rem;
  --text-body: 1.0625rem;
  --text-data: 0.9375rem;
  --text-small: 0.875rem;
  --text-caption: 0.8125rem;
  --text-label: 0.75rem;

  /* Shape, space, layout */
  --radius: 4px;
  --nav-h: 68px;
  /* Gutter and section rhythm step at breakpoints rather than fluid clamp(),
     so static analysis can read the inset too. */
  --gutter: 16px;
  --section: 80px;
  --clause-pad: 20px;
  --target: 44px;

  /* Motion */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);

  /* z-index scale */
  --z-sticky: 10;
  --z-skip: 20;
  --z-toast: 30;
}

@media (min-width: 720px) {
  :root { --gutter: 24px; --section: 112px; --clause-pad: 28px; }
}
@media (min-width: 1100px) {
  :root { --gutter: 40px; --section: 144px; --clause-pad: 32px; }
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0d1013;
    --surface: #15191c;
    --hairline: #2a2e33;
    --ink: #eceff1;
    --muted: #a6abb1;
    --green: #55c483;
    --green-hover: #72d699;
    --green-tint: #173826;
    --green-ink: #72d699;
    --on-green: #0d1013;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--nav-h) + 16px);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--text-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul, ol, dl, dd { margin: 0; padding: 0; }
li { list-style: none; }
img { display: block; max-width: 100%; height: auto; }

a { color: inherit; }
.icon { width: 1.125em; height: 1.125em; flex: none; }
:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
  border-radius: var(--radius);
}

.wrap {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-left: var(--gutter); padding-right: var(--gutter);
}

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

.skip {
  position: absolute; left: 16px; top: -64px; z-index: var(--z-skip);
  background: var(--ink); color: var(--paper);
  padding: 12px 16px; border-radius: var(--radius); text-decoration: none;
}
.skip:focus { top: 12px; }

/* ---------- Type roles ---------- */

h1 {
  font-size: var(--text-display);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.03em;
}
h2 {
  font-size: var(--text-headline);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
}
h3 {
  font-size: var(--text-title);
  font-weight: 600;
  line-height: 1.3;
}

/* ---------- Buttons & links ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 22px;
  border-radius: var(--radius);
  font: 600 var(--text-body)/1 var(--font-sans);
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 160ms ease, transform 160ms var(--ease-out);
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--green); color: var(--on-green); }
.btn-sm { min-height: var(--target); padding: 10px 16px; font-size: var(--text-data); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  font-weight: 600;
  text-decoration: none;
}
.link-arrow span {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
  text-decoration-color: var(--hairline);
  transition: text-decoration-color 160ms ease;
}
.link-arrow .icon { transition: transform 200ms var(--ease-out); }

@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover { background: var(--green-hover); }
  .link-arrow:hover span { text-decoration-color: var(--green); }
  .link-arrow:hover .icon { transform: translateX(3px); }
}

/* Copy button: shared by the hero sheet and the contact line */
.copy {
  position: relative;
  display: inline-grid;
  place-items: center;
  min-width: 84px;
  min-height: var(--target);
  padding: 8px 14px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink);
  font: 500 var(--text-caption)/1 var(--font-mono);
  cursor: pointer;
  transition: border-color 160ms ease, color 160ms ease, transform 160ms var(--ease-out);
}
.copy:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) {
  .copy:hover { border-color: var(--ink); }
}
.copy[data-state="copied"] { border-color: var(--green); color: var(--green-ink); }
.copy[data-state="failed"] { border-color: var(--ink); }
.copy-label { transition: filter 200ms ease, opacity 200ms ease; }
.copy-label.is-swapping { filter: blur(2px); opacity: 0; }

/* Compact variant inside the term sheet; the ::before keeps a 44px hit area. */
.copy-inline {
  min-width: 64px;
  min-height: 28px;
  padding: 4px 10px;
  font-size: var(--text-label);
}
.copy-inline::before {
  content: "";
  position: absolute;
  inset: -10px -4px;
}

/* ---------- Nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  background: var(--paper);
  border-bottom: 1px solid var(--hairline);
}
.nav-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: var(--nav-h);
}
.wordmark {
  display: inline-flex;
  align-items: center;
  min-height: var(--target);
  font-weight: 700;
  font-size: var(--text-wordmark);
  letter-spacing: -0.02em;
  text-decoration: none;
  white-space: nowrap;
}
.nav nav { margin-left: auto; }
.nav-links { display: flex; gap: 24px; }
.nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: var(--target);
  font-size: var(--text-data);
  color: var(--muted);
  text-decoration: none;
  transition: color 160ms ease;
}
@media (hover: hover) and (pointer: fine) {
  .nav-links a:hover { color: var(--ink); }
}
@media (max-width: 799px) {
  .nav nav { display: none; }
  .nav .btn { margin-left: auto; }
}

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

/* Full-bleed photograph: dawn light through a dock door onto one prepared pallet.
   The photo is dark in both themes, so hero text colors are fixed, not theme tokens. */
.hero {
  --hero-ink: #f4f6f8;
  --hero-muted: #c4ccd4;
  --hero-shade: 8, 11, 14;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: max(560px, min(calc(100svh - var(--nav-h)), 880px));
  padding-top: 96px;
  padding-bottom: 96px;
  background: #0d1013;
  color: var(--hero-ink);
}
.hero-photo {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% 50%;
}
.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg,
    rgba(var(--hero-shade), 0.82) 0%,
    rgba(var(--hero-shade), 0.6) 34%,
    rgba(var(--hero-shade), 0.15) 62%,
    rgba(var(--hero-shade), 0) 78%);
}
.hero-inner { width: 100%; }
.hero-copy { max-width: 620px; }
.hero-copy h1 { max-width: 14ch; }
.lede {
  margin-top: 24px;
  max-width: 44ch;
  font-size: var(--text-lede);
  color: var(--hero-muted);
}
.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 28px;
  margin-top: 36px;
}
.link-arrow-light { color: var(--hero-ink); }
.link-arrow-light span { text-decoration-color: rgba(244, 246, 248, 0.45); }
@media (hover: hover) and (pointer: fine) {
  .link-arrow-light:hover span { text-decoration-color: var(--hero-ink); }
}

/* Phones: the pallet holds the frame; the copy sits at the bottom over a darker floor. */
@media (max-width: 719px) {
  .hero {
    align-items: flex-end;
    min-height: max(560px, calc(100svh - var(--nav-h)));
    padding-top: 48px;
    padding-bottom: 40px;
  }
  .hero-photo { object-position: 74% 50%; }
  .hero-scrim {
    background: linear-gradient(0deg,
      rgba(var(--hero-shade), 0.9) 0%,
      rgba(var(--hero-shade), 0.7) 38%,
      rgba(var(--hero-shade), 0.1) 68%,
      rgba(var(--hero-shade), 0) 100%);
  }
}

/* ---------- Terms (the signed sheet) ---------- */

/* Deliberately tighter than the other sections: the sheet is a summary, read at a glance. */
.terms { padding-top: 56px; padding-bottom: 56px; }
.terms-grid {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: 48px;
  align-items: center;
}
.terms-copy h2 { max-width: 13ch; }
.terms-copy p { margin-top: 16px; max-width: 36ch; color: var(--muted); }

@media (min-width: 720px) {
  .terms { padding-top: 72px; padding-bottom: 72px; }
}
@media (min-width: 1100px) {
  .terms { padding-top: 88px; padding-bottom: 88px; }
}
@media (max-width: 899px) {
  .terms-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
}

/* ---------- Term sheet (signature) ---------- */

.sheet {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 24px;
  font-family: var(--font-mono);
  font-size: var(--text-data);
  font-weight: 500;
  font-variant-numeric: tabular-nums slashed-zero;
}
.sheet-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 4px 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--ink);
  font-size: var(--text-caption);
}
.sheet-title { color: var(--ink); letter-spacing: 0.02em; }
.sheet-party { color: var(--muted); }

.sheet-row {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr);
  gap: 16px;
  align-items: baseline;
  padding-top: 12px; padding-bottom: 12px;
  border-bottom: 1px solid var(--hairline);
}
.sheet-row:last-child { border-bottom: 0; }
.sheet-row dt { font-size: var(--text-caption); color: var(--muted); }
.sheet-row dd { color: var(--ink); overflow-wrap: anywhere; }

/* The sheet is signed by a named person (name and direct lines; the portrait lives in the close). */
.signatory {
  margin-top: 4px;
  padding-top: 16px;
  border-top: 1px solid var(--ink);
}
.signatory-name {
  font-family: var(--font-sans);
  font-variant-numeric: normal; /* the sheet's tabular setting gives this face a fixed-width comma */
  font-weight: 600;
  font-size: var(--text-body);
  line-height: 1.3;
}
/* Email row and phone row stacked with a 12px gap, so the phone's hit area
   can never reach the Copy button above it. */
.signatory-lines {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  margin-top: 4px;
  font-size: var(--text-caption);
}
.sheet-email {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
}
.sheet-email a,
.signatory-phone {
  position: relative;
  color: var(--green-ink);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
  overflow-wrap: anywhere;
}
.signatory-phone { color: var(--ink); text-decoration-color: var(--hairline); }
/* 44px hit areas without inflating the sheet's rhythm */
.sheet-email a::before,
.signatory-phone::before {
  content: "";
  position: absolute;
  inset: -12px -4px;
}
.signatory-phone::before { top: -6px; } /* stays clear of the Copy button above */
@media (hover: hover) and (pointer: fine) {
  .signatory-phone:hover { text-decoration-color: var(--green); }
}

.chip {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: var(--radius);
  background: var(--green-tint);
  color: var(--green-ink);
  font-size: var(--text-label);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  vertical-align: 1px;
}

@media (max-width: 479px) {
  .sheet-row { grid-template-columns: minmax(0, 1fr); gap: 4px; }
}

/* ---------- Photos ---------- */

.photo {
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--hairline);
  background: var(--surface);
}
.photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
@media (prefers-color-scheme: dark) {
  /* The photography is shot light; take the glare off on a dark page. */
  .photo img { filter: brightness(0.78); }
  .portrait-frame img { filter: brightness(0.9); }
}

/* ---------- Brand protection ---------- */

.protection { padding-top: var(--section); padding-bottom: var(--section); background: var(--surface); }
.protection h2 { max-width: 20ch; }

/* The page's typographic peak: five enforceable clauses, each the rule then its mechanism. */
.clauses { margin-top: clamp(40px, 5vw, 64px); border-top: 1px solid var(--ink); }
.clause {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 8px clamp(32px, 6vw, 96px);
  align-items: baseline;
  padding-top: var(--clause-pad); padding-bottom: var(--clause-pad);
  border-bottom: 1px solid var(--hairline);
}
.clause:last-child { border-bottom: 0; }
.clause dt {
  font-size: var(--text-clause);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.clause dd { color: var(--muted); max-width: 44ch; }

@media (max-width: 719px) {
  .clause { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Payment ---------- */

.prepaid { padding-top: var(--section); padding-bottom: var(--section); }
.prepaid-grid {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: clamp(40px, 7vw, 112px);
  align-items: center;
}
.photo-cartons { aspect-ratio: 5 / 4; }
.prepaid-statement h2 { max-width: 13ch; }
.prepaid-statement p { margin-top: 20px; max-width: 44ch; color: var(--muted); }

@media (max-width: 899px) {
  .prepaid-grid { grid-template-columns: minmax(0, 1fr); }
  .photo-cartons { aspect-ratio: 16 / 9; }
}

/* ---------- How we work ---------- */

.how { padding-top: var(--section); padding-bottom: var(--section); border-top: 1px solid var(--hairline); }
.photo-band {
  aspect-ratio: 1916 / 821;
  margin-bottom: 64px;
}
@media (min-width: 1100px) {
  .photo-band { margin-bottom: 96px; }
}
@media (max-width: 599px) {
  /* A 21:9 band would be a sliver on a phone: go 4:3 and keep the pallet in frame. */
  .photo-band { aspect-ratio: 4 / 3; margin-bottom: 48px; }
  .photo-band img { object-position: 92% 50%; }
}
.how-lede { margin-top: 16px; color: var(--muted); max-width: 48ch; }

/* Scroll-scrubbed video. The track is taller than the viewport; the stage sticks under the nav
   while the track scrolls past, and main.js maps that scroll distance onto the video's timeline.
   The background matches the video's own ground (#edf0ed) in both themes, so the letterboxing
   around the frame is invisible. Shown only when main.js enables it (.has-scrub). */
.scrub {
  --scrub-bg: #edf0ed;
  position: relative;
  height: 280vh;
  background: var(--scrub-bg);
}
.scrub[hidden] { display: none; }
.scrub-stage {
  position: sticky;
  top: var(--nav-h);
  height: calc(100svh - var(--nav-h));
  display: grid;
  place-items: center;
  overflow: hidden;
}
.scrub-video {
  display: block;
  width: 100%;
  height: 100%;
  /* At 1280px the frame's built-in margins line its heading up with the page's 1120px column. */
  max-width: 1280px;
  object-fit: contain;
  background: var(--scrub-bg);
}
/* Portrait screens use the vertical cut and need a little less travel. */
@media (max-aspect-ratio: 1/1) {
  .scrub { height: 240vh; }
}

/* While the video carries the section, the text version stays in the document for screen readers. */
.how.has-scrub { padding-bottom: 0; }
.how.has-scrub .how-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.timeline {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px;
  margin-top: clamp(40px, 5vw, 64px);
}
/* Desktop: one rule behind the four step numbers */
.timeline::before {
  content: "";
  position: absolute;
  left: 0;
  right: calc(25% - 40px); /* ends at the centre of step 4's number (4 cols, 32px gaps) */
  top: 15.5px;
  height: 1px;
  background: var(--hairline);
  transform-origin: left center;
}
.step { position: relative; }
.step-num {
  position: relative;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius);
  background: var(--paper);
  border: 1px solid var(--ink);
  font: 500 var(--text-small)/1 var(--font-mono);
}
.step h3 { margin-top: 24px; }
.step p { margin-top: 8px; color: var(--muted); max-width: 30ch; }

/* Tablet: 2 x 2, no connecting rule */
@media (max-width: 899px) {
  .timeline { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 32px; }
  .timeline::before { display: none; }
}

/* Mobile: vertical, one segment between each pair of numbers */
@media (max-width: 599px) {
  .timeline { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .step {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    column-gap: 20px;
    padding-bottom: 32px;
  }
  .step:last-child { padding-bottom: 0; }
  .step:not(:last-child)::after {
    content: "";
    position: absolute;
    left: 15.5px;
    top: 32px;
    bottom: 0;
    width: 1px;
    background: var(--hairline);
    transform-origin: center top;
  }
  .step-num { grid-row: span 2; }
  .step h3 { margin-top: 4px; }
}

/* ---------- Contact ---------- */

.contact { padding-top: var(--section); padding-bottom: var(--section); border-top: 1px solid var(--hairline); }
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: clamp(40px, 7vw, 112px);
  align-items: center;
}
.contact-lede { margin-top: 16px; color: var(--muted); max-width: 48ch; }

/* The person is the close: the largest human on the page. */
.portrait { margin: 0; max-width: 360px; }
.portrait-frame {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--hairline);
  background: var(--surface);
}
.portrait-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font: 500 var(--text-headline)/1 var(--font-mono);
  color: var(--ink);
  letter-spacing: 0.04em;
}
.portrait-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* The photo is visible by default and covers the initials; JS removes it only if it fails to load. */
.portrait figcaption {
  display: grid;
  gap: 2px;
  margin-top: 16px;
}
.person-name { font-weight: 600; font-size: var(--text-title); line-height: 1.3; }
.person-role { color: var(--muted); font-size: var(--text-data); }
.person-address {
  margin-top: 10px;
  font-style: normal;
  font-size: var(--text-small);
  line-height: 1.5;
}
.person-address a {
  display: inline-block;
  padding-top: 4px;
  padding-bottom: 4px;
  color: var(--muted);
  text-decoration: underline;
  text-decoration-color: var(--hairline);
  text-underline-offset: 4px;
  transition: color 160ms ease, text-decoration-color 160ms ease;
}
@media (hover: hover) and (pointer: fine) {
  .person-address a:hover { color: var(--ink); text-decoration-color: var(--green); }
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  margin-top: 28px;
}
.contact-actions .phone { margin-top: 0; }
.next-step {
  margin-top: 24px;
  max-width: 48ch;
  color: var(--muted);
}

@media (max-width: 899px) {
  .contact-grid { grid-template-columns: minmax(0, 1fr); }
  .portrait {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 20px;
    align-items: center;
    max-width: none;
  }
  .portrait figcaption { margin-top: 0; }
}

.email-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  margin-top: clamp(32px, 4vw, 48px);
}
.email-big {
  display: inline-flex;
  align-items: center;
  min-height: var(--target);
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: var(--text-email);
  letter-spacing: -0.02em;
  line-height: 1.15;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 8px;
  text-decoration-color: var(--hairline);
  overflow-wrap: anywhere;
  transition: text-decoration-color 160ms ease;
}
@media (hover: hover) and (pointer: fine) {
  .email-big:hover { text-decoration-color: var(--green); }
}

.phone {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: var(--target);
  margin-top: 16px;
  padding: 0 16px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  font: 500 var(--text-data)/1 var(--font-mono);
  font-variant-numeric: tabular-nums;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color 160ms ease, transform 160ms var(--ease-out);
}
.phone .icon { color: var(--muted); }
.phone:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) {
  .phone:hover { border-color: var(--ink); }
}

/* ---------- Footer ---------- */

.footer { border-top: 1px solid var(--hairline); }
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 32px;
  padding-top: 20px; padding-bottom: 20px;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 24px;
  font: 500 var(--text-small)/1 var(--font-mono);
}
.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: var(--target);
  color: var(--muted);
  text-decoration: none;
  transition: color 160ms ease;
}
@media (hover: hover) and (pointer: fine) {
  .footer-links a:hover { color: var(--ink); }
}
.footer-note { margin-left: auto; color: var(--muted); font-size: var(--text-small); }
@media (max-width: 599px) {
  .footer-note { margin-left: 0; }
}

/* ---------- Mail fallback toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: var(--z-toast);
  width: min(calc(100vw - 32px), 520px);
  padding: 16px 16px 12px 20px;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  transform: translateX(-50%);
}
.toast[hidden] { display: none; }
.toast-text { color: var(--muted); font-size: var(--text-small); }
.toast-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-top: 8px;
}
.toast-address {
  font: 500 var(--text-data)/1.4 var(--font-mono);
  overflow-wrap: anywhere;
  margin-right: auto;
}
.toast-close {
  min-height: var(--target);
  padding: 0 12px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: 500 var(--text-caption)/1 var(--font-mono);
  cursor: pointer;
  transition: color 160ms ease;
}
@media (hover: hover) and (pointer: fine) {
  .toast-close:hover { color: var(--ink); }
}

/* =========================================================
   Motion. Only where it carries meaning:
   1. Term sheet rows settle in on load (storytelling: the terms are being written).
   2. The PREPAID chip reveals last (state: payment cleared).
   3. The how-we-work rule draws left to right (explanation: it is a sequence).
   4. Press feedback and the copy confirmation (feedback).
   Everything is visible by default. JS adds .motion-ok only when the page is
   visible and the user has not asked for reduced motion.
   ========================================================= */

@keyframes row-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes chip-clear {
  from { clip-path: inset(0 100% 0 0); }
  to   { clip-path: inset(0 0 0 0); }
}

/* Hero, first load only: the light settles and the promise arrives in reading order. */
@keyframes hero-settle {
  from { transform: scale(1.06); }
  to   { transform: scale(1); }
}
@keyframes hero-rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
.motion-ok .hero-photo { animation: hero-settle 1800ms var(--ease-out) both; }
.motion-ok .hero-copy h1 { animation: hero-rise 700ms var(--ease-out) 120ms both; }
.motion-ok .hero-copy .lede { animation: hero-rise 700ms var(--ease-out) 240ms both; }
.motion-ok .hero-copy .cta-row { animation: hero-rise 700ms var(--ease-out) 360ms both; }

/* Term sheet: plays once as it comes into view (main.js adds .is-in). */
.motion-ok .sheet.is-in .sheet-row {
  animation: row-in 420ms var(--ease-out) both;
  animation-delay: calc(160ms + var(--i, 0) * 70ms);
}
.motion-ok .sheet-row:nth-child(2) { --i: 1; }
.motion-ok .sheet-row:nth-child(3) { --i: 2; }
.motion-ok .sheet-row:nth-child(4) { --i: 3; }
.motion-ok .sheet-row:nth-child(5) { --i: 4; }
.motion-ok .sheet.is-in .chip { animation: chip-clear 320ms var(--ease-out) 720ms both; }
/* The sheet is signed last: terms written, payment cleared, then a person puts a name to it. */
.motion-ok .sheet.is-in .signatory { animation: row-in 420ms var(--ease-out) 900ms both; }

/* Toast: enters from below (ease-out), leaves faster than it came. Transitions, so it can be interrupted. */
.toast {
  opacity: 0;
  transform: translate(-50%, 12px);
  transition: opacity 160ms ease, transform 160ms var(--ease-out);
}
.toast.is-open {
  opacity: 1;
  transform: translate(-50%, 0);
  transition: opacity 220ms ease, transform 260ms var(--ease-out);
}

/* Only the connecting rule is held back; the step numbers and text are always visible,
   so a reveal that never fires costs a line, never content. */
.motion-ok .timeline.is-armed::before { transform: scaleX(0); }
.motion-ok .timeline.is-armed .step:not(:last-child)::after { transform: scaleY(0); }

.motion-ok .timeline.is-in::before {
  transform: scaleX(1);
  transition: transform 900ms var(--ease-in-out);
}
.motion-ok .timeline.is-in .step:not(:last-child)::after {
  transform: scaleY(1);
  transition: transform 360ms var(--ease-in-out) var(--d, 0ms);
}
.timeline .step:nth-child(2) { --d: 220ms; }
.timeline .step:nth-child(3) { --d: 440ms; }

@media (prefers-reduced-motion: reduce) {
  .btn:active, .copy:active, .phone:active { transform: none; }
  .link-arrow .icon { transition: none; }
  .copy-label.is-swapping { filter: none; }
  .toast, .toast.is-open { transform: translate(-50%, 0); }
}

@media print {
  .nav, .skip, .copy, .toast { display: none; }
  .timeline::before, .step::after, .step-num { transform: none !important; opacity: 1 !important; }
  .sheet-row, .chip, .signatory { animation: none !important; }
  /* Print the text version of "How we work", never a paused video frame. */
  .scrub { display: none !important; }
  .how.has-scrub .how-text { position: static; width: auto; height: auto; margin: 0; overflow: visible; clip: auto; white-space: normal; }
}
