/* PlayGuard's website (site/README.md): the branding's navy, teal and amber
   (branding/), in a light and a dark theme (data-theme, set before the first
   paint by each page: the choice kept, else the system's). */
/* Sora (SIL Open Font License, fonts/OFL.txt), served with the site rather
   than by Google Fonts, which would see every visitor: its Latin letters,
   cut out of google/fonts' ofl/sora/Sora[wght].ttf, every weight. */
@font-face {
  font-family: "Sora";
  src: url("fonts/sora.woff2") format("woff2");
  font-weight: 100 800;
  font-display: swap;
}

:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #eef2f8;
  --text: #121b2c;
  --muted: #536079;
  --line: #dbe2ec;
  --accent: #0a705f;
  --accent-soft: #e2f4f0;
  --accent-text: #ffffff;
  --amber: #b26a00;
  --amber-soft: #fff4e2;
  --hero: #0b1424;
  --hero-text: #e8eef7;
  --hero-muted: #a9b6cc;
  --shadow: 0 10px 30px rgb(11 20 36 / 0.10);
  --radius: 14px;
  --display: "Sora", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0b1424;
  --surface: #111d31;
  --surface-2: #17253d;
  --text: #e8eef7;
  --muted: #a9b6cc;
  --line: #22324f;
  --accent: #2ec4a6;
  --accent-soft: #0f2f2e;
  --accent-text: #05140f;
  --amber: #ffb547;
  --amber-soft: #2c2412;
  --hero: #08101d;
  --shadow: 0 10px 30px rgb(0 0 0 / 0.35);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
}
a { color: var(--accent); }
img, video { max-width: 100%; }
h1, h2, h3 { font-family: var(--display); line-height: 1.2; letter-spacing: -0.01em; }
code { font: 0.9em ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--surface-2); padding: 0.1em 0.35em; border-radius: 5px; }
pre { background: var(--surface-2); padding: 14px 16px; border-radius: 10px; overflow-x: auto; }
pre code { background: none; padding: 0; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }

/* Header */
.top {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 10px max(16px, calc((100% - 1180px) / 2));
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font: 700 20px var(--display); }
.brand b { color: var(--accent); font-weight: 700; }
.nav { display: flex; gap: 18px; flex: 1; }
.nav a { color: var(--muted); text-decoration: none; font-weight: 500; white-space: nowrap; }
.nav a:hover, .nav a[aria-current] { color: var(--text); }
.nav .nav-try { color: var(--accent); }
.settings { display: flex; gap: 8px; }
.settings select {
  font: inherit;
  font-size: 14px;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 5px 8px;
}

