/* Turnload — smoke test site
   Tokens live in tokens.css (copied from design-reference/turnload/tokens.css).
   Rules and component specs: design-reference/turnload/DESIGN.md */

/* ---------- base ---------- */
/* Lenis smooth scroll (vendor/lenis.min.js), from lenis/dist/lenis.css */
html.lenis, html.lenis body { height: auto; }
.lenis:not(.lenis-autoToggle).lenis-stopped { overflow: clip; }
.lenis [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-smooth iframe { pointer-events: none; }

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

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 96px; }

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

img, video { display: block; max-width: 100%; }
[hidden] { display: none !important; }
h1, h2, h3, p, figure, blockquote, ol { margin: 0; }
ol { padding: 0; list-style: none; }
button, input, select { font: inherit; color: inherit; }
p { text-wrap: pretty; }

a { color: inherit; text-decoration: underline; text-decoration-thickness: 1px;
    text-decoration-color: var(--ink-50); text-underline-offset: 3px;
    transition: text-decoration-color var(--t-color) var(--ease); }
@media (hover: hover) { a:hover { text-decoration-color: var(--accent); text-decoration-thickness: 2px; } }

.wrap { width: 100%; max-width: calc(var(--maxw) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }

.skip { position: absolute; left: 16px; top: -60px; z-index: 200; padding: 10px 16px; background: var(--ink);
        color: #fff; border-radius: var(--radius); font-size: var(--fs-label); text-decoration: none; }
.skip:focus { top: 16px; }

.eyebrow { font-size: var(--fs-caption); font-weight: 500; letter-spacing: .01em; line-height: 1.4; color: var(--ink-64); }

/* ---------- buttons and text links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 24px;
  font-size: 16px; font-weight: 500; line-height: 1; letter-spacing: .005em; white-space: nowrap;
  color: #fff; background: var(--accent);
  border: 0; border-radius: var(--radius); cursor: pointer; text-decoration: none;
  transition: background-color var(--t-color) var(--ease), transform var(--t-move) var(--ease),
              opacity var(--t-border) var(--ease);
}
@media (hover: hover) { .btn:hover { background: var(--accent-hover); text-decoration: none; } }
.btn:active { transform: scale(.98); }
.btn[aria-busy="true"] { cursor: progress; }
.btn[aria-busy="true"]::before {
  content: ""; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.btn-sm { height: 40px; padding: 0 16px; font-size: var(--fs-label); }
.btn-block { width: 100%; }

.text-link {
  display: inline-flex; align-items: baseline; gap: 8px;
  padding: 0; background: none; border: 0; cursor: pointer;
  font-weight: 500; color: var(--ink); text-decoration: none;
}
.text-link .tl { text-decoration: underline; text-decoration-color: var(--accent);
                 text-decoration-thickness: 2px; text-underline-offset: 5px; }
.text-link .arrow { display: inline-block; transition: transform var(--t-move) var(--ease); }
@media (hover: hover) { .text-link:hover .arrow { transform: translateX(3px); } }

/* ---------- navigation: floating box (DESIGN.md §2.5) ---------- */
.nav {
  position: fixed; top: 16px; left: 0; right: 0; z-index: 50;
  display: flex; justify-content: center; padding: 0 16px; pointer-events: none;
}
.nav-box {
  pointer-events: auto; position: relative;
  max-width: 100%; height: 60px;
  display: flex; align-items: center; justify-content: space-between; gap: 72px;
  padding: 0 8px 0 24px;
  background: var(--paper); border: var(--line); border-radius: var(--radius);
}
.wordmark { font-size: 22px; font-weight: 600; letter-spacing: -.02em; line-height: 1; color: var(--ink); text-decoration: none; }
.nav-cta { height: 44px; padding: 0 22px; font-size: var(--fs-body-sm); }
/* After the calculator has been used, the nav CTA draws the eye once. */
.nav-cta.is-nudged { animation: nudge 1.6s var(--ease) 2; }
@keyframes nudge {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 45%, transparent); }
  70%, 100% { box-shadow: 0 0 0 10px color-mix(in srgb, var(--accent) 0%, transparent); }
}
.nav-progress { position: absolute; left: -1px; right: -1px; bottom: -1px; height: 2px; overflow: hidden; }
.nav-progress span { display: block; height: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); }

