/* Ghosty — terminal-noir editorial */

:root {
  --ink: #0b0e0d;
  --ink-2: #111614;
  --ink-3: #1a221f;
  --line: #243029;
  --bone: #f1eee4;
  --bone-dim: #b8b5a9;
  --phosphor: #8df0c3;
  --phosphor-dim: #4d8f73;
  --amber: #e8c47c;
  --font-display: "Fraunces", Georgia, serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--ink);
  color: var(--bone);
  font-family: var(--font-display);
  font-weight: 340;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ── atmosphere ─────────────────────────────── */

.atmosphere {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(900px 600px at 85% -10%, rgba(141, 240, 195, 0.07), transparent 60%),
    radial-gradient(700px 500px at -10% 35%, rgba(232, 196, 124, 0.05), transparent 60%),
    var(--ink);
}

.atmosphere::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 72px 72px;
  opacity: 0.14;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black, transparent 75%);
}

.grain {
  position: fixed;
  inset: -50%;
  z-index: -1;
  pointer-events: none;
  opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.04 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain-shift 9s steps(6) infinite;
}

@keyframes grain-shift {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-3%, 2%); }
  40% { transform: translate(2%, -3%); }
  60% { transform: translate(-2%, -2%); }
  80% { transform: translate(3%, 3%); }
}

/* ── shell ──────────────────────────────────── */

.shell {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 28px;
}

/* ── nav ────────────────────────────────────── */

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 0;
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--bone);
}

.wordmark span {
  font-family: var(--font-mono);
  font-size: 15px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
}

.ghost-mark {
  width: 26px;
  height: 30px;
  animation: bob 4.5s ease-in-out infinite;
}

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
  font-family: var(--font-mono);
  font-size: 13px;
}

.nav-links a {
  color: var(--bone-dim);
  text-decoration: none;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--phosphor); }

.btn {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink);
  background: var(--phosphor);
  padding: 10px 20px;
  border-radius: 4px;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 0 0 rgba(141, 240, 195, 0);
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(141, 240, 195, 0.25);
}

/* ── hero ───────────────────────────────────── */

.hero {
  padding: 88px 0 64px;
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 56px;
  align-items: center;
}

.kicker {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--phosphor);
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 26px;
}

.kicker::before {
  content: "";
  width: 36px;
  height: 1px;
  background: var(--phosphor-dim);
}

h1 {
  font-size: clamp(40px, 5.6vw, 62px);
  font-weight: 420;
  line-height: 1.06;
  letter-spacing: -0.015em;
  margin-bottom: 26px;
}

h1 em {
  font-style: italic;
  font-weight: 360;
  color: var(--phosphor);
}

.lede {
  font-size: 19px;
  color: var(--bone-dim);
  max-width: 46ch;
  margin-bottom: 36px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.install-chip {
  font-family: var(--font-mono);
  font-size: 13.5px;
  color: var(--phosphor);
  background: var(--ink-2);
  border: 1px solid var(--line);
  padding: 11px 18px;
  border-radius: 4px;
}

.install-chip::before { content: "$ "; color: var(--phosphor-dim); }

/* staggered page-load reveal */
.reveal { opacity: 0; animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) forwards; }
.reveal.d1 { animation-delay: 0.08s; }
.reveal.d2 { animation-delay: 0.18s; }
.reveal.d3 { animation-delay: 0.28s; }
.reveal.d4 { animation-delay: 0.42s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── terminal ───────────────────────────────── */

.terminal {
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), 0 0 60px rgba(141, 240, 195, 0.05);
  overflow: hidden;
  transform: rotate(1.2deg);
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.terminal-bar i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--ink-3);
  border: 1px solid var(--line);
}

.terminal-bar span {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--bone-dim);
}

.terminal-body {
  padding: 20px 20px 24px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 2.05;
}

.terminal-body .line { opacity: 0; animation: rise 0.4s ease forwards; white-space: nowrap; }
.t1 { animation-delay: 0.7s; }
.t2 { animation-delay: 1.3s; }
.t3 { animation-delay: 1.9s; }
.t4 { animation-delay: 2.5s; }
.t5 { animation-delay: 3.1s; }
.t6 { animation-delay: 3.9s; }
.t7 { animation-delay: 4.7s; }

