@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=IBM+Plex+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  --ink: #17161a;
  --surface: #201e23;
  --surface-2: #2a2730;
  --paper: #ede8e0;
  --paper-dim: #a8a29a;
  --paper-faint: #6f6b64;
  --signal: #c1432b;
  --signal-dim: rgba(193, 67, 43, 0.16);
  --gold: #b98d3e;
  --gold-dim: rgba(185, 141, 62, 0.16);
  --ok: #7a9b7e;
  --rule: rgba(237, 232, 224, 0.12);
  --radius: 10px;
  --max: 920px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: 'IBM Plex Sans', ui-sans-serif, system-ui, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

a { color: var(--gold); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

h1, h2, h3 { font-family: 'Fraunces', ui-serif, Georgia, serif; font-weight: 600; letter-spacing: -0.01em; margin: 0; }

.eyebrow {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--paper-faint);
}

/* ---------- Header ---------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0;
  border-bottom: 1px solid var(--rule);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--paper); }
.brand img { width: 26px; height: 26px; border-radius: 6px; }
.brand span { font-family: 'Fraunces', serif; font-weight: 600; font-size: 18px; }
.site-header nav a {
  color: var(--paper-dim);
  text-decoration: none;
  font-size: 14px;
  margin-left: 22px;
}
.site-header nav a:hover { color: var(--paper); }

/* ---------- Hero ---------- */
.hero { padding: 72px 0 56px; }
.hero h1 {
  font-size: clamp(34px, 5.5vw, 54px);
  line-height: 1.08;
  max-width: 15ch;
}
.hero h1 em { font-style: normal; color: var(--signal); }
.hero p.lede {
  font-size: 18px;
  color: var(--paper-dim);
  max-width: 52ch;
  margin-top: 18px;
}
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 30px; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 14.5px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn-primary { background: var(--paper); color: var(--ink); }
.btn-primary:hover { background: #fff; }
.btn-secondary { background: transparent; color: var(--paper); border-color: var(--rule); }
.btn-secondary:hover { border-color: var(--paper-dim); }

/* ---------- Redline demo (hero signature) ---------- */
.demo {
  margin-top: 52px;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 28px 30px;
  max-width: 640px;
}
.demo-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.demo-dots { display: flex; gap: 6px; }
.demo-dots span { width: 8px; height: 8px; border-radius: 50%; background: var(--rule); }
.demo-dots span.active { background: var(--signal); }
.demo-text {
  font-size: 20px;
  line-height: 1.9;
  direction: rtl;
  text-align: right;
  min-height: 4.5em;
}
.demo-text .struck {
  color: var(--paper-faint);
  text-decoration: line-through;
  text-decoration-color: var(--signal);
  margin-left: 6px;
}
.demo-text .swap {
  color: var(--paper);
  font-weight: 600;
  background: linear-gradient(to bottom, transparent 62%, var(--signal-dim) 62%);
  border-bottom: 1.5px dotted var(--signal);
  padding: 0 2px;
}
.demo-reason {
  margin-top: 14px;
  font-size: 13px;
  color: var(--gold);
  direction: rtl;
  text-align: right;
}
.demo-reason::before { content: '↳ '; color: var(--paper-faint); }

/* ---------- Sections ---------- */
section { padding: 64px 0; border-top: 1px solid var(--rule); }
section h2 { font-size: clamp(26px, 3.5vw, 34px); margin-bottom: 14px; }
section p.section-lede { color: var(--paper-dim); max-width: 60ch; font-size: 16px; }

.phase-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 32px;
}
@media (max-width: 720px) { .phase-grid { grid-template-columns: 1fr; } }
.phase-card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 24px;
  border-top: 3px solid var(--signal);
}
.phase-card.phase-ai { border-top-color: var(--gold); }
.phase-card .phase-tag {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--signal);
}
.phase-card.phase-ai .phase-tag { color: var(--gold); }
.phase-card h3 { font-size: 19px; margin: 10px 0 8px; font-family: 'IBM Plex Sans', sans-serif; font-weight: 600; }
.phase-card p { color: var(--paper-dim); font-size: 14.5px; margin: 0; }

/* ---------- Dictionary table ---------- */
.dict-table {
  margin-top: 32px;
  border: 1px solid var(--rule);
  border-radius: 12px;
  overflow: hidden;
}
.dict-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1.4fr;
  gap: 16px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--rule);
  font-size: 14px;
  align-items: center;
}
.dict-row:last-child { border-bottom: none; }
.dict-row.dict-head {
  background: var(--surface-2);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--paper-faint);
}
.dict-row .original { direction: rtl; text-align: right; color: var(--paper-faint); text-decoration: line-through; text-decoration-color: var(--signal); font-size: 16px; }
.dict-row .replacement { direction: rtl; text-align: right; color: var(--paper); font-size: 16px; font-weight: 500; }
.dict-row .reason { color: var(--paper-dim); direction: rtl; text-align: right; font-size: 13.5px; }
.dict-note { margin-top: 14px; font-size: 13.5px; color: var(--paper-faint); }

/* ---------- Privacy / install lists ---------- */
.check-list { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 14px; }
.check-list li { padding-left: 26px; position: relative; color: var(--paper-dim); font-size: 15px; }
.check-list li::before { content: '—'; position: absolute; left: 0; color: var(--gold); }
.check-list strong { color: var(--paper); font-weight: 600; }

.steps { counter-reset: step; list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 16px; }
.steps li { counter-increment: step; padding-left: 40px; position: relative; color: var(--paper-dim); font-size: 15px; }
.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: -2px;
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 1px solid var(--rule);
  display: flex; align-items: center; justify-content: center;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  color: var(--paper);
}
.steps strong { color: var(--paper); }
.steps code { background: var(--surface-2); padding: 2px 6px; border-radius: 4px; font-family: 'IBM Plex Mono', monospace; font-size: 13px; }

/* ---------- Footer ---------- */
footer { padding: 40px 0 60px; border-top: 1px solid var(--rule); }
footer .wrap { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
footer p { color: var(--paper-faint); font-size: 13px; margin: 0; }
footer .footer-links a { color: var(--paper-dim); text-decoration: none; font-size: 13px; margin-left: 18px; }
footer .footer-links a:hover { color: var(--paper); }

/* ---------- Simple content page (privacy) ---------- */
.doc { padding: 56px 0 80px; }
.doc h1 { font-size: 36px; margin-bottom: 6px; }
.doc .updated { color: var(--paper-faint); font-size: 13px; margin-bottom: 40px; }
.doc h2 { font-size: 21px; margin-top: 40px; margin-bottom: 12px; font-family: 'IBM Plex Sans', sans-serif; font-weight: 600; }
.doc p, .doc li { color: var(--paper-dim); font-size: 15.5px; }
.doc ul { padding-left: 20px; }
.doc .callout {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--gold);
  border-radius: 8px;
  padding: 16px 20px;
  margin: 24px 0;
  font-size: 14.5px;
}
