/* Redifact public site
   Direction: calibrated, bound, cool, direct, named.
   Signature: severity tariff as a calibrated scale (oxblood spine).
   Fonts: IBM Plex Sans + IBM Plex Mono, self-hosted, OFL.
   No remote scripts, no analytics.
*/

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/ibm-plex-sans-latin-400.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/ibm-plex-sans-latin-500.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/ibm-plex-sans-latin-600.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/ibm-plex-mono-latin-400.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/ibm-plex-mono-latin-500.woff2") format("woff2");
}

:root {
  /* Color roles. Ratios computed from these hex values (WCAG 2.x relative luminance). */
  --canvas: #eef1f4;       /* cool steel */
  --surface: #ffffff;
  --ink: #161a20;          /* body on canvas 15.40:1; on white 17.46:1 */
  --muted: #3d4a5a;        /* muted on canvas 7.97:1; on white 9.03:1 */
  --line: #c2ccd6;
  --oxblood: #8a2032;      /* primary action, scale spine, focus, links */
  --oxblood-deep: #6e1828; /* hover */
  --on-oxblood: #ffffff;   /* white on oxblood 9.00:1 */
  --error-bg: #f8e8eb;     /* oxblood on error-bg 7.60:1 */
  --disabled: #d3d9e0;
  --focus: #8a2032;        /* focus ring vs canvas 7.94:1 (UI ≥ 3:1) */

  --font-sans: "IBM Plex Sans", "Liberation Sans", "Nimbus Sans L", ui-sans-serif, sans-serif;
  --font-mono: "IBM Plex Mono", "Liberation Mono", ui-monospace, monospace;

  --radius: 2px; /* technical / serious */
  --max: 72rem;
  --prose: 38rem;
  --pad: clamp(1.25rem, 4vw, 2.5rem);
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --space-9: 6rem;

  --t: 120ms ease;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --motion-ui: 140ms;
  --motion-enter: 420ms;
  --shadow-cool: 22, 26, 32;
}

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

html {
  color-scheme: light;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0ms !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
    animation-timeline: auto !important;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--canvas);
  background-image:
    radial-gradient(ellipse 78% 56% at 10% -8%, rgba(138, 32, 50, 0.10), transparent 60%),
    radial-gradient(ellipse 52% 38% at 100% 0%, rgba(22, 26, 32, 0.055), transparent 54%);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1.0625rem; /* 17px */
  font-weight: 400;
  line-height: 1.55;
}

/* Cool canvas grain — atmosphere over the instrument field, not on type */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.055;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.site-main,
.site-footer {
  position: relative;
  z-index: 2;
}

/* Instrument field: gauge + measuring rail. Decorative only. */
.instrument-field {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  --field-tilt: 0deg;
  --rail-shift: 0px;
}

.field-gauge {
  position: absolute;
  top: -10%;
  right: -18%;
  width: min(92vw, 1080px);
  max-width: none;
  height: auto;
  display: block;
  transform: rotate(var(--field-tilt));
  transform-origin: 74% 40%;
  opacity: 0.92;
}

body:not(.is-home) .field-gauge {
  top: -18%;
  right: -30%;
  width: min(70vw, 720px);
  opacity: 0.62;
}

.field-veil {
  position: absolute;
  left: 1.6rem;
  top: 0;
  bottom: 0;
  width: min(46vw, 34rem);
  background: linear-gradient(
    90deg,
    rgba(238, 241, 244, 0.94) 0%,
    rgba(238, 241, 244, 0.78) 42%,
    rgba(238, 241, 244, 0.0) 100%
  );
}

body:not(.is-home) .field-veil {
  width: min(58vw, 40rem);
  background: linear-gradient(
    90deg,
    rgba(238, 241, 244, 0.96) 0%,
    rgba(238, 241, 244, 0.82) 48%,
    rgba(238, 241, 244, 0.0) 100%
  );
}

