/* Tradr — waitlist page.
   Light-first, quiet, serif display over a neutral grotesque.
   No webfonts, no external requests: the serif is a system face on Apple
   platforms and falls back to Georgia everywhere else. */

:root {
  --bg: #ffffff;
  --ink: #282828;          /* headlines, body serif */
  --ink-strong: #161311;   /* the mark */
  --muted: #535353;        /* lede, secondary copy */
  --nav: #3c3836;
  --line: #e7e4e0;
  --field: #ffffff;
  --pill: #f1efec;         /* resting button fill */
  --pill-hover: #e6e3df;

  --brass: #a9741f;
  --brass-lit: #d9a441;
  --teal: #0e6e63;
  --teal-lit: #3fb8a6;
  --clay: #c1502e;

  --serif: "Iowan Old Style BT", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans: -apple-system, system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --gutter: 24px;
  --measure: 760px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131211;
    --ink: #eceae6;
    --ink-strong: #f2efe9;
    --muted: #a5a09a;
    --nav: #cbc6bf;
    --line: #2b2825;
    --field: #1b1917;
    --pill: #26231f;
    --pill-hover: #322e29;

    --brass-lit: #e0b25c;
    --teal: #3fb8a6;
    --clay: #e0704a;
  }
}

* { box-sizing: border-box; }

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

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

/* ---------- shared bits ---------- */

.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: -9999px; top: 8px;
  background: var(--bg); color: var(--ink);
  padding: 10px 16px; border: 1px solid var(--line); border-radius: 100px;
  font-family: var(--sans); font-size: 14px; z-index: 10;
}
.skip:focus { left: 16px; }

.wordmark {
  font-family: var(--sans);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
}
.wordmark.small { font-size: 13px; letter-spacing: 0.18em; }

/* ---------- header ---------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 28px var(--gutter);
  max-width: 1180px;
  margin: 0 auto;
}

.nav {
  display: flex;
  gap: 28px;
  font-family: var(--sans);
  font-size: 15px;
}
.nav a {
  color: var(--nav);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}
.nav a:hover { border-bottom-color: var(--nav); }

/* ---------- hero ---------- */

.hero {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 8px var(--gutter) 96px;
  text-align: center;
}

.mark { margin: 0 auto 34px; max-width: 400px; }
.mark svg { width: 100%; height: auto; display: block; overflow: visible; }

/* The layers settle into place from the bottom up — the base first, then each
   one laid on top of it. The rotation lives on the inner <rect> as an
   attribute so this CSS transform can animate without wiping it.

   The resting state here is the FINISHED state, and the entrance lives only in
   the keyframes' `from` (reached via fill-mode `both`). Written the other way
   round — hidden by default, revealed by the animation — anything that stops
   the animation running leaves an empty hero: reduced motion, a background tab
   that never gets focused, an engine that chokes on the keyframes. */
.stratum {
  animation: settle 0.6s cubic-bezier(0.2, 0.8, 0.3, 1) both;
}
.s1 { animation-delay: 0.06s; }
.s2 { animation-delay: 0.18s; }
.s3 { animation-delay: 0.30s; }
.s4 { animation-delay: 0.42s; }

@keyframes settle {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: translateY(0); }
}

.eyebrow {
  font-family: var(--sans);
  font-size: 15px;
  letter-spacing: -0.01em;
  color: var(--nav);
  margin: 0 0 18px;
}

h1 {
  font-family: var(--serif);
  font-weight: 400;
  /* short tagline, so it can carry the full display size — drop the clamp back
     down if the headline ever grows to two sentences again */
  font-size: clamp(2.5rem, 6.2vw, 4.5rem);
  line-height: 1.1;
  letter-spacing: -0.018em;
  margin: 0 0 20px;
  text-wrap: balance;
}

.lede {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--muted);
  margin: 0 auto 34px;
  max-width: 34em;
  text-wrap: pretty;
}

.fineprint {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--muted);
  opacity: 0.85;
  margin: 22px 0 0;
}

/* ---------- signup form ---------- */

.signup {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 0 auto;
  max-width: 520px;
}

.signup input[type="email"] {
  flex: 1 1 260px;
  min-width: 0;
  height: 46px;
  padding: 0 18px;
  font-family: var(--sans);
  font-size: 15px;
  color: var(--ink);
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 100px;
  outline: none;
  transition: border-color 0.15s ease;
}
.signup input[type="email"]::placeholder { color: var(--muted); opacity: 0.7; }
.signup input[type="email"]:focus-visible { border-color: var(--teal); }
.signup input[type="email"][aria-invalid="true"] { border-color: var(--clay); }

