/* Night window colors, Ghost layout, Blueprint's split mark. A single dark look by choice:
   your Mac glowing amber at home, the device in your hand its outlined twin. */
:root {
  --bg: #0c1226;
  --surface: #121a33;
  --raised: #182241;
  --fg: #f3ead9;
  --muted: #b9bfd3;
  --line: #26355c;
  --accent: #ffb547;
  --accent-ink: #1a1406;
  --ghost: rgba(255, 181, 71, 0.38);
  --paper: #fff4dd;
  --frame: #3a4b7a;
  --font-display: "Manrope", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Helvetica Neue", Arial, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.6rem;
  --step-3: clamp(2.25rem, 1.4rem + 3.6vw, 4rem);
  --radius: 10px;
  --wrap: 68rem;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
}
a { color: var(--accent); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; text-wrap: balance; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

/* Header */
.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-block: 18px; }
.wordmark {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
  color: var(--fg);
  text-decoration: none;
}
.wordmark .slash { color: var(--accent); margin: 0 0.04em; }
.site-nav { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; font-size: var(--step--1); }
.site-nav a { color: var(--muted); text-decoration: none; }
.site-nav a:hover { color: var(--fg); }
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--accent); border: 1px solid var(--ghost); border-radius: 999px; padding: 3px 10px;
}
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }

/* Hero */
.hero { background: radial-gradient(110% 120% at 88% 100%, #24355e 0%, #121a33 50%, var(--bg) 100%); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 48px; align-items: center; padding-block: 72px 64px; }
.eyebrow { font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 18px; }
.hero h1 { font-size: var(--step-3); font-weight: 800; letter-spacing: -0.02em; }
.hero h1 .twice { position: relative; display: inline-block; isolation: isolate; color: var(--accent); }
.hero h1 .twice::after {
  content: attr(data-text);
  position: absolute; left: 0.07em; top: 0.06em; z-index: -1;
  color: transparent; -webkit-text-stroke: 1.5px var(--ghost);
}
.lede { margin-top: 22px; max-width: 34rem; font-size: var(--step-1); color: var(--muted); line-height: 1.5; }
.hero-actions { margin-top: 32px; display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-body); font-weight: 600; font-size: var(--step--1);
  padding: 12px 20px; border-radius: 8px; text-decoration: none;
  border: 1px solid var(--accent);
}
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 0 22px -4px var(--ghost); }
.btn-quiet { color: var(--accent); background: transparent; }
.hero-art { width: 100%; max-width: 100%; }
.hero-art svg { width: 100%; height: auto; display: block; }
.art-caption { margin-top: 10px; font-family: var(--font-mono); font-size: 0.75rem; color: var(--muted); text-align: center; }

/* SVG drawing, all from tokens */
.s-frame { fill: var(--bg); stroke: var(--frame); stroke-width: 2.5; }
.s-ghost { fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-dasharray: 5 5; opacity: 0.75; }
.s-desk { fill: var(--accent); opacity: 0.92; }
.s-win { fill: var(--paper); }
.s-bar { fill: #e2952c; }
.s-line { fill: var(--bg); opacity: 0.28; }
.s-link { fill: none; stroke: var(--accent); stroke-width: 2; stroke-dasharray: 2 6; stroke-linecap: round; }
.s-label { fill: var(--muted); font-family: var(--font-mono); font-size: 12px; }
.s-hinge { stroke: var(--paper); stroke-width: 1.5; opacity: 0.4; }
.s-glow { fill: var(--accent); opacity: 0.18; filter: blur(18px); }

/* Sections */
section { border-top: 1px solid var(--line); }
section > .wrap { padding-block: 72px; }
.section-head { max-width: 40rem; margin-bottom: 40px; }
.section-head h2 { font-size: var(--step-2); }
.section-head p { margin-top: 12px; color: var(--muted); }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; counter-reset: step; }
.steps li { counter-increment: step; display: grid; gap: 10px; align-content: start; min-width: 0; }
.steps li::before {
  content: counter(step);
  font-family: var(--font-display); font-weight: 700; font-size: 1.1rem;
  width: 40px; height: 40px; display: grid; place-items: center;
  border-radius: 50%; border: 1.5px solid var(--accent); color: var(--accent);
  box-shadow: 4px 3px 0 -1px var(--ghost);
}
.steps h3 { font-size: var(--step-1); }
.steps p { color: var(--muted); }
code, .mono { font-family: var(--font-mono); font-size: 0.9em; }
code { background: var(--surface); border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; }

