/* gammapdf.com — brand palette from design/brand/tokens.json: amber #e8a020
   on warm neutrals, the hero's system font stack, no web fonts. */

:root {
  --bg: #f6f4ef;
  --bg-2: #efece4;
  --surface: #ffffff;
  --text: #1a1a18;
  --text-2: #5f5c55;
  --muted: #8a877e;
  --line: #e4e0d5;
  --accent: #e8a020;
  --accent-ink: #9a6206;
  --accent-soft: #f3e6c9;
  --dark: #1e1e1c;
  --dark-fg: #eeebe4;
  --shadow: 0 18px 48px rgba(30, 30, 28, 0.14), 0 2px 6px rgba(30, 30, 28, 0.06);
  --radius: 14px;
  --font: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Code", "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1b1b1a;
    --bg-2: #222220;
    --surface: #262624;
    --text: #eeebe4;
    --text-2: #b9b5aa;
    --muted: #8b887f;
    --line: #35342f;
    --accent-ink: #f0b74a;
    --accent-soft: #3b3120;
    --shadow: 0 18px 48px rgba(0, 0, 0, 0.45), 0 2px 6px rgba(0, 0, 0, 0.3);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; letter-spacing: -0.02em; font-weight: 700; }
h2 { font-size: clamp(28px, 3.4vw, 40px); }
h3 { font-size: 19px; }
p { margin: 0; }
code, kbd, pre { font-family: var(--mono); font-size: 0.92em; }
code, kbd {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 5px;
}
b { font-weight: 600; color: var(--text); }
ul { margin: 0; padding-left: 20px; }
li + li { margin-top: 8px; }

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.wrap--wide { width: min(1280px, 100% - 32px); }
.eyebrow {
  color: var(--accent-ink);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.lead { font-size: 18px; color: var(--text-2); max-width: 62ch; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
  line-height: 1.2;
  border: 1px solid transparent;
  white-space: nowrap;
  transition: transform 0.12s ease, background-color 0.12s ease, border-color 0.12s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn--primary { background: var(--dark); color: var(--dark-fg); }
.btn--primary:hover { background: #2b2b28; }
.btn--ghost { background: var(--surface); color: var(--text); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--muted); }
.btn--lg { padding: 14px 24px; font-size: 16px; }
.btn--sm { padding: 7px 14px; font-size: 14px; }
@media (prefers-color-scheme: dark) {
  .btn--primary { background: var(--accent); color: #1a1a18; }
  .btn--primary:hover { background: #f0b03a; }
}

/* Header */
.top {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.top__row { display: flex; align-items: center; gap: 24px; height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; font-size: 20px; letter-spacing: -0.03em; }
.brand:hover { text-decoration: none; }
.brand em { font-style: normal; font-weight: 400; color: var(--accent); margin-left: 5px; }
.brand img { border-radius: 7px; }
.nav { display: flex; align-items: center; gap: 22px; margin-left: auto; }
.nav > a { color: var(--text-2); font-weight: 500; font-size: 15px; }
.nav > a:hover { color: var(--text); text-decoration: none; }
.nav__github { display: inline-flex; align-items: center; gap: 6px; }
.stars { font-size: 12px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 999px; padding: 1px 7px; color: var(--text-2); }
.top__menu { display: none; margin-left: auto; background: none; border: 1px solid var(--line); border-radius: 8px; padding: 6px; color: var(--text); }
@media (max-width: 820px) {
  .top__menu { display: inline-flex; }
  .nav {
    display: none;
    position: absolute;
    left: 0; right: 0; top: 60px;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 12px 16px 16px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
  }
  .nav--open { display: flex; }
  .nav > a { padding: 8px 4px; font-size: 16px; }
}

/* Hero */
.hero { padding: 72px 0 24px; overflow: hidden; }
.hero__text { text-align: center; display: flex; flex-direction: column; align-items: center; }
.hero h1 { font-size: clamp(38px, 6.4vw, 72px); letter-spacing: -0.035em; margin-bottom: 20px; }
.hero .lead { font-size: clamp(17px, 1.6vw, 20px); max-width: 64ch; margin-bottom: 30px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.hero__meta { margin-top: 18px; font-size: 14px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.hero__meta a { color: var(--text-2); }
.dot { color: var(--line); }
.chips { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.chips li { background: var(--accent-soft); color: var(--accent-ink); border-radius: 999px; padding: 6px 14px; font-size: 14px; font-weight: 500; margin: 0; }
@media (prefers-color-scheme: dark) { .chips li { color: #f0d9a4; } }

.frame {
  margin: 52px 0 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.frame__bar { display: flex; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--bg-2); }
.frame__bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.frame--hero img { width: 100%; }

/* Pillars */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; padding: 72px 0 24px; }
.pillar { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.pillar h3 { margin-bottom: 8px; }
.pillar p { color: var(--text-2); font-size: 15px; }
@media (max-width: 820px) { .pillars { grid-template-columns: 1fr; padding-top: 48px; } }

/* Feature rows */
.features { padding-top: 24px; }
.feature { display: grid; grid-template-columns: 5fr 7fr; gap: 48px; align-items: center; padding: 64px 0; }
.feature--flip .feature__text { order: 2; }
.feature__text h2 { margin-bottom: 14px; }
.feature__text > p { color: var(--text-2); margin-bottom: 14px; }
.feature__text { min-width: 0; }
.feature__text ul { color: var(--text-2); font-size: 15.5px; }
.feature__media { margin: 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); background: var(--surface); }
.feature__media--plain { border: 0; box-shadow: none; background: none; }
.feature__media img { width: 100%; }
.feature--stack { display: block; }
.feature__text--center { text-align: center; max-width: 68ch; margin: 0 auto 36px; }
.feature__text--center > p { margin: 0 auto; }
.illustration { display: block; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 20px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.card img { width: 100%; border-bottom: 1px solid var(--line); }
.card h3 { margin: 16px 18px 6px; font-size: 17px; }
.card p { margin: 0 18px 18px; font-size: 14.5px; color: var(--text-2); }
.feature__note { margin-top: 28px; text-align: center; color: var(--text-2); font-size: 15px; max-width: 78ch; margin-inline: auto; }
@media (max-width: 900px) {
  .feature { grid-template-columns: 1fr; gap: 28px; padding: 44px 0; }
  .feature--flip .feature__text { order: 0; }
  .trio { grid-template-columns: 1fr; }
}

/* Download */
.download { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 80px 0; margin-top: 24px; }
.download h2 { margin-bottom: 14px; }
.dl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 36px; }
.dl__card { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.dl__card--wide { grid-column: span 3; }
.dl__card--mine { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.dl__card p { color: var(--text-2); font-size: 14.5px; overflow-wrap: anywhere; }
.dl__card .code { width: 100%; }
.store img { height: 60px; width: auto; }
.store--text { display: none; }
.store--failed .store { display: none; }
.store--failed .store--text { display: inline-flex; }
@media (max-width: 900px) { .dl { grid-template-columns: 1fr; } .dl__card--wide { grid-column: auto; } }

/* Code blocks */
.code { position: relative; min-width: 0; background: var(--dark); color: var(--dark-fg); border-radius: 10px; }
.code pre { margin: 0; padding: 14px 84px 14px 16px; overflow-x: auto; font-size: 13.5px; line-height: 1.55; }
.code code { background: none; border: 0; padding: 0; color: inherit; font-size: inherit; }
.copy { position: absolute; top: 8px; right: 8px; background: rgba(255, 255, 255, 0.1); color: var(--dark-fg); border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 7px; padding: 4px 10px; font: 600 12px var(--font); cursor: pointer; }
.copy:hover { background: rgba(255, 255, 255, 0.18); }

/* Self-host */
.selfhost { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; padding: 88px 0; }
.selfhost h2 { margin-bottom: 14px; }
.selfhost__text > p { color: var(--text-2); margin-bottom: 14px; }
.selfhost__text ul { color: var(--text-2); font-size: 15.5px; margin-bottom: 18px; }
.selfhost__code { min-width: 0; display: flex; flex-direction: column; gap: 16px; }
@media (max-width: 900px) { .selfhost { grid-template-columns: 1fr; padding: 56px 0; } }

/* Privacy */
.privacy { background: var(--dark); color: var(--dark-fg); padding: 88px 0; }
.privacy .eyebrow { color: var(--accent); }
.privacy h2 { margin-bottom: 36px; max-width: 24ch; }
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.facts h3 { font-size: 16px; margin-bottom: 8px; color: #fff; }
.facts p { color: #b8b4aa; font-size: 14.5px; }
.privacy__link { margin-top: 36px; }
.privacy__link a { color: var(--accent); }
@media (max-width: 900px) { .facts { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .facts { grid-template-columns: 1fr; } }

/* FAQ */
.faq { padding: 88px 0; max-width: 780px; }
.faq h2 { margin-bottom: 24px; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-of-type { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 16px 0; font-weight: 600; font-size: 17px; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--muted); font-weight: 400; font-size: 22px; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--text-2); padding: 0 0 18px; max-width: 70ch; }

/* Closing */
.closing { padding: 40px 0 96px; text-align: center; }
.closing h2 { margin-bottom: 24px; }
.cta--center { justify-content: center; }

/* Footer */
.foot { border-top: 1px solid var(--line); padding: 48px 0 32px; font-size: 14.5px; }
.foot__grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
.foot__brand p { color: var(--text-2); margin-top: 12px; max-width: 34ch; }
.foot h4 { font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.foot__grid a { display: block; color: var(--text-2); padding: 3px 0; }
.foot__grid .brand { display: inline-flex; padding: 0; color: var(--text); }
.foot__meta { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
@media (max-width: 820px) { .foot__grid { grid-template-columns: 1fr 1fr; } .foot__brand { grid-column: span 2; } }

/* Markdown pages (privacy) and the 404 */
.prose, .notfound { padding: 56px 0 96px; max-width: 760px; }
.prose h1 { font-size: clamp(32px, 4vw, 44px); margin-bottom: 8px; }
.prose h2 { font-size: 24px; margin: 40px 0 12px; }
.prose h3 { margin: 28px 0 8px; }
.prose p, .prose li { color: var(--text-2); margin-bottom: 12px; }
.prose li { margin-bottom: 6px; }
.prose em { color: var(--muted); }
.notfound h1 { font-size: clamp(30px, 4vw, 44px); margin-bottom: 16px; }

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