@font-face {
  font-family: "Unbounded";
  src: url("fonts/unbounded-latin-800-normal.woff2") format("woff2");
  font-weight: 800;
  font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: url("fonts/manrope-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: url("fonts/manrope-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: url("fonts/manrope-latin-800-normal.woff2") format("woff2");
  font-weight: 800;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("fonts/jetbrains-mono-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Caveat";
  src: url("fonts/caveat-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --paper: #f3ede2;
  --card: #fbf8f2;
  --ink: #1d1b18;
  --ink-2: #6f675c;
  --red: #e2532d;
  --amber: #f1b52f;
  --line: #d8cfbf;

  --display: "Unbounded", "Arial Black", sans-serif;
  --text: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --hand: "Caveat", "Bradley Hand", cursive;

  --gutter: 16px;
  --radius: 14px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-weight: 500;
  font-size: 18px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
p { margin: 0; }
p, li { text-wrap: pretty; }
a { color: inherit; }
strong { font-weight: 800; }

:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 3px;
}

.wrap {
  width: 100%;
  max-width: calc(576px + 2 * var(--gutter));
  margin: 0 auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left));
  padding-right: max(var(--gutter), env(safe-area-inset-right));
}

.section { padding-top: 64px; }
.section > p + p, .section > p + .btn, .section > .h2 + p { margin-top: 14px; }

.h2 {
  margin: 0 0 20px;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(26px, 7.4vw, 34px);
  line-height: 1.12;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

/* ── Buttons ─────────────────────────────────────────── */

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 56px;
  padding: 14px 20px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  font: 800 18px/1.2 var(--text);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.12s ease, background-color 0.15s ease;
}
.btn:active { transform: scale(0.98); }
.btn[disabled] { opacity: 0.6; cursor: progress; }

.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: #34302b; }

.btn-secondary { background: transparent; color: var(--ink); }
.btn-secondary:hover { background: var(--card); }

/* ── 1. Hero ─────────────────────────────────────────── */

.hero { padding-top: max(28px, env(safe-area-inset-top)); }

.wordmark {
  font-family: var(--display);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.02em;
}

.hero-art {
  width: 100%;
  margin: 28px 0 8px;
}

.title {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(40px, 11.6vw, 64px);
  line-height: 1.04;
  letter-spacing: -0.035em;
}
.accent { color: var(--red); }

.tagline {
  margin-top: 18px;
  font-size: 26px;
  font-weight: 500;
  line-height: 1.3;
}
.tagline mark {
  background: none;
  color: inherit;
  box-shadow: inset 0 -0.42em 0 var(--amber);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.lede {
  margin: 12px 0 28px;
  color: var(--ink-2);
  font-size: 19px;
}

/* ── 2. Rules ────────────────────────────────────────── */

.rules {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 22px;
}
.rules li {
  display: grid;
  grid-template-columns: 44px 1fr;
  align-items: start;
}
.rule-n {
  font-family: var(--display);
  font-weight: 800;
  font-size: 36px;
  line-height: 0.95;
  color: var(--red);
}

/* ── 3. Plans ────────────────────────────────────────── */

.plans { display: grid; gap: 16px; }

.plan {
  padding: 16px;
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: 18px;
}
.plan-top {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 16px;
  align-items: start;
  margin-bottom: 16px;
}
.plan-cover {
  width: 92px;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.plan-title {
  margin: 2px 0 8px;
  font-family: var(--display);
  font-weight: 800;
  font-size: 21px;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.plan-text { color: var(--ink-2); }

.fine {
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.45;
}

/* ── 5. Unlocked ─────────────────────────────────────── */

.unlocked:focus { outline: none; }
.unlocked > .h2 { margin-top: 40px; }

.pdf-ready {
  display: grid;
  gap: 12px;
  padding: 18px 16px;
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: 18px;
}
.pdf-status {
  font-family: var(--hand);
  font-weight: 700;
  font-size: 30px;
  line-height: 1.1;
  color: var(--red);
}

.code-box {
  margin: 24px 0 16px;
  padding: 16px;
  border: 2px dashed var(--ink);
  border-radius: var(--radius);
}
.code-label { font-size: 16px; color: var(--ink-2); }
.code-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 6px;
}
.code {
  font-family: var(--mono);
  font-weight: 600;
  font-size: clamp(18px, 5.4vw, 24px);
  letter-spacing: 0.03em;
  word-break: break-all;
}
.btn-copy {
  flex: none;
  min-width: 84px;
  min-height: 48px;
  padding: 10px 16px;
  border: 2px solid var(--ink);
  border-radius: 12px;
  background: transparent;
  color: var(--ink);
  font: 800 16px/1 var(--text);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.btn-copy:active { transform: scale(0.97); }
.unlocked > .btn + .fine { margin-top: 12px; }
.unlocked > .fine + .fine { margin-top: 8px; }

/* ── 4. Included ─────────────────────────────────────── */

.included {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 14px;
}
.included li {
  position: relative;
  padding-left: 26px;
}
.included li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.55em;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--red);
}
.note {
  margin-top: 22px;
  font-family: var(--hand);
  font-weight: 700;
  font-size: 28px;
  line-height: 1.15;
  color: var(--red);
}

/* ── 6. FAQ ──────────────────────────────────────────── */

.faq { border-top: 2px solid var(--ink); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  position: relative;
  display: block;
  padding: 18px 40px 18px 0;
  font-weight: 800;
  font-size: 19px;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--display);
  font-size: 24px;
  color: var(--red);
  transition: transform 0.15s ease;
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { padding: 0 0 20px; }

/* ── Footer ──────────────────────────────────────────── */

.footer {
  display: grid;
  gap: 12px;
  margin-top: 72px;
  padding-top: 24px;
  padding-bottom: max(40px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.45;
}
.footer a { text-underline-offset: 3px; }

[hidden] { display: none !important; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
