/* simplebrain.app: the "Spotlight" look, after Dream Games' studio site. White pages, the game's cover full width at
   the top of the home page, big uppercase section titles, one raspberry accent taken from the game's covers, a light
   band and a dark footer. Headings, menus and buttons in Fredoka, the game's own typeface (SIL Open Font License,
   fonts/OFL.txt), served from the site itself: nothing loads from another site. Body text in the system font. */
@font-face {
  font-family: 'Fredoka';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/fredoka-600-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Fredoka';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/fredoka-700-latin.woff2') format('woff2');
}

:root {
  --page: #ffffff;
  --band: #f6f3f8;
  --ink: #1c1a22;
  --ink-soft: #5e5868;
  --rule: #ebe6ef;
  --head-bg: rgba(255, 255, 255, 0.94);
  /* Buttons (white text on --accent), list markers; --link for text links */
  --accent: #d6246e;
  --accent-hover: #b81b5c;
  --link: #b81b5c;
  --chip: #fde8f1;
  --shadow: 0 18px 40px rgba(28, 26, 34, 0.14);
  --foot: #1c1a22;
  --foot-ink: #ffffff;
  --foot-soft: #9e97a8;
  --focus: #b81b5c;
  --font-display: 'Fredoka', ui-rounded, system-ui, sans-serif;
  --font: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --wide: 75rem;
  --measure: 46rem;
  --gutter: 24px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --page: #16141b;
    --band: #201d27;
    --ink: #f3eff7;
    --ink-soft: #b9b2c4;
    --rule: #2e2a36;
    --head-bg: rgba(22, 20, 27, 0.92);
    --link: #ff7fb0;
    --chip: #3a1f2c;
    --shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
    --foot: #0f0e13;
    --focus: #ff7fb0;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --page: #16141b;
  --band: #201d27;
  --ink: #f3eff7;
  --ink-soft: #b9b2c4;
  --rule: #2e2a36;
  --head-bg: rgba(22, 20, 27, 0.92);
  --link: #ff7fb0;
  --chip: #3a1f2c;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  --foot: #0f0e13;
  --focus: #ff7fb0;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--font);
}

.wrap {
  max-width: var(--wide);
  margin: 0 auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.1; text-wrap: balance; margin: 0; }
p, ul, ol { margin: 0; }
strong { font-weight: 650; }
img, video { display: block; max-width: 100%; height: auto; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
section[id], article[id] { scroll-margin-top: 88px; }

/* Header: the brand on the left, the menu on the right, in capitals */
.site-head {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--head-bg);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}
.site-head .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 24px;
  min-height: 72px;
  padding-top: 10px;
  padding-bottom: 10px;
}
/* The logo: one line in the header, the stacked sticker logo in the footer (public/brand/, brand/make-logo.py) */
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand img { display: block; width: auto; height: 52px; }
.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 28px;
  font: 600 0.875rem/1 var(--font-display);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.site-nav a { color: var(--ink); text-decoration: none; padding: 12px 0; }
