/* ==========================================================================
   Wiramu — landing page
   Dark-only. Near-black ground, a single purple-blue accent used sparingly
   as outlines, glows and small tags — never as a fill. Inter throughout;
   the old "data register" (labels, tags, readouts) stays legible through
   size, letter-spacing and uppercase rather than a separate mono family.
   ========================================================================== */

:root {
  --bg:        #14161F;
  --surface:   #1C1F2E;
  --surface-2: #242739;
  --text:      #E9E9ED;
  --text-soft: color-mix(in srgb, var(--text) 62%, transparent);
  --rule:      color-mix(in srgb, var(--text) 15%, transparent);
  --rule-2:    color-mix(in srgb, var(--text) 9%, transparent);

  --accent:      #9184D9;
  --accent-lit:  #A79FE0;
  --accent-dim:  #5D5294;
  --accent-bg:   #2B2741;
  --accent-text: #D2CEFD;
  --shadow: 0 0 0 1px rgba(255,255,255,.05), 0 12px 32px -18px rgba(0,0,0,.85);

  --display: "Inter", system-ui, -apple-system, sans-serif;
  --body:    "Inter", system-ui, -apple-system, sans-serif;
  --mono:    "Inter", system-ui, -apple-system, sans-serif;

  --radius: 8px;
  --gut: clamp(1.25rem, 5vw, 5rem);
  --maxw: 76rem;
  /* One gutter formula for every full-bleed section, so banded and unbanded
     sections share a single left edge. */
  --pad-x: max(var(--gut), calc((100% - var(--maxw)) / 2));
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

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

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--text); color: var(--bg);
  padding: .6rem 1rem; z-index: 50; text-decoration: none;
}
.skip:focus { left: .5rem; top: .5rem; }

/* ─── type scale ────────────────────────────────────────────────────────── */

h1, h2, h3 {
  font-family: var(--display);
  line-height: 1.1;
  letter-spacing: -0.018em;
  font-weight: 600;
  margin: 0;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.1rem, 5.2vw, 3.9rem);
  font-weight: 700;
}

h2 {
  font-size: clamp(1.65rem, 3.4vw, 2.5rem);
  font-weight: 600;
}

h3 {
  font-size: 1.06rem;
  font-weight: 600;
  letter-spacing: -0.006em;
  line-height: 1.3;
}

.eyebrow {
  font-family: var(--mono);
  font-size: .74rem;
  font-weight: 500;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 .9rem;
}

code { font-family: var(--mono); font-size: .9em; }

/* ─── topbar ────────────────────────────────────────────────────────────── */

