/* ─────────────────────────────────────────────────────────────
   Site chrome shared by every PUBLIC page (home, /games/<id>, contact,
   legal, account deletion): fonts, the header and the footer.
   Loaded after css/main.css, which keeps each page's own body styles.
   The admin consoles (/mcdanaly, /marketing) do not load this file.
   ───────────────────────────────────────────────────────────── */
:root {
  --site-ink: #1A1442;
  --site-ink-2: #4A4570;
  --site-soft: #F4F2FB;
  --site-line: #E4E0F2;
  --site-night: #1B1446;
  --site-night-2: #2A2163;
  --site-sun: #FFC83D;
  --site-ease: cubic-bezier(.645, .045, .355, 1);
  --font-display: 'Fredoka', 'Nunito', system-ui, sans-serif;
}

/* ─── Header ────────────────────────────────────────────────── */
.nav {
  background: #fff;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--site-ease), box-shadow .3s var(--site-ease);
}
.nav.scrolled,
body:not(.home) .nav { border-color: var(--site-line); box-shadow: 0 6px 24px -18px rgba(26, 20, 66, .5); }
.nav-inner { height: 68px; }

.nav-brand { min-height: 44px; }
.nav-wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -.01em;
  color: var(--site-ink);
  white-space: nowrap;
}

.nav-links { gap: 6px; }
.nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  color: var(--site-ink);
  transition: background .25s var(--site-ease), color .25s var(--site-ease);
}
.nav-links a:hover { color: var(--site-ink); background: var(--site-soft); }
.nav-links a.nav-cta { background: var(--site-ink); color: #fff; }
.nav-links a.nav-cta:hover { background: var(--site-night-2); color: #fff; }
/* the page or section you are on: one blue item at a time (BUG-04); white on #1D4ED8 is 6.7:1 */
.nav-links a[aria-current="page"], .nav-links a[aria-current="page"]:hover,
.nav-links a.nav-cta[aria-current="page"], .nav-links a.nav-cta[aria-current="page"]:hover { background: #1D4ED8; color: #fff; }
.nav-mobile a[aria-current="page"] { background: #1D4ED8; color: #fff; border-radius: 12px; }

.nav-hamburger { min-width: 44px; min-height: 44px; align-items: center; justify-content: center; }
.nav-hamburger span { background: var(--site-ink); }

.nav-mobile { background: #fff; border-top: 1px solid var(--site-line); }
.nav-mobile a {
  min-height: 44px;
  display: flex;
  align-items: center;
  font-weight: 700;
  color: var(--site-ink);
  border-bottom: 1px solid var(--site-line);
}
.nav-mobile a:hover { color: var(--site-night-2); }

/* main.css's mobile `.section { padding: 60px 20px }` drops the game page head under the fixed header */
@media (max-width: 768px) {
  .game-page-head { padding-top: 100px; }
  .footer .footer-inner { padding: 0; }
}
/* one gutter on phones: header, page content (.hp-wrap) and footer all start 16px in */
@media (max-width: 640px) {
  .nav-inner { padding: 0 16px; }
  .footer { padding-left: 16px; padding-right: 16px; }
}

/* contact / account-deletion forms: hint text and the back link meet the 14px / 44px floors */
.form-hint { font-size: 14px; }
.back-link { display: inline-flex; align-items: center; min-height: 44px; }

/* game pages (/games/<id>): no text under 14px, store buttons at least 48px */
.game-badge { font-size: 14px; }
.game-page-actions .btn { font-size: 16px; min-height: 48px; }

/* ─── Footer ────────────────────────────────────────────────── */
.footer { background: var(--site-night); border-top: 0; color: #D9D5F2; }
.footer-inner { padding: 0 24px; }   /* content edge lines up with the header's (max-width 1200 + 24px) */
.footer-bottom { max-width: 1152px; }
.footer-brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  background: none;
  -webkit-text-fill-color: #fff;
  color: #fff;
}
.footer-tagline { font-size: 15px; color: #C9C4EA; }
.footer-col h4 { font-size: 14px; letter-spacing: .06em; color: #B8B2E0; }
.footer-col ul { gap: 2px; }
.footer-col ul a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 15px;
  color: #E4E0F7;
}
.footer-col ul a:hover { color: #fff; text-decoration: underline; }
.footer-bottom { font-size: 14px; color: #B8B2E0; border-top-color: rgba(255, 255, 255, .12); }

/* ─── Wave band (game pages + homepage) ───────────────────────
   One 720 px wave period is a mask repeated sideways on a band 720 px wider than its box; the band slides one
   period and loops, so it covers ANY screen width (a fixed-width strip showed a hard step past 1440 px, owner
   2026-11-17). Its colour is currentColor; the box behind it is the colour above the wave. Transform-only. */
.wave-band {
  position: absolute; left: 0; bottom: -1px; width: calc(100% + 720px); height: 111px; background: currentColor; pointer-events: none;
  -webkit-mask: var(--wave-mask) repeat-x 0 0 / 720px 111px; mask: var(--wave-mask) repeat-x 0 0 / 720px 111px;
  animation: wave-drift 16s linear infinite;
}
:root { --wave-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 720 110' preserveAspectRatio='none'%3E%3Cpath d='M0 58c120-30 240-30 360 0s240 30 360 0v52H0z'/%3E%3C/svg%3E"); }
@keyframes wave-drift { to { transform: translateX(-720px); } }
@media (prefers-reduced-motion: reduce) { .wave-band { animation: none; } }