.site-nav a:hover { color: var(--link); }
.site-nav a[aria-current="page"] { color: var(--link); box-shadow: inset 0 -2px 0 var(--accent); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 28px;
  border-radius: 999px;
  background: var(--accent);
  color: #ffffff;
  font: 600 1.0625rem/1.1 var(--font-display);
  letter-spacing: 0.02em;
  text-align: center;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.btn:hover { background: var(--accent-hover); }
.btn-line { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.btn-line:hover { background: var(--ink); color: var(--page); }

/* Sections and their titles: big, centred, in capitals */
.section { padding-top: 88px; padding-bottom: 88px; }
.band { background: var(--band); }
.section-title {
  font-size: clamp(2rem, 4vw, 2.75rem);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
}

/* Home: the cover, full width, then the line under it */
.hero img { width: 100%; aspect-ratio: 16 / 9; max-height: 720px; object-fit: cover; }
.intro { text-align: center; padding-top: 72px; padding-bottom: 8px; }
.intro h1 { max-width: 20ch; margin: 0 auto; font-size: clamp(2.25rem, 5vw, 3.75rem); }
.intro p { margin-top: 16px; color: var(--ink-soft); font-size: 1.25rem; }

/* Home: a game, its video beside its name */
.feature {
  margin-top: 48px;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 48px;
  align-items: center;
}
.feature video { width: 100%; border-radius: 24px; box-shadow: var(--shadow); background: var(--band); }
.feature-text { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.feature-icon { width: 96px; border-radius: 22px; box-shadow: 0 10px 24px rgba(214, 36, 110, 0.25); }
.feature h3 { font-size: 2.5rem; }
.feature p { color: var(--ink-soft); font-size: 1.25rem; }
.feature .btn { margin-top: 6px; }

/* Screenshots, in a row (home and /games/) */
.shots {
  margin-top: 48px;
  margin-left: auto;
  margin-right: auto;
  max-width: 760px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.shots img { width: 100%; border-radius: 20px; box-shadow: 0 12px 28px rgba(28, 26, 34, 0.12); }

/* Home: About us, Tiger on a raspberry circle */
.about {
  margin-top: 48px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
}
.about-art { position: relative; width: 100%; max-width: 460px; aspect-ratio: 1; justify-self: center; }
.about-art::before {
  content: '';
  position: absolute;
  inset: 8%;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #ff8cc0, #e5337a 70%);
}
.about-art img { position: absolute; left: 14%; bottom: 0; width: 72%; }
.about-text { display: flex; flex-direction: column; align-items: flex-start; gap: 24px; color: var(--ink-soft); font-size: 1.25rem; }

.contact { text-align: center; }
.contact p { margin: 16px 0 28px; color: var(--ink-soft); font-size: 1.25rem; }

/* Footer: dark, the brand and the links in capitals */
.site-foot { --focus: #ff7fb0; background: var(--foot); color: var(--foot-soft); padding-top: 56px; padding-bottom: 44px; font-size: 0.9375rem; }
.site-foot .wrap { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px 48px; }
.site-foot .brand img { height: 112px; }
.copy { display: block; margin-top: 12px; }
.foot-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  font: 600 0.8125rem/1.4 var(--font-display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.foot-nav a { color: var(--foot-ink); text-decoration: none; }
.foot-nav a:hover, .foot-nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 0.3em; }

/* Our games, the policy pages: one reading column */
.doc { max-width: var(--measure); padding-top: 56px; padding-bottom: 96px; }
.doc h1 { font-size: clamp(2.25rem, 5vw, 3rem); letter-spacing: 0.04em; text-transform: uppercase; }
.doc h2 { font-size: 1.5rem; }
.doc h3 { font-size: 1.1875rem; }
.doc > * + *, .doc article > * + *, .doc section > * + * { margin-top: 1rem; }
.doc section { margin-top: 2.75rem; }
/* The privacy page holds two documents: the Privacy Policy, then the Terms */
article + article { margin-top: 4.5rem; padding-top: 3rem; border-top: 2px solid var(--rule); }
.doc ul, .doc ol { padding-left: 1.4em; }
.doc li + li { margin-top: 0.4em; }
.doc li::marker { color: var(--accent); }
.meta, .small { color: var(--ink-soft); font-size: 0.9375rem; }

/* The player code, drawn like the one in the game's Settings */
code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--chip);
  border-radius: 6px;
  padding: 0.1em 0.4em;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

/* Numbered steps (the deletion page): the order is the point */
ol.steps { list-style: none; padding: 0; counter-reset: step; display: grid; gap: 12px; }
ol.steps li { counter-increment: step; display: grid; grid-template-columns: 2.5rem 1fr; gap: 14px; align-items: start; margin: 0; }
ol.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--accent);
  color: #ffffff;
  font: 600 1.125rem/1 var(--font-display);
}
ol.steps li > span { padding-top: 0.35rem; min-width: 0; }

/* Our games (/games/): a game's cover, its name, its video and screenshots */
.doc-wide { max-width: 60rem; }
.showcase { margin-top: 2rem; }
.doc .showcase > * + * { margin-top: 1.5rem; }
.showcase__cover { width: 100%; border-radius: 24px; box-shadow: var(--shadow); }
.showcase__head { display: grid; grid-template-columns: 72px 1fr; gap: 8px 16px; align-items: center; }
.showcase__icon { width: 72px; height: 72px; border-radius: 22%; }
.doc .showcase h2 { font-size: 2rem; }
.tagline { color: var(--ink-soft); margin-top: 0.15rem; }
.showcase__video { width: 100%; border-radius: 24px; box-shadow: var(--shadow); background: var(--band); }
.doc .showcase .shots { margin-top: 2rem; }
.links { display: flex; flex-wrap: wrap; gap: 8px 20px; }

@media (max-width: 860px) {
  .feature, .about { grid-template-columns: 1fr; gap: 32px; }
  .section { padding-top: 64px; padding-bottom: 64px; }
  .intro { padding-top: 48px; }
  .about-art { max-width: 340px; }
  .shots { gap: 12px; }
  .shots img { border-radius: 12px; }
}
@media (max-width: 720px) {
  /* The menu wraps under the brand here: the header scrolls away rather than cover half the screen */
  .site-head { position: static; }
  .site-head .wrap { justify-content: flex-start; }
  .site-nav { gap: 0 20px; }
  .doc { padding-top: 36px; }
  .showcase__head { grid-template-columns: 56px 1fr; }
  .showcase__icon { width: 56px; height: 56px; }
  .doc .showcase h2 { font-size: 1.5rem; }
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

@media print {
  body { background: #ffffff; color: #000000; }
  .site-head, .site-foot { display: none; }
  a { color: inherit; }
  .doc section { break-inside: avoid-page; }
}