.field-rail {
  position: absolute;
  left: 0;
  top: -24%;
  height: 150%;
  width: 26px;
  transform: translateY(var(--rail-shift));
  background-image:
    linear-gradient(to right, #9aa8b5 1.15px, transparent 1.15px),
    repeating-linear-gradient(to bottom, #8e9bab 0 1.6px, transparent 1.6px 64px),
    repeating-linear-gradient(to bottom, #c2ccd6 0 1.2px, transparent 1.2px 32px),
    repeating-linear-gradient(to bottom, rgba(22, 26, 32, 0.30) 0 1px, transparent 1px 8px);
  background-size:
    1.15px 100%,
    20px 64px,
    13px 32px,
    7px 8px;
  background-repeat: no-repeat, repeat-y, repeat-y, repeat-y;
  background-position: 0 0;
  opacity: 0.9;
}

body:not(.is-home) .field-rail {
  opacity: 0.62;
}

.site-footer {
  background: transparent;
}

@media (max-width: 959px) {
  .field-gauge {
    top: 14%;
    right: -38%;
    width: 125vw;
    opacity: 0.95;
  }
  body:not(.is-home) .field-gauge {
    top: -8%;
    right: -34%;
    width: 95vw;
    opacity: 0.58;
  }
  .field-veil {
    width: min(36vw, 14rem);
  }
}

@media (max-width: 799px) {
  .field-rail {
    width: 14px;
    opacity: 0.55;
    background-size: 1px 100%, 11px 64px, 8px 32px, 5px 8px;
  }
  .field-veil {
    left: 0.85rem;
    width: 3.25rem;
  }
}

img, svg { display: block; max-width: 100%; }

a {
  color: var(--oxblood);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition: color var(--t), text-decoration-thickness var(--motion-ui) var(--ease-out);
}

a:hover {
  color: var(--oxblood-deep);
  text-decoration-thickness: 2px;
}

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

.skip {
  position: absolute;
  left: var(--space-3);
  top: var(--space-3);
  padding: 0.45rem 0.75rem;
  background: var(--ink);
  color: var(--surface);
  text-decoration: none;
  z-index: 30;
  transform: translateY(-180%);
}
.skip:hover { text-decoration: none; color: var(--surface); }
.skip:focus { transform: none; }

.wrap {
  width: min(var(--max), calc(100% - var(--pad) * 2));
  margin-inline: auto;
}

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

/* Header — boring on purpose; shade only after scroll */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  box-shadow: none;
  transition: box-shadow var(--motion-ui) var(--ease-out);
}
.site-header.is-scrolled {
  box-shadow:
    0 1px 0 rgba(194, 204, 214, 0.65),
    0 8px 22px -14px rgba(var(--shadow-cool), 0.22);
}

.header-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3) var(--space-4);
  min-height: 4rem;
  padding-block: var(--space-3);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--ink);
}
.brand:hover {
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  width: 4px;
  height: 1.35rem;
  background: var(--oxblood);
  flex: 0 0 auto;
}

.wordmark {
  font-weight: 600;
  font-size: 1.125rem;
  letter-spacing: -0.02em;
  line-height: 1;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15rem 1.25rem;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--ink);
  font-weight: 500;
  font-size: 0.95rem;
  min-height: 44px;
  padding: 0.2rem 0;
  transition: color var(--t);
}
.site-nav a:hover { text-decoration: none; }

.site-nav a:hover { color: var(--oxblood); }

.site-nav a[aria-current="page"] {
  box-shadow: inset 0 -2px 0 var(--oxblood);
  font-weight: 600;
}

@media (max-width: 799px) {
  .header-bar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    padding-bottom: 0.2rem;
  }
  .site-nav {
    border-top: 1px solid var(--line);
    margin-top: 0.35rem;
    padding-top: 0.15rem;
  }
  .site-nav ul { gap: 0 1.1rem; }
  .site-nav a { font-size: 0.9rem; }
}

.site-main { flex: 1; }

/* Hero */
.hero {
  padding: clamp(2rem, 7vw, 4.75rem) 0 clamp(1.75rem, 5vw, 3.5rem);
}

