/* Snow Gaming Studio — shared stylesheet for every page.
   Studio identity is neutral-warm; each game brings its own accent through
   --game-accent / --game-accent-soft (set on the game's card or page <body>). */

:root {
  color-scheme: light dark;

  --bg: #fff6ea;
  --bg-deep: #fdebd5;
  --surface: #ffffff;
  --text: #3a2e26;
  --text-soft: #6b5a4d;
  --line: #f0dcc4;
  --link: #a14d00;
  --link-hover: #7a3900;
  --shadow: 0 6px 20px rgba(120, 72, 30, 0.10), 0 1px 3px rgba(120, 72, 30, 0.08);

  /* studio accents */
  --peach: #ffa726;
  --peach-soft: #ffe2bd;
  --mint: #bfead7;
  --mint-ink: #1f6b4f;
  --pink: #ffd3dc;
  --pink-ink: #9c2f4a;
  --snow: #6f9fd8;

  /* per-game accent (default = studio peach) */
  --game-accent: var(--peach);
  --game-accent-soft: #ffe2bd;
  --game-ink: #3a2410;

  --radius: 22px;
  --radius-sm: 14px;
  --maxw: 960px;
  --gutter: clamp(16px, 4vw, 32px);

  --font-head: "Fredoka", "Nunito", ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-body: "Nunito", ui-rounded, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #211a16;
    --bg-deep: #2b221d;
    --surface: #312720;
    --text: #f7ebde;
    --text-soft: #cdb9a7;
    --line: #47382d;
    --link: #ffbe6b;
    --link-hover: #ffd59c;
    --shadow: 0 6px 20px rgba(0, 0, 0, 0.35), 0 1px 3px rgba(0, 0, 0, 0.3);
    --peach-soft: #4a3220;
    --mint: #24443a;
    --mint-ink: #a8e6cc;
    --pink: #4a2a33;
    --pink-ink: #ffc2cf;
    --snow: #9cc2ee;
  }
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  background-image:
    radial-gradient(circle at 12% -10%, var(--peach-soft) 0, transparent 40%),
    radial-gradient(circle at 100% 0%, var(--pink) 0, transparent 30%);
  background-repeat: no-repeat;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-wrap: break-word;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--link); text-underline-offset: 3px; }
a:hover { color: var(--link-hover); }
a:focus-visible,
.btn:focus-visible,
.game-card:focus-within {
  outline: 3px solid var(--snow);
  outline-offset: 3px;
}

h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2rem, 6vw, 2.8rem); }
h2 { font-size: clamp(1.5rem, 4vw, 1.9rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }

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

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- header ---------- */
.site-header { padding: 20px 0 8px; }
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--text); text-decoration: none;
  font-family: var(--font-head); font-weight: 600; font-size: 1.15rem;
}
.brand:hover { color: var(--text); }
.logo-mark {
  width: 40px; height: 40px; flex: none;
  border-radius: 13px;
  background: var(--surface);
  box-shadow: var(--shadow);
  display: grid; place-items: center;
  color: var(--snow);
}
.logo-mark svg { width: 26px; height: 26px; }
.nav { display: flex; gap: 6px 18px; flex-wrap: wrap; font-weight: 700; font-size: 0.98rem; }
.nav a { text-decoration: none; color: var(--text-soft); }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); text-decoration: underline; }

/* ---------- hero ---------- */
.hero { padding: 40px 0 24px; text-align: center; }
.hero .logo-mark { width: 84px; height: 84px; border-radius: 26px; margin: 0 auto 18px; }
.hero .logo-mark svg { width: 54px; height: 54px; }
.tagline { font-size: 1.2rem; color: var(--text-soft); max-width: 34em; margin: 0 auto; }

section { padding: 28px 0; }
.section-title { display: flex; align-items: center; gap: 10px; }
.section-title .dot {
  width: 12px; height: 12px; border-radius: 50%; background: var(--game-accent); flex: none;
}

