/* everpurr.io — one stylesheet for every page. Palette and font are the game's. */

@font-face { font-family: "Fredoka"; src: url("/fonts/fredoka-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Fredoka"; src: url("/fonts/fredoka-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Fredoka"; src: url("/fonts/fredoka-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }

:root {
  --bg: #1E2430;
  --plate: #2C3445;
  --text: #F4EFE6;
  --muted: #A9B0BD;
  --accent: #7B4FB8;
  --line: rgba(244, 239, 230, 0.14);
  --gutter: 16px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { margin: 0; }
body {
  font-family: Fredoka, "Trebuchet MS", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}
main { flex: 1 0 auto; width: 100%; }
img, video { display: block; max-width: 100%; }
figure { margin: 0; }

a { color: var(--text); text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Top bar on inner pages */
.bar { width: 100%; max-width: 640px; margin: 0 auto; padding: 14px var(--gutter) 0; }
.logo { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; text-decoration: none; }

/* ---------- Home ---------- */
.home {
  max-width: 1240px; margin: 0 auto;
  padding: clamp(24px, 4vw, 56px) clamp(16px, 4vw, 40px) 24px;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(24px, 4vw, 56px); align-items: center;
}
.brand h1 { margin: 0; font-size: clamp(44px, 6vw, 68px); font-weight: 600; letter-spacing: -0.02em; line-height: 1; }
.brand > p { margin: 10px 0 0; font-size: clamp(17px, 1.8vw, 21px); max-width: 32ch; }

.games { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 18px; }
.game {
  position: relative;
  background: var(--plate);
  border: 2px solid transparent;
  border-radius: 16px;
  padding: 18px 18px 16px;
  display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 14px; align-items: start;
}
.game .icon { width: 56px; height: 56px; padding: 4px; border-radius: 14px; background: var(--text); }
.game .icon svg { display: block; width: 100%; height: 100%; }
.game h2 { margin: 2px 0 4px; font-size: 21px; font-weight: 600; letter-spacing: -0.01em; }
.game p { margin: 0; font-size: 15.5px; color: var(--muted); max-width: 40ch; }
.game .status {
  position: absolute; top: -12px; right: 14px;
  font-size: 12.5px; font-weight: 500; padding: 3px 9px; border-radius: 7px;
  background: var(--bg); color: var(--muted); border: 1px solid var(--line);
}
.game .status.is-soon { background: var(--accent); color: var(--text); border-color: var(--accent); }
.game.has-link:hover { border-color: var(--accent); }
.game h2 a::after { content: ""; position: absolute; inset: 0; border-radius: 14px; }

.scene img { width: 100%; height: auto; max-height: 78vh; object-fit: contain; margin: 0 auto; }

@media (max-width: 820px) {
  .home { grid-template-columns: minmax(0, 1fr); }
  .scene { order: -1; }
  .scene img { max-height: 46vh; }
}

/* ---------- Footer (every page) ---------- */
.foot { width: 100%; max-width: 1240px; margin: 0 auto; padding: 8px clamp(16px, 4vw, 40px) 32px; }
.foot-inner {
  border-top: 2px solid var(--line); padding-top: 18px;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(24px, 4vw, 56px); align-items: end;
}
.say { font-size: 17px; }
.say p { margin: 0 0 4px; }
.legal { font-size: 13px; color: var(--muted); }
.legal p { margin: 0 0 6px; max-width: 70ch; }
.legal a { color: var(--text); }

.narrow .foot { max-width: 640px; padding-left: var(--gutter); padding-right: var(--gutter); }
.narrow .foot-inner { grid-template-columns: minmax(0, 1fr); gap: 14px; }

@media (max-width: 820px) {
  .foot-inner { grid-template-columns: minmax(0, 1fr); gap: 14px; }
}

/* ---------- Game page ---------- */
.game-page { max-width: 640px; margin: 0 auto; padding: 6px var(--gutter) 40px; }
.intro { text-align: center; }
.intro h1 { margin: 0; font-size: clamp(36px, 9vw, 56px); font-weight: 600; letter-spacing: -0.02em; line-height: 1.05; }
.tagline { margin: 4px 0 0; font-size: clamp(17px, 4.4vw, 21px); color: var(--muted); }

.trailer {
  margin: 14px auto 0;
  height: 52vh;
  height: clamp(240px, 52svh, 680px);
  width: auto;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  border-radius: 18px;
  background: var(--plate);
}

.notify { margin: 16px auto 0; max-width: 460px; }
.notify .row { display: flex; flex-direction: column; gap: 8px; }
.notify input[type="email"] {
  width: 100%; min-width: 0; height: 52px; padding: 0 16px;
  font: inherit; font-size: 17px; color: var(--text);
  background: var(--plate); border: 2px solid var(--line); border-radius: 14px;
}
.notify input[type="email"]::placeholder { color: var(--muted); opacity: 1; }
.notify input[type="email"]:focus { border-color: var(--accent); outline: none; }
.notify button {
  height: 52px; padding: 0 22px;
  font: inherit; font-size: 17px; font-weight: 600; white-space: nowrap;
  color: var(--text); background: var(--accent);
  border: 0; border-radius: 14px; cursor: pointer;
}
.notify button:hover { filter: brightness(1.1); }
.notify button:disabled { opacity: 0.7; cursor: progress; filter: none; }
.notify.is-done .row { display: none; }

.form-status {
  margin: 10px 0 0; padding: 10px 14px;
  font-size: 16px; font-weight: 500; text-align: center;
  background: var(--plate); border-radius: 12px; border: 2px solid var(--line);
}
.form-status[hidden] { display: none; }
.form-status.is-ok { border-color: var(--accent); font-size: 18px; }
.note { margin: 10px 0 0; font-size: 14.5px; color: var(--muted); text-align: center; }

.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

@media (min-width: 520px) {
  .notify .row { flex-direction: row; }
  .notify input[type="email"] { flex: 1 1 auto; }
}
@media (min-width: 720px) {
  .trailer { height: 58vh; height: clamp(240px, 58svh, 720px); }
}
.tagline, .note { text-wrap: balance; }

.frames { margin: 40px 0 0; }
.frames ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.frames img { width: 100%; height: auto; aspect-ratio: 9 / 16; border-radius: 12px; background: var(--plate); }
.frames figcaption { margin-top: 6px; text-align: center; font-size: 14px; color: var(--muted); }

/* ---------- Privacy and other text pages ---------- */
.doc { max-width: 640px; margin: 0 auto; padding: 18px var(--gutter) 40px; }
.doc h1 { margin: 0; font-size: clamp(34px, 8vw, 48px); font-weight: 600; letter-spacing: -0.02em; line-height: 1.05; }
.doc .updated { margin: 6px 0 0; font-size: 14px; color: var(--muted); }
.doc h2 { margin: 28px 0 6px; font-size: 20px; font-weight: 600; }
.doc p, .doc li { font-size: 16.5px; }
.doc p { margin: 0 0 10px; }
.doc ul { margin: 0 0 10px; padding-left: 22px; }
.doc li { margin: 0 0 4px; }
.doc .lead { font-size: 18px; margin-top: 16px; }
