/* ============================================================
   Thematic Labs — landing page
   Warm editorial (Thinking Machines lineage) with a single
   disciplined cobalt signal accent and a mono utility face.
   ============================================================ */

:root {
  --paper:      #F4F1E9;
  --paper-2:    #EDE9DE;   /* panels */
  --ink:        #14130E;   /* near-black, warm */
  --ink-soft:   #3B382F;   /* body copy */
  --ink-muted:  #6D6858;   /* captions */
  --faded:      #A39D8D;   /* the "old" taxonomy */
  --hairline:   #DcD5C7;
  --hairline-2: #E5DFD2;
  --accent:     #2438CF;   /* cobalt signal */
  --accent-ink: #1B2CAE;   /* hover / pressed */
  --accent-tint:#EAE9FB;
  --risk:       #B4472A;   /* one warm counter-signal, used once */

  --maxw: 1160px;
  --gut: clamp(1.25rem, 5vw, 4rem);

  --f-display: "Schibsted Grotesk", "Inter", system-ui, sans-serif;
  --f-body: "Inter", system-ui, -apple-system, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", monospace;
}

/* ---------- reset-ish ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-soft);
  font-family: var(--f-body);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.075rem);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

h1, h2, h3 { color: var(--ink); font-family: var(--f-display); font-weight: 600; }
p { margin: 0; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-ink); }

::selection { background: var(--accent); color: var(--paper); }

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gut); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -48px; z-index: 20;
  background: var(--ink); color: var(--paper); padding: 8px 14px; border-radius: 8px;
  font-family: var(--f-mono); font-size: 0.8rem; transition: top .18s ease;
}
.skip-link:focus { top: 12px; color: var(--paper); }

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

/* ---------- shared type devices ---------- */
.eyebrow {
  font-family: var(--f-mono);
  font-size: 0.74rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1.1rem;
}

/* ============================================================
   Header
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.1) blur(8px);
  border-bottom: 1px solid var(--hairline);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 66px;
}
.brand { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand-name {
  font-family: var(--f-display); font-weight: 600; font-size: 1.02rem;
  letter-spacing: -0.01em;
}
.brand-mark .mark-node { fill: var(--ink); }
.brand-mark .mark-theme { fill: var(--accent); }
.brand-mark .mark-line { stroke: var(--faded); stroke-width: 1.5; }

.header-nav { display: flex; align-items: center; gap: clamp(1rem, 2.4vw, 2rem); }
.header-nav a {
  font-family: var(--f-mono); font-size: 0.82rem; color: var(--ink-soft);
  letter-spacing: 0.01em;
}
.header-nav a:hover { color: var(--accent); }
.header-nav .nav-cta {
  color: var(--paper); background: var(--ink);
  padding: 0.5rem 0.9rem; border-radius: 8px;
}
.header-nav .nav-cta:hover { background: var(--accent); color: var(--paper); }
@media (max-width: 560px) {
  .header-nav a:not(.nav-cta) { display: none; }
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
  padding-top: clamp(3.5rem, 8vw, 7rem);
  padding-bottom: clamp(3.5rem, 7vw, 6rem);
}
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 2.75rem; }
}

.hero-title {
  font-size: clamp(2.3rem, 1.4rem + 3.4vw, 4rem);
  line-height: 1.04;
  letter-spacing: -0.022em;
  margin: 0 0 1.5rem;
  text-wrap: balance;
}
.hero-title em {
  font-style: normal;
  color: var(--accent);
}
.hero-lead {
  font-size: clamp(1.06rem, 1rem + 0.5vw, 1.28rem);
  line-height: 1.56;
  color: var(--ink-soft);
  max-width: 34em;
  margin: 0 0 2rem;
}
.hero-fineprint {
  margin-top: 0.9rem;
  font-family: var(--f-mono);
  font-size: 0.76rem;
  color: var(--ink-muted);
  letter-spacing: 0.02em;
}

/* ---------- waitlist form ---------- */
.waitlist-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.6rem;
  max-width: 32rem;
}
.waitlist-form.wide { max-width: 34rem; margin-top: 2rem; }
.wl-input {
  font-family: var(--f-body);
  font-size: 1rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-radius: 9px;
  padding: 0.85rem 1rem;
  min-width: 0;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.wl-input::placeholder { color: var(--faded); }
.wl-input:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-tint);
}
.wl-button {
  font-family: var(--f-display); font-weight: 600; font-size: 0.98rem;
  color: var(--paper); background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 9px; padding: 0.85rem 1.35rem;
  cursor: pointer; white-space: nowrap;
  transition: background .16s ease, transform .08s ease;
}
.wl-button:hover { background: var(--accent); border-color: var(--accent); }
.wl-button:active { transform: translateY(1px); }
.wl-note {
  grid-column: 1 / -1;
  min-height: 1.2em;
  margin: 0.15rem 0 0;
  font-family: var(--f-mono);
  font-size: 0.8rem;
  color: var(--ink-muted);
}
.wl-note.ok { color: var(--accent); }
.wl-note.err { color: var(--risk); }
@media (max-width: 440px) {
  .waitlist-form { grid-template-columns: 1fr; }
}