.hero-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.kicker {
  margin: 0 0 var(--space-3);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero-copy,
.hero-follow,
.page-head .wrap {
  position: relative;
  z-index: 1;
}

.hero-copy::before,
.hero-follow::before,
.page-head .wrap::before {
  content: "";
  position: absolute;
  inset: -1.1rem -1.35rem;
  pointer-events: none;
  z-index: -1;
  background: radial-gradient(
    ellipse 100% 90% at 12% 38%,
    rgba(238, 241, 244, 0.92) 0%,
    rgba(238, 241, 244, 0.70) 46%,
    rgba(238, 241, 244, 0) 74%
  );
}

.section .prose,
.section .wrap > .kicker,
.section .wrap > h2 {
  position: relative;
  z-index: 1;
}

.hero h1,
.page-head h1 {
  font-weight: 600;
  font-size: clamp(1.85rem, 5.4vw, 3.05rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin: 0 0 var(--space-4);
  max-width: 18ch;
}

.lede {
  font-size: 1.0625rem;
  max-width: 36rem;
  margin: 0 0 var(--space-4);
  color: var(--ink);
}

.offer {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.4;
  margin: 0 0 var(--space-5);
  color: var(--ink);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-4);
  align-items: center;
}
@media (max-width: 420px) {
  .actions { flex-direction: column; align-items: stretch; }
  .actions .btn { width: 100%; }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.15rem;
  min-height: 44px;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  border: 1px solid transparent;
  transition:
    background-color var(--t),
    color var(--t),
    border-color var(--t),
    box-shadow var(--motion-ui) var(--ease-out),
    transform var(--motion-ui) var(--ease-out);
}
.btn:hover { text-decoration: none; }

.btn-primary,
button[type="submit"] {
  background: var(--oxblood);
  color: var(--on-oxblood);
  border-color: var(--oxblood);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 1px 1px rgba(var(--shadow-cool), 0.14),
    0 7px 16px -7px rgba(var(--shadow-cool), 0.32);
}
.btn-primary:hover,
button[type="submit"]:hover {
  background: var(--oxblood-deep);
  color: var(--on-oxblood);
  border-color: var(--oxblood-deep);
  text-decoration: none;
}
.btn-primary:active,
button[type="submit"]:active {
  background: var(--oxblood-deep);
  transform: translateY(1px);
  box-shadow:
    inset 0 1px 2px rgba(var(--shadow-cool), 0.22),
    0 1px 2px rgba(var(--shadow-cool), 0.14);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn-ghost:hover {
  background: var(--ink);
  color: var(--surface);
  text-decoration: none;
}
.btn-ghost:active {
  transform: translateY(1px);
}

button[type="submit"] {
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  padding: 0.7rem 1.15rem;
  min-height: 44px;
  border-radius: var(--radius);
  transition:
    background-color var(--t),
    color var(--t),
    box-shadow var(--motion-ui) var(--ease-out),
    transform var(--motion-ui) var(--ease-out);
}
button[type="submit"]:disabled {
  background: var(--disabled);
  color: var(--ink); /* ink on #d3d9e0 remains readable */
  border: 1px solid var(--line);
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

@media (min-width: 960px) {
  .hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(20rem, 0.85fr);
    grid-template-areas:
      "copy instrument"
      "follow instrument";
    gap: var(--space-5) var(--space-8);
    align-items: start;
  }
  .hero-copy { grid-area: copy; }
  .hero-instrument { grid-area: instrument; }
  .hero-follow { grid-area: follow; }
  .hero-copy .offer { margin-bottom: 0; }
}

/* Signature: calibrated tariff — instrument lighting + spine */
.tariff-wrap {
  position: relative;
  background: linear-gradient(165deg, #ffffff 0%, #f3f5f7 100%);
  padding: var(--space-5);
  padding-left: calc(var(--space-5) + 4px);
  box-shadow:
    inset 0 1px 0 #ffffff,
    1px 2px 3px rgba(var(--shadow-cool), 0.04),
    6px 14px 28px -12px rgba(var(--shadow-cool), 0.16),
    2px 4px 8px -3px rgba(var(--shadow-cool), 0.08);
}

.tariff-spine {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  overflow: hidden;
  pointer-events: none;
}

.tariff-spine-draw,
.tariff-spine-fill {
  position: absolute;
  left: 0;
  top: 0;
  width: 4px;
  height: 100%;
  transform-origin: top center;
}

.tariff-spine-draw {
  background: var(--oxblood);
  transform: scaleY(1);
}

.tariff-spine-fill {
  left: 1px;
  width: 2px;
  background: var(--oxblood-deep);
  transform: scaleY(var(--spine-progress, 0));
}

.js-motion .tariff-wrap:not(.is-in-view) .tariff-spine-draw {
  transform: scaleY(0);
}
.js-motion .tariff-wrap.is-in-view .tariff-spine-draw {
  transform: scaleY(1);
  transition: transform 560ms var(--ease-out);
}

.tariff {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 0.95rem;
}

.tariff caption {
  caption-side: top;
  text-align: left;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0 0 var(--space-4);
  line-height: 1.4;
}

.tariff th,
.tariff td {
  text-align: left;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
  font-weight: 400;
  vertical-align: baseline;
}

.tariff thead th {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 0;
}

.tariff td:last-child,
.tariff th:last-child {
  text-align: right;
  font-weight: 500;
}

.tariff tbody th {
  font-weight: 400;
  color: var(--ink);
}

.tariff tfoot th,
.tariff tfoot td {
  border-bottom: 0;
  border-top: 2px solid var(--ink);
  font-weight: 600;
  padding-top: 0.85rem;
}

.tariff-lg {
  padding: var(--space-6);
  padding-left: calc(var(--space-6) + 4px);
}
.tariff-lg .tariff {
  font-size: 1.05rem;
}
.tariff-lg .tariff th,
.tariff-lg .tariff td {
  padding-block: 0.85rem;
}

/* Sections */
.section {
  padding: var(--space-7) 0;
}

.band {
  background: linear-gradient(180deg, #ffffff 0%, #f6f8fa 100%);
  padding: var(--space-7) 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  box-shadow: inset 0 1px 0 #ffffff;
}

.section h2,
.band h2,
.page-head h1 {
  font-weight: 600;
  letter-spacing: -0.02em;
}

.section h2,
.band h2 {
  font-size: clamp(1.4rem, 3vw, 1.85rem);
  line-height: 1.2;
  margin: 0 0 var(--space-4);
}

.prose { max-width: var(--prose); }
.prose p { margin: 0 0 var(--space-4); }
.prose p:last-child { margin-bottom: 0; }
.prose h2 { margin-top: var(--space-6); }
.prose h2:first-child { margin-top: 0; }
.prose h2 + p { margin-top: 0; }
.prose ul {
  margin: 0 0 var(--space-4);
  padding-left: 1.15rem;
}
.prose li { margin: 0.35rem 0; }

.page-head {
  padding: clamp(1.75rem, 5vw, 3rem) 0 0.25rem;
}
.page-head .lede { margin-bottom: 0; }

.note {
  color: var(--muted);
  max-width: var(--prose);
}

.list-plain {
  margin: var(--space-3) 0 0;
  padding-left: 1.15rem;
}
.list-plain li { margin: 0.4rem 0; }

.never-list {
  display: grid;
  gap: var(--space-2) var(--space-6);
  margin: var(--space-5) 0 0;
  padding: 0;
  list-style: none;
}
.never-list li {
  padding: var(--space-3) 0;
  border-top: 1px solid var(--line);
  font-size: 1rem;
}
@media (min-width: 800px) {
  .never-list {
    grid-template-columns: 1fr 1fr;
  }
}

.split {
  display: grid;
  gap: var(--space-6);
}
@media (min-width: 800px) {
  .split { grid-template-columns: 1fr 1fr; gap: var(--space-8); }
}

.caution {
  border-left: 4px solid var(--oxblood);
  background: linear-gradient(165deg, #ffffff 0%, #f3f5f7 100%);
  padding: var(--space-5);
  box-shadow:
    inset 0 1px 0 #ffffff,
    5px 12px 24px -12px rgba(var(--shadow-cool), 0.14),
    1px 2px 4px rgba(var(--shadow-cool), 0.05);
}
.caution h2 {
  font-size: 1.15rem;
  margin: 0 0 var(--space-3);
}
.caution p { margin: 0 0 var(--space-3); color: var(--ink); }
.caution p:last-child { margin-bottom: 0; }

/* Process steps — recomposes: stack on small, 3-col on large */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  padding-left: var(--space-4);
  position: relative;
  --steps-progress: 1;
}
.steps::before,
.steps::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0.2rem;
  width: 1px;
  pointer-events: none;
}
.steps::before {
  bottom: 0.2rem;
  background: var(--line);
}
.steps::after {
  height: calc((100% - 0.4rem) * var(--steps-progress, 1));
  background: var(--oxblood);
  transform-origin: top;
}
.js-motion .steps {
  --steps-progress: 0;
}

.step {
  display: grid;
  gap: var(--space-2);
  padding: var(--space-5) 0;
  border-top: 1px solid var(--line);
}
.step:first-child { border-top: 0; padding-top: 0; }

.step-num {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--oxblood);
  letter-spacing: 0.04em;
  position: relative;
  z-index: 1;
}

.step h2 {
  font-size: 1.25rem;
  margin: 0;
}

.step p {
  margin: 0;
  color: var(--muted);
  max-width: 42rem;
}

@media (min-width: 800px) {
  .steps {
    padding-left: 0;
  }
  .steps::before,
  .steps::after {
    left: 0.85rem;
    top: 1.2rem;
  }
  .steps::before { bottom: 1.2rem; }
  .steps::after { height: calc((100% - 2.4rem) * var(--steps-progress, 1)); }
  .step {
    grid-template-columns: 3.5rem 11rem 1fr;
    gap: var(--space-5);
    align-items: start;
    padding: var(--space-5) 0;
  }
  .step:first-child { padding-top: var(--space-5); border-top: 1px solid var(--line); }
  .step-num {
    display: inline-block;
    background: var(--canvas);
    box-shadow: 0 0 0 7px var(--canvas);
  }
}

/* Form */
form {
  display: grid;
  gap: var(--space-5);
  max-width: 34rem;
}

.field {
  display: grid;
  gap: var(--space-2);
}

.field label {
  font-weight: 600;
  font-size: 0.95rem;
}

.optional {
  font-weight: 400;
  color: var(--muted);
}

.help {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--muted);
}

.field-error {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--oxblood);
}
.field-error:empty { display: none; }