@media (max-width: 639px) {
  .nav { top: 10px; padding: 0 10px; }
  .nav-box { height: 52px; padding: 0 6px 0 16px; gap: 32px; }
  .nav-cta { height: 40px; padding: 0 16px; }
}

/* ---------- scene: hero + how it works ----------
   Base layout (no JS, small screens, reduced motion): hero, then a plain list of
   steps. html.scene-on (set in main.js) turns both into one pinned stage. */
.scene { position: relative; }
.scene-stage { position: relative; }

.hero {
  position: relative; z-index: 4;
  min-height: 100svh; display: flex; align-items: flex-start;
  padding-top: clamp(120px, 20vh, 200px); padding-bottom: 64px;
  color: #fff;
  /* Words slide in from 24px to the right; clip so the intro never widens the page. */
  overflow-x: clip;
}
.hero-h {
  max-width: 15ch;
  font-size: clamp(42px, 6.4vw, 88px); font-weight: 500; line-height: 1; letter-spacing: var(--track-display-xl);
  text-wrap: balance;
}
.hero-lead {
  max-width: 44ch; margin-top: 32px;
  font-size: var(--fs-lead); line-height: 1.5; letter-spacing: -.01em; color: rgba(255,255,255,.86);
}

/* "AI-generated" label on the hero film, bottom right, as on fleetward.io. */
.media-note {
  position: absolute; right: 10px; bottom: 10px; z-index: 1; pointer-events: none;
  padding: 1px 6px; border: 1px solid rgba(255,255,255,.2); border-radius: var(--radius);
  background: rgba(23,23,26,.6); color: rgba(255,255,255,.9);
  font-size: 10px; font-weight: 500; line-height: 1.5; letter-spacing: .05em; text-transform: uppercase;
}

.scene-media {
  position: absolute; z-index: 1; top: 0; left: 0; width: 100%; height: 100svh;
  overflow: hidden; background: var(--ink); border-radius: 0;
}
.scene-media-inner { position: absolute; inset: 0; transform-origin: 50% 50%; }
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scene-cards, .media-layer { display: none; }
.media-dim { position: absolute; inset: 0; background: #000; opacity: 0; pointer-events: none; }
.media-shade {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(14,14,18,.62) 0%, rgba(14,14,18,.28) 55%, rgba(14,14,18,.08) 100%),
    linear-gradient(0deg, rgba(14,14,18,.25), rgba(14,14,18,0) 40%);
}

.solution { position: relative; z-index: 3; padding: var(--section-y) 0; }
.solution-slot { display: none; }
.solution-copy { max-width: 720px; }
.solution-h {
  margin-top: 16px; max-width: 18ch;
  font-size: var(--fs-display-l); font-weight: 500; line-height: 1.05; letter-spacing: var(--track-display-l);
  text-wrap: balance;
}
.solution-lead { margin-top: 24px; max-width: 48ch; font-size: var(--fs-lead); line-height: 1.5; color: var(--ink-72); }

.steps { margin-top: 48px; display: grid; gap: 40px; }
.step-fig { margin-bottom: 20px; aspect-ratio: 3 / 2; overflow: hidden; border-radius: var(--radius); background: var(--cream); }
.step-fig img { width: 100%; height: 100%; object-fit: cover; }
.step-h { font-size: var(--fs-display-m); font-weight: 500; line-height: 1.1; letter-spacing: var(--track-display-m); }
.step-btn { padding: 0; background: none; border: 0; text-align: left; cursor: default; letter-spacing: inherit; }
.step-body p { margin-top: 12px; max-width: 46ch; font-size: var(--fs-body); color: var(--ink-72); }

