/* ── Ekko — useekko.app ─────────────────────────────────────────────
   One page, zero third-party requests. Tokens per docs/DESIGN.md. */

@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/newsreader-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/newsreader-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Newsreader";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/newsreader-latin-400-italic.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/inter-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/inter-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/geist-mono-latin-400-normal.woff2") format("woff2");
}

:root {
  --bg: #faf9f7;
  --bg-raise: #ffffff;
  --ink: #16181d;
  --ink-soft: #33363e;
  --muted: #8a8d94;
  --faint: #b5b7bc;
  --line: #e7e5e0;
  --accent: #5865e6;
  --accent-ink: #ffffff;
  --cipher: #6f7480;

  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --prose-w: 40rem;
  --wide-w: 66rem;
  --pad-x: clamp(1.25rem, 4vw, 2.5rem);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1014;
    --bg-raise: #14171d;
    --ink: #e9eaee;
    --ink-soft: #c6c9d2;
    --muted: #7d828e;
    --faint: #565b66;
    --line: #23272f;
    --accent: #7c8cf8;
    --accent-ink: #0a1030;
    --cipher: #8d93a1;
    color-scheme: dark;
  }
}
html[data-theme="dark"] {
  --bg: #0e1014;
  --bg-raise: #14171d;
  --ink: #e9eaee;
  --ink-soft: #c6c9d2;
  --muted: #7d828e;
  --faint: #565b66;
  --line: #23272f;
  --accent: #7c8cf8;
  --accent-ink: #0a1030;
  --cipher: #8d93a1;
  color-scheme: dark;
}
html[data-theme="light"] {
  --bg: #faf9f7;
  --bg-raise: #ffffff;
  --ink: #16181d;
  --ink-soft: #33363e;
  --muted: #8a8d94;
  --faint: #b5b7bc;
  --line: #e7e5e0;
  --accent: #5865e6;
  --accent-ink: #ffffff;
  --cipher: #6f7480;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }
::selection { background: var(--accent); color: var(--accent-ink); }

/* ── Top bar ──────────────────────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.8rem var(--pad-x);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
}
.brand__mark { width: 24px; height: 24px; color: var(--accent); flex: none; }
.brand__word {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.topbar__nav {
  display: flex;
  gap: 1.35rem;
  margin-left: 0.5rem;
}
.topbar__nav a {
  font-size: 0.85rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s ease;
}
.topbar__nav a:hover { color: var(--ink); }

.topbar__actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: none;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.theme-toggle:hover { color: var(--ink); border-color: var(--muted); }
.theme-toggle svg { width: 16px; height: 16px; }
.theme-toggle__moon { display: none; }
html[data-theme="dark"] .theme-toggle__sun { display: none; }
html[data-theme="dark"] .theme-toggle__moon { display: block; }
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .theme-toggle__sun { display: none; }
  html:not([data-theme="light"]) .theme-toggle__moon { display: block; }
}

/* ── Buttons ──────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 0.5rem 1rem;
  font-family: var(--sans);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.15s ease, background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.btn--lg { padding: 0.72rem 1.35rem; font-size: 0.95rem; border-radius: 12px; }
.btn--solid { background: var(--ink); color: var(--bg); }
.btn--solid:hover { opacity: 0.85; }
.btn--ghost { border-color: var(--line); color: var(--ink); }
.btn--ghost:hover { border-color: var(--muted); }
.btn:focus-visible, .theme-toggle:focus-visible, a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ── Hero ─────────────────────────────────────────────────────── */
.hero {
  max-width: var(--prose-w);
  margin: 0 auto;
  padding: clamp(4.5rem, 12vh, 8rem) var(--pad-x) clamp(3rem, 8vh, 5rem);
  text-align: center;
}

.kicker {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 1.6rem;
}

.hero__title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.6rem, 7.5vw, 4.4rem);
  line-height: 1.04;
  letter-spacing: -0.015em;
  margin: 0 0 1.5rem;
  text-wrap: balance;
}

.hero__sub {
  font-family: var(--serif);
  font-size: clamp(1.05rem, 2.4vw, 1.2rem);
  line-height: 1.6;
  color: var(--ink-soft);
  margin: 0 auto 2.1rem;
  max-width: 34rem;
  text-wrap: pretty;
}
.hero__sub em { font-style: italic; }

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  justify-content: center;
}
.actions--center { justify-content: center; }

.hero__status {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.13em;
  color: var(--faint);
  margin: 1.6rem 0 0;
}

/* The wire: plaintext vs what the platform carries */
.wire {
  margin: clamp(3rem, 8vh, 4.5rem) auto 0;
  max-width: 30rem;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg-raise);
  padding: 1.1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.wire__row { display: flex; flex-direction: column; gap: 0.28rem; }
.wire__tag {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--faint);
}
.wire__tag--accent { color: var(--accent); }
.wire__text {
  font-family: var(--serif);
  font-size: 1.02rem;
  color: var(--ink);
  min-height: 1.5em;
  overflow-wrap: anywhere;
}
.wire__text--mono {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--cipher);
  letter-spacing: 0.01em;
}

/* ── Sections ─────────────────────────────────────────────────── */
.rule {
  border: 0;
  border-top: 1px solid var(--line);
  max-width: min(var(--wide-w), calc(100% - 2 * var(--pad-x)));
  margin: 0 auto;
}

.section {
  max-width: var(--wide-w);
  margin: 0 auto;
  padding: clamp(4rem, 10vw, 6.5rem) var(--pad-x);
  scroll-margin-top: 4rem;
}