input, textarea {
  font: inherit;
  font-weight: 400;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.65rem 0.75rem;
  width: 100%;
  min-height: 44px;
  box-shadow:
    inset 1px 2px 3px rgba(var(--shadow-cool), 0.07),
    inset 0 1px 0 rgba(var(--shadow-cool), 0.04);
}

textarea { min-height: 8rem; resize: vertical; }

input:hover, textarea:hover { border-color: var(--muted); }

input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-color: var(--oxblood);
  box-shadow: inset 1px 1px 2px rgba(var(--shadow-cool), 0.05);
}

input[aria-invalid="true"],
textarea[aria-invalid="true"] {
  border-color: var(--oxblood);
  background: var(--error-bg);
}

.error-summary {
  border-left: 4px solid var(--oxblood);
  background: var(--error-bg);
  padding: var(--space-4) var(--space-5);
}
.error-summary h2 {
  font-size: 1.05rem;
  margin: 0 0 var(--space-3);
}
.error-summary ul {
  margin: 0;
  padding-left: 1.15rem;
}
.error-summary[hidden],
.form-status[hidden] { display: none; }

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-4);
  align-items: center;
}

.form-status {
  margin: 0;
  border-left: 4px solid var(--ink);
  background: var(--surface);
  padding: var(--space-4) var(--space-5);
  font-weight: 500;
}

