/* Zyphren site: dark, technical, honest. Zero JS; one self-hosted variable font. */

/* Space Grotesk (OFL), latin subset, variable weight — display voice for headings and CTAs.
   22 KB self-hosted; body copy stays on the system stack the app itself uses. */
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("/fonts/space-grotesk-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2191, U+2193, U+2212;
}

:root {
  --bg: #0f1115;
  --card: #191c23;
  --text: #e6e8ee;
  --muted: #9aa1ad;
  --accent: #4cc2ff;
  --accent-strong: #7ad4ff;
  --accent-ink: #06121a;
  --line: #2a2f3a;
  --line-strong: #39404e;
  --ok: #57d98a;
  --danger: #ff6b6b;
  --radius: 12px;
  --radius-control: 9px;
  --speed: 150ms;
  /* Built-in easings are too weak — a strong ease-out reads as instant feedback. */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --mono: ui-monospace, "Cascadia Mono", Menlo, Consolas, monospace;
  --display: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --discord: #5865f2;
}

/* Radius system (locked, mirrors the app): cards/panels 12px, interactive controls 9px. */

* { box-sizing: border-box; }

/* visually hidden, screen-reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

html {
  color-scheme: dark;
  scroll-behavior: smooth;
  /* lets height:auto interpolate (animated FAQ); inert where unsupported */
  interpolate-size: allow-keywords;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* film grain on a fixed non-interactive layer — material texture, kills the flat-render look */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: 0.05;
  background: 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.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.container {
  max-width: 1100px;
  margin-inline: auto;
  padding-inline: 24px;
}

/* ---- typography ---- */
h1, h2, h3 { margin: 0; font-family: var(--display); }
h1 {
  font-size: clamp(2.5rem, 5.5vw, 3.7rem);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
h2 {
  font-size: clamp(1.7rem, 2.6vw, 2.2rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.015em;
}
p { margin: 0; }
a { color: var(--accent); }

::selection { background: rgba(76, 194, 255, 0.25); }

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

/* anchored sections land below the sticky header */
section[id] { scroll-margin-top: 84px; }

/* ---- header / nav ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(15, 17, 21, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 64px;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--text);
  text-decoration: none;
}
/* same mark as the favicon: card tile, hairline edge, accent Z */
.wordmark-mark {
  width: 1.5em;
  height: 1.5em;
  flex-shrink: 0;
}
.wordmark-mark .mark-z {
  fill: var(--accent);
  transition: fill var(--speed) ease;
}
.wordmark:hover .mark-z { fill: var(--accent-strong); }
.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-left: auto;
}
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14.5px;
  white-space: nowrap;
  transition: color var(--speed) ease;
}
.nav-links a:hover { color: var(--text); }
.nav-side {
  display: flex;
  align-items: center;
  gap: 20px;
}
.lang-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: color var(--speed) ease;
}
.lang-link:hover { color: var(--text); }

/* ---- buttons ---- */
.btn-buy {
  display: inline-block;
  white-space: nowrap;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--display);
  font-weight: 600;
  font-size: 15px;
  line-height: 1.3;
  text-decoration: none;
  border: 1px solid var(--accent);
  border-radius: var(--radius-control);
  padding: 10px 20px;
  transition: background var(--speed) ease, border-color var(--speed) ease,
              transform 160ms var(--ease-out);
}
.btn-buy:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
}
/* press feedback: scale, not translate — the button visibly responds under the cursor */
.btn-buy:active { transform: scale(0.97); }
.btn-block {
  display: block;
  width: 100%;
  text-align: center;
  padding: 13px 24px;
  font-size: 16px;
}
.link-quiet {
  color: var(--accent);
  text-decoration: none;
  font-size: 15px;
  white-space: nowrap;
  transition: color var(--speed) ease;
}
.link-quiet:hover {
  color: var(--accent-strong);
  text-decoration: underline;
}

/* ---- sections ---- */
.section { padding: clamp(72px, 9vw, 112px) 0; }

/* Scroll-driven section reveal — pure CSS progressive enhancement (no JS budget).
   Browsers without animation-timeline render everything static. */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    @keyframes section-rise {
      from { opacity: 0; transform: translateY(18px); }
      to   { opacity: 1; transform: none; }
    }
    .section > .container {
      animation: section-rise both;
      animation-timeline: view();
      animation-range: entry 5% entry 38%;
    }
  }
}

/* ---- hero entrance (one-time, page load only — never on repeated interactions).
       `backwards` holds the hidden state through each stagger delay; the reduced-motion
       block below kills the animation, leaving elements in their natural visible state. ---- */
