/*
 * Shared styles for the static pages (privacy policy, account deletion, 404).
 * Mirrors the "Arcade Pop" tokens and type scale of the main page (src/index.css), so keep the two in sync.
 */
@font-face { font-family: "Libre Baskerville"; font-style: normal; font-weight: 700; font-display: swap; src: url(/fonts/libre-baskerville-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 600; font-display: swap; src: url(/fonts/poppins-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 700; font-display: swap; src: url(/fonts/poppins-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Nunito"; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/nunito-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Nunito"; font-style: italic; font-weight: 400; font-display: swap; src: url(/fonts/nunito-latin-400-italic.woff2) format("woff2"); }
@font-face { font-family: "Nunito"; font-style: normal; font-weight: 600; font-display: swap; src: url(/fonts/nunito-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Nunito"; font-style: normal; font-weight: 700; font-display: swap; src: url(/fonts/nunito-latin-700-normal.woff2) format("woff2"); }

:root {
  --background: 36 100% 97%;
  --foreground: 217 33% 17%;
  --card: 0 0% 100%;
  --primary: 243 75% 59%;
  --primary-foreground: 240 25% 98%;
  --accent: 0 100% 71%;
  --accent-foreground: 217 33% 17%;
  --muted: 41 42% 91%;
  --muted-foreground: 215 19% 35%;
  --border: 42 32% 86%;
  --ring: 243 75% 59%;
  --glow-2: 43 100% 51%;
  --glow-2-alpha: 0.1;
  --font-display: "Libre Baskerville", Georgia, serif;
  --font-heading: Poppins, ui-sans-serif, system-ui, sans-serif;
  --font-body: Nunito, ui-sans-serif, system-ui, sans-serif;
}
:root.dark {
  --background: 222 47% 11%;
  --foreground: 240 25% 98%;
  --card: 222 38% 21%;
  --primary: 234 89% 74%;
  --primary-foreground: 222 47% 11%;
  --muted: 222 33% 27%;
  --muted-foreground: 215 20% 65%;
  --border: 222 33% 27%;
  --ring: 234 89% 74%;
  --glow-2: 188 86% 53%;
  --glow-2-alpha: 0.15;
}

*, *::before, *::after { box-sizing: border-box; border-color: hsl(var(--border)); }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  font-family: var(--font-body);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip; /* lets the hero glow bleed past the title block without a horizontal scrollbar */
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
a { color: hsl(var(--primary)); font-weight: 600; text-underline-offset: 4px; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, button:focus-visible { outline: 3px solid hsl(var(--ring) / 0.5); outline-offset: 2px; border-radius: 0.5rem; }
img { max-width: 100%; }

.wrap { max-width: 72rem; margin: 0 auto; padding: 0 1rem; }
@media (min-width: 640px) { .wrap { padding: 0 1.5rem; } }

/* Header, same as the main page */
.site-header {
  position: sticky; top: 0; z-index: 30;
  border-bottom: 1px solid hsl(var(--border));
  background: hsl(var(--background) / 0.85);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.site-header .wrap { display: flex; height: 4rem; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 0.625rem; text-decoration: none; }
.brand img { width: 2rem; height: 2rem; border-radius: 0.5rem; }
.brand span { font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; color: hsl(var(--primary)); }
.header-actions { display: flex; align-items: center; gap: 0.25rem; }
.icon-btn {
  display: inline-flex; width: 2.5rem; height: 2.5rem; align-items: center; justify-content: center;
  border: 0; border-radius: 9999px; background: transparent; color: inherit; cursor: pointer;
}
.icon-btn:hover { background: hsl(var(--muted)); }
.icon-btn svg { width: 1rem; height: 1rem; }
.icon-btn .sun { display: none; }
.dark .icon-btn .sun { display: block; }
.dark .icon-btn .moon { display: none; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; white-space: nowrap;
  height: 2rem; padding: 0 1rem; border-radius: 9999px; text-decoration: none;
  font-family: var(--font-heading); font-size: 0.875rem; font-weight: 600; transition: background-color 0.15s;
}
.btn-accent { background: hsl(var(--accent)); color: hsl(var(--accent-foreground)); }
.btn-accent:hover { background: hsl(var(--accent) / 0.9); }
.play-badge { display: inline-block; border-radius: 0.5rem; margin-left: 0.25rem; }
.play-badge img { display: block; height: 2.5rem; width: auto; }
.play-badge:focus-visible { outline: 3px solid hsl(var(--ring) / 0.5); outline-offset: 2px; }
.btn-lg { height: 3rem; padding: 0 2rem; font-size: 1rem; }

/* Title block with the same soft glow as the hero */
.page-hero { position: relative; overflow-x: clip; /* the glow may bleed up and down, but must not widen the page */ }
.page-hero::before, .page-hero::after {
  content: ""; position: absolute; border-radius: 9999px; filter: blur(64px); pointer-events: none;
}
.page-hero::before { top: -10rem; right: -10rem; width: 30rem; height: 30rem; background: hsl(var(--primary) / 0.15); }
.page-hero::after { bottom: -14rem; left: -10rem; width: 26rem; height: 26rem; background: hsl(var(--glow-2) / var(--glow-2-alpha)); }
.page-hero .wrap { position: relative; max-width: 48rem; padding-top: 3rem; padding-bottom: 2rem; }
@media (min-width: 768px) { .page-hero .wrap { padding-top: 4.5rem; padding-bottom: 2.5rem; } }
.pill {
  display: inline-flex; align-items: center; gap: 0.375rem; padding: 0.125rem 0.75rem; margin-bottom: 1.25rem;
  border: 2px solid hsl(var(--border)); border-radius: 9999px;
  font-family: var(--font-heading); font-size: 0.75rem; font-weight: 600;
}
h1 {
  margin: 0; font-family: var(--font-heading); font-weight: 700; line-height: 1.15;
  font-size: 2.25rem; text-wrap: balance;
}
@media (min-width: 640px) { h1 { font-size: 3rem; } }
.meta { margin: 1rem 0 0; color: hsl(var(--muted-foreground)); }
.meta strong { color: hsl(var(--foreground)); }
.lede { margin: 1rem 0 0; max-width: 40rem; font-size: 1.125rem; color: hsl(var(--muted-foreground)); }

.toc { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1.5rem 0 0; padding: 0; list-style: none; }
.toc a {
  display: inline-block; padding: 0.25rem 0.75rem; border: 2px solid hsl(var(--border)); border-radius: 9999px;
  color: hsl(var(--foreground)); text-decoration: none; font-family: var(--font-heading); font-size: 0.8125rem; font-weight: 600; line-height: 1.5;
}
.toc a:hover { background: hsl(var(--muted)); color: hsl(var(--primary)); }

/* Document body */
main.doc-wrap { position: relative; max-width: 48rem; margin: 0 auto; padding: 0 1rem 4rem; }
@media (min-width: 640px) { main.doc-wrap { padding: 0 1.5rem 5rem; } }
.doc {
  padding: 1.5rem; border: 1px solid hsl(var(--border)); border-radius: 1.5rem;
  background: hsl(var(--card)); box-shadow: 0 1px 2px rgb(0 0 0 / 0.04), 0 8px 24px -12px rgb(0 0 0 / 0.12);
}
@media (min-width: 640px) { .doc { padding: 2.5rem; } }
.doc > :first-child { margin-top: 0; }
.doc > :last-child { margin-bottom: 0; }
.doc p { margin: 1rem 0 0; }
.doc h2 {
  display: flex; align-items: center; gap: 0.625rem; margin: 2.5rem 0 0; scroll-margin-top: 5.5rem;
  font-family: var(--font-heading); font-size: 1.375rem; font-weight: 600; line-height: 1.3; text-wrap: balance;
}
.doc h2::before {
  content: ""; flex: none; width: 0.3125rem; height: 1.25em; border-radius: 9999px; background: hsl(var(--accent));
}
.doc h2 + p, .doc h2 + ul, .doc h2 + ol { margin-top: 0.875rem; }
.doc ul, .doc ol { margin: 1rem 0 0; padding-left: 1.5rem; }
.doc li { margin-top: 0.625rem; padding-left: 0.25rem; }
.doc li::marker { color: hsl(var(--primary)); font-weight: 700; }
.doc strong { font-weight: 700; }
.doc em { font-style: italic; }
.note {
  margin: 1.5rem 0 0; padding: 1rem 1.25rem; border-radius: 1rem; background: hsl(var(--muted));
}
.note > :first-child { margin-top: 0; }

/* Centered state page (404) */
.center { text-align: center; }
.center .wrap { padding-bottom: 5rem; }
.center .lede { margin-left: auto; margin-right: auto; }
.center .actions { margin-top: 2rem; }
.big-code { font-family: var(--font-display); font-weight: 700; font-size: 5rem; line-height: 1; color: hsl(var(--primary)); margin: 0 0 1rem; }

/* Footer, same as the main page */
.site-footer { position: relative; border-top: 1px solid hsl(var(--border)); background: hsl(var(--background)); }
.site-footer .wrap { padding-top: 2.5rem; padding-bottom: 2.5rem; font-size: 0.875rem; color: hsl(var(--muted-foreground)); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; font-family: var(--font-heading); font-weight: 500; }
.site-footer nav a { color: hsl(var(--foreground)); font-weight: 500; text-decoration: none; }
.site-footer nav a:hover { color: hsl(var(--primary)); }
.site-footer p { margin: 1rem 0 0; line-height: 1.5; }
