/* Duomanga site. System fonts only, no third-party requests.
   Colours follow the app's Newsprint look: paper, one ink, one red (docs/DESIGN.md).
   Every text pair is 4.5:1 or better, in light and dark. */

:root {
  --paper: #f4f0e8;
  --band: #eae4d6;
  --ink: #1a1817;
  --muted: #5c554b;
  --rule: #cfc7b6;
  --accent: #c23b1e;
  --on-accent: #ffffff;
  --accent-text: #b33518;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Hoefler Text", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #151413;
    --band: #201e1c;
    --ink: #f2ece0;
    --muted: #b5ada0;
    --rule: #3a3632;
    --accent: #f0735a;
    --on-accent: #151413;
    --accent-text: #f0735a;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 1.0625rem/1.6 var(--sans);
}

img, video, svg { max-width: 100%; height: auto; }

a { color: var(--accent-text); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid var(--accent-text); outline-offset: 3px; border-radius: 2px; }

.skip {
  position: absolute; left: -999px; top: 0;
  background: var(--ink); color: var(--paper); padding: 0.6rem 1rem; z-index: 10;
}
.skip:focus { left: 0; }

.wrap { width: min(100% - 2.5rem, 68rem); margin-inline: auto; }
.wrap.narrow { width: min(100% - 2.5rem, 42rem); }

h1, h2, h3 { font-family: var(--serif); line-height: 1.15; margin: 0 0 0.6em; font-weight: 700; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.1rem, 5.5vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }

section { padding: clamp(2.5rem, 7vw, 4.5rem) 0; }
.band { background: var(--band); }

.lede { font-size: 1.2rem; color: var(--ink); max-width: 38rem; }
.kicker {
  font: 700 0.8rem/1 var(--sans); letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent-text); margin: 0 0 1rem;
}
.fine { font-size: 0.875rem; color: var(--muted); margin: 0.6rem 0 0; }
.note { color: var(--muted); font-size: 0.95rem; margin-top: 1.25rem; }
.tag {
  display: inline-block; font: 700 0.7rem/1 var(--sans); letter-spacing: 0.08em; text-transform: uppercase;
  border: 1px solid var(--muted); color: var(--muted); padding: 0.25rem 0.45rem; border-radius: 2px; margin-right: 0.4rem;
}

/* Header and footer */
.top { border-bottom: 1px solid var(--rule); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.9rem 0; }
.mark { font: 700 1.35rem/1 var(--serif); color: var(--ink); text-decoration: none; letter-spacing: -0.01em; }
.top nav { display: flex; align-items: center; gap: 1.2rem; font-size: 0.95rem; }
.top nav a:not(.pill) { color: var(--ink); }
@media (max-width: 34rem) { .top nav a:not(.pill) { display: none; } }

.pill {
  background: var(--accent); color: var(--on-accent); text-decoration: none; font-weight: 600;
  padding: 0.55rem 1rem; border-radius: 999px;
}
.pill:hover { text-decoration: underline; }

.foot { border-top: 1px solid var(--rule); padding: 2rem 0 3rem; }
.foot-links { display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; margin: 0 0 1rem; }

/* Hero */
.hero { padding-top: clamp(2rem, 6vw, 4rem); }
.hero-grid { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 56rem) { .hero-grid { grid-template-columns: 1.15fr 1fr; gap: 4rem; } }
.small-print { margin-top: 1rem; }

