/* Thoughtborne landing page — self-contained, no external requests, no JS.
   Palette from assets/logo/README.md; light/dark via prefers-color-scheme.
   v2 ("value-first structured", #93): the v1 type system and palette, plus
   three quiet structural forms — a hairline value lattice up top, a
   key-figures cost ledger, and a ruled feature list. Rules, not color.
   Contrast note: the silent-e gray (#8A939C / #71828F) is 2.95:1 on the light
   ground — below any WCAG text threshold — so it is used only where it is
   decoration or a logotype (the wordmark's e, link underlines, the value
   grid's index numerals), never for standalone meaningful text. Muted text
   uses --ink-soft (AA-passing). */

/* ---- reset ---- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }

/* ---- palette ---- */
:root {
  --navy:      #0E202E;               /* brand navy */
  --e-gray:    #8A939C;               /* silent-e gray, light bg */
  --e-on-dark: #71828F;               /* silent-e gray on a dark ground (the hero is always dark) */
  --paper:     #F7F9FB;               /* page ground, light — cool near-white */
  --ink:       #0E202E;               /* body text = brand navy (15.7:1 on paper) */
  --ink-soft:  rgba(14, 32, 46, .72); /* muted text — #4F5D67, 6.4:1 on paper (AA) */
  --line:      rgba(14, 32, 46, .14); /* hairlines */
  --panel:     rgba(14, 32, 46, .035);/* faint fill for the loop/quote panels */
  --hero-ink:  #FFFFFF;               /* text/mark on the navy hero (16.6:1) */
  --hero-soft: rgba(255,255,255,.80); /* muted text on navy — #CFD2D5, 10.9:1 */
  --hero-line: rgba(255,255,255,.42); /* hairlines/ghost-button border on navy */
  --link-underline: var(--e-gray);    /* decorative: link underline carries the brand gray */

  /* button colors — default context is the light paper ground */
  --btn-bg: var(--navy); --btn-fg: #FFFFFF;
  --btn-ghost-fg: var(--ink); --btn-ghost-line: var(--line);

  --measure: 42rem;                   /* prose column */
  --measure-wide: 56rem;              /* hero + wide breakouts (value grid, lineup) */
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper:     #0A141D;             /* darker & desaturated vs. navy, so the hero band reads as a panel */
    --ink:       #E9EDF0;             /* 15.8:1 on paper */
    --ink-soft:  rgba(233, 237, 240, .72); /* #ABB0B5, 8.5:1 (AA) */
    --line:      rgba(233, 237, 240, .16);
    --panel:     rgba(233, 237, 240, .04);
    --e-gray:    #71828F;             /* silent-e gray, dark bg */
    /* link color on dark: a lightened navy derivative (functional, not a brand color) */
    --link-dark: #AFC3D2;            /* 10.2:1 on paper */
    --btn-ghost-fg: var(--ink);
    /* primary button on the dark paper ground: raw navy would vanish on the near-navy
       paper (~1.2:1), so it takes a lightened-navy fill with navy text — same functional
       derivative as --link-dark. The hero primary keeps its own white-on-navy override. */
    --btn-bg: #AFC3D2; --btn-fg: var(--navy);
  }
}

/* ---- base ---- */
html { background: var(--paper); }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.wrap {
  width: 100%;
  max-width: var(--measure);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 2rem);
}

/* ---- skip link (hidden until keyboard focus) ---- */
.skip-link {
  position: absolute;
  top: -100vh;
  left: 0;
  z-index: 10;
  background: #FFFFFF;
  color: var(--navy);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.65rem 1.1rem;
  border-radius: 0 0 7px 0;
  text-decoration: none;
}
.skip-link:focus { top: 0; }

/* ---- links ---- */
a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--link-underline);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
  transition: text-decoration-color .18s ease, color .18s ease;
}
a:hover { text-decoration-color: currentColor; }
@media (prefers-color-scheme: dark) {
  main a, .site-footer a { color: var(--link-dark); text-decoration-color: rgba(175,195,210,.45); }
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 2px;
}
/* on the navy hero --ink equals the ground, so the ring vanishes there; the hero ink (white) restores it */
.hero :focus-visible { outline-color: var(--hero-ink); }