.p { color: var(--phosphor-dim); }
.q { color: var(--amber); }
.ok { color: var(--phosphor); }
.dim { color: var(--bone-dim); }
.url { color: var(--phosphor); text-decoration: underline; text-underline-offset: 3px; }

.cursor {
  display: inline-block;
  width: 8px;
  height: 15px;
  background: var(--phosphor);
  vertical-align: -2px;
  animation: blink 1.1s steps(1) infinite;
}

@keyframes blink { 50% { opacity: 0; } }

/* ── sections ───────────────────────────────── */

section { padding: 72px 0; }

.section-label {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--phosphor);
  margin-bottom: 48px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* features — asymmetric trio */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

.feature {
  background: var(--ink);
  padding: 34px 30px 38px;
  transition: background 0.25s;
}

.feature:hover { background: var(--ink-2); }

.feature:nth-child(2) { transform: translateY(0); }

.feature .num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--phosphor-dim);
  display: block;
  margin-bottom: 22px;
}

.feature h3 {
  font-size: 23px;
  font-weight: 420;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.feature p { color: var(--bone-dim); font-size: 15.5px; }

/* how it works — editorial list */
.steps { counter-reset: step; }

.step {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 28px;
  padding: 30px 0;
  border-top: 1px solid var(--line);
  align-items: baseline;
}

.step:last-child { border-bottom: 1px solid var(--line); }

.step::before {
  counter-increment: step;
  content: "0" counter(step);
  font-family: var(--font-mono);
  font-size: 30px;
  color: var(--phosphor);
  opacity: 0.85;
}

.step h3 { font-size: 21px; font-weight: 420; margin-bottom: 6px; }
.step p { color: var(--bone-dim); font-size: 15.5px; max-width: 62ch; }
.step code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  color: var(--phosphor);
  background: var(--ink-2);
  border: 1px solid var(--line);
  padding: 1px 7px;
  border-radius: 3px;
}

/* closing CTA */
.closing {
  text-align: center;
  padding: 96px 0 110px;
}

.closing .ghost-mark {
  width: 44px;
  height: 50px;
  margin: 0 auto 28px;
  display: block;
}

.closing h2 {
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 420;
  letter-spacing: -0.01em;
  margin-bottom: 14px;
}

.closing h2 em { font-style: italic; color: var(--phosphor); font-weight: 360; }

.closing p {
  color: var(--bone-dim);
  margin-bottom: 34px;
}

/* ── footer ─────────────────────────────────── */

footer {
  border-top: 1px solid var(--line);
  padding: 34px 0 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--bone-dim);
}

footer .links { display: flex; gap: 24px; }
footer a { color: var(--bone-dim); text-decoration: none; }
footer a:hover { color: var(--phosphor); }

/* ── legal pages ────────────────────────────── */

.legal {
  max-width: 720px;
  margin: 0 auto;
  padding: 64px 28px 96px;
}

.legal h1 {
  font-size: clamp(34px, 4.5vw, 46px);
  margin-bottom: 10px;
}

.legal .meta {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--phosphor);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 48px;
}

.legal h2 {
  font-size: 23px;
  font-weight: 420;
  margin: 44px 0 12px;
  letter-spacing: -0.01em;
}

.legal p, .legal li { color: var(--bone-dim); margin-bottom: 12px; }
.legal ul { padding-left: 22px; margin-bottom: 16px; }
.legal a { color: var(--phosphor); text-decoration: underline; text-underline-offset: 3px; }
.legal strong { color: var(--bone); font-weight: 500; }

/* ── responsive ─────────────────────────────── */

@media (max-width: 880px) {
  .hero { grid-template-columns: 1fr; padding-top: 48px; }
  .terminal { transform: rotate(0); }
  .features { grid-template-columns: 1fr; }
  .step { grid-template-columns: 64px 1fr; gap: 18px; }
  .step::before { font-size: 22px; }
  .nav-links .hide-sm { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal, .terminal-body .line { opacity: 1; }
}
