@font-face {
  font-family: "Instrument Sans";
  src: url("/fonts/InstrumentSans-Var.woff") format("woff");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/fonts/IBMPlexMono-Regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/fonts/IBMPlexMono-Medium.woff") format("woff");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #101412;
  --bg-elev: #161c19;
  --card: #1a221e;
  --line: #2a3530;
  --line-strong: #3d4d45;
  --text: #ecf2ea;
  --muted: #8d9b91;
  --accent: #c8f26c;
  --accent-ink: #15200c;
  --gold: #e2c47a;
  --gold-ink: #2a220c;
  --nfa: #cbb892;
  --danger-soft: #e8a0a0;
  --max: 1080px;
  --header-h: 4rem;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Instrument Sans", "Segoe UI", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  letter-spacing: -0.011em;
}
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: #dff9a3; }
img { max-width: 100%; height: auto; }
code, .mono { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 0.9em; }
h1, h2, h3 {
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 0 0 0.7rem;
}
h1 { font-size: clamp(2.1rem, 4.6vw, 3.25rem); }
h2 { font-size: clamp(1.4rem, 2.4vw, 1.85rem); margin-top: 2.4rem; }
h3 { font-size: 1.12rem; margin-top: 1.6rem; }

.wrap { width: min(var(--max), calc(100% - 3rem)); margin: 0 auto; }
.skip {
  position: absolute; left: -999px; top: 0;
}
.skip:focus {
  left: 1rem; top: 1rem; z-index: 100;
  background: var(--accent); color: var(--accent-ink);
  padding: 0.4rem 0.7rem; border-radius: 4px;
}

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  width: min(var(--max), calc(100% - 3rem));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  gap: 1.5rem;
}
.wordmark {
  display: flex; align-items: center; gap: 0.6rem;
  color: var(--text); text-decoration: none;
  font-weight: 650; letter-spacing: -0.04em; font-size: 1.15rem;
}
.wordmark:hover { color: var(--text); }
.tick {
  width: 0.7rem; height: 0.7rem;
  background: var(--accent);
  transform: rotate(12deg);
  display: inline-block;
  flex-shrink: 0;
}
nav.primary { display: flex; gap: 1.4rem; align-items: center; }
nav.primary a {
  color: var(--muted); text-decoration: none; font-size: 0.95rem;
}
nav.primary a:hover, nav.primary a[aria-current="page"] { color: var(--text); }
nav.primary a.cta {
  background: var(--accent); color: var(--accent-ink);
  padding: 0.4rem 0.75rem; border-radius: 999px;
  text-decoration: none; font-weight: 600; font-size: 0.9rem;
}
nav.primary a.cta:hover { background: #dff9a3; color: var(--accent-ink); }

.nav-toggle { display: none; }
.nav-toggle-label {
  display: none;
  width: 2rem; height: 2rem;
  cursor: pointer;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  position: relative;
}
.nav-toggle-label span,
.nav-toggle-label span:before,
.nav-toggle-label span:after {
  position: absolute; left: 0.45rem; right: 0.45rem;
  height: 1.5px; background: var(--text);
  content: "";
}
.nav-toggle-label span { top: 50%; }
.nav-toggle-label span:before { top: -6px; }
.nav-toggle-label span:after { top: 6px; }

/* Hero */
.hero { padding: 4.2rem 0 2.6rem; }
.kicker {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1rem;
}
.lede { font-size: 1.2rem; color: var(--muted); max-width: 38rem; margin: 0 0 1.8rem; }
.actions { display: flex; flex-wrap: wrap; gap: 0.7rem; }
.btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.55rem 1rem; border-radius: 999px;
  text-decoration: none; font-weight: 600; font-size: 0.95rem;
  border: 1px solid transparent;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: #dff9a3; color: var(--accent-ink); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn-ghost:hover { color: var(--text); border-color: var(--accent); }
.btn[aria-disabled="true"], .btn.disabled {
  opacity: 0.55; pointer-events: none; cursor: not-allowed;
}

/* Catalog */
.catalog { margin: 1rem 0 3rem; border-top: 1px solid var(--line); }
.script-row {
  display: grid;
  grid-template-columns: 9.25rem 1fr auto;
  gap: 1rem 1.4rem;
  align-items: baseline;
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  text-decoration: none;
}
.script-row:hover { color: var(--text); background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 6%, transparent), transparent 60%); }
.badge-wrap { display: flex; flex-direction: column; align-items: flex-start; gap: 0.3rem; }
.badge { white-space: nowrap; }
.script-row h2, .script-row h3 { margin: 0 0 0.2rem; font-size: 1.2rem; }
.script-row p { margin: 0; color: var(--muted); font-size: 0.98rem; }
.badge {
  display: inline-block;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.18rem 0.45rem;
  border-radius: 3px;
  width: fit-content;
}
.badge-free { background: var(--accent); color: var(--accent-ink); }
.badge-members { background: var(--gold); color: var(--gold-ink); }
.badge-kind {
  background: transparent; color: var(--muted);
  border: 1px solid var(--line-strong);
  margin-left: 0.35rem;
}
.row-go { color: var(--muted); font-size: 1.2rem; align-self: center; }