.topbar {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.1rem var(--pad-x);
  border-bottom: 1px solid var(--rule);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.mark {
  display: flex; align-items: center; gap: .55rem;
  text-decoration: none;
  margin-right: auto;
}
.mark-glyph {
  width: .95rem; height: .95rem;
  border: 2px solid var(--accent);
  border-radius: 50%;
  position: relative;
  flex: none;
}
.mark-glyph::after {
  content: "";
  position: absolute; inset: 3px;
  background: var(--accent);
  border-radius: 50%;
}
.mark-word {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.12rem;
  letter-spacing: -0.02em;
}

.topnav { display: flex; gap: 1.4rem; }
.topnav a {
  font-family: var(--mono);
  font-size: .78rem;
  letter-spacing: .05em;
  text-decoration: none;
  color: var(--text-soft);
  padding: .2rem 0;
  border-bottom: 1px solid transparent;
}
.topnav a:hover { color: var(--text); border-bottom-color: var(--accent); }
@media (max-width: 720px) { .topnav { display: none; } }

/* ─── buttons ───────────────────────────────────────────────────────────── */
/* Outlined, not filled: transparent ground, accent line, accent text. */

.btn {
  display: inline-block;
  background: transparent;
  color: var(--accent);
  font-family: var(--body);
  font-weight: 600;
  font-size: .97rem;
  text-decoration: none;
  padding: .82rem 1.5rem;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  transition: background .16s ease, border-color .16s ease, transform .16s ease;
}
.btn:hover { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.btn:active { transform: translateY(1px); }

.btn-sm { padding: .5rem .95rem; font-size: .87rem; }

.btn-ghost {
  color: var(--text);
  border-color: var(--rule);
}
.btn-ghost:hover { background: color-mix(in srgb, var(--text) 6%, transparent); border-color: var(--text-soft); }

.btn-wide {
  width: 100%;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  padding: .9rem 1.5rem;
  margin-top: .3rem;
}

/* ─── hero ──────────────────────────────────────────────────────────────── */

.hero {
  padding: clamp(3rem, 8vw, 6rem) var(--pad-x) clamp(2rem, 5vw, 3rem);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}
@media (max-width: 900px) { .hero { grid-template-columns: 1fr; } }

.hero-sub {
  font-family: var(--display);
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  font-weight: 500;
  color: var(--accent-text);
  max-width: 28ch;
  line-height: 1.3;
  margin: .6rem 0 0;
}

.lede {
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  color: var(--text-soft);
  max-width: 34rem;
  margin: 1.2rem 0 0;
}
.lede-2 {
  font-family: var(--mono);
  font-size: .86rem;
  letter-spacing: .01em;
  margin: 1rem 0 0;
  color: var(--text);
}
.hero-actions {
  display: flex; flex-wrap: wrap; gap: .7rem;
  margin-top: 2rem;
}

/* ─── trust proof strip ─────────────────────────────────────────────────── */

.proof-wrap {
  padding: 0 var(--pad-x) clamp(2.5rem, 6vw, 4rem);
}
.proof-strip {
  display: flex;
  flex-wrap: wrap;
  gap: .8rem 2.2rem;
  padding: 1rem 1.4rem;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--surface);
  max-width: var(--maxw);
  margin: 0 auto;
}
.proof-strip span {
  font-family: var(--mono);
  font-size: .78rem;
  letter-spacing: .02em;
  color: var(--text-soft);
}

/* ─── the machine (signature) ───────────────────────────────────────────── */

.machine { min-width: 0; }

.machine-frame {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.35rem 1.35rem 1.5rem;
  display: grid;
  gap: 1.1rem;
}

.rating { display: grid; gap: .7rem; }
.rating-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.rating-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: .82rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.rating-meta {
  font-family: var(--mono);
  font-size: .66rem;
  color: var(--text-soft);
  letter-spacing: .04em;
  text-align: right;
}

.scale {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  border: 1px solid var(--rule);
  border-radius: 6px;
  overflow: hidden;
  background: var(--surface-2);
}
.tick {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1rem;
  text-align: center;
  padding: .55rem 0;
  color: var(--text-soft);
  border-right: 1px solid var(--rule);
  position: relative;
  z-index: 2;
  transition: color .3s ease;
}
.tick:last-of-type { border-right: 0; }
/* The number sitting on the marker, whichever one that is. */
.machine[data-at="5"] .tick:nth-of-type(6),
.machine[data-at="3"] .tick:nth-of-type(4) { color: var(--bg); }
.pip {
  position: absolute;
  top: 0; bottom: 0;
  left: 0;
  width: calc(100% / 6);
  background: var(--accent-dim);
  transform: translateX(500%);
  transition: transform .7s cubic-bezier(.65,.02,.28,1), background-color .5s ease, box-shadow .5s ease;
  z-index: 1;
}
.machine[data-phase="fall"] .pip,
.machine[data-phase="trigger"] .pip,
.machine[data-phase="letter"] .pip {
  transform: translateX(300%);
  background: var(--accent);
  box-shadow: 0 0 18px color-mix(in srgb, var(--accent) 55%, transparent);
}

.rating-foot { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.premises { font-family: var(--mono); font-size: .74rem; color: var(--text-soft); }
.delta {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  transition: color .4s ease;
}
.machine[data-phase="fall"] .delta,
.machine[data-phase="trigger"] .delta,
.machine[data-phase="letter"] .delta { color: var(--accent-lit); }

.readout {
  list-style: none;
  margin: 0; padding: .9rem 0 0;
  border-top: 1px solid var(--rule-2);
  display: grid;
  gap: .34rem;
  font-family: var(--mono);
  font-size: .74rem;
}
.readout li {
  display: flex; gap: 1rem;
  opacity: .18;
  transform: translateY(2px);
  transition: opacity .35s ease, transform .35s ease;
}
/* Lit either by the running loop, or by the end phase the markup ships with —
   so a JavaScript-free page shows the whole readout rather than a ghost. */
.readout li.on,
.machine[data-phase="letter"] .readout li { opacity: 1; transform: none; }
.readout .k {
  color: var(--text-soft);
  min-width: 5.6rem;
  letter-spacing: .04em;
}
.readout .v { color: var(--text); }
.readout .v.hot { color: var(--accent-text); font-weight: 500; }
.readout .v.ok  { color: var(--accent-text); font-weight: 500; }

.letter {
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: var(--surface-2);
  padding: .95rem 1rem 1rem;
  /* Held faint before the trigger fires: the letter is queued, not absent.
     Keeping it in flow means the panel never jumps height. */
  opacity: .12;
  transform: translateY(8px);
  transition: opacity .5s ease, transform .5s cubic-bezier(.2,.7,.2,1);
}
.machine[data-phase="letter"] .letter { opacity: 1; transform: none; }
.letter-head {
  display: flex; justify-content: space-between; align-items: center;
  padding-bottom: .6rem; border-bottom: 2px solid var(--text);
}
.letter-logo {
  font-family: var(--mono); font-size: .62rem; letter-spacing: .14em;
  color: var(--text-soft);
  border: 1px dashed var(--rule); padding: .22rem .5rem; border-radius: 4px;
}
.letter-refs { font-family: var(--mono); font-size: .62rem; letter-spacing: .1em; color: var(--text-soft); }
.letter-body { font-size: .84rem; margin: .75rem 0 .8rem; line-height: 1.5; }
.letter-rules {
  height: 1px; background: var(--rule-2);
  box-shadow: 0 5px 0 var(--rule-2), 0 10px 0 var(--rule-2);
  margin-bottom: 1.1rem;
}
.letter-foot {
  font-family: var(--mono);
  font-size: .58rem;
  line-height: 1.5;
  color: var(--text-soft);
  margin: 0;
  padding-top: .55rem;
  border-top: 1px solid var(--rule-2);
}

.machine-caption {
  font-family: var(--mono);
  font-size: .72rem;
  line-height: 1.65;
  color: var(--text-soft);
  margin: .9rem 0 0;
  max-width: 30rem;
  margin-left: auto;
  text-align: right;
}
@media (max-width: 900px) { .machine-caption { text-align: left; margin-left: 0; } }

@media (prefers-reduced-motion: reduce) {
  .pip, .delta, .readout li, .letter { transition: none; }
}

/* ─── sections ──────────────────────────────────────────────────────────── */

.section {
  padding: clamp(3.5rem, 7vw, 6rem) var(--pad-x);
  /* Clears the sticky topbar when an anchor is followed. */
  scroll-margin-top: 4rem;
}

.band {
  background: var(--surface);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.section-head { max-width: 44rem; margin-bottom: 2.6rem; }
.section-head p {
  color: var(--text-soft);
  margin: 1rem 0 0;
  font-size: 1.06rem;
}

/* ─── the opposite (three points) ───────────────────────────────────────── */

.opposite {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  gap: 0;
  border-top: 1px solid var(--rule);
}
.opposite li {
  display: grid;
  grid-template-columns: minmax(0, 15rem) minmax(0, 1fr);
  gap: clamp(1rem, 4vw, 3rem);
  padding: 1.6rem 0;
  border-bottom: 1px solid var(--rule);
}
@media (max-width: 720px) { .opposite li { grid-template-columns: 1fr; gap: .4rem; } }
.opposite p { margin: 0; color: var(--text-soft); max-width: 42rem; }

/* ─── comparison table ──────────────────────────────────────────────────── */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}
.table {
  width: 100%;
  min-width: 34rem;
  border-collapse: collapse;
  font-size: .92rem;
}
.table th {
  text-align: left;
  font-family: var(--mono);
  font-size: .7rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-soft);
  padding: .8rem 1.1rem;
  border-bottom: 1px solid var(--rule);
  background: var(--surface);
}
.table th.col-accent { color: var(--accent); }
.table td {
  padding: .9rem 1.1rem;
  border-bottom: 1px solid var(--rule-2);
  color: var(--text-soft);
  vertical-align: top;
}
.table tr:last-child td { border-bottom: 0; }
.table td:first-child { color: var(--text); font-weight: 600; white-space: nowrap; }
.table td:last-child { color: var(--text); }

/* ─── triggers ──────────────────────────────────────────────────────────── */

.triggers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}
.trig {
  background: var(--surface);
  padding: 1.5rem 1.5rem 1.6rem;
  display: flex;
  flex-direction: column;
  gap: .55rem;
}
.trig p { margin: 0; color: var(--text-soft); font-size: .95rem; }
.trig p.trig-what { color: var(--text); font-weight: 600; }

