@charset "UTF-8";
/* ===== Site polish: details shared by the main page, /yt and /arcade =====
   Pairs with polish.js. Everything here is decoration. Calm mode (html.calm) and
   prefers-reduced-motion switch off the glows, spotlights and movement at the end
   of this file, plus a few GPU-heavy bits from the older stylesheets that calm
   mode did not cover yet. --ga is an "r, g, b" accent so rgba(var(--ga), .4) works. */

/* ---------- scroll progress bar, back to top, toast ---------- */

.site-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 60;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--accent), var(--magenta), var(--cyan));
  pointer-events: none;
}

.to-top {
  position: fixed;
  left: 1rem;
  bottom: 1rem;
  z-index: 44;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--card-line);
  border-radius: 50%;
  background: rgba(13,17,32,0.94);
  color: var(--text);
  font: 700 1.2rem/1 inherit;
  cursor: pointer;
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease-out),
              border-color 0.2s var(--ease), color 0.2s var(--ease);
}

.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-3px); }

.site-toast {
  position: fixed;
  left: 50%;
  top: 5rem;
  z-index: 65;
  max-width: calc(100vw - 2rem);
  padding: 0.6rem 1.2rem;
  border: 1px solid rgba(255,159,46,0.6);
  border-radius: 999px;
  background: rgba(13,17,32,0.96);
  box-shadow: 0 12px 34px -12px rgba(0,0,0,0.9), 0 0 30px -10px rgba(255,159,46,0.5);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  opacity: 0;
  transform: translate(-50%, -14px);
  pointer-events: none;
  transition: opacity 0.3s var(--ease), transform 0.35s var(--ease-out);
}

.site-toast.show { opacity: 1; transform: translate(-50%, 0); }

.fx-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 70;
  pointer-events: none;
}

/* ---------- sections: a coloured glow on hover, an icon on the heading ---------- */

.panel { --ga: 255, 159, 46; }
.panel:nth-of-type(3n+2) { --ga: 255, 46, 166; }
.panel:nth-of-type(3n)   { --ga: 54, 232, 255; }

.panel {
  transition: opacity 0.75s var(--ease-out), transform 0.75s var(--ease-out),
              border-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.panel:hover {
  border-color: rgba(var(--ga), 0.4);
  box-shadow: var(--shadow), 0 0 70px -34px rgba(var(--ga), 0.7);
}

/* landing on a section from the nav or a number key: a ring that pulses once */
.panel.arrived { animation: arrived 1.2s var(--ease-out); }

@keyframes arrived {
  0%   { box-shadow: var(--shadow), 0 0 0 0 rgba(var(--ga), 0.75); }
  100% { box-shadow: var(--shadow), 0 0 0 26px rgba(var(--ga), 0); }
}

.panel h2::after {
  margin-left: auto;
  font-size: 1.5rem;
  line-height: 1;
  opacity: 0.9;
  transition: transform 0.4s var(--ease-out);
}

.panel:hover h2::after { transform: rotate(-12deg) scale(1.2); }

/* the centred "come hang out" heading keeps its icon next to the words */
.panel-join h2::after { margin-left: 0.5rem; }

#start h2::after   { content: "👋"; }
#long h2::after    { content: "🎞️"; }
#watch h2::after   { content: "📺"; }
#games h2::after   { content: "🎮"; }
#arcade h2::after  { content: "🕹️"; }
#friends h2::after { content: "🤝"; }
#about h2::after   { content: "⭐"; }
#join h2::after    { content: "💬"; }

/* ---------- link cards: a soft pool of light that follows the pointer ---------- */

.cta, a.feature {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.cta::before,
a.feature::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 0%), rgba(var(--ga), 0.2), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
  pointer-events: none;
}

.cta:hover::before,
a.feature:hover::before { opacity: 1; }

/* each card glows in its own brand colour */
.cta, a.feature { --ga: 255, 159, 46; }
.cta-yt { --ga: 255, 45, 45; }
.cta-dc { --ga: 88, 101, 242; }
.cta-st { --ga: 102, 192, 244; }
.cta-rb { --ga: 226, 35, 26; }
.cta-sc { --ga: 255, 140, 26; }
.cta-sb { --ga: 87, 171, 255; }
.cta-monke { --ga: 3, 98, 252; }
.cta-ar { --ga: 255, 46, 166; }

/* ---------- the tip line in the footer ---------- */

.foot-tip,
.arcade-tip { margin: 1rem 0 0.2rem; font-size: 0.8rem; color: var(--muted); }
.arcade-tip { margin: 1.2rem 0 0; }

.foot-tip kbd,
.arcade-tip kbd {
  display: inline-block;
  min-width: 1.5em;
  padding: 0 0.35em;
  border: 1px solid var(--card-line);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: rgba(255,255,255,0.05);
  font: 600 0.78rem/1.5 "Consolas", "Courier New", ui-monospace, monospace;
  color: var(--text);
}

/* ---------- calm mode: everything above goes quiet, and the older gaps get closed ----------
   Calm is for weak graphics chips. The rule of thumb here: nothing that blurs what is
   behind it, nothing that animates by itself, no big soft glows, no spotlight that
   repaints as the mouse moves. Layout, colours, links and videos stay as they are. */

html.calm .panel.arrived { animation: none; }

html.calm .panel,
html.calm .to-top,
html.calm .site-toast,
html.calm .panel h2::after,
html.calm .cta::before,
html.calm a.feature::before { transition: none; }

html.calm .panel:hover {                       /* border colour only, no big blurred glow */
  box-shadow: var(--shadow);
}

html.calm .panel:hover h2::after { transform: none; }

html.calm .cta::before,
html.calm a.feature::before { display: none; }

html.calm .site-toast { box-shadow: none; }

/* blur behind the game start / game over cards: swap for a more solid card */
html.calm .snake-overlay,
html.calm .ps-overlay {
  background: rgba(7,9,15,0.92);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* drop-shadows are blurred copies that get redrawn whenever the thing moves */
html.calm .mines-cell .seal,
html.calm .icon-btn:hover svg { filter: none; }

html.calm .stats b.bumped { animation: none; }

@media (prefers-reduced-motion: reduce) {
  .panel.arrived { animation: none; }

  .panel, .to-top, .site-toast, .panel h2::after, .cta::before, a.feature::before { transition: none; }

  .panel:hover h2::after { transform: none; }
}