/* Sign-up box */
.signup label { display: block; font-weight: 600; margin-bottom: 0.4rem; font-size: 0.95rem; }
.signup .row { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.signup input[type="email"] {
  flex: 1 1 15rem; min-width: 0; font: inherit; color: var(--ink); background: var(--paper);
  border: 2px solid var(--ink); border-radius: 4px; padding: 0.75rem 0.9rem; min-height: 3rem;
}
.band .signup input[type="email"] { background: var(--paper); }
.signup button, .details button {
  font: inherit; font-weight: 700; cursor: pointer; min-height: 3rem;
  background: var(--accent); color: var(--on-accent); border: 2px solid var(--accent);
  border-radius: 4px; padding: 0.75rem 1.2rem;
}
.signup button:hover, .details button:hover { filter: brightness(0.94); }
.signup button[disabled], .details button[disabled] { opacity: 0.6; cursor: progress; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.status { min-height: 1.4em; margin: 0.5rem 0 0; font-size: 0.95rem; }
.status.error { color: var(--accent-text); font-weight: 600; }

/* Diagram of the pages. Drawn in CSS, labelled as a diagram. */
.diagram { margin: 0; }
.states { display: grid; grid-template-columns: 1.7fr 1.7fr 1fr; gap: 1rem; align-items: end; }
.state { display: flex; justify-content: center; }
.spread, .outer { display: flex; width: 100%; gap: 0; border: 2px solid var(--ink); border-radius: 6px; background: var(--ink); }
.outer { width: 100%; }
.page {
  flex: 1; aspect-ratio: 3 / 4; background: var(--paper); display: flex; flex-direction: column;
  align-items: center; justify-content: center; font: 0.7rem/1.2 var(--sans); color: var(--muted); gap: 0.2rem;
  background-image: radial-gradient(var(--rule) 1px, transparent 1.5px); background-size: 8px 8px;
}
.page b { font: 700 1.6rem/1 var(--serif); color: var(--ink); background: var(--paper); padding: 0 0.3rem; }
.spread .page + .page { margin-left: 4px; }
.page.blank { background-image: none; background: var(--band); }
.outer .page { aspect-ratio: 9 / 16; }
.diagram figcaption { margin-top: 1rem; font-size: 0.95rem; color: var(--muted); }
.diagram figcaption .tag { display: block; width: max-content; margin: 0 0 0.5rem; }

/* Sections */
.cols { display: grid; gap: 1.5rem; }
@media (min-width: 52rem) {
  .cols { grid-template-columns: repeat(3, 1fr); gap: 2rem; }
  .cols.two { grid-template-columns: repeat(2, 1fr); }
}
.cols article { border-top: 3px solid var(--ink); padding-top: 1rem; }
.cols article p { color: var(--ink); }
.cols article.card { background: var(--paper); border: 2px solid var(--ink); padding: 1.25rem 1.5rem; border-radius: 4px; }
.card ul { margin: 0; padding-left: 1.2rem; }
.card li { margin-bottom: 0.35rem; }

.box { border: 2px solid var(--ink); border-radius: 4px; padding: clamp(1.25rem, 4vw, 2rem); }
.box ul { padding-left: 1.2rem; }
.box li { margin-bottom: 0.4rem; }

/* Clips (filled in when src/media/clips.json exists) */
.clips { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1.5rem; }
.clip { margin: 0; }
.clip video { width: 100%; border-radius: 6px; background: #000; }
.clip figcaption { margin-top: 0.6rem; font-size: 0.9rem; color: var(--muted); }

/* FAQ */
details { border-bottom: 1px solid var(--rule); padding: 0.9rem 0; }
details:first-of-type { border-top: 1px solid var(--rule); }
summary { cursor: pointer; font-weight: 600; font-size: 1.05rem; }
summary::marker { color: var(--accent-text); }
details p { margin: 0.7rem 0 0; color: var(--ink); }

/* Document pages: compare, privacy, support, thanks */
.doc { padding: clamp(2rem, 6vw, 4rem) 0; }
.doc .band { margin-top: 3rem; }
.doc article > h1 { margin-bottom: 0.4em; }
.doc h2 { margin-top: 2em; }
.doc h3 { margin-top: 1.6em; }
.doc li { margin-bottom: 0.4rem; }
.doc table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 0.7rem 0.8rem; border-bottom: 1px solid var(--rule); }
.doc thead th { border-bottom: 2px solid var(--ink); }
.doc tbody th { font-weight: 600; width: 28%; }
.table-wrap { overflow-x: auto; margin: 1rem 0; }
.table-wrap table { min-width: 40rem; }
.doc code { font: 0.9em ui-monospace, "SF Mono", Menlo, monospace; background: var(--band); padding: 0.1em 0.3em; border-radius: 3px; }

.details { margin: 2.5rem 0; padding: 1.5rem; background: var(--band); border-radius: 4px; }
.details fieldset { border: 0; padding: 0; margin: 1.2rem 0; }
.details legend { font-weight: 600; margin-bottom: 0.4rem; padding: 0; }
.details label { display: block; padding: 0.3rem 0; }
.details input[type="radio"] { accent-color: var(--accent); margin-right: 0.5rem; width: 1.1rem; height: 1.1rem; vertical-align: -0.15rem; }

/* Copy v2 additions: pose list and status table */
.poses { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; max-width: 40rem; counter-reset: pose; }
.poses li { padding: 0.7rem 0 0.7rem 2.4rem; border-bottom: 1px solid var(--rule); position: relative; counter-increment: pose; }
.poses li::before { content: counter(pose); position: absolute; left: 0; top: 0.65rem; font: 700 1.1rem/1.6 var(--serif); color: var(--accent-text); width: 1.6rem; }
.box .status-table { width: 100%; border-collapse: collapse; font-size: 0.97rem; margin: 1rem 0; }
.status-table th, .status-table td { text-align: left; vertical-align: top; padding: 0.65rem 0.7rem 0.65rem 0; border-bottom: 1px solid var(--rule); }
.status-table th { width: 38%; font-weight: 700; }
@media (max-width: 40rem) { .status-table th, .status-table td { display: block; width: 100%; padding: 0.2rem 0; border: 0; } .status-table tr { display: block; padding: 0.6rem 0; border-bottom: 1px solid var(--rule); } }