/* ---- headings & type ---- */
h1, h2 { font-weight: 600; letter-spacing: -0.012em; line-height: 1.2; }
h2 { font-size: clamp(1.45rem, 1rem + 1.9vw, 2rem); }
p { text-wrap: pretty; }

.eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 0.9rem;
}

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

/* ---- <kbd> ---- */
kbd {
  font-family: ui-monospace, "Cascadia Code", "Cascadia Mono", Consolas, "SFMono-Regular", monospace;
  font-size: 0.82em;
  line-height: 1;
  padding: 0.28em 0.5em;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 4px;
  background: var(--panel);
  white-space: nowrap;
}

/* ---- hero (constant navy in both schemes) ---- */
.hero {
  background: var(--navy);
  color: var(--hero-ink);
  padding-block: clamp(3.5rem, 8vw, 6rem);
}
.hero-inner { max-width: var(--measure-wide); text-align: center; }
.mark path { fill: currentColor; }
.mark-hero {
  width: clamp(96px, 22vw, 132px);
  height: auto;
  margin: 0 auto clamp(1.5rem, 4vw, 2.25rem);
  color: var(--hero-ink);
}
.wordmark-h1 { margin: 0 auto; max-width: 30rem; }
.wordmark { width: 100%; height: auto; color: var(--hero-ink); }
.wordmark .letters { fill: currentColor; }
.wordmark .silent-e { fill: var(--e-on-dark); }

.tagline {
  font-size: clamp(1.12rem, 0.95rem + 0.9vw, 1.4rem);
  line-height: 1.45;
  color: var(--hero-soft);
  max-width: 40rem;
  margin: clamp(1.75rem, 4vw, 2.5rem) auto 0;
}
.tagline strong { color: var(--hero-ink); font-weight: 600; }
.subline {
  color: var(--hero-soft);
  margin: 0.85rem auto 0;
  max-width: 38rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: clamp(1.75rem, 4vw, 2.4rem);
}
/* center is the hero default; the left-aligned setup section wants its buttons at the text edge */
.get-started .actions { justify-content: flex-start; }
.meta {
  font-size: 0.86rem;
  color: var(--hero-soft);
  margin-top: 1.5rem;
  letter-spacing: 0.01em;
}
/* items never break mid-phrase; the separator dot is generated and glued to the
   preceding item (none after the last), so a wrapped line never carries an
   orphaned dot */
.meta span { white-space: nowrap; }
.meta span:not(:last-child)::after {
  content: "·";
  padding: 0 0.3em 0 0.6em;   /* + the inter-span space ≈ visually centered dot */
  font-weight: 400;
}

/* the glanceable value line: four short claims, each proven further down the
   page. A step stronger than the meta line (white, medium weight) but below
   the tagline — it should scan, not shout. Separator dots follow the same
   glued-::after pattern as the meta line. */
.benefits {
  font-size: 0.97rem;
  color: var(--hero-soft);
  margin: 1.35rem auto 0;
  max-width: 52rem;
  letter-spacing: 0.01em;
}
.benefits span { white-space: nowrap; color: var(--hero-ink); font-weight: 500; }
.benefits span:not(:last-child)::after {
  content: "·";
  padding: 0 0.3em 0 0.6em;
  color: var(--hero-soft);
  font-weight: 400;
}

/* ---- buttons ---- */
.btn {
  display: inline-block;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.2;
  padding: 0.7em 1.25em;
  border-radius: 7px;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform .12s ease, background-color .18s ease, border-color .18s ease, color .18s ease;
}
.btn-primary { background: var(--btn-bg); color: var(--btn-fg); }
.btn-ghost { background: transparent; color: var(--btn-ghost-fg); border-color: var(--btn-ghost-line); }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