/* Steps / sections */
.section { padding: 0 0 3rem; }
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
  margin-top: 1.2rem;
}
.step {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  padding: 1.1rem 1.15rem 1.2rem;
}
.step .n {
  font-family: "IBM Plex Mono", monospace;
  color: var(--accent);
  font-size: 0.8rem;
  display: block;
  margin-bottom: 0.4rem;
}
.step p { margin: 0; color: var(--muted); }
.step h3 { margin: 0 0 0.35rem; }

/* Script page */
.crumb { color: var(--muted); font-size: 0.9rem; margin: 1.6rem 0 1.1rem; }
.crumb a { color: var(--muted); text-decoration: none; }
.crumb a:hover { color: var(--accent); }
.title-row { display: flex; flex-wrap: wrap; gap: 0.6rem 0.8rem; align-items: center; margin-bottom: 0.8rem; }
.title-row h1 { margin: 0; }
.shot {
  margin: 1.4rem 0 1.8rem;
  background: #0b0e0c;
  border: 1px solid var(--line);
  overflow: hidden;
}
.shot-frame {
  aspect-ratio: 16 / 9;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 0.7rem;
  padding: 1.5rem;
  background:
    linear-gradient(180deg, #141a16 0%, #0b0e0c 100%);
  position: relative;
}
.shot-frame svg { width: min(88%, 720px); height: auto; opacity: 0.9; }
.shot-caption {
  padding: 0.7rem 1rem;
  color: var(--muted);
  font-size: 0.88rem;
  border-top: 1px solid var(--line);
  background: var(--bg-elev);
}
.settings { width: 100%; border-collapse: collapse; margin: 0.6rem 0 1.2rem; }
.settings th, .settings td {
  text-align: left; vertical-align: top;
  padding: 0.65rem 0.7rem 0.65rem 0;
  border-bottom: 1px solid var(--line);
}
.settings th { color: var(--muted); font-weight: 500; width: 13.5rem; font-size: 0.92rem; }
ol.howto, ul.plain { padding-left: 1.2rem; }
ol.howto li, ul.plain li { margin: 0.4rem 0; }
.note, .nfa-box, .callout {
  border: 1px solid var(--line);
  background: var(--bg-elev);
  padding: 0.9rem 1rem;
  margin: 1.2rem 0;
  color: var(--muted);
}
.nfa-box { border-left: 3px solid var(--nfa); color: var(--nfa); }
.callout strong { color: var(--text); }
.source-link {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.88rem;
}

/* Custom work */
.packages {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 1.2rem 0 1.5rem;
}
.pkg {
  border: 1px solid var(--line);
  background: var(--bg-elev);
  padding: 1.1rem 1.15rem 1.2rem;
}
.pkg h3 { margin-top: 0; }
.pkg .price { font-size: 1.6rem; letter-spacing: -0.03em; margin: 0.2rem 0 0.6rem; }
.pkg .price span { font-size: 0.85rem; color: var(--muted); font-weight: 400; }
.pkg p { color: var(--muted); margin: 0; }
.placeholder-link {
  display: inline-block;
  margin-top: 0.4rem;
  padding: 0.2rem 0;
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.82rem;
  word-break: break-all;
}

/* FAQ */
.faq details {
  border-bottom: 1px solid var(--line);
  padding: 0.85rem 0;
}
.faq summary {
  cursor: pointer;
  font-weight: 600;
  letter-spacing: -0.02em;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:after {
  content: "+";
  float: right;
  color: var(--accent);
  font-weight: 500;
}
.faq details[open] summary:after { content: "–"; }
.faq details p { color: var(--muted); margin: 0.6rem 0 0.2rem; max-width: 40rem; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.6rem 0 2.4rem;
  margin-top: 2rem;
  color: var(--muted);
  font-size: 0.92rem;
}
.site-footer .nfa {
  color: var(--nfa);
  margin: 0 0 0.8rem;
  max-width: 42rem;
}
.foot-row {
  display: flex; flex-wrap: wrap; gap: 0.5rem 1.3rem;
  justify-content: space-between;
  align-items: baseline;
}

@media (max-width: 800px) {
  .wrap, .header-inner { width: min(var(--max), calc(100% - 2rem)); }
  .nav-toggle-label { display: block; }
  nav.primary {
    display: none;
    position: absolute; left: 0; right: 0; top: var(--header-h);
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: flex-start;
    padding: 0.8rem 1.2rem 1.1rem;
    gap: 0.8rem;
  }
  .nav-toggle:checked ~ nav.primary { display: flex; }
  .script-row { grid-template-columns: 1fr auto; }
  .script-row .badge-wrap { grid-column: 1; }
  .steps, .packages { grid-template-columns: 1fr; }
  .settings th { width: 8.5rem; }
  .hero { padding-top: 2.4rem; }
}