.signal {
  font-family: var(--mono);
  font-size: .7rem;
  font-weight: 500;
  letter-spacing: .06em;
  padding: .24rem .5rem;
  border-radius: 5px;
  align-self: flex-start;
  margin-bottom: .35rem;
  white-space: nowrap;
}
.signal-new,
.signal-fall { background: var(--accent-bg); color: var(--accent-text); }
.signal-stale { background: var(--surface-2); color: var(--text-soft); }

.trig p.trades {
  display: flex; flex-wrap: wrap; gap: .3rem;
  margin-top: auto;
  padding-top: .95rem;
  border-top: 1px solid var(--rule-2);
}
.trades span {
  font-family: var(--mono);
  font-size: .66rem;
  letter-spacing: .03em;
  color: var(--text-soft);
  border: 1px solid var(--rule);
  border-radius: 5px;
  padding: .16rem .42rem;
}

.tag {
  font-family: var(--mono);
  font-size: .64rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  background: var(--surface-2);
  color: var(--text-soft);
  padding: .22rem .5rem;
  border-radius: 5px;
  align-self: start;
  justify-self: start;
  white-space: nowrap;
  margin-top: .18rem;
}
.tag-fixed { background: var(--accent-bg); color: var(--accent-text); }

/* Tag sits in its own column so the note text keeps a clean left edge. */
.planned, .devnote {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: .75rem;
  align-items: start;
  margin: 2.2rem 0 0;
  max-width: 50rem;
  color: var(--text-soft);
  font-size: .95rem;
}
@media (max-width: 560px) {
  .planned, .devnote { grid-template-columns: 1fr; gap: .5rem; }
}