.btn {
  flex: 0 0 auto;
  height: 46px;
  padding: 0 22px;
  font-family: var(--sans);
  font-size: 15px;
  color: var(--ink);
  background: var(--pill);
  border: 1px solid transparent;
  border-radius: 100px;
  cursor: pointer;
  transition: background 0.15s ease, opacity 0.15s ease;
}
.btn:hover { background: var(--pill-hover); }
.btn:disabled { cursor: default; opacity: 0.55; }

/* honeypot — visually gone, never announced */
.pot {
  position: absolute; left: -9999px;
  width: 1px; height: 1px; opacity: 0;
  pointer-events: none;
}

.note {
  flex: 1 0 100%;
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
  margin: 4px 0 0;
  min-height: 1.2em;
}
.note[data-tone="ok"]  { color: var(--teal); }
.note[data-tone="err"] { color: var(--clay); }

/* form collapses to its success line */
.signup.done input[type="email"], .signup.done .btn { display: none; }
.signup.done .note { font-size: 16px; margin-top: 0; }

/* ---------- content sections ---------- */

.path-section, .layers, .control {
  max-width: 1020px;
  margin: 0 auto;
  padding: 76px var(--gutter);
  border-top: 1px solid var(--line);
}

h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.5rem, 3vw, 1.85rem);
  letter-spacing: -0.01em;
  line-height: 1.25;
  margin: 0 0 20px;
}

.section-lede {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--muted);
  margin: 0 0 44px;
  max-width: 40em;
  text-wrap: pretty;
}

.grid.three {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 40px 44px;
}

.grid.three h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.35rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin: 0 0 10px;
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.tick {
  flex: 0 0 auto;
  width: 9px; height: 9px;
  border-radius: 50%;
  transform: translateY(-1px);
}
.tick-teal  { background: var(--teal); }
.tick-brass { background: var(--brass-lit); }
.tick-clay  { background: var(--clay); }

.grid.three p {
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.7;
  color: var(--muted);
  margin: 0;
  text-wrap: pretty;
}

/* ---------- the four layers ---------- */

.stack {
  list-style: none;
  margin: 0;
  padding: 0 0 0 28px;
  border-left: 1px solid var(--line);
  max-width: 780px;
}

.stack li {
  display: flex;
  gap: 22px;
  padding: 0 0 40px;
  position: relative;
}
.stack li:last-child { padding-bottom: 0; }

/* the node sitting on the rule */
.stack li::before {
  content: "";
  position: absolute;
  left: -32px;
  top: 9px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--line);
}
/* same four colours, same order, as the bands in the mark */
.stack li:nth-child(1)::before { background: var(--ink-strong); }
.stack li:nth-child(2)::before { background: var(--brass-lit); }
.stack li:nth-child(3)::before { background: var(--teal); }
.stack li:nth-child(4)::before { background: var(--clay); }

.layer-num {
  flex: 0 0 auto;
  font-family: var(--serif);
  font-size: 1.6rem;
  line-height: 1.15;
  color: var(--muted);
  opacity: 0.5;
  font-variant-numeric: tabular-nums;
}

.layer-body { flex: 1 1 auto; min-width: 0; }

.layer-body h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.45rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 0 0 10px;
}

.layer-body p {
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.7;
  color: var(--muted);
  margin: 0;
  text-wrap: pretty;
}

/* ---------- the path, running across ---------- */

/* none of these headings has a lede under it, so they carry their own gap */
.path-section h2, .layers h2, .control h2 { margin-bottom: 44px; }

/* The two structural sections are deliberately drawn along different axes: the
   journey runs left to right on a single rule, the agent stacks downward. That
   contrast is doing the explaining, so keep them visually distinct. */
.path {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  /* four across when there's room, folding to three or two rather than
     crushing; each row keeps its own connecting rule */
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 44px 32px;
}

.path li {
  position: relative;
  padding: 26px 0 0;
  border-top: 1px solid var(--line);
}

/* the node sitting on the rule */
.path li::before {
  content: "";
  position: absolute;
  top: -5px;
  left: 0;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--teal);
}

