/* PaperPull, the website. The control panel's own palette, so the Store
   page, the site and the app read as one thing. Light theme follows the
   visitor's setting. */
:root {
  --bg: #0f1115;
  --panel: #171a21;
  --fg: #e6e6e6;
  --muted: #98a0ad;
  --accent: #4c8dff;
  --accent-ink: #ffffff;
  --line: #262b36;
  --ok: #3ecf8e;
  --code-bg: #0b0d11;
  --shadow: 0 30px 80px rgba(0, 0, 0, .45);
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f5f6f8;
    --panel: #ffffff;
    --fg: #14171d;
    --muted: #5c6472;
    --accent: #2f6fe0;
    --accent-ink: #ffffff;
    --line: #dde1e8;
    --ok: #178a5a;
    --code-bg: #1a1d24;
    --shadow: 0 30px 80px rgba(20, 30, 60, .18);
    color-scheme: light;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 17px/1.6 system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover, a:focus-visible { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
img { max-width: 100%; height: auto; display: block; }
code, .mono { font-family: ui-monospace, Consolas, "Cascadia Mono", Menlo, monospace; font-size: .92em; }

.wrap { max-width: 1080px; margin: 0 auto; padding-inline: 20px; }

h1, h2, h3 { font-family: "Instrument Sans", system-ui, "Segoe UI", sans-serif; text-wrap: balance; margin: 0; letter-spacing: -.01em; }
h1 { font-size: clamp(2.2rem, 5.5vw, 3.6rem); line-height: 1.05; font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.1rem); line-height: 1.15; font-weight: 700; }
h3 { font-size: 1.1rem; font-weight: 600; }
p { margin: 0; }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 40ch; }
.eyebrow { font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; color: var(--accent); font-weight: 600; margin-bottom: 14px; }

/* -- top bar ------------------------------------------------------------ */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 18px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--fg); font-weight: 700; font-family: "Instrument Sans", system-ui, sans-serif; font-size: 1.1rem; }
.brand img { width: 32px; height: 32px; }
.nav { display: flex; gap: 22px; font-size: .95rem; }
.nav a { color: var(--muted); }
.nav a:hover { color: var(--fg); text-decoration: none; }
@media (max-width: 640px) { .nav { display: none; } }

/* -- hero --------------------------------------------------------------- */
.hero { padding-block: 56px 40px; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.hero-copy { display: flex; flex-direction: column; gap: 22px; }
.hero-copy h1 span { color: var(--muted); font-weight: 500; }
.hero img.icon { width: 88px; height: 88px; }
.hero-shot { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); background: var(--panel); }
@media (max-width: 860px) { .hero { grid-template-columns: 1fr; gap: 32px; padding-block: 36px 24px; } }

.cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
/* The hero's four buttons sit in a two-by-two grid so their edges line up. */
#cta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 520px; }
#cta .btn { width: 100%; justify-content: flex-start; }
@media (max-width: 480px) { #cta { grid-template-columns: 1fr; } }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 20px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--panel); color: var(--fg); font-weight: 600; font-size: 1rem; line-height: 1.2;
}
.btn:hover { border-color: var(--accent); text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.soon { color: var(--muted); cursor: default; border-style: dashed; }
.btn.soon:hover { border-color: var(--line); }
.btn small { display: block; font-weight: 400; font-size: .8rem; color: inherit; opacity: .8; }
.btn svg { width: 18px; height: 18px; flex: none; fill: currentColor; }
.kofi-btn { border-color: color-mix(in srgb, #ff5e5b 55%, var(--line)); }
.kofi-btn:hover { border-color: #ff5e5b; }
.kofi-btn svg { color: #ff5e5b; }
.free { font-size: .95rem; color: var(--muted); max-width: 56ch; line-height: 1.55; }
.free strong { color: var(--fg); }
.alt { font-size: .9rem; color: var(--muted); }
.alt a { color: var(--fg); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.alt a:hover { text-decoration-color: var(--accent); }

/* -- sections ----------------------------------------------------------- */
section { padding-block: 64px; border-top: 1px solid var(--line); }
section > .wrap > h2 { margin-bottom: 14px; }
section > .wrap > p.lead { margin-bottom: 36px; }
@media (max-width: 640px) { section { padding-block: 44px; } }

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.step { display: flex; flex-direction: column; gap: 10px; }
.step .n { font-family: ui-monospace, Consolas, monospace; color: var(--accent); font-size: .85rem; letter-spacing: .08em; }
.step p { color: var(--muted); }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; gap: 24px; } }

.shot { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--panel); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 36px; }
.two figure { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.two figcaption { font-size: .9rem; color: var(--muted); }
@media (max-width: 760px) { .two { grid-template-columns: 1fr; } }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 40px; align-items: center; }
.split .text { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.split .text .sample { max-width: 100%; }
.split .text p { color: var(--muted); }
.split .text p strong { color: var(--fg); }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

.sample { border: 1px solid var(--line); border-radius: 10px; overflow-x: auto; background: var(--panel); }
.sample table { border-collapse: collapse; width: 100%; font-size: .9rem; font-variant-numeric: tabular-nums; }
.sample th, .sample td { padding: 8px 12px; text-align: left; white-space: nowrap; border-bottom: 1px solid var(--line); }
.sample th { color: var(--muted); font-weight: 500; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; }
.sample tr:last-child td { border-bottom: 0; }
.sample .num { text-align: right; }
.sample .cap { font-size: .82rem; color: var(--muted); padding: 8px 12px; white-space: normal; }

.groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 28px 40px; }
.group h3 { color: var(--fg); font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 8px 14px; border-radius: 999px; font-size: 1rem; font-weight: 600; white-space: nowrap;
  color: var(--fg);
  border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--line));
  background: color-mix(in srgb, var(--accent) 9%, var(--panel));
}
.missing { margin-top: 32px; color: var(--muted); }

.why { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 40px; }
.why div { display: flex; flex-direction: column; gap: 8px; }
.why p { color: var(--muted); }
.why code { color: var(--fg); }
@media (max-width: 900px) { .why { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .why { grid-template-columns: 1fr; } }

.story { max-width: 68ch; display: flex; flex-direction: column; gap: 18px; }
.story h2 { margin-bottom: 4px; }
.story p { color: var(--fg); }
.story .sig { color: var(--muted); font-style: italic; }

.trust { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 48px; }
.trust div { display: flex; flex-direction: column; gap: 8px; }
.trust p { color: var(--muted); }
.trust p a { color: var(--fg); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
@media (max-width: 700px) { .trust { grid-template-columns: 1fr; } }

.editions { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 36px; }
.edition { border: 1px solid var(--line); border-radius: 12px; padding: 26px; display: flex; flex-direction: column; gap: 12px; background: var(--panel); }
.edition .price { font-family: "Instrument Sans", system-ui, sans-serif; font-size: 2rem; font-weight: 700; }
.edition .price small { font-size: 1rem; color: var(--muted); font-weight: 400; }
.edition ul { margin: 0; padding-left: 18px; color: var(--muted); display: flex; flex-direction: column; gap: 6px; }
.edition .cta { margin-top: auto; padding-top: 8px; }
@media (max-width: 700px) { .editions { grid-template-columns: 1fr; } }

.kofi { margin-top: 32px; color: var(--muted); max-width: 70ch; display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }

footer { border-top: 1px solid var(--line); padding-block: 32px 48px; color: var(--muted); font-size: .92rem; }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px; }
footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
footer a { color: var(--muted); }
footer a:hover { color: var(--fg); }

/* -- the privacy page --------------------------------------------------- */
.doc { max-width: 68ch; padding-block: 24px 64px; display: flex; flex-direction: column; gap: 18px; }
.doc h1 { font-size: clamp(2rem, 4vw, 2.6rem); margin-bottom: 8px; }
.doc h2 { font-size: 1.35rem; margin-top: 18px; }
.doc ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 10px; }
.doc p, .doc li { color: var(--fg); }
.doc .note { color: var(--muted); font-size: .95rem; }