/* hero button context: on navy, primary is white-on-navy, ghost is white outline */
.hero .btn-primary { --btn-bg: #FFFFFF; --btn-fg: var(--navy); }
.hero .btn-primary:hover { background: #EAF0F4; }
.hero .btn-ghost { color: var(--hero-ink); border-color: var(--hero-line); }
.hero .btn-ghost:hover { background: rgba(255,255,255,.10); border-color: var(--hero-ink); }
/* paper button context (get-started) */
.btn-primary:hover { background: #16354a; }
.btn-ghost:hover { border-color: var(--ink); background: var(--panel); }
@media (prefers-color-scheme: dark) {
  .btn-primary:hover { background: #C4D6E2; }  /* lighten the light fill; hero primary keeps its own hover */
}

/* ---- sections ----
   Padding is calibrated so two adjacent sections sum to ≈9.5rem — one even
   whitespace rhythm down the whole page (6rem each doubled up into visibly
   oversized gaps before the cost and privacy sections). */
.section { padding-block: clamp(3rem, 7vw, 4.75rem); }
.prose { max-width: var(--measure); }
.prose h2 { margin-bottom: 1rem; }
.prose p { color: var(--ink-soft); }
.prose p + p { margin-top: 1rem; }
.prose p strong { color: var(--ink); font-weight: 600; }

/* ---- value grid (the "why it exists" essentials, right under the hero) ----
   A hairline lattice: 1px grid gaps over a --line ground read as rules between
   opaque paper cells — structure from alignment and rules, not from color. */
.value .value-wide { max-width: var(--measure-wide); }
.value-grid {
  list-style: none;
  padding: 0;
  margin-top: 2.5rem;
  counter-reset: value;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
}
.value-grid li {
  counter-increment: value;
  background: var(--paper);   /* opaque, so only the 1px gaps show the rule color */
  padding: 1.4rem 1.5rem 1.55rem;
}
.value-grid li::before {
  /* decorative index numeral — same decoration-only rule as the silent e */
  content: "0" counter(value);
  display: block;
  font-family: ui-monospace, "Cascadia Code", "Cascadia Mono", Consolas, "SFMono-Regular", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--e-gray);
  margin-bottom: 0.85rem;
}
.value-grid strong {
  display: block;
  color: var(--ink);
  font-weight: 600;
  font-size: 1.02rem;
  line-height: 1.35;
  letter-spacing: -0.008em;
}
.value-grid span {
  display: block;
  color: var(--ink-soft);
  font-size: 0.93rem;
  line-height: 1.55;
  margin-top: 0.45rem;
}

/* ---- the loop ---- */
.loop { padding-block: clamp(2.5rem, 6vw, 4rem); }
.loop .wrap { max-width: var(--measure-wide); }
.loop-title {
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ink-soft);
  text-align: center; margin-bottom: 1.75rem;
}
.steps {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 3vw, 1.75rem);
}
.steps li {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.4rem 1.4rem 1.5rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.keys { display: flex; flex-wrap: wrap; align-items: center; gap: 0.15rem; font-size: 0.95rem; }
.keys kbd + kbd { margin-left: 0.05rem; }
.step-text { color: var(--ink-soft); font-size: 0.97rem; line-height: 1.55; }
.step-text strong { color: var(--ink); font-weight: 600; }
.loop-note {
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.92rem;
  margin-top: 1.5rem;
}
.loop-note strong { color: var(--ink); font-weight: 600; }

/* ---- quality bar ---- */
.quality { border-block: 1px solid var(--line); background: var(--panel); }
.quality .wrap { max-width: var(--measure-wide); padding-block: clamp(3.5rem, 8vw, 5.5rem); }
.quote { text-align: center; max-width: 46rem; margin-inline: auto; }
.quote-lead {
  font-size: clamp(1.35rem, 1rem + 1.9vw, 1.9rem);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-wrap: balance;
}
.quote-body { color: var(--ink-soft); margin-top: 1.35rem; max-width: 40rem; margin-inline: auto; }
.quote-cite {
  display: block;
  margin-top: 1.5rem;
  font-style: normal;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

/* ---- lineup ---- */
/* text (eyebrow/h2/intro) sits in prose-width wraps like every other section,
   so the section's left edge no longer jumps; only the table's own wrap opens
   up to the wide measure. */
.lineup .lineup-wide { max-width: var(--measure-wide); }
.lineup > .wrap > p { color: var(--ink-soft); max-width: var(--measure); margin-top: 1rem; }
.table-scroll { overflow-x: auto; margin-top: 2rem; -webkit-overflow-scrolling: touch; }
.lineup-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  min-width: 30rem;
}
.lineup-table th, .lineup-table td {
  text-align: left;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.lineup-table thead th {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border-bottom-color: var(--ink-soft);
}
.lineup-table tbody th { font-weight: 600; color: var(--ink); white-space: nowrap; }
.lineup-table tbody td { color: var(--ink-soft); }
.lineup-table tbody tr:last-child th,
.lineup-table tbody tr:last-child td { border-bottom: 0; }

/* ---- cost: the key-figures ledger ----
   The numbers, set like key figures in a report: numeral column left,
   explanation right, one hairline per row. Ascending order tells the story
   on its own — free path, unit price, measured monthly total. */
.figures { margin-top: 2rem; }
.figures > div {
  display: grid;
  grid-template-columns: 9.5rem 1fr;
  border-top: 1px solid var(--line);
  padding-block: 1.05rem 1.15rem;
}
.figures dt { padding-right: 1.5rem; }
.fig-num {
  display: block;
  font-size: 1.55rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.15;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.fig-unit {
  display: block;
  font-size: 0.8rem;
  color: var(--ink-soft);
  margin-top: 0.2rem;
  line-height: 1.4;
  text-wrap: balance;   /* "per month, heavy use" breaks evenly, no orphaned word */
}
.figures dd {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.55;
}
.figures dd strong { color: var(--ink); font-weight: 600; }
.cost-note { font-size: 0.95rem; margin-top: 1.75rem; }

/* ---- features: ruled definition list ---- */
.feature-list { margin-top: 2.25rem; }
.feature-row {
  display: grid;
  grid-template-columns: 13rem 1fr;
  gap: 0.35rem 1.75rem;
  padding-block: 1.05rem;
  border-top: 1px solid var(--line);
}
.feature-row:last-child { border-bottom: 1px solid var(--line); }
.feature-row dt {
  font-weight: 600;
  color: var(--ink);
  font-size: 0.98rem;
  line-height: 1.5;
}
.feature-row dd {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ---- prose small print ---- */
code {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 0.88em;
  padding: 0.1em 0.35em;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 4px;
}
.audience { font-size: 0.92rem; margin-top: 1.6rem; }

/* ---- footer ---- */
.site-footer { border-top: 1px solid var(--line); padding-block: clamp(2.5rem, 6vw, 3.5rem); }
.footer-inner { max-width: var(--measure-wide); text-align: center; }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem 1.15rem;
  font-size: 0.9rem;
}
.footer-note { color: var(--ink-soft); font-size: 0.9rem; margin-top: 1.5rem; }
.mark-footer {
  width: 64px;
  height: auto;
  margin: 1.75rem auto 0;
  color: var(--ink);
  opacity: 0.9;
}

/* ---- motion ---- */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  .btn:hover { transform: none; }
}

/* ---- narrow screens ---- */
@media (max-width: 880px) {
  .value-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .steps { grid-template-columns: 1fr; }
  .feature-row { grid-template-columns: 1fr; padding-block: 0.95rem; }
}

@media (max-width: 560px) {
  .value-grid { grid-template-columns: 1fr; }
  /* cost figures stack; the numeral and unit join on one label line */
  .figures > div { grid-template-columns: 1fr; }
  .figures dt { display: flex; align-items: baseline; gap: 0.55rem; padding: 0 0 0.4rem; }
  .fig-num { font-size: 1.35rem; }
  .fig-unit { margin-top: 0; }
  /* the glance line stacks one claim per line here — the separator dots would
     only dangle at line ends, so they go and the stack stands on its own */
  .benefits span { display: block; }
  .benefits span:not(:last-child)::after { content: none; }
}

/* Lineup table: stack into labelled cards on narrow screens rather than
   scrolling the third column out of sight. */
@media (max-width: 560px) {
  .table-scroll { overflow-x: visible; }
  .lineup-table { min-width: 0; }
  .lineup-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); }
  .lineup-table tbody tr,
  .lineup-table tbody th,
  .lineup-table tbody td { display: block; }
  .lineup-table tbody tr {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 1rem 1.1rem;
    margin-bottom: 0.75rem;
  }
  .lineup-table tbody tr:last-child { margin-bottom: 0; }
  .lineup-table tbody th {
    padding: 0;
    font-size: 1.02rem;
    white-space: normal;
    margin-bottom: 0.55rem;
  }
  .lineup-table tbody td {
    padding: 0.2rem 0;
    border: 0;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1.25rem;
  }
  .lineup-table tbody td::before {
    content: attr(data-label);
    color: var(--ink-soft);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    flex: none;
  }
  .lineup-table tbody td { text-align: right; }
}