/* ---------- hero visual panel ---------- */
.hero-visual {
  background:
    linear-gradient(var(--paper-2), var(--paper-2)) padding-box;
  border: 1px solid var(--hairline);
  border-radius: 16px;
  padding: 1.1rem 1.2rem 1.4rem;
  box-shadow: 0 1px 0 #fff8 inset, 0 18px 40px -30px rgba(20,19,14,.5);
}
.hv-top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.1rem 0.2rem 0.9rem;
  border-bottom: 1px solid var(--hairline-2);
  margin-bottom: 0.5rem;
}
.hv-title {
  font-family: var(--f-mono); font-size: 0.74rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--accent);
}
.hv-tag {
  font-family: var(--f-mono); font-size: 0.68rem; letter-spacing: 0.08em;
  color: var(--faded);
}
.hv-diagram { display: block; width: 100%; height: auto; }

/* diagram type + strokes */
.node-card { fill: var(--paper); stroke: var(--ink); stroke-width: 1.4; }
.node-glyph { fill: var(--ink); }
.node-ticker { fill: var(--ink); font-family: var(--f-display); font-weight: 600; font-size: 15px; }
.node-sub { fill: var(--ink-muted); font-family: var(--f-mono); font-size: 9.5px; letter-spacing: 0.02em; }
.node-rule { stroke: var(--hairline); stroke-width: 1; }
.node-meta { fill: var(--faded); font-family: var(--f-mono); font-size: 8.5px; letter-spacing: 0.04em; }

.old-eyebrow { fill: var(--faded); font-family: var(--f-mono); font-size: 8.5px; letter-spacing: 0.18em; }
.old-line { fill: var(--faded); font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.01em; }
.old-stale { fill: var(--faded); font-family: var(--f-mono); font-size: 8.5px; font-style: italic; letter-spacing: 0.03em; }

.link { fill: none; stroke: var(--accent); stroke-width: 1.4; opacity: 0.42; }

.chip-card { fill: var(--paper); stroke: var(--hairline); stroke-width: 1.2; }
.chip-tick { fill: var(--accent); }
.chip-card.risk { stroke: color-mix(in srgb, var(--risk) 40%, var(--hairline)); }
.chip-tick.risk { fill: var(--risk); }
.chip-name { fill: var(--ink); font-family: var(--f-mono); font-weight: 500; font-size: 12px; letter-spacing: -0.01em; }
.chip-conf { fill: var(--accent); font-family: var(--f-mono); font-size: 11px; text-anchor: end; }
.chip-track { stroke: var(--hairline); stroke-width: 3; stroke-linecap: round; }
.chip-weight { stroke: var(--accent); stroke-width: 3; stroke-linecap: round; }

