/* Thresho — shared styles
   Brand tokens from Theme.swift:
   bg #080D18 · bg-lift #14213D · cool #4A90E2 · warm #F5A623
   Aesthetic: calm, precise, utility-premium. Halide / Linear adjacent. */

:root {
  --bg: #080D18;
  --bg-lift: #14213D;
  --cool: #4A90E2;
  --warm: #F5A623;

  --ink: #EAF0FA;
  --ink-soft: #9DAAC2;
  --ink-faint: #5C6883;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);

  --sans: "Geist", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", "JetBrains Mono", Menlo, monospace;

  --maxw: 1080px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* Atmosphere: a warm glow at the horizon line, cool pooling below, faint grain */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(120% 80% at 50% 38%, rgba(245, 166, 35, 0.10), transparent 55%),
    radial-gradient(140% 90% at 50% 100%, rgba(74, 144, 226, 0.14), transparent 60%);
  pointer-events: none;
  z-index: 0;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.4'/%3E%3C/svg%3E");
  opacity: 0.025;
  pointer-events: none;
  mix-blend-mode: screen;
  z-index: 0;
}

.wrap {
  position: relative;
  z-index: 1;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 28px;
}

/* ---------- Header ---------- */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 30px 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-weight: 600;
  font-size: 1.18rem;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}
.mark {
  width: 24px; height: 24px;
  border-radius: 6px;
  display: block;
  flex: none;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.10), 0 4px 14px rgba(74,144,226,0.22);
}
.tag {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  color: var(--ink-faint);
  text-transform: uppercase;
}

/* ---------- Hero ---------- */
.hero {
  padding: clamp(36px, 7vw, 84px) 0 clamp(48px, 8vw, 96px);
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 40px; }
}

.eyebrow {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cool);
  margin-bottom: 22px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.eyebrow::before {
  content: "";
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--warm);
  box-shadow: 0 0 10px var(--warm);
}

h1 {
  font-size: clamp(2.4rem, 5.4vw, 3.7rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 600;
  margin-bottom: 22px;
}
h1 .warm { color: var(--warm); }

.lede {
  font-size: clamp(1.02rem, 1.5vw, 1.18rem);
  color: var(--ink-soft);
  max-width: 30em;
  margin-bottom: 34px;
}

.cta-row {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: var(--ink);
  color: var(--bg);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.96rem;
  padding: 13px 22px;
  border-radius: 11px;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
  box-shadow: 0 6px 24px rgba(0,0,0,0.4);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(74,144,226,0.3); }
.btn .arrow { transition: transform 0.25s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }

.pill {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border: 1px solid var(--line-strong);
  border-radius: 100px;
  padding: 8px 14px;
}
.beta-note {
  font-size: 0.88rem;
  color: var(--ink-faint);
  margin-top: 4px;
}

/* ---------- Hero figure: the threshold crossing ---------- */
.figure {
  width: 100%;
  aspect-ratio: 5 / 4;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--bg-lift);
  overflow: hidden;
  position: relative;
  box-shadow: 0 30px 80px rgba(0,0,0,0.5);
}
.figure svg { width: 100%; height: 100%; display: block; }

/* ---------- Feature triad ---------- */
.triad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: clamp(60px, 9vw, 110px);
}
@media (max-width: 720px) { .triad { grid-template-columns: 1fr; } }
.cell {
  background: var(--bg);
  padding: 30px 28px 34px;
}
.cell .k {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cool);
  margin-bottom: 14px;
}
.cell h3 {
  font-size: 1.06rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}
.cell p { font-size: 0.94rem; color: var(--ink-soft); }

/* ---------- Footer ---------- */
footer {
  border-top: 1px solid var(--line);
  padding: 30px 0 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.88rem;
  color: var(--ink-faint);
}
footer nav { display: flex; gap: 22px; flex-wrap: wrap; }
footer a { color: var(--ink-soft); text-decoration: none; transition: color 0.2s; }
footer a:hover { color: var(--ink); }

/* ---------- Privacy page ---------- */
.doc { padding: 16px 0 80px; max-width: 720px; }
.doc .eyebrow { color: var(--warm); }
.doc .eyebrow::before { background: var(--cool); box-shadow: 0 0 10px var(--cool); }
.doc h1 { font-size: clamp(2rem, 4vw, 2.7rem); margin-bottom: 10px; }
.doc .updated {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
  margin-bottom: 40px;
}
.doc h2 {
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  margin: 38px 0 12px;
  color: var(--ink);
}
.doc p, .doc li { color: var(--ink-soft); margin-bottom: 12px; font-size: 0.98rem; }
.doc ul { padding-left: 22px; margin-bottom: 12px; }
.doc li { margin-bottom: 8px; }
.doc a { color: var(--cool); text-decoration: none; border-bottom: 1px solid var(--line-strong); }
.doc a:hover { border-color: var(--cool); }
.doc strong { color: var(--ink); font-weight: 600; }

/* ---------- Load reveal ---------- */
.reveal { opacity: 0; transform: translateY(14px); animation: rise 0.8s var(--ease) forwards; }
.d1 { animation-delay: 0.05s; }
.d2 { animation-delay: 0.15s; }
.d3 { animation-delay: 0.25s; }
.d4 { animation-delay: 0.35s; }
.d5 { animation-delay: 0.45s; }
@keyframes rise { to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) {
  .reveal { animation: none; opacity: 1; transform: none; }
}