@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
}
.hero h1        { animation: rise 550ms var(--ease-out) backwards; }
.hero .hero-sub { animation: rise 550ms var(--ease-out) 60ms backwards; }
.hero .cta-row  { animation: rise 550ms var(--ease-out) 120ms backwards; }
.hero .app-card { animation: rise 650ms var(--ease-out) 150ms backwards; }

/* ---- hero (split: copy left, app result replica right) ---- */
.hero {
  position: relative;
  padding: 88px 0 56px;
}
/* single ambient light source, brand cyan at near-invisible alpha — depth, not glow */
.hero::before {
  content: "";
  position: absolute;
  inset: -64px 0 auto;
  height: 480px;
  background: radial-gradient(640px 320px at 28% 0%, rgba(76, 194, 255, 0.07), transparent 70%);
  pointer-events: none;
}
.hero .container {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}
.hero-sub {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 34em;
  margin: 20px 0 32px;
}
.cta-row {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}

/* ---- app result replica (faithful mini-version of the app's result step, same tokens,
        real field-test numbers — the honest stand-in for a screenshot) ---- */
.app-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 24px 20px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}
.app-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 14px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.app-card-name {
  font-family: var(--display);
  font-weight: 700;
  font-size: 13.5px;
}
.app-card-step {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent);
}
.app-compare {
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  gap: 12px;
  padding: 4px 0 2px;
}
.app-score { display: grid; justify-items: center; gap: 2px; }
.app-num {
  font-family: var(--display);
  font-size: clamp(2.1rem, 3.4vw, 2.6rem);
  font-weight: 700;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.is-after .app-num { color: var(--accent); }
.app-lbl {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.app-fps {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 4px;
}
.app-delta {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--ok);
  border: 1px solid rgba(87, 217, 138, 0.3);
  background: rgba(87, 217, 138, 0.08);
  border-radius: 999px;
  padding: 3px 10px;
  font-variant-numeric: tabular-nums;
}
.app-foot {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.6;
}

/* ---- how it works (asymmetric: sticky intro left, step rail right) ---- */
.how {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 64px;
  align-items: start;
}
.how-intro { position: sticky; top: 100px; }
.how-intro p {
  color: var(--muted);
  margin-top: 14px;
  max-width: 28em;
}
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
}
.steps li {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 18px;
  padding: 24px 0;
}
.steps li + li { border-top: 1px solid var(--line); }
.steps li:first-child { padding-top: 4px; }
.step-num {
  font-family: var(--display);
  font-variant-numeric: tabular-nums;
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.15;
  color: var(--accent);
}
.steps h3 {
  font-size: 1.08rem;
  font-weight: 650;
  margin-bottom: 6px;
}
.steps p {
  color: var(--muted);
  font-size: 14.5px;
  max-width: 44em;
}

/* ---- does / never (one panel, hairline-split) ---- */
.contrast {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
}
.contrast-col { padding: 30px 34px 28px; }
.contrast-col + .contrast-col { border-left: 1px solid var(--line); }
.contrast-col h2 {
  font-size: 1.2rem;
  margin-bottom: 14px;
}
.checklist {
  list-style: none;
  margin: 0;
  padding: 0;
}
.checklist li {
  position: relative;
  padding: 8px 0 8px 30px;
  font-size: 15px;
  line-height: 1.5;
}
.checklist li::before {
  position: absolute;
  left: 0;
  top: 8px;
  font-weight: 700;
}
.list-does li::before { content: "✓"; color: var(--ok); }
.list-never li::before { content: "✗"; color: var(--danger); }

/* real tweak names from the app, as quiet mono tags */
.tags-label {
  margin-top: 22px;
  font-size: 12.5px;
  color: var(--muted);
}
.tag-row {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 0;
  padding: 0;
}
.tag-row li {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 11px;
  white-space: nowrap;
}

/* ---- price card ---- */
.price-card {
  max-width: 560px;
  margin-inline: auto;
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 36px 38px 30px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}
.price-card h2 {
  font-size: 1.8rem;
  font-variant-numeric: tabular-nums;
}
.price-list {
  list-style: none;
  margin: 22px 0 18px;
  padding: 0;
}
.price-list li {
  position: relative;
  padding: 7px 0 7px 28px;
  font-size: 15px;
  line-height: 1.5;
}
.price-list li::before {
  content: "✓";
  color: var(--ok);
  font-weight: 700;
  position: absolute;
  left: 0;
  top: 7px;
}
.promo-hint {
  font-size: 13.5px;
  color: var(--muted);
  margin-bottom: 24px;
}
.price-alt {
  margin-top: 16px;
  font-size: 13.5px;
  color: var(--muted);
  text-align: center;
}