.section__num {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin: 0 0 1.1rem;
}

.section__title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 1.9rem;
  max-width: 26ch;
  text-wrap: balance;
}
.section--center { text-align: center; }
.section--center .section__title { margin-left: auto; margin-right: auto; }

.prose { max-width: var(--prose-w); }
.prose--center { margin-left: auto; margin-right: auto; }
.prose p {
  font-family: var(--serif);
  font-size: 1.1rem;
  line-height: 1.65;
  color: var(--ink-soft);
  margin: 0 0 1.25rem;
  text-wrap: pretty;
}
.prose p:last-child { margin-bottom: 0; }
.prose__strong { color: var(--ink); font-weight: 500; }

/* Steps */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  margin: 2.6rem 0 0;
}
.step { background: var(--bg); padding: 1.5rem 1.4rem 1.6rem; }
.step__num {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--accent);
  margin: 0 0 0.9rem;
}
.step__title {
  font-family: var(--sans);
  font-size: 0.98rem;
  font-weight: 500;
  margin: 0 0 0.5rem;
}
.step__body {
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--muted);
  margin: 0;
}
.step__body em { font-style: normal; font-weight: 500; color: var(--ink-soft); }

/* Pipeline diagram */
.pipeline {
  display: flex;
  align-items: stretch;
  gap: 0.9rem;
  margin: 2.2rem 0 0;
}
.pipeline__node {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  background: var(--bg-raise);
  display: flex;
  flex-direction: column;
  gap: 0.42rem;
  min-width: 0;
}
.pipeline__node--dark {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
.pipeline__label {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.13em;
  color: var(--muted);
}
.pipeline__node--dark .pipeline__label { color: color-mix(in srgb, var(--bg) 55%, transparent); }
.pipeline__value {
  font-family: var(--serif);
  font-size: 1rem;
  overflow-wrap: anywhere;
}
.pipeline__value--mono {
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.01em;
}
.pipeline__sub {
  font-size: 0.74rem;
  line-height: 1.45;
  color: var(--muted);
}
.pipeline__node--dark .pipeline__sub { color: color-mix(in srgb, var(--bg) 60%, transparent); }
.pipeline__arrow {
  align-self: center;
  color: var(--faint);
  font-size: 1.1rem;
  flex: none;
}

/* ── Demo ─────────────────────────────────────────────────────── */
.demo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem;
  margin-top: 2.2rem;
}
.demo__pane { display: flex; flex-direction: column; gap: 0.5rem; min-width: 0; }
.demo__label {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
}
.demo__input {
  font-family: var(--serif);
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg-raise);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.9rem 1rem;
  resize: vertical;
  min-height: 7.2rem;
}
.demo__input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.demo__input::placeholder { color: var(--faint); }
.demo__output {
  font-family: var(--mono);
  font-size: 0.8rem;
  line-height: 1.6;
  letter-spacing: 0.01em;
  color: var(--cipher);
  background: var(--bg-raise);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.9rem 1rem;
  min-height: 7.2rem;
  overflow-wrap: anywhere;
  overflow-y: auto;
  max-height: 14rem;
}
.demo__placeholder { color: var(--faint); font-family: var(--sans); font-size: 0.85rem; }
.demo__note {
  max-width: var(--prose-w);
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--muted);
  margin: 1.4rem 0 0;
  text-wrap: pretty;
}

/* ── Principles grid ──────────────────────────────────────────── */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
.cell { background: var(--bg); padding: 1.5rem 1.4rem 1.7rem; }
.cell__title {
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 500;
  margin: 0 0 0.55rem;
}
.cell__body {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--muted);
  margin: 0;
}
.cell__body em { font-style: italic; }

/* ── Get / waitlist ───────────────────────────────────────────── */
.waitlist {
  display: flex;
  gap: 0.6rem;
  justify-content: center;
  flex-wrap: wrap;
  max-width: 30rem;
  margin: 0 auto;
}
.waitlist__input {
  flex: 1;
  min-width: 14rem;
  font-family: var(--sans);
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--bg-raise);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.72rem 1rem;
}
.waitlist__input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.waitlist__input::placeholder { color: var(--faint); }
.waitlist.is-done { display: none; }

.get__hint {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  line-height: 1.7;
  color: var(--faint);
  margin: 1.1rem auto 0;
  max-width: 30rem;
}
.get__hint.is-ok { color: var(--accent); }
.get__hint.is-error { color: var(--ink-soft); }

.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;
}

/* ── Footer ───────────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--line);
  max-width: var(--wide-w);
  margin: 0 auto;
  padding: 2.4rem var(--pad-x) 2.8rem;
}
.footer__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.brand--footer .brand__word { font-size: 0.98rem; }
.footer__nav { display: flex; flex-wrap: wrap; gap: 1.3rem; }
.footer__nav a {
  font-size: 0.82rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s ease;
}
.footer__nav a:hover { color: var(--ink); }
.footer__zero {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  line-height: 1.7;
  color: var(--faint);
  margin: 1.9rem 0 0;
  max-width: 46rem;
}
.footer__legal {
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0.7rem 0 0;
}

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 900px) {
  .steps { grid-template-columns: 1fr; }
  .grid { grid-template-columns: 1fr 1fr; }
  .pipeline { flex-direction: column; }
  .pipeline__arrow { transform: rotate(90deg); padding: 0.1rem 0; }
}

@media (max-width: 620px) {
  .topbar__nav { display: none; }
  .grid { grid-template-columns: 1fr; }
  .demo { grid-template-columns: 1fr; }
  .hero__title br { display: none; }
}