/* ---------- cards ---------- */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(18px, 4vw, 28px);
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  list-style: none; margin: 0; padding: 0;
}
.game-card {
  position: relative;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex; flex-direction: column;
  border-top: 8px solid var(--game-accent);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.game-card:hover { transform: translateY(-3px); }
.game-card .game-card-body { padding: 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.game-card .game-head { display: flex; align-items: center; gap: 14px; }
.game-card .game-icon { width: 72px; height: 72px; border-radius: 18px; box-shadow: var(--shadow); }
.game-card h3 { margin: 0; }
.game-card h3 a { color: var(--text); text-decoration: none; }
/* whole card clickable through the title link */
.game-card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.game-card p { margin: 0; color: var(--text-soft); }

.badge {
  display: inline-block;
  align-self: flex-start;
  background: var(--game-accent-soft);
  color: var(--game-ink);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 0.88rem; font-weight: 700;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 10px 22px;
  border-radius: 999px;
  background: var(--game-accent);
  color: var(--game-ink);
  font-family: var(--font-head); font-weight: 600; font-size: 1.05rem;
  text-decoration: none;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.12);
}
.btn:hover { color: var(--game-ink); filter: brightness(1.05); }
.btn.secondary { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.btn.secondary:hover { color: var(--text); }

.two-col { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 720px) { .two-col { grid-template-columns: 1fr 1fr; } }

.pill-mint { background: var(--mint); color: var(--mint-ink); }
.pill-pink { background: var(--pink); color: var(--pink-ink); }

/* ---------- game page ---------- */
.game-hero {
  display: grid; gap: 22px; align-items: center;
  grid-template-columns: 1fr;
  text-align: center;
  padding: 32px 0 12px;
}
.game-hero .game-icon-lg {
  width: 168px; height: 168px; border-radius: 40px; margin: 0 auto;
  box-shadow: var(--shadow);
}
.game-hero .lead { font-size: 1.2rem; color: var(--text-soft); }
.game-hero .actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
@media (min-width: 720px) {
  .game-hero { grid-template-columns: 200px 1fr; text-align: left; }
  .game-hero .game-icon-lg { width: 200px; height: 200px; margin: 0; }
  .game-hero .actions { justify-content: flex-start; }
}

.features {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px;
}
.features li {
  background: var(--surface); border-radius: var(--radius-sm); box-shadow: var(--shadow);
  padding: 16px 18px;
}
.features .emoji { font-size: 1.6rem; display: block; line-height: 1.2; margin-bottom: 4px; }
.features strong { font-family: var(--font-head); font-weight: 600; display: block; }
.features span.desc { color: var(--text-soft); font-size: 0.98rem; }

.shots { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .shots { grid-template-columns: 1fr 1fr; } }
.shots figure { margin: 0; }
.shots img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.shots figcaption { color: var(--text-soft); font-size: 0.95rem; text-align: center; margin-top: 8px; }

/* ---------- prose (privacy) ---------- */
.prose { max-width: 46em; }
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.3em; }
.prose ul { padding-left: 1.3em; margin: 0 0 1em; }
.prose li { margin-bottom: 0.4em; }
.prose .updated { color: var(--text-soft); font-weight: 700; }
.toc { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.toc a { display: inline-block; padding: 6px 14px; border-radius: 999px; background: var(--surface); box-shadow: var(--shadow); text-decoration: none; color: var(--text); font-weight: 700; font-size: 0.95rem; }
.game-section {
  border-left: 6px solid var(--game-accent);
  background: var(--surface);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  padding: 4px clamp(16px, 4vw, 26px) 12px;
  margin: 1.4em 0;
}

/* ---------- 404 ---------- */
.notfound { text-align: center; padding: 56px 0 32px; }
.notfound .big-cat { font-size: 4.5rem; line-height: 1; margin-bottom: 10px; }

/* ---------- footer ---------- */
.site-footer {
  margin-top: 40px;
  padding: 26px 0 36px;
  border-top: 2px dashed var(--line);
  color: var(--text-soft);
  font-size: 0.95rem;
  text-align: center;
}
.site-footer p { margin: 0; }
.site-footer .sep { margin: 0 6px; }

@media (prefers-reduced-motion: reduce) {
  .game-card { transition: none; }
  .game-card:hover { transform: none; }
}

/* ---------- language switch (plain links, no JS) ---------- */
.lang-switch { font-weight: 700; font-size: 0.85rem; display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--surface); box-shadow: var(--shadow); }
.lang-switch a { text-decoration: none; color: var(--text-soft); padding: 3px 11px; border-radius: 999px; }
.lang-switch a:hover { color: var(--text); }
.lang-switch a[aria-current="true"] { background: var(--text); color: var(--surface); }
.lang-jump { font-weight: 700; margin: 0 0 1em; }
.site-header .wrap > .nav { margin-left: auto; }
.prose hr { border: 0; border-top: 2px dashed var(--text-soft); opacity: 0.35; margin: 3em 0 1.5em; }

/* ---------- data table (privacy: what / why / how long) ---------- */
.data-table { width: 100%; border-collapse: separate; border-spacing: 0; margin: 0 0 1.2em; background: var(--surface); border-radius: var(--radius-sm); box-shadow: var(--shadow); overflow: hidden; font-size: 0.98rem; }
.data-table th, .data-table td { text-align: left; vertical-align: top; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.data-table thead th { font-family: var(--font-head); font-weight: 600; background: var(--bg-deep); }
.data-table tbody tr:last-child > * { border-bottom: 0; }
.data-table tbody th { font-weight: 700; }
/* Phones: each row becomes a small card, column names come from data-label */
@media (max-width: 640px) {
  .data-table thead { position: absolute; left: -9999px; }
  .data-table, .data-table tbody, .data-table tr, .data-table th, .data-table td { display: block; width: 100%; }
  .data-table tbody tr { border-bottom: 1px solid var(--line); padding: 6px 0; }
  .data-table tbody tr:last-child { border-bottom: 0; }
  .data-table th, .data-table td { border-bottom: 0; padding: 4px 14px; }
  .data-table td::before { content: attr(data-label); display: block; font-weight: 700; color: var(--text-soft); font-size: 0.85rem; }
}