/* ---- FAQ (details/summary accordion, CSS-only indicator) ---- */
.faq { max-width: 760px; }
.faq h2 { margin-bottom: 14px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  font-weight: 600;
  font-size: 1.02rem;
  transition: color var(--speed) ease;
}
.faq summary:hover { color: var(--accent-strong); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  flex: none;
  font-family: var(--mono);
  font-size: 19px;
  line-height: 1;
  color: var(--muted);
  transition: transform 200ms var(--ease-out), color var(--speed) ease;
}
.faq details[open] summary::after {
  transform: rotate(45deg);
  color: var(--accent);
}
.faq details p {
  margin: 0 0 18px;
  color: var(--muted);
  max-width: 60ch;
}
/* Animated open/close — progressive enhancement (needs ::details-content + interpolate-size;
   browsers without support keep the instant toggle). Close is snappier than open. */
.faq details::details-content {
  height: 0;
  opacity: 0;
  overflow: clip;
  transition: height 200ms var(--ease-out), opacity 200ms var(--ease-out),
              content-visibility 200ms allow-discrete;
}
.faq details[open]::details-content {
  height: auto;
  opacity: 1;
  transition: height 250ms var(--ease-out), opacity 250ms var(--ease-out),
              content-visibility 250ms allow-discrete;
}

/* ---- community (Discord) ---- */
.community {
  text-align: center;
  padding-top: 0;
}
.community p {
  color: var(--muted);
  max-width: 46em;
  margin: 12px auto 26px;
}
.btn-discord {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--card);
  color: var(--text);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-control);
  padding: 11px 22px;
  transition: border-color var(--speed) ease, background var(--speed) ease,
              transform 160ms var(--ease-out);
}
.btn-discord:hover {
  border-color: var(--discord);
  background: rgba(88, 101, 242, 0.12);
}
.btn-discord:active { transform: scale(0.97); }
.btn-discord svg {
  width: 20px;
  height: 16px;
  flex: none;
  fill: var(--discord);
}

/* ---- footer (two rows: identity, then links) ---- */
.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 72px;
  padding: 36px 0 30px;
  font-size: 13.5px;
  color: var(--muted);
}
.footer-id {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}
.footer-id .wordmark { font-size: 16px; }
.footer-tag { color: var(--muted); font-size: 13px; }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 26px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.site-footer a {
  color: var(--muted);
  text-decoration: none;
  transition: color var(--speed) ease;
}
.site-footer a:hover { color: var(--text); }
.site-footer .wordmark { color: var(--text); }
.copyright { margin-left: auto; }

/* ---- document pages (legal.html, privacy.html) ---- */
/* Single-column prose layout; ~65ch measure; reuses all tokens above. */
.doc {
  max-width: 740px;
  padding-block: 56px 96px;
}
.doc h1 {
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  margin-bottom: 32px;
}
.doc h2 {
  font-size: 1.25rem;
  margin-top: 40px;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.doc h3 {
  font-size: 1rem;
  font-weight: 650;
  margin-top: 24px;
  margin-bottom: 6px;
}
.doc p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
  max-width: 65ch;
  margin-top: 8px;
}
.doc p.doc-lead {
  font-size: 16px;
  color: var(--text);
  margin-bottom: 8px;
}
.doc-list {
  list-style: none;
  margin: 12px 0 16px;
  padding: 0;
}
.doc-list li {
  position: relative;
  padding: 6px 0 6px 22px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
  max-width: 65ch;
}
.doc-list li::before {
  content: "–";
  position: absolute;
  left: 0;
  top: 6px;
  color: var(--line-strong);
  font-weight: 700;
}
.doc code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 5px;
}
/* EN summary section gets a subtle separator */
.doc section[lang="en"] {
  margin-top: 56px;
  padding-top: 40px;
  border-top: 1px solid var(--line-strong);
}
.doc section[lang="en"] h2 {
  color: var(--muted);
  font-size: 1.1rem;
  letter-spacing: 0;
}

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

/* ---- mobile collapse (every multi-column layout) ---- */
@media (max-width: 900px) {
  .how {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .how-intro { position: static; }
}
@media (max-width: 768px) {
  .nav-links { display: none; }
  .site-header .container { gap: 16px; }
  .nav-side { margin-left: auto; }
  .hero { padding: 44px 0 24px; }
  .hero .container {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .section { padding: 56px 0; }
  .steps li { grid-template-columns: 44px 1fr; gap: 12px; }
  .contrast { grid-template-columns: 1fr; }
  .contrast-col { padding: 24px 22px; }
  .contrast-col + .contrast-col {
    border-left: none;
    border-top: 1px solid var(--line);
  }
  .price-card { padding: 28px 22px 24px; }
  .footer-links { gap: 8px 20px; }
  .copyright {
    margin-left: 0;
    flex-basis: 100%;
  }
}
