/* Twister: dark single-theme site.
   Landing is one screen: header, left-aligned statement with two buttons, footer. */
@font-face {
  font-family: "Hanken Grotesk";
  src: url("fonts/hanken.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("fonts/jb400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #0a0a0b;
  --surface: #101012;
  --surface-2: #17171b;
  --line: #232327;
  --line-2: #2c2c31;
  --line-3: #3a3a41;
  --text: #f3f1ec;
  --text-2: #c9c7c1;
  --muted: #9a9a9f;
  --muted-2: #6e6d73;
  --red: #e5392f;
  --red-hover: #f0483e;
  --red-text: #ff6a61;
  --red-line: rgba(229, 57, 47, 0.32);

  --sans: "Hanken Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --radius-s: 6px;
  --radius-m: 10px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
a { color: inherit; }
h1, h2 { margin: 0; text-wrap: balance; letter-spacing: -0.025em; line-height: 1.08; font-weight: 640; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--red-text); outline-offset: 3px; border-radius: 4px; }

.wrap {
  position: relative;
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}

/* ---------- header ---------- */
.site-header { position: relative; z-index: 2; }
.site-header .wrap { display: flex; align-items: center; height: 76px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 20px; letter-spacing: -0.02em; text-decoration: none; }
.brand svg { width: 21px; height: 30px; flex: none; display: block; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 22px;
  border-radius: var(--radius-s);
  border: 1px solid transparent;
  font-family: var(--sans);
  font-size: 16.5px;
  font-weight: 620;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-hover); }
.btn-primary .arrow { transition: transform 0.2s var(--ease); }
.btn-primary:hover .arrow { transform: translateX(3px); }
.btn-secondary { background: rgba(16, 16, 18, 0.6); color: var(--text); border-color: var(--line-3); }
.btn-secondary:hover { background: var(--surface-2); border-color: #4d4d53; }

/* ---------- landing ---------- */
body.landing, body.page { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; }
.bg-grid, .bg-glow, .bg-chart { position: fixed; inset: 0; pointer-events: none; }
.bg-grid {
  background-image:
    linear-gradient(90deg, rgba(243, 241, 236, 0.045) 1px, transparent 1px),
    linear-gradient(rgba(243, 241, 236, 0.045) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask-image: radial-gradient(ellipse 75% 70% at 40% 45%, #000 25%, transparent 80%);
  mask-image: radial-gradient(ellipse 75% 70% at 40% 45%, #000 25%, transparent 80%);
}
.bg-glow::before {
  content: "";
  position: absolute; width: 1000px; height: 1000px; left: 30%; top: 50%; margin: -500px 0 0 -500px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(229, 57, 47, 0.16), rgba(229, 57, 47, 0.05) 50%, transparent 78%);
  animation: drift 18s ease-in-out infinite alternate;
}
@keyframes drift { from { transform: translate(-40px, -20px); } to { transform: translate(70px, 30px); } }
.bg-chart { width: 100%; height: 100%; opacity: 0.9; }

.hero { position: relative; z-index: 1; flex: 1; display: flex; align-items: center; padding-block: 48px 72px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted);
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--red); box-shadow: 0 0 10px var(--red); flex: none; animation: blink 1.8s ease-in-out infinite; }
@keyframes blink { 50% { opacity: 0.4; } }
.hero h1 { font-size: clamp(42px, 7vw, 92px); margin-top: 24px; max-width: 13em; letter-spacing: -0.04em; line-height: 1.02; }
.hero .lead { font-size: clamp(18px, 1.8vw, 21px); color: var(--muted); margin-top: 26px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 40px; }

.reveal { animation: rise 0.7s var(--ease) both; }
.reveal.d1 { animation-delay: 0.06s; }
.reveal.d2 { animation-delay: 0.16s; }
.reveal.d3 { animation-delay: 0.26s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- footer ---------- */
.site-footer { position: relative; z-index: 1; border-top: 1px solid var(--line); padding-block: 22px 26px; }
.footer-row { display: flex; justify-content: space-between; align-items: center; gap: 12px 24px; flex-wrap: wrap; }
.footer-row p { color: var(--muted-2); font-size: 13.5px; }
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; }
.footer-links a { color: var(--muted); text-decoration: none; font-size: 14px; }
.footer-links a:hover, .footer-links a[aria-current="page"] { color: var(--text); }

/* ---------- legal pages ---------- */
.legal { padding-block: 40px 96px; flex: 1; }
.legal-inner { max-width: 720px; }
.legal .back { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); text-decoration: none; font-size: 15px; }
.legal .back:hover { color: var(--text); }
.legal h1 { font-size: clamp(36px, 4.4vw, 52px); margin-top: 28px; }
.legal .updated { font-family: var(--mono); font-size: 13px; color: var(--muted-2); margin-top: 16px; }
.legal h2 { font-size: 23px; margin-top: 48px; letter-spacing: -0.015em; line-height: 1.25; }
.legal p, .legal li { color: var(--text-2); font-size: 16.5px; line-height: 1.7; }
.legal p { margin-top: 14px; }
.legal ul { margin: 14px 0 0; padding-left: 22px; }
.legal li + li { margin-top: 8px; }
.legal a { color: var(--text); text-underline-offset: 3px; text-decoration-color: var(--red-line); }
.legal a:hover { text-decoration-color: var(--red-text); }
.legal .summary { margin-top: 28px; padding: 18px 20px; border: 1px solid var(--line-2); border-radius: var(--radius-m); background: var(--surface); }
.legal .summary p { margin: 0; }

@media (max-width: 520px) {
  .actions .btn { width: 100%; }
  .footer-row { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
