/* SHARED BY EVERY PAGE: index.html (the portal), kids/, arcade/.
   Palette, nav + drawer, ticker, logo block, footer. Page-only styles stay in each page's <style>. */
:root {
  --black: #0d0d0d;
  --cream: #f5f0e8;
  --yellow: #f0c832;
  --rust: #c94f2a;
  --teal: #2a7f7f;
  --offwhite: #faf7f2;
  --neon: #3ff0e0;      /* the arcade's glow: a lit-up --teal */
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--offwhite);
  color: var(--black);
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  overflow-x: hidden;
}

/* NAV */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: var(--black);
}

.hamburger {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
  z-index: 200;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--cream);
  transition: all 0.3s;
}

.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-logo {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  text-decoration: none;
}

.nav-logo img { height: 44px; width: auto; display: block; }

.nav-spacer { width: 32px; }

.nav-links {
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  width: 260px;
  height: 100vh;
  background: #111;
  padding: 5rem 2rem 2rem;
  list-style: none;
  z-index: 150;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  display: flex;
  pointer-events: none;
}

.nav-links.open { transform: translateX(0); pointer-events: all; box-shadow: 4px 0 20px rgba(0,0,0,0.5); }   /* shadow only when open: closed, it bled onto the page's left edge */

.nav-links li { border-bottom: 1px solid rgba(255,255,255,0.07); }

.nav-links a {
  display: block;
  color: var(--cream);
  text-decoration: none;
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 500;
  padding: 1.1rem 0;
  transition: color 0.2s;
}

.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--yellow); }

.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 140;
}

.nav-overlay.open { display: block; }

/* SECTION HEADING (Bebas, the size every section on the site uses) */
.section-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2.5rem, 5vw, 4rem);
  letter-spacing: 0.03em;
  line-height: 1;
}

/* TICKER */
.ticker {
  background: var(--yellow);
  padding: 0.75rem 0;
  overflow: hidden;
  white-space: nowrap;
}

.ticker-inner { display: inline-flex; animation: ticker 20s linear infinite; }

.ticker-inner span {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.1rem;
  letter-spacing: 0.1em;
  color: var(--black);
  padding: 0 2rem;
}

.ticker-inner span.dot { color: var(--rust); padding: 0; }

/* CROSS-LINK BAND: "looking for the other section?" at the foot of a section page */
.crosslink {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 2.25rem max(3rem, calc((100% - 1100px) / 2));   /* lines up with the 1100px content column */
  text-decoration: none;
  transition: background 0.2s;
}

.crosslink-text { font-size: 0.8rem; letter-spacing: 0.15em; text-transform: uppercase; font-weight: 500; }

.crosslink-name { font-family: 'Bebas Neue', sans-serif; font-size: clamp(2rem, 4vw, 3rem); letter-spacing: 0.04em; line-height: 1; }

.crosslink svg { transition: transform 0.2s; }
.crosslink:hover svg { transform: translateX(6px); }

/* LOGO BLOCK (the "buy me a coffee" image under it was removed 2026-12-04) */
.logo-break {
  background: var(--black);
  padding: 4rem 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
}

.logo-break .big-logo { width: clamp(260px, 40vw, 520px); height: auto; }

/* FOOTER */
footer {
  background: var(--black);
  padding: 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-brand { display: flex; align-items: center; gap: 0.6rem; }
.footer-brand img { height: 52px; width: auto; }

.footer-logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.8rem;
  color: var(--yellow);
  letter-spacing: 0.06em;
}

.footer-copy { font-size: 0.8rem; color: rgba(245,240,232,0.35); letter-spacing: 0.05em; }

.footer-bn {
  color: var(--yellow);
  text-decoration: none;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 500;
  border-bottom: 1px solid rgba(240,200,50,0.4);
  padding-bottom: 2px;
  transition: border-color 0.2s;
}

.footer-bn:hover { border-color: var(--yellow); }

/* ANIMATIONS */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .crosslink { padding: 2rem 1.5rem; }
  .logo-break { padding: 3rem 1.5rem; }
  footer { padding: 2rem 1.5rem; flex-direction: column; align-items: flex-start; }
}