.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.feature { padding: 28px; display: grid; gap: 10px; align-content: start; min-width: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.feature:nth-child(3n) { border-right: 0; }
.feature:nth-last-child(-n+3) { border-bottom: 0; }
.feature h3 { font-size: var(--step-1); }
.feature p { color: var(--muted); font-size: 0.98rem; }
.mark { width: 34px; height: 24px; position: relative; margin-bottom: 4px; }
.mark::before, .mark::after { content: ""; position: absolute; width: 24px; height: 18px; border-radius: 4px; }
.mark::before { left: 0; top: 0; background: var(--accent); }
.mark::after { left: 9px; top: 6px; border: 1.5px dashed var(--accent); }

.privacy-band .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.privacy-band h2 { font-size: var(--step-2); }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.checklist li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; align-items: baseline; }
.checklist li::before { content: ""; width: 12px; height: 12px; border-radius: 3px; background: var(--accent); transform: translateY(1px); box-shadow: 4px 4px 0 -1px var(--ghost); }

.download { background: var(--surface); }
.dl-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.dl-card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; display: grid; gap: 10px; align-content: start; min-width: 0; }
.dl-platform { font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.dl-card h3 { font-size: var(--step-1); }
.dl-card p { color: var(--muted); }
.dl-card .dl-platform { color: var(--accent); }
.dl-req { font-family: var(--font-mono); font-size: 0.85rem; color: var(--fg) !important; }
.btn-soon { margin-top: 8px; justify-self: start; background: transparent; color: var(--muted); border: 1px dashed var(--ghost); cursor: not-allowed; }
.dl-note { margin-top: 20px; font-size: var(--step--1); color: var(--muted); max-width: 40rem; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); font-size: var(--step--1); color: var(--muted); }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 16px 32px; flex-wrap: wrap; padding-block: 28px 40px; }
.site-footer nav { display: flex; gap: 20px; }
.site-footer a { color: var(--muted); }
.fineprint { flex-basis: 100%; font-size: 0.8rem; }

/* Prose page */
.prose .wrap { padding-block: 56px 72px; }
.prose article { max-width: 42rem; }
.prose h1 { font-size: clamp(2rem, 1.5rem + 2vw, 2.75rem); }
.prose .updated { margin-top: 10px; font-family: var(--font-mono); font-size: 0.8rem; color: var(--muted); }
.prose h2 { font-size: var(--step-1); margin-top: 40px; }
.prose p, .prose ul { margin-top: 12px; }
.prose ul { padding-left: 1.2em; }
.prose li + li { margin-top: 6px; }

@media (max-width: 860px) {
  .hero .wrap, .privacy-band .wrap { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .hero .wrap { padding-block: 48px; }
  .steps { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .features, .dl-grid { grid-template-columns: minmax(0, 1fr); }
  .feature, .feature:nth-child(3n) { border-right: 0; border-bottom: 1px solid var(--line); }
  .feature:nth-last-child(-n+3) { border-bottom: 1px solid var(--line); }
  .feature:last-child { border-bottom: 0; }
  section > .wrap { padding-block: 56px; }
}
@media (max-width: 480px) {
  .site-nav .nav-link { display: none; }
}
@media (prefers-reduced-motion: no-preference) {
  .s-link { animation: flow 2.4s linear infinite; }
  @keyframes flow { to { stroke-dashoffset: -32; } }
}