.mailto-fallback {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0;
}

.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

form { position: relative; }

/* Footer */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding: var(--space-5) 0 var(--space-6);
  color: var(--muted);
  font-size: 0.95rem;
  background: transparent;
}

.site-footer .wrap {
  display: grid;
  gap: var(--space-3);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-5);
}

.footer-nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  background-image: linear-gradient(currentColor, currentColor);
  background-position: 0 100%;
  background-repeat: no-repeat;
  background-size: 0 1px;
  transition: color var(--t), background-size var(--motion-ui) var(--ease-out);
}
.footer-nav a:hover {
  text-decoration: none;
  color: var(--oxblood);
  background-size: 100% 1px;
}

.legal {
  margin: 0;
  font-size: 0.875rem;
  max-width: 42rem;
}

.mt-l { margin-top: var(--space-6); }
.mt-s { margin-top: var(--space-4); }

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-4);
  margin-top: var(--space-5);
}

/* ---------- Motion: instrument, not generic fade-up ---------- */

@keyframes enter-soft {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes tariff-tick {
  from {
    opacity: 0;
    transform: translateX(-6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes tariff-cap {
  from {
    opacity: 0;
    transform: translateX(-6px);
  }
  72% {
    opacity: 1;
    transform: none;
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes spine-fill {
  from { transform: scaleY(0); }
  to { transform: scaleY(1); }
}

.js-motion [data-reveal="hero"] .kicker,
.js-motion [data-reveal="hero"] h1 {
  opacity: 0;
}
.js-motion [data-reveal="hero"].is-in-view .kicker {
  animation: enter-soft 360ms var(--ease-out) forwards;
}
.js-motion [data-reveal="hero"].is-in-view h1 {
  animation: enter-soft 420ms var(--ease-out) 70ms forwards;
}

.js-motion .tariff tbody tr th,
.js-motion .tariff tbody tr td,
.js-motion .tariff tfoot tr th,
.js-motion .tariff tfoot tr td {
  opacity: 0;
}

.js-motion .tariff-wrap.is-in-view tbody tr:nth-child(1) th,
.js-motion .tariff-wrap.is-in-view tbody tr:nth-child(1) td {
  animation: tariff-tick 380ms var(--ease-out) 80ms forwards;
}
.js-motion .tariff-wrap.is-in-view tbody tr:nth-child(2) th,
.js-motion .tariff-wrap.is-in-view tbody tr:nth-child(2) td {
  animation: tariff-tick 380ms var(--ease-out) 140ms forwards;
}
.js-motion .tariff-wrap.is-in-view tbody tr:nth-child(3) th,
.js-motion .tariff-wrap.is-in-view tbody tr:nth-child(3) td {
  animation: tariff-tick 380ms var(--ease-out) 200ms forwards;
}
.js-motion .tariff-wrap.is-in-view tbody tr:nth-child(4) th,
.js-motion .tariff-wrap.is-in-view tbody tr:nth-child(4) td {
  animation: tariff-tick 380ms var(--ease-out) 260ms forwards;
}
.js-motion .tariff-wrap.is-in-view tbody tr:nth-child(5) th,
.js-motion .tariff-wrap.is-in-view tbody tr:nth-child(5) td {
  animation: tariff-tick 380ms var(--ease-out) 320ms forwards;
}
.js-motion .tariff-wrap.is-in-view tfoot tr th,
.js-motion .tariff-wrap.is-in-view tfoot tr td {
  animation: tariff-cap 560ms var(--ease-out) 420ms forwards;
}

.js-motion .step-num {
  opacity: 0;
}
.js-motion .step.is-in-view .step-num {
  opacity: 1;
  transition: opacity 180ms var(--ease-out);
}

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .js-motion .tariff-spine-fill {
      animation: spine-fill linear both;
      animation-timeline: view();
      animation-range: cover 0% cover 90%;
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  .field-gauge,
  .field-rail {
    transform: none !important;
  }
  .instrument-field {
    --field-tilt: 0deg !important;
    --rail-shift: 0px !important;
  }
  .tariff-spine-draw,
  .tariff-spine-fill {
    transform: none !important;
  }
  .tariff-spine-fill {
    display: none !important;
  }
  .tariff th,
  .tariff td,
  [data-reveal="hero"] .kicker,
  [data-reveal="hero"] h1,
  .step-num {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }
  .steps {
    --steps-progress: 1 !important;
  }
  .js-motion .tariff-wrap:not(.is-in-view) .tariff-spine-draw,
  .js-motion .tariff-wrap.is-in-view .tariff-spine-draw {
    transform: scaleY(1) !important;
    transition: none !important;
  }
}