/* WHIMSIVERSE (2026-12-03, Zul: "more kid-centric, it looks too business", then "redo whimsiverse colors with the
   colors of the image [banner_explore.png]. Animate the WHIMSIVERSE"). The --wv-* colours were SAMPLED from that
   banner: navy outline, the sky's blue -> purple -> pink -> sunset, the title yellow, rainbow pink and green.
   Shared by the portal's kids door, the kids page hero and the arcade page's cross-link. Needs Luckiest Guy.
   Markup: <span class="wv-title"><span class="sr-only">Whimsiverse</span><span class="wv-letters" aria-hidden="true">
   <span style="--i:0">W</span>...</span></span>. */
:root {
  --wv-navy: #003167;
  --wv-blue: #0b50b2;
  --wv-purple: #7c64bf;
  --wv-pink: #eb83a1;
  --wv-rose: #fa7b94;
  --wv-sunset: #fec42a;
  --wv-yellow: #fdcc17;
  --wv-cream: #fff8e7;
  --wv-cyan: #6fd3f0;
  --wv-green: #97bc2e;
  --wv-sky: linear-gradient(to bottom, var(--wv-blue) 0%, #0f5bbf 28%, var(--wv-purple) 60%, var(--wv-pink) 82%, var(--wv-sunset) 100%);
}

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

.wv-title { display: block; font-family: 'Luckiest Guy', 'Fredoka', sans-serif; font-weight: 400; line-height: 1; letter-spacing: 0.035em; }

/* each letter: a banner colour, the banner's navy outline + drop, a tilt, and its place in the wave (--i) */
.wv-letters span {
  display: inline-block;
  color: var(--wv-yellow);
  text-shadow:
    0.045em 0 0 var(--wv-navy), -0.045em 0 0 var(--wv-navy), 0 0.045em 0 var(--wv-navy), 0 -0.045em 0 var(--wv-navy),
    0.032em 0.032em 0 var(--wv-navy), -0.032em 0.032em 0 var(--wv-navy), 0.032em -0.032em 0 var(--wv-navy), -0.032em -0.032em 0 var(--wv-navy),
    0.07em 0.09em 0 var(--wv-navy);
  transform: rotate(-5deg);
  animation: wvWave 2.4s calc(var(--i) * 0.11s) ease-in-out infinite;
}
.wv-letters span:nth-child(4n+2) { color: var(--wv-cream); transform: rotate(4deg); }
.wv-letters span:nth-child(4n+3) { color: var(--wv-rose);  transform: rotate(-2deg); }
.wv-letters span:nth-child(4n)   { color: var(--wv-cyan);  transform: rotate(5deg); }

/* THE WAVE: a ripple runs left to right, each letter hopping and wobbling in turn, then a breath of rest.
   `translate` / `scale` / `rotate` compose with each letter's own tilt in `transform`. */
@keyframes wvWave {
  0%, 55%, 100% { translate: 0 0;        scale: 1;    rotate: 0deg; }
  15%           { translate: 0 -0.16em;  scale: 1.08; rotate: -4deg; }
  30%           { translate: 0 0.03em;   scale: 0.97; rotate: 3deg; }
  42%           { translate: 0 -0.04em;  scale: 1;    rotate: 0deg; }
}

/* TWINKLING STARS for the Whimsiverse skies: <span class="wv-star" style="top:..;left:..;--s:18px;--d:.4s"></span> */
.wv-star {
  position: absolute;
  width: var(--s, 16px);
  aspect-ratio: 1;
  background: var(--wv-yellow);
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  animation: wvTwinkle 2.6s var(--d, 0s) ease-in-out infinite;
  pointer-events: none;
}
.wv-star.dot { clip-path: circle(50%); background: var(--wv-cream); }

@keyframes wvTwinkle {
  0%, 100% { opacity: 0.6; scale: 0.75; rotate: 0deg; }
  50%      { opacity: 1;    scale: 1.15; rotate: 20deg; }
}

/* ARCADIUM (2026-12-04, Zul: "Animate Arcadium too in a sci-fi way"). The arcade's twin of the WHIMSIVERSE block:
   an energy pulse runs through the letters, two letters flicker like failing neon tubes, and every few seconds the
   word glitches (a magenta / cyan split, sliced, with a jolt). Shared by the portal's arcade door, the arcade page
   hero and the kids page's cross-link. Needs Audiowide.
   Markup: <span class="ac-title"><span class="sr-only">Arcadium</span><span class="ac-letters" aria-hidden="true"
   data-text="Arcadium"><span style="--i:0">A</span>...</span></span>. The glitch copies hang off .ac-letters, which
   is aria-hidden, so a screen reader says "Arcadium" once. */
:root {
  --ac-magenta: #ff3db8;
  --ac-glow: 0 0 0.1em var(--neon), 0 0 0.32em rgba(63,240,224,0.6), 0 0 0.7em rgba(63,240,224,0.32);
}

.ac-title { display: block; width: fit-content; font-family: 'Audiowide', sans-serif; font-weight: 400; line-height: 1; letter-spacing: 0.04em; color: #eafffd; }
.ac-letters { position: relative; display: inline-block; animation: acJolt 5.2s 1.5s steps(1) infinite; }

.ac-letters span {
  display: inline-block;
  text-shadow: var(--ac-glow);
  animation: acPulse 3.6s calc(var(--i) * 0.08s) ease-in-out infinite;
}
/* two "tubes" that stutter, each on its own clock */
.ac-letters span:nth-child(3) { animation: acPulse 3.6s calc(var(--i) * 0.08s) ease-in-out infinite, acFlicker 7s 2s linear infinite; }
.ac-letters span:nth-child(6) { animation: acPulse 3.6s calc(var(--i) * 0.08s) ease-in-out infinite, acFlicker 9s 5s linear infinite; }

/* THE PULSE: a charge sweeps left to right, each letter flaring white-hot and stretching a touch, then a rest */
@keyframes acPulse {
  0%, 32%, 100% { text-shadow: var(--ac-glow); scale: 1; }
  9%            { text-shadow: 0 0 0.05em #fff, 0 0 0.18em #fff, 0 0 0.45em var(--neon), 0 0 1em rgba(63,240,224,0.7); scale: 1 1.07; }
}

@keyframes acFlicker {
  0%, 60%, 100% { opacity: 1; }
  61% { opacity: 0.2; }  62% { opacity: 1; }  64% { opacity: 0.35; }  66% { opacity: 1; }  67% { opacity: 0.15; }  70% { opacity: 1; }
}

/* THE GLITCH: two coloured copies of the word, sliced and offset, for a few frames out of every 5.2s */
.ac-letters::before, .ac-letters::after {
  content: attr(data-text);
  position: absolute;
  left: 0; top: 0;
  white-space: nowrap;
  text-shadow: none;
  opacity: 0;
  pointer-events: none;
  mix-blend-mode: screen;
  animation: acGlitchA 5.2s 1.5s steps(1) infinite;
}
.ac-letters::before { color: var(--ac-magenta); }
.ac-letters::after  { color: var(--neon); animation-name: acGlitchB; }

@keyframes acGlitchA {
  0%, 88%, 96%, 100% { opacity: 0; translate: 0 0; clip-path: inset(0); }
  89% { opacity: 0.9; translate: -0.06em 0;  clip-path: inset(8% 0 62% 0); }
  91% { opacity: 0.9; translate: 0.05em 0;   clip-path: inset(52% 0 22% 0); }
  93% { opacity: 0.9; translate: -0.04em 0;  clip-path: inset(30% 0 44% 0); }
  95% { opacity: 0.6; translate: 0.02em 0;   clip-path: inset(70% 0 4% 0); }
}
@keyframes acGlitchB {
  0%, 88%, 96%, 100% { opacity: 0; translate: 0 0; clip-path: inset(0); }
  89% { opacity: 0.9; translate: 0.06em 0;   clip-path: inset(40% 0 35% 0); }
  91% { opacity: 0.9; translate: -0.05em 0;  clip-path: inset(12% 0 70% 0); }
  93% { opacity: 0.9; translate: 0.04em 0;   clip-path: inset(62% 0 10% 0); }
  95% { opacity: 0.6; translate: -0.02em 0;  clip-path: inset(20% 0 60% 0); }
}
@keyframes acJolt {
  0%, 88%, 96%, 100% { transform: none; }
  89% { transform: translateX(0.02em) skewX(-8deg); }
  91% { transform: translateX(-0.02em) skewX(5deg); }
  93% { transform: skewX(-3deg); }
}