/* ─── pair panes ────────────────────────────────────────────────────────── */

.pair {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}
@media (min-width: 780px) { .pair { grid-template-columns: 1fr 1fr; } }
.pane { background: var(--surface); padding: 1.6rem; }
.pane p { margin: .5rem 0 0; color: var(--text-soft); font-size: .95rem; }

/* ─── features ──────────────────────────────────────────────────────────── */

.feats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: clamp(1.5rem, 3vw, 2.5rem);
}
.feat { border-top: 2px solid var(--text); padding-top: .9rem; }
.feat p { margin: .5rem 0 0; color: var(--text-soft); font-size: .95rem; }

/* Says whether a feature works today or is still being built. The page makes
   that distinction in words too; this is so you can't miss it. */
.feat p.feat-state {
  font-family: var(--mono);
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  margin: .45rem 0 0;
}
.feat-live { color: var(--accent-lit); }
.feat-soon { color: var(--text-soft); }
.feat-live::before,
.feat-soon::before {
  content: "";
  display: inline-block;
  width: .42rem; height: .42rem;
  border-radius: 50%;
  margin-right: .45rem;
  vertical-align: .08rem;
  background: currentColor;
}
.feat-soon::before { background: transparent; box-shadow: inset 0 0 0 1px currentColor; }

/* ─── FAQ ───────────────────────────────────────────────────────────────── */

