/* ==========================================================================
   eggs.css: the hidden things.
   Hard-edged pixel effects only. No blur, no glow, no soft shadows, no gradients
   except hard-stop stripes. Motion is switched off under prefers-reduced-motion.
   ========================================================================== */

/* ---------- pixel confetti (Konami code, "party") ---------- */
.egg-fx { position: fixed; inset: 0; z-index: 350; overflow: hidden; pointer-events: none; }
.egg-fx i { position: absolute; top: -24px; width: 10px; height: 10px; animation: egg-fall 2.4s steps(16) forwards; }
.egg-fx i:nth-child(4n + 1) { background: var(--accent); }
.egg-fx i:nth-child(4n + 2) { background: var(--ink); }
.egg-fx i:nth-child(4n + 3) { background: #f2c200; }
.egg-fx i:nth-child(4n) { background: var(--white); outline: 2px solid var(--ink); outline-offset: -2px; }
@keyframes egg-fall { from { transform: translate(0, 0); } to { transform: translate(var(--dx, 0px), calc(100vh + 48px)); } }

/* ---------- pixel hearts (the dog) ---------- */
.egg-heart { position: fixed; z-index: 350; width: 21px; height: 18px; margin: -9px 0 0 -10px; pointer-events: none; animation: egg-rise 1.1s steps(9) forwards; }
.egg-heart svg { display: block; width: 100%; height: 100%; fill: var(--accent); shape-rendering: crispEdges; }
@keyframes egg-rise { from { transform: translate(0, 0); opacity: 1; } to { transform: translate(var(--dx, 0px), -76px); opacity: 0; } }

/* ---------- matchday: the header goes yellow and black, like a scarf ---------- */
:root[data-matchday="on"] ::selection { background: #f2c200; color: var(--ink); }
:root[data-matchday="on"] .strip { background: #f2c200; color: var(--ink); }
:root[data-matchday="on"] .strip::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 6px; background: repeating-linear-gradient(90deg, var(--ink) 0 12px, #f2c200 12px 24px); pointer-events: none; }
:root[data-matchday="on"] .strip-mark { background: var(--ink); color: #f2c200; }
:root[data-matchday="on"] .strip-menu { border-color: var(--ink); color: var(--ink); }
:root[data-matchday="on"] .strip-menu:hover, :root[data-matchday="on"] .strip-menu[aria-expanded="true"] { background: #dcae00; border-color: var(--ink); }
:root[data-matchday="on"] .strip-cmd { border-color: var(--ink); color: var(--ink); }
:root[data-matchday="on"] .strip-cmd:hover { border-color: var(--ink); background: #dcae00; color: var(--ink); }
:root[data-matchday="on"] .strip-contact { color: var(--ink); }
:root[data-matchday="on"] .strip-contact:hover { color: #3b3200; text-decoration: underline; }
@media (min-width: 861px) {
  :root[data-matchday="on"] .strip-nav a { color: #3b3200; }
  :root[data-matchday="on"] .strip-nav a:hover, :root[data-matchday="on"] .strip-nav a[aria-current="page"] { color: var(--ink); }
  :root[data-matchday="on"] .strip-nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--ink); }
}

/* ---------- footer badge and quips ---------- */
.egg-badge { cursor: default; }
a.egg-badge { cursor: pointer; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a.egg-badge:hover { color: var(--accent-ink); }
.egg-quip { display: block; margin-bottom: 6px; color: var(--ink); font-weight: 600; }
.egg-quip:empty { display: none; }
.foot-quip { flex-basis: 100%; }

/* ---------- the keepie-uppie game ---------- */
.egg-modal { position: fixed; inset: 0; z-index: 360; display: grid; place-items: center; padding: 16px; background: rgba(21, 19, 15, 0.62); }
.egg-box { position: relative; width: min(640px, 100%); max-height: 100%; overflow: auto; padding: 18px; background: var(--white); color: var(--ink); box-shadow: 0 -4px 0 0 var(--ink), 0 4px 0 0 var(--ink), -4px 0 0 0 var(--ink), 4px 0 0 0 var(--ink); }
.egg-box h2 { margin: 0 0 4px; font: 600 16px/1.3 var(--mono); }
.egg-box p { margin: 0 0 12px; color: var(--ink-2); font-size: 14.5px; }
.keepie { display: block; }
.keepie canvas { display: block; width: 100%; height: auto; aspect-ratio: 8 / 5; border: 2px solid var(--ink); background: var(--paper); image-rendering: pixelated; touch-action: manipulation; cursor: pointer; }
.keepie-hud { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; margin-top: 10px; font: 500 13px/1.5 var(--mono); color: var(--ink-2); }
.keepie-hud b { color: var(--ink); font-weight: 600; }
.keepie-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.keepie:focus-visible, .keepie canvas:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

/* ---------- the terminal's secret art ---------- */
.term-ln.egg-art { white-space: pre; overflow: hidden; }

@media print {
  .egg-badge, .egg-fx, .egg-heart, .egg-modal, .foot-quip { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .egg-fx, .egg-heart { display: none; }
}