@media (min-width: 768px) and (max-width: 1023px) {
  .steps { grid-template-columns: 1fr 1fr; gap: 48px 24px; }
}

/* pinned stage (desktop, JS, motion allowed) */
.scene-on .scene { height: 560vh; }
.scene-on .scene-stage { position: sticky; top: 0; height: 100vh; overflow: hidden; }
.scene-on .hero {
  position: absolute; inset: 0; min-height: 0; pointer-events: none;
  /* As on Waabi: at rest only the headline, low on the screen. The second line
     takes its place at the bottom once you scroll (main.js). */
  align-items: flex-end; padding-top: 0; padding-bottom: calc(clamp(64px, 10vh, 96px) + 7.5em);
}
.scene-on .hero-lead {
  position: absolute; left: max(var(--gutter), calc((100% - var(--maxw)) / 2)); bottom: clamp(64px, 10vh, 96px);
  max-width: 24ch; margin: 0;
  font-size: clamp(26px, 2.7vw, 40px); font-weight: 500; line-height: 1.15; letter-spacing: -.025em; color: #fff;
  text-wrap: balance;
}
.scene-on .scene-media { height: 100%; will-change: clip-path; }
.scene-on .scene-media-inner { will-change: transform; }
.scene-on .scene-cards { display: block; position: absolute; z-index: 2; pointer-events: none; }
.scene-on .media-layer {
  display: block; position: absolute; inset: 0; overflow: hidden; border-radius: var(--radius);
  background: var(--ink); will-change: transform;
}
.scene-on .media-layer img { width: 100%; height: 100%; object-fit: cover; }
.scene-on .layer-dim { position: absolute; inset: 0; background: rgba(0, 0, 0, .5); opacity: 0; pointer-events: none; }

.scene-on .solution { position: absolute; inset: 0; padding: 0; display: flex; align-items: center; pointer-events: none; }
.scene-on .solution-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(48px, 7vw, 120px);
  align-items: center; height: 100vh; padding-top: 72px;
}
.scene-on .solution-slot { display: block; width: min(100%, calc(100vh - 200px)); aspect-ratio: 1; justify-self: end; }
/* The column starts level with the card (offset set in main.js) and then moves
   with the scroll, as on Waabi: the heading leaves, the step list glides to the middle. */
.scene-on .solution-copy { pointer-events: auto; align-self: start; position: relative; }
.scene-on .solution-head, .scene-on .steps { will-change: transform; }
.scene-on .solution-h { font-size: min(var(--fs-display-l), 6.2vh); }
.scene-on .solution-lead { margin-top: 20px; font-size: min(var(--fs-lead), 2.4vh); }
.scene-on .steps { margin-top: min(64px, 7vh); gap: min(14px, 1.6vh); }
.scene-on .step-fig { display: none; }
.scene-on .step-h { font-size: min(var(--fs-display-m), 4.8vh); }
.scene-on .step-btn {
  cursor: pointer; color: var(--ink-50);
  transition: color 800ms var(--ease);
}
@media (hover: hover) { .scene-on .step-btn:hover { color: var(--ink-72); } }
.scene-on .step.is-active .step-btn { color: var(--ink); }
/* The active step's description opens under its title. */
.scene-on .step-body {
  display: grid; grid-template-rows: 0fr; opacity: 0;
  transition: grid-template-rows 900ms var(--ease), opacity 500ms var(--ease);
}
.scene-on .step-body > p { overflow: hidden; min-height: 0; margin-top: 0; padding-top: 10px; }
.scene-on .step.is-active .step-body {
  grid-template-rows: 1fr; opacity: 1;
  transition: grid-template-rows 900ms var(--ease), opacity 900ms var(--ease) 250ms;
}

