/* My Pew Pal site: shared by every page. Tokens, base type, buttons, header, footer and the store chooser
   (the AGC Studios site's system in My Pew Pal's sky colours). Page-specific styles stay in each page. */
:root {
  --bg: #f7fbff;
  --surface: #ffffff;
  --surface-2: #eaf4fc;
  --ink: #17283a;
  --muted: #4f6275;
  --line: #d6e5f1;
  --brand: #1f56b8;
  --brand-ink: #ffffff;
  --hoodie: #2463d1;
  --sun: #ffd75e;
  --sun-ink: #8a5a00;
  --orange: #e8872f;
  --orange-text: #b45f12;
  --leaf: #2f8a57;
  --sky-1: #8fcdf2;
  --sky-2: #cfeafb;
  --sky-3: #fff4cf;
  --band-bg: #13284a;
  --band-card: #1c365e;
  --band-ink: #f2f7ff;
  --band-muted: #b9cbe3;
  --band-line: #2e4b78;
  --band-accent: #ffd75e;
  --scrim: rgb(10 22 40 / 0.55);
  --shadow: rgb(23 40 58 / 0.28);
  --focus: #1f56b8;
  --font-display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --font-body: "Public Sans", "Helvetica Neue", Arial, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --step-0: 1rem;
  --step-1: 1.18rem;
  --step-2: clamp(1.6rem, 3.4vw, 2.2rem);
  --step-3: clamp(2.35rem, 5.6vw, 3.9rem);
  --radius: 22px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c1522;
    --surface: #132033;
    --surface-2: #1a2a41;
    --ink: #e9f1fa;
    --muted: #a5b6c9;
    --line: #24364f;
    --brand: #8cc0ff;
    --brand-ink: #0b1a2e;
    --hoodie: #8cc0ff;
    --sun-ink: #ffd75e;
    --orange-text: #ffb46b;
    --leaf: #7dd3a2;
    --band-bg: #11233f;
    --band-card: #19304f;
    --band-line: #2c4a74;
    --scrim: rgb(2 6 12 / 0.7);
    --shadow: rgb(0 0 0 / 0.55);
    --focus: #8cc0ff;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0c1522;
  --surface: #132033;
  --surface-2: #1a2a41;
  --ink: #e9f1fa;
  --muted: #a5b6c9;
  --line: #24364f;
  --brand: #8cc0ff;
  --brand-ink: #0b1a2e;
  --hoodie: #8cc0ff;
  --sun-ink: #ffd75e;
  --orange-text: #ffb46b;
  --leaf: #7dd3a2;
  --band-bg: #11233f;
  --band-card: #19304f;
  --band-line: #2c4a74;
  --scrim: rgb(2 6 12 / 0.7);
  --shadow: rgb(0 0 0 / 0.55);
  --focus: #8cc0ff;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column;
}
body > main { flex: 1 0 auto; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
a:focus-visible, button:focus-visible, summary:focus-visible, [tabindex]:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 8px; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.06; margin: 0; text-wrap: balance; letter-spacing: -0.015em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

.wrap {
  max-width: 70rem;
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
@media (min-width: 640px) {
  .wrap {
    padding-left: max(32px, env(safe-area-inset-left, 0px));
    padding-right: max(32px, env(safe-area-inset-right, 0px));
  }
}
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Buttons */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 11px 20px; border-radius: 999px; border: 0;
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
  background: var(--brand); color: var(--brand-ink);
}
.button:hover { filter: brightness(1.08); }
.button.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.button.ghost:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); filter: none; }
.text-link { font-weight: 600; color: var(--brand); text-decoration-thickness: 1.5px; text-underline-offset: 4px; }

/* Header */
body::before {
  content: ""; position: fixed; inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--bg);
}
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 10px; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; flex: none; font-family: var(--font-display); font-weight: 800; font-size: 1.25rem; letter-spacing: -0.02em; }
.wordmark img { width: 38px; height: 38px; border-radius: 26%; box-shadow: 0 6px 12px -8px var(--shadow); }
.wordmark .pew { color: var(--hoodie); }
.nav { display: flex; align-items: center; gap: 22px; font-weight: 500; font-size: 0.95rem; }
.nav a { text-decoration: none; color: var(--muted); }
.nav a:hover { color: var(--ink); }
.nav .button { min-height: 38px; padding: 7px 16px; font-size: 0.9rem; color: var(--brand-ink); }
@media (max-width: 820px) { .nav .hide-sm { display: none; } }
@media (max-width: 400px) { .wordmark { font-size: 1.08rem; gap: 8px; } .wordmark img { width: 32px; height: 32px; } .nav { gap: 14px; } }
section[id], article[id] { scroll-margin-top: 80px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); }
.site-footer .wrap { padding-block: 44px 28px; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.6fr); gap: 32px; }
.footer-brand { display: grid; gap: 12px; align-content: start; }
.footer-brand p { color: var(--muted); }
.made-by { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 10px; color: var(--muted); font-size: 0.9rem; text-decoration: none; }
.made-by img { height: 20px; width: auto; }
.logo-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo-light { display: none; }
  :root:not([data-theme="light"]) .logo-dark { display: block; }
}
:root[data-theme="dark"] .logo-light { display: none; }
:root[data-theme="dark"] .logo-dark { display: block; }
.footer-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr)); gap: 24px 20px; }
.footer-cols div { display: grid; gap: 8px; align-content: start; }
.footer-cols a { text-decoration: none; color: var(--ink); }
.footer-cols a:hover, .to-top:hover { text-decoration: underline; text-underline-offset: 4px; }
.footer-base { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 20px; color: var(--muted); font-size: 0.9rem; }
.to-top { text-decoration: none; color: var(--muted); }
@media (max-width: 760px) { .site-footer .wrap { grid-template-columns: minmax(0, 1fr); gap: 28px; } }

/* Store chooser */
.chooser {
  width: min(420px, calc(100vw - 32px)); max-height: calc(100dvh - 32px);
  border: 0; border-radius: 26px; padding: 0;
  background: var(--surface); color: var(--ink);
  box-shadow: 0 40px 80px -30px rgb(0 0 0 / 0.6);
}
.chooser::backdrop { background: var(--scrim); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.chooser-inner { display: grid; gap: 18px; padding: 26px 22px 22px; }
.chooser-head { display: grid; grid-template-columns: 60px minmax(0, 1fr) auto; gap: 14px; align-items: center; }
.chooser-head img { width: 60px; height: 60px; border-radius: 26%; }
.chooser-head h2 { font-size: 1.35rem; font-weight: 800; }
.chooser-head p { color: var(--muted); font-size: 0.9rem; margin-top: 2px; }
.close-btn { align-self: start; width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer; background: var(--surface-2); color: var(--ink); display: grid; place-items: center; }
.close-btn svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; fill: none; }
.store-list { display: grid; gap: 10px; }
.store {
  display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 14px; align-items: center;
  padding: 14px 16px; border-radius: 16px; text-decoration: none;
  background: var(--surface-2); color: var(--ink); border: 1px solid var(--line);
}
a.store:hover { border-color: var(--brand); }
.store svg.logo { width: 28px; height: 28px; }
.store .small { display: block; font-size: 0.75rem; color: var(--muted); line-height: 1.2; }
.store .big { display: block; font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; line-height: 1.2; }
.store .state { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.store .go { width: 20px; height: 20px; stroke: var(--brand); stroke-width: 2.2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.store[aria-disabled="true"] { opacity: 0.72; }
.store .apple { fill: currentColor; }
.chooser-note { font-size: 0.9rem; color: var(--muted); }