/* Buttons and callouts */
.button {
  display: inline-block;
  padding: 11px 18px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
}
.button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.button.ghost { background: transparent; }
.button:hover { filter: brightness(1.06); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.callout { border-left: 4px solid var(--accent); background: var(--accent-soft); padding: 12px 16px; border-radius: 0 10px 10px 0; margin: 18px 0; }
.callout p { margin: 0.3em 0; }
.callout.warning, .callout.caution, .callout.important { border-color: var(--amber); background: var(--amber-soft); }
.callout.wide { max-width: 1180px; margin: 24px auto 0; width: calc(100% - 32px); }

/* Home */
.hero { background: var(--hero); color: var(--hero-text); }
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 40px;
  align-items: center;
  padding: 56px max(16px, calc((100% - 1180px) / 2));
}
.hero h1 { font-size: clamp(30px, 4vw, 46px); margin: 6px 0 10px; }
.hero .sub { color: #2ec4a6; font-weight: 600; font-size: 19px; margin: 0 0 12px; }
.hero p { color: var(--hero-muted); }
.wordmark { font: 700 22px var(--display); color: var(--hero-text); margin: 0; letter-spacing: -0.02em; }
.wordmark span { color: #2ec4a6; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.hero .button { background: transparent; color: var(--hero-text); border-color: #2a3854; }
.hero .button.primary { background: #2ec4a6; border-color: #2ec4a6; color: #05140f; }
.hero-video video { width: 100%; border-radius: 16px; box-shadow: 0 30px 80px rgb(0 0 0 / 0.5), 0 0 0 1px #2a3854; display: block; }

.section { max-width: 1180px; margin: 0 auto; padding: 56px 16px 0; }
.section > h2 { font-size: clamp(24px, 3vw, 32px); margin: 0 0 22px; }
.section.narrow { max-width: 720px; padding-bottom: 80px; }
.cards { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); }
.card h3 { margin: 8px 0 6px; font-size: 18px; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }
.emoji { font-size: 26px; }

.gallery { display: grid; grid-auto-flow: column; grid-auto-columns: min(440px, 80%); gap: 16px; overflow-x: auto; padding-bottom: 12px; scroll-snap-type: x mandatory; }
.gallery figure { margin: 0; scroll-snap-align: start; }
.gallery img { width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--line); display: block; }
.gallery figcaption { color: var(--muted); font-size: 14px; margin-top: 6px; }

.band {
  margin-top: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: var(--accent-soft);
  border-radius: 18px;
  padding: 28px 32px;
  max-width: 1148px;
}
.band h2 { margin: 0 0 6px; font-size: 24px; }
.band p { margin: 0; color: var(--muted); }
.columns { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.steps { padding-left: 1.3em; }
.steps li { margin: 6px 0; }

.doc-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.doc-group h3 { font-size: 15px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); margin: 0 0 8px; }
.doc-group ul { list-style: none; padding: 0; margin: 0; }
.doc-group li a { display: block; padding: 6px 10px; border-radius: 8px; text-decoration: none; color: var(--text); }
.doc-group li a:hover { background: var(--surface-2); }
.doc-group li a[aria-current] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }

/* Documentation */
.doc {
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px 16px 0;
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr) 220px;
  gap: 36px;
  align-items: start;
}
.doc-nav, .toc { position: sticky; top: 76px; max-height: calc(100vh - 96px); overflow: auto; }
.doc-nav .doc-list { grid-template-columns: 1fr; }
.toc ul { list-style: none; padding: 0 0 0 12px; margin: 0; border-left: 1px solid var(--line); font-size: 14px; }
.toc li { margin: 6px 0; }
.toc a { color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--text); }
.prose { min-width: 0; }
.prose h1 { font-size: clamp(28px, 3.5vw, 38px); margin-top: 0; }
.prose h2 { margin-top: 2em; padding-top: 0.4em; border-top: 1px solid var(--line); scroll-margin-top: 80px; }
.prose h3 { margin-top: 1.6em; scroll-margin-top: 80px; }
.prose img { border-radius: 10px; border: 1px solid var(--line); }
.prose li { margin: 4px 0; }
.table { overflow-x: auto; margin: 16px 0; }
.prose table { border-collapse: collapse; width: 100%; font-size: 15px; }
.prose th, .prose td { border: 1px solid var(--line); padding: 7px 10px; text-align: left; vertical-align: top; }
.prose th { background: var(--surface-2); }
.edit { margin-top: 40px; font-size: 14px; }

/* Footer */
.footer { margin-top: 80px; border-top: 1px solid var(--line); background: var(--surface); }
.footer-inner { max-width: 1180px; margin: 0 auto; padding: 24px 16px; color: var(--muted); font-size: 14px; }
.footer img { vertical-align: -4px; }
.fine { font-size: 13px; }

@media (max-width: 1100px) {
  .doc { grid-template-columns: 210px minmax(0, 1fr); }
  .toc { display: none; }
}
@media (max-width: 860px) {
  .top { flex-wrap: wrap; gap: 10px 16px; }
  .nav { order: 3; flex-basis: 100%; overflow-x: auto; gap: 16px; }
  .settings { margin-left: auto; }
  .hero, .columns { grid-template-columns: 1fr; }
  .hero { padding-top: 36px; }
  .band { flex-direction: column; align-items: flex-start; margin: 56px 16px 0; }
  .doc { grid-template-columns: 1fr; }
  .doc-nav { position: static; max-height: none; order: 2; border-top: 1px solid var(--line); padding-top: 16px; }
}