/* ---------- pillars ---------- */
/* The pillars slide in from the right; clip them so the offset start never widens the page. */
.pillars-band { padding: var(--section-y) 0; overflow-x: clip; }
.pillars { display: grid; gap: 32px; }
.pillar { padding-top: 24px; border-top: var(--line); }
.pillar h3 { font-size: var(--fs-heading); font-weight: 600; line-height: 1.25; letter-spacing: var(--track-heading); }
.pillar p { margin-top: 12px; max-width: 36ch; font-size: var(--fs-body-sm); line-height: 1.55; color: var(--ink-72); }
@media (min-width: 768px) { .pillars { grid-template-columns: repeat(3, 1fr); gap: 24px; } }

/* ---------- quote ---------- */
/* ---------- backed by ---------- */
/* One quiet row: label left, greyed logo marquee right (full colour on hover). The list is
   rendered twice and the row slides by exactly one copy, so the loop has no visible jump. */
.backed-band { padding: 0 0 var(--section-y); }
.backed { display: flex; flex-direction: column; gap: 24px; }
.backed-h { flex-shrink: 0; font-size: var(--fs-label); font-weight: 500; line-height: 1.4; color: var(--ink-64); }
.backed-track {
  min-width: 0; flex: 1; overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.backed-row { display: flex; width: max-content; animation: backed-scroll 45s linear infinite; }
.backed-list { display: flex; align-items: center; margin: 0; padding: 0; list-style: none; }
.backed-list li { padding-right: 56px; }
.backed-list img {
  width: auto; max-width: 140px; object-fit: contain;
  opacity: .55; filter: grayscale(1);
  transition: filter var(--t-move) var(--ease), opacity var(--t-move) var(--ease);
}
.backed-list img:hover { opacity: 1; filter: none; }
@keyframes backed-scroll { to { transform: translateX(-50%); } }
@media (min-width: 768px) {
  .backed { flex-direction: row; align-items: center; gap: 40px; }
  .backed-h { width: 200px; }
}
@media (prefers-reduced-motion: reduce) {
  .backed-row { animation: none; width: auto; }
  .backed-track { mask-image: none; }
  .backed-list { flex-wrap: wrap; row-gap: 24px; }
  .backed-list[aria-hidden] { display: none; }
}

.quote-band { padding: clamp(48px, 6vw, 88px) 0; background: var(--cream); }
.quote blockquote p {
  font-size: clamp(24px, 3vw, 44px); font-weight: 500; line-height: 1.1; letter-spacing: -.035em;
  text-indent: -.42em; text-wrap: balance;
}
.quote figcaption { margin-top: 32px; padding-top: 20px; border-top: var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 24px; }
.quote-name { font-size: var(--fs-label); font-weight: 600; letter-spacing: .01em; }
.quote-role { font-size: var(--fs-caption); line-height: 1.45; color: var(--ink-64); }

/* ---------- calculator on the road image ---------- */
.calc-band { position: relative; overflow: hidden; padding: var(--section-y) 0; background: var(--ink); color: #fff; }
.calc-bg { position: absolute; inset: 0; background: var(--ink); }
.calc-bg img { position: absolute; top: 0; left: -8%; width: 116%; max-width: none; height: 100%; object-fit: cover; will-change: transform; }
.calc-bg::after {
  content: ""; position: absolute; inset: 0;
  /* Bottom: the photo dissolves into the ink of the footer below. */
  background:
    linear-gradient(180deg, rgba(23,23,26,0) 50%, rgba(23,23,26,.75) 80%, var(--ink) 100%),
    linear-gradient(90deg, rgba(17,17,20,.78) 0%, rgba(17,17,20,.5) 48%, rgba(17,17,20,.2) 100%);
}
.calc-grid { position: relative; display: grid; gap: 40px; }
.calc-band .eyebrow { color: rgba(255,255,255,.72); }
.calc-h {
  margin-top: 16px; max-width: 16ch;
  font-size: var(--fs-display-l); font-weight: 500; line-height: 1.05; letter-spacing: var(--track-display-l); text-wrap: balance;
}
.calc-lead { margin-top: 24px; max-width: 44ch; font-size: var(--fs-lead); line-height: 1.5; color: rgba(255,255,255,.86); }

.calc-panel {
  align-self: start;
  padding: 32px; background: var(--paper); color: var(--ink); border-radius: var(--radius);
  display: grid; gap: 24px;
}
.slider-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 12px; }
.slider-head label { font-size: var(--fs-label); font-weight: 500; letter-spacing: .01em; }
.slider-head output { font-size: var(--fs-label); font-weight: 500; font-variant-numeric: tabular-nums; }

input[type="range"] {
  --fill: 50%;
  -webkit-appearance: none; appearance: none; width: 100%; height: 24px; margin: 0; background: transparent; cursor: pointer;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 4px; border-radius: 2px;
  background: linear-gradient(90deg, var(--accent) var(--fill), var(--ink-15) var(--fill));
}
input[type="range"]::-moz-range-track { height: 4px; border-radius: 2px; background: var(--ink-15); }
input[type="range"]::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--accent); }
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 20px; height: 20px; margin-top: -8px;
  border-radius: 50%; background: #fff; border: 2px solid var(--accent);
  transition: transform var(--t-move) var(--ease);
}
input[type="range"]::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 2px solid var(--accent); }
input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.15); }
input[type="range"]:focus-visible { outline: none; }
input[type="range"]:focus-visible::-webkit-slider-thumb { outline: 2px solid var(--ink); outline-offset: 2px; }
input[type="range"]:focus-visible::-moz-range-thumb { outline: 2px solid var(--ink); outline-offset: 2px; }