.faq {
  display: grid;
  gap: .7rem;
  max-width: 44rem;
}
.faq-item {
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}
.faq-item summary {
  padding: 1rem 1.15rem;
  font-weight: 600;
  font-size: .95rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  color: var(--accent);
  font-size: 1.15rem;
  line-height: 1;
  flex: none;
  transition: transform .2s ease;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p {
  margin: 0;
  padding: 0 1.15rem 1.15rem;
  color: var(--text-soft);
  font-size: .92rem;
  line-height: 1.6;
}

/* ─── waitlist ──────────────────────────────────────────────────────────── */

.waitlist {
  max-width: 34rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: .85rem; }
@media (max-width: 560px) { .grid2 { grid-template-columns: 1fr; } }

.field { display: grid; gap: .3rem; }
.field label {
  font-family: var(--mono);
  font-size: .7rem;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--text-soft);
}
.field input {
  font: inherit;
  font-size: .95rem;
  padding: .6rem .7rem;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--text);
  min-width: 0;
}
.field input::placeholder { color: var(--text-soft); opacity: .7; }
.field input:focus-visible { border-color: var(--accent); }
.field input[aria-invalid="true"] { border-color: var(--accent-lit); }

.form-note {
  font-family: var(--mono);
  font-size: .7rem;
  line-height: 1.6;
  color: var(--text-soft);
  margin: .9rem 0 0;
}
.form-note.err { color: var(--accent-lit); }

/* Honeypot: out of sight and out of the tab order, but really in the DOM. */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.joined-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.35rem;
  line-height: 1.2;
  margin: 0;
  color: var(--accent-text);
}
.joined-body { margin: .7rem 0 0; color: var(--text-soft); font-size: .95rem; }

/* ─── footer ────────────────────────────────────────────────────────────── */

.site-foot {
  border-top: 1px solid var(--rule);
  padding: clamp(2.5rem, 5vw, 3.5rem) var(--pad-x) 1.5rem;
}
.foot-grid {
  display: grid;
  grid-template-columns: minmax(0, 18rem) minmax(0, 1fr);
  gap: clamp(1.5rem, 5vw, 4rem);
}
@media (max-width: 780px) { .foot-grid { grid-template-columns: 1fr; } }

.foot-mark { display: grid; grid-template-columns: auto 1fr; gap: .55rem; align-items: center; }
.foot-mark p {
  grid-column: 1 / -1;
  margin: .6rem 0 0;
  font-size: .88rem;
  color: var(--text-soft);
}
.foot-legal p {
  margin: 0 0 .8rem;
  font-size: .82rem;
  line-height: 1.6;
  color: var(--text-soft);
  max-width: 42rem;
}

.foot-bar {
  margin-top: 2.5rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.4rem;
  font-family: var(--mono);
  font-size: .72rem;
  color: var(--text-soft);
}
.foot-bar a { text-decoration: none; }
.foot-bar a:hover { color: var(--text); text-decoration: underline; }

/* ─── sticky mobile CTA ─────────────────────────────────────────────────── */
/* Persistent bottom bar on small viewports, hidden once the visitor has
   joined the waitlist (main.js adds .joined to <body>). */

.sticky-cta { display: none; }

@media (max-width: 720px) {
  body { padding-bottom: 4.3rem; }
  body.joined { padding-bottom: 0; }

  .sticky-cta {
    display: flex;
    align-items: center;
    gap: .9rem;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 30;
    padding: .75rem 1rem calc(.75rem + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--bg) 92%, transparent);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--rule);
  }
  .sticky-cta span {
    flex: 1;
    font-size: .84rem;
    color: var(--text-soft);
  }
  body.joined .sticky-cta { display: none; }
}

/* ─── scroll reveal ─────────────────────────────────────────────────────── */

.reveal { opacity: 0; transform: translateY(12px); }
.reveal.in {
  opacity: 1; transform: none;
  transition: opacity .6s ease, transform .6s cubic-bezier(.2,.7,.2,1);
}
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal.in { opacity: 1; transform: none; transition: none; }
}