/* the last step is the one that leaves the sandbox — mark the arrival */
.path li.final::before { background: var(--brass-lit); }

.path-num {
  display: block;
  font-family: var(--serif);
  font-size: 1.4rem;
  line-height: 1;
  color: var(--muted);
  opacity: 0.5;
  margin-bottom: 12px;
  font-variant-numeric: tabular-nums;
}

.path h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.25rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 0 0 10px;
}

.path p {
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.7;
  color: var(--muted);
  margin: 0;
  text-wrap: pretty;
}

/* ---------- questions ---------- */

.faq {
  max-width: 1020px;
  margin: 0 auto;
  padding: 76px var(--gutter);
  border-top: 1px solid var(--line);
}

.faq h2 { margin-bottom: 40px; }

.faq dl {
  margin: 0;
  max-width: 42em;
}

.faq dt {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.2rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin: 32px 0 8px;
}
.faq dt:first-child { margin-top: 0; }

.faq dd {
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.7;
  color: var(--muted);
  margin: 0;
  text-wrap: pretty;
}

/* ---------- closing ---------- */

/* matches the other sections' width so the divider rule lines up with theirs;
   the text inside is what stays narrow */
.join {
  max-width: 1020px;
  margin: 0 auto;
  padding: 76px var(--gutter) 96px;
  border-top: 1px solid var(--line);
  text-align: center;
}
.join h2 { margin-bottom: 18px; }
.join .lede { max-width: 30em; }

/* ---------- prose pages (privacy) ---------- */

.prose {
  max-width: 660px;
  margin: 0 auto;
  padding: 32px var(--gutter) 96px;
}

.page-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2rem, 5vw, 2.8rem);
  line-height: 1.15;
  letter-spacing: -0.018em;
  margin: 0 0 20px;
}

.prose h2 {
  font-size: 1.25rem;
  margin: 40px 0 10px;
}

.prose p {
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.75;
  color: var(--muted);
  margin: 0 0 14px;
  text-wrap: pretty;
}

.prose .section-lede { margin-bottom: 8px; }
.prose strong { color: var(--ink); font-weight: 500; }

.updated {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

/* ---------- links in body copy ---------- */

.prose a, .foot a, .fineprint a, .note a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--line);
}
.prose a:hover, .foot a:hover, .fineprint a:hover, .note a:hover {
  text-decoration-color: currentColor;
}
.prose a { color: var(--teal); }

/* ---------- footer ---------- */

.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 26px var(--gutter) 48px;
  border-top: 1px solid var(--line);
}
.foot-note {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--muted);
}

/* ---------- motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }

  /* The mark needs no rescue here: its resting state is already the finished
     one, so killing the animation just shows the completed drawing. */
}

@media (max-width: 620px) {
  .topbar { padding: 20px var(--gutter); }
  .nav { gap: 18px; font-size: 14px; }

  /* three links wrap into a cramped block at phone widths. It's a one-page
     site — the sections are a scroll away, so keep only the action. */
  .nav a:not(:last-child) { display: none; }

  .hero { padding-bottom: 72px; }
  .mark { max-width: 300px; margin-bottom: 32px; }
  .signup input[type="email"], .btn { flex: 1 1 100%; }
  .foot { justify-content: flex-start; }

  .path-section, .layers, .control, .faq, .join {
    padding-top: 60px;
    padding-bottom: 60px;
  }
  /* the journey turns to run downward, keeping its single connecting rule */
  .path {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .path li {
    border-top: 0;
    border-left: 1px solid var(--line);
    padding: 0 0 32px 24px;
  }
  .path li:last-child { padding-bottom: 0; }
  .path li::before { top: 4px; left: -5px; }
  .path-num { margin-bottom: 8px; }

  /* the numeral keeps its place beside the title, but the paragraph drops to
     its own full-width row instead of living in a squeezed column */
  .stack { padding-left: 18px; }
  .stack li {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 12px;
    padding-bottom: 34px;
  }
  .stack li::before { left: -22px; }
  .layer-body { display: contents; }
  .layer-num { grid-column: 1; grid-row: 1; font-size: 1.4rem; }
  .layer-body h3 { grid-column: 2; grid-row: 1; margin-bottom: 0; }
  .layer-body p { grid-column: 1 / -1; grid-row: 2; margin-top: 10px; }

  .callout { padding: 18px 20px; margin-top: 40px; }
}