.calc-result { display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: end; padding-top: 24px; border-top: var(--line); }
.calc-metric { display: flex; flex-direction: column; gap: 6px; }
.calc-metric + .calc-metric { text-align: right; }
.calc-label { font-size: var(--fs-caption); font-weight: 500; letter-spacing: .01em; color: var(--ink-64); }
.calc-small { font-size: var(--fs-heading); font-weight: 600; letter-spacing: var(--track-heading); font-variant-numeric: tabular-nums; }
.calc-stat { font-size: var(--fs-stat); font-weight: 500; line-height: 1; letter-spacing: -.03em; color: var(--accent); font-variant-numeric: tabular-nums; }
.calc-foot { font-size: var(--fs-caption); line-height: 1.45; color: var(--ink-64); }
.calc-cta-q { padding-top: 20px; border-top: var(--line); font-size: var(--fs-body-sm); line-height: 1.55; color: var(--ink-72); }
.calc-cta-q.is-in { animation: rise 600ms var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

@media (min-width: 1024px) {
  /* Full screen: the photo gets its room, and when the calculator grows (the
     follow-up line) the band absorbs it instead of pushing the waitlist down. */
  .calc-band { min-height: max(760px, 100vh); display: flex; align-items: center; }
  .calc-grid { grid-template-columns: 7fr 5fr; gap: 24px 64px; align-items: start; }
  .calc-panel { padding: 36px; }
}
@media (max-width: 639px) {
  .calc-panel { padding: 24px 20px; }
  .calc-result { grid-template-columns: 1fr; }
  .calc-metric + .calc-metric { text-align: left; }
}

/* ---------- footer + waitlist (ink, ultramarine glow) ---------- */
/* Calc band's bottom padding plus this top padding: one step more than the section rhythm,
   matching the gap from the waitlist down to the footer columns. */
/* margin-top -1px: overlaps the calc band so its cream background can't show as a hairline seam. */
.footer { position: relative; overflow: hidden; margin-top: -1px; padding-top: var(--s-8); --error-on: #ff9e94; }
/* The blue sits low, behind the footer links; only its edge reaches the CTA. */
.footer-glow {
  position: absolute; left: 50%; bottom: -35%; width: min(90vw, 1200px); height: 60%;
  transform: translateX(-50%); background: var(--accent); border-radius: var(--radius);
  filter: blur(140px); opacity: .38; pointer-events: none;
}
.footer > .wrap { position: relative; }

/* A step more than the section rhythm, so the waitlist reads as its own block. */
.footer-cta { display: grid; gap: 40px; padding-bottom: calc(var(--section-y) + var(--s-8)); }
.footer-h {
  max-width: 15ch;
  font-size: var(--fs-display-m); font-weight: 500; line-height: 1.08; letter-spacing: var(--track-display-m); text-wrap: balance;
}
.footer-lead { margin-top: 16px; max-width: 40ch; font-size: var(--fs-body); line-height: 1.5; color: var(--ink-72); }
.footer-calc { margin-top: 16px; max-width: 40ch; font-size: var(--fs-body); line-height: 1.5; color: var(--ink-72); }
.footer-calc strong { font-weight: 600; color: #fff; font-variant-numeric: tabular-nums; }
.footer-cta .signup { gap: 14px; }
.footer-form-row { display: grid; gap: 12px; }
.footer-form-row .btn { justify-self: stretch; }
@media (min-width: 640px) { .footer-form-row { grid-template-columns: 1.6fr 1fr auto; align-items: end; } }
@media (min-width: 1024px) { .footer-cta { grid-template-columns: 5fr 7fr; gap: 64px; align-items: end; } }

.footer-cols { display: grid; gap: 40px; }
.footer-cols .wordmark { display: inline-block; margin-bottom: 20px; font-size: 28px; color: #fff; }
.footer-tag { max-width: 24ch; font-size: var(--fs-heading); font-weight: 500; line-height: 1.3; letter-spacing: var(--track-heading); }
.footer-mail { margin-top: 16px; font-size: var(--fs-body-sm); line-height: 1.6; color: var(--ink-72); }
.footer-mail a { color: #fff; text-underline-offset: 4px; text-decoration-color: var(--accent-on-dark); }
.footer-nav-h { font-size: var(--fs-caption); font-weight: 500; letter-spacing: .01em; color: var(--ink-64); }
.footer-links { margin-top: 16px; display: grid; gap: 6px; }
.footer-links a { font-size: var(--fs-heading); font-weight: 500; letter-spacing: var(--track-heading); line-height: 1.3;
                  text-decoration: none; text-underline-offset: 4px; color: #fff; width: fit-content; }
@media (hover: hover) { .footer-links a:hover { text-decoration: underline; text-decoration-color: var(--accent-on-dark); text-decoration-thickness: 2px; } }
@media (min-width: 768px) { .footer-cols { grid-template-columns: 1fr 1fr; } .footer-nav { justify-self: end; min-width: 220px; } }

/* The one divider: --line resolves to dark ink, so on ink it needs the on-dark value. */
.footer-base { margin-top: var(--s-16); padding: 20px 0 28px; border-top: 1px solid var(--ink-15);
               display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 24px;
               font-size: var(--fs-caption); color: var(--ink-64); }
.footer-base-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; }
.footer-base-links a:not(.lang-link) { color: var(--ink-72); text-decoration: none; text-underline-offset: 4px;
                                       transition: color var(--t-move) var(--ease); }
@media (hover: hover) {
  .footer-base-links a:not(.lang-link):hover { color: #fff; text-decoration: underline; text-decoration-color: var(--accent-on-dark); text-decoration-thickness: 2px; }
}

/* legal pages: the simple footer keeps the meta row */
.footer-meta { padding-top: 20px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px;
               font-size: var(--fs-caption); color: var(--ink-64); }

/* ---------- forms (DESIGN.md §2.3) ---------- */
.signup { display: grid; gap: 20px; }
.field-row { display: grid; gap: 16px; }
@media (min-width: 640px) { .field-row { grid-template-columns: 1.5fr 1fr; } }
.field { display: grid; gap: 8px; }
.field label { font-size: var(--fs-label); font-weight: 500; letter-spacing: .01em; }
.field input, .field select {
  width: 100%; height: 48px; padding: 0 14px;
  font-size: 16px; color: var(--ink); background: var(--paper);
  border: var(--line-control); border-radius: var(--radius);
  transition: border-color var(--t-border) var(--ease);
}
.field select {
  -webkit-appearance: none; appearance: none; padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%2317171a' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 16px;
}
.field input::placeholder { color: color-mix(in srgb, var(--ink) 50%, transparent); }
@media (hover: hover) { .field input:hover, .field select:hover { border-color: var(--ink-72); } }
.field input:focus-visible, .field select:focus-visible { border-color: var(--ink); }
.field input[aria-invalid="true"], .field select[aria-invalid="true"] { border: 1.5px solid var(--error); }
.on-dark .field input, .on-dark .field select { border-color: transparent; }
.on-dark .field input[aria-invalid="true"], .on-dark .field select[aria-invalid="true"] { border: 1.5px solid var(--error-on); }
/* Honeypot: hidden from people and screen readers, still filled in by naive bots. */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-msg:empty { display: none; }
.form-msg { display: flex; gap: 8px; align-items: flex-start; font-size: var(--fs-body-sm); font-weight: 500; line-height: 1.45; }
.form-msg.err { color: var(--error); }
.on-dark .form-msg.err { color: var(--error-on); }
.form-msg.err::before {
  content: ""; flex: none; width: 16px; height: 16px; margin-top: 2px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='7' fill='none' stroke='black' stroke-width='1.5'/%3E%3Cpath d='M8 7v4.5M8 4.5v.1' stroke='black' stroke-width='1.7' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='7' fill='none' stroke='black' stroke-width='1.5'/%3E%3Cpath d='M8 7v4.5M8 4.5v.1' stroke='black' stroke-width='1.7' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.signup .btn { justify-self: start; }
.signup .btn-block { justify-self: stretch; }
.signup-note { font-size: var(--fs-caption); line-height: 1.45; color: var(--ink-64); max-width: 60ch; }
@media (max-width: 639px) { .signup .btn { justify-self: stretch; } }

/* success state, replaces the form in place (§2.7) */
.success { display: grid; gap: 8px; justify-items: start; }
.success-mark { display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 8px;
                border-radius: 50%; background: var(--success-soft); }
.success-mark svg { width: 22px; height: 22px; fill: none; stroke: var(--success); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.on-dark .success-mark { background: rgba(123, 211, 164, .16); }
.on-dark .success-mark svg { stroke: #7bd3a4; }
.success-h { font-size: var(--fs-heading); font-weight: 600; line-height: 1.25; letter-spacing: var(--track-heading); }
.success-p { font-size: var(--fs-body-sm); color: var(--ink-72); }
.success-offer { margin-top: 16px; display: grid; gap: 16px; font-size: var(--fs-body-sm); color: var(--ink-72); max-width: 46ch; justify-items: start; }
.on-dark .text-link { color: #fff; }
.on-dark .text-link .tl { text-decoration-color: var(--accent-on-dark); }

/* ---------- modal (§2.8) ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; }
.modal[hidden] { display: none; }
.modal-backdrop {
  position: absolute; inset: 0; background: color-mix(in srgb, var(--ink) 42%, transparent);
  -webkit-backdrop-filter: blur(0px); backdrop-filter: blur(0px); opacity: 0;
  transition: opacity 500ms var(--ease), backdrop-filter 700ms var(--ease), -webkit-backdrop-filter 700ms var(--ease);
}
.modal-panel {
  position: relative; width: 100%; max-width: 480px; max-height: 90vh; overflow: auto;
  padding: 32px; background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow-float);
  opacity: 0; transform: translateY(32px) scale(.98);
  transition: opacity 500ms var(--ease), transform 800ms var(--ease);
}
.modal-panel > * { opacity: 0; transform: translateY(8px); transition: opacity 500ms var(--ease) 120ms, transform 700ms var(--ease) 120ms; }
.modal.is-open .modal-backdrop { opacity: 1; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.modal.is-open .modal-panel { opacity: 1; transform: none; }
.modal.is-open .modal-panel > * { opacity: 1; transform: none; }
.modal.is-closing .modal-backdrop, .modal.is-closing .modal-panel, .modal.is-closing .modal-panel > * { transition-duration: 300ms; transition-delay: 0ms; }
.modal-close {
  position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; display: grid; place-items: center;
  background: none; border: 0; border-radius: var(--radius); cursor: pointer; transition: background-color var(--t-color) var(--ease);
}
@media (hover: hover) { .modal-close:hover { background: var(--ink-6); } }
.modal-close svg { width: 16px; height: 16px; stroke: var(--ink); stroke-width: 1.6; }
.modal-h { font-size: var(--fs-heading); font-weight: 600; line-height: 1.25; letter-spacing: var(--track-heading); padding-right: 40px; }
.modal-sub { margin-top: 8px; margin-bottom: 24px; font-size: var(--fs-body-sm); color: var(--ink-72); }
.modal .signup { gap: 16px; }
body.modal-open { overflow: hidden; }
@media (max-width: 639px) {
  .modal { place-items: end stretch; padding: 0; }
  .modal-panel { max-width: none; padding: 24px 20px 28px; border-radius: var(--radius) var(--radius) 0 0; transform: translateY(100%); }
}

/* ---------- legal page ---------- */
.legal { padding: 160px 0 var(--section-y); }
.legal-wrap { max-width: calc(760px + 2 * var(--gutter)); }
.legal-h1 { margin-top: 16px; font-size: var(--fs-display-l); font-weight: 500; line-height: 1.05; letter-spacing: var(--track-display-l); }
.legal-meta { margin-top: 12px; font-size: var(--fs-caption); color: var(--ink-64); }
.legal-intro { margin-top: 32px; font-size: var(--fs-lead); line-height: 1.5; color: var(--ink-72); }
.legal-flag { margin-top: 32px; padding: 12px 16px; background: var(--accent-soft); border-radius: var(--radius); font-size: var(--fs-body-sm); }
.legal h2 { margin-top: 48px; font-size: var(--fs-heading); font-weight: 600; line-height: 1.25; letter-spacing: var(--track-heading); }
.legal p, .legal ul { margin-top: 16px; max-width: var(--measure); }
.legal ul { padding-left: 20px; }
.legal li + li { margin-top: 8px; }
.legal code { font-family: inherit; padding: 1px 4px; background: var(--ink-6); border-radius: var(--radius); }
.legal-table { width: 100%; margin-top: 16px; border-collapse: collapse; font-size: var(--fs-body-sm); }
.legal-table th, .legal-table td { padding: 12px 12px 12px 0; text-align: left; vertical-align: top; border-bottom: var(--line); }
.legal-table th { font-weight: 600; }
@media (max-width: 639px) {
  /* Stacked rows: three columns do not fit a phone. Labels come from data-label. */
  .legal-table, .legal-table tbody, .legal-table tr, .legal-table td { display: block; }
  .legal-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .legal-table tr { padding: 12px 0; border-bottom: var(--line); }
  .legal-table td { padding: 4px 0; border: 0; overflow-wrap: anywhere; }
  .legal-table td::before { content: attr(data-label); display: block; font-size: var(--fs-caption); font-weight: 600; color: var(--ink-64); }
}
.legal-back { margin-top: 64px; }
.footer-meta-end { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; }
/* Language link in the footer base: one link to the same page in the other language. */
.lang-link { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-72); text-decoration: none;
             text-underline-offset: 4px; transition: color var(--t-move) var(--ease); }
/* Flag emoji + language code. */
.lang-flag { flex: none; font-size: 18px; line-height: 1; }
.lang-link span:not(.lang-flag) { letter-spacing: .02em; }
@media (hover: hover) {
  .lang-link:hover { color: #fff; }
  .lang-link:hover span:not(.lang-flag) { text-decoration: underline; text-decoration-color: var(--accent-on-dark); text-decoration-thickness: 2px; }
}

.footer-simple { padding: 48px 0 32px; }
.footer-simple .footer-meta { margin-top: 0; }

@media (prefers-reduced-motion: reduce) {
  .calc-bg img { transform: none !important; }
}