/* diagram entrance animation */
.link { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw .9s ease forwards; }
.links .link:nth-child(1) { animation-delay: .15s; }
.links .link:nth-child(2) { animation-delay: .27s; }
.links .link:nth-child(3) { animation-delay: .39s; }
.links .link:nth-child(4) { animation-delay: .51s; }
.links .link:nth-child(5) { animation-delay: .63s; }
.chip { opacity: 0; transform: translateX(10px); animation: chipIn .6s ease forwards; }
.chip { animation-delay: calc(.32s + var(--i) * .12s); }
.oldpath { opacity: 0; animation: fadeIn .8s ease .1s forwards; }
.node { opacity: 0; animation: fadeIn .7s ease forwards; }

@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes chipIn { to { opacity: 1; transform: translateX(0); } }
@keyframes fadeIn { to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  .link, .chip, .oldpath, .node { animation: none; opacity: 1; transform: none; stroke-dashoffset: 0; }
}

/* ============================================================
   Sections
   ============================================================ */
.section {
  padding-top: clamp(3.5rem, 7vw, 6rem);
  padding-bottom: clamp(3.5rem, 7vw, 6rem);
  border-top: 1px solid var(--hairline);
}
.section.band { background: var(--paper-2); }
.section-head { max-width: 44rem; margin-bottom: clamp(2rem, 4vw, 3.25rem); }
.section-title {
  font-size: clamp(1.7rem, 1.2rem + 2vw, 2.7rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.75rem, 4vw, 3.5rem);
  align-items: start;
}
@media (max-width: 760px) { .two-col { grid-template-columns: 1fr; gap: 1.5rem; } }
.lead-para {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(1.2rem, 1.05rem + 0.8vw, 1.6rem);
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.stack > p + p { margin-top: 1.1rem; }

/* ---------- steps ---------- */
.steps {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 3vw, 2.75rem);
  counter-reset: none;
}
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; gap: 2rem; } }
.step { padding-top: 1.4rem; border-top: 2px solid var(--ink); }
.step-num {
  display: block; font-family: var(--f-mono); font-size: 0.8rem;
  color: var(--accent); letter-spacing: 0.08em; margin-bottom: 1rem;
}
.step-title { font-size: 1.3rem; margin: 0 0 0.55rem; letter-spacing: -0.01em; }
.step-body { color: var(--ink-soft); }

/* ---------- value ---------- */
.value-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(1.25rem, 3vw, 2rem);
}
@media (max-width: 760px) { .value-grid { grid-template-columns: 1fr; } }
.value-card {
  background: var(--paper-2);
  border: 1px solid var(--hairline);
  border-radius: 14px;
  padding: clamp(1.6rem, 3vw, 2.4rem);
}
.value-title {
  font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.55rem);
  line-height: 1.2; letter-spacing: -0.01em; margin: 0 0 0.8rem;
}
.value-card p { color: var(--ink-soft); }

/* ============================================================
   CTA
   ============================================================ */
.cta { text-align: center; }
.cta .eyebrow { color: var(--accent); }
.cta-title {
  font-size: clamp(1.9rem, 1.3rem + 2.6vw, 3.1rem);
  line-height: 1.08; letter-spacing: -0.022em;
  margin: 0 auto 1.25rem; max-width: 20ch; text-wrap: balance;
}
.cta-lead {
  max-width: 40rem; margin: 0 auto;
  font-size: clamp(1.02rem, 1rem + 0.4vw, 1.2rem);
  color: var(--ink-soft);
}
.cta .waitlist-form { margin-inline: auto; }

/* ============================================================
   Footer
   ============================================================ */
.site-footer { border-top: 1px solid var(--hairline); padding-block: 2.5rem; }
.footer-inner {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 1rem;
}
.footer-brand { display: flex; align-items: baseline; gap: 0.8rem; flex-wrap: wrap; }
.footer-brand .brand-name { color: var(--ink); font-size: 1rem; }
.footer-tag { color: var(--ink-muted); font-size: 0.92rem; }
.footer-meta {
  font-family: var(--f-mono); font-size: 0.78rem; color: var(--ink-muted);
  letter-spacing: 0.02em;
}
