/* Ernest Games Playground. Gadget Zone's dark panel system (design-library/sites/gadget-zone.md) in dark gold: warm
   near-black surfaces with a gold accent (Ernest, 2026-11-08, after black + blue, the portfolio's charcoal grey, which
   he disliked, navy black, and dark amber; that last one is saved in _temp/sninja/theme-dark-amber-backup).
   Every colour on the page comes from the :root block, the hologram's and the icons' SVG included (the .s-/.f-/.t-
   classes), so a colour try only changes that block. All motion lives in site.js (Web Animations API); CSS only
   describes states. */

@font-face { font-family: "Outfit"; src: url("fonts/outfit-normal-500-d8a316f7.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("fonts/dm-sans-normal-400-89c7ce3a.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  /* dark gold with the dark leading (Ernest, 2026-11-08: "make the darker tone more prominent than the gold"):
     near-black surfaces with only a trace of warmth, faint glows and grid, gold kept for the accents.
     Contrast (_temp/sninja/contrast.mjs, the dk: pairs): muted 6.9+ on every surface, gold 8.8+, the dark ink on the
     gold button 7.8+. theme-color in index.html and icon.svg repeat --c-bg by hand. */
  --c-bg: #070604;
  --c-band: #0c0a06;
  --c-surface: #110f09;
  --c-raised: #19160e;
  --c-raised2: #221e13;
  --c-text: #f7f1e3;
  --c-body: #ded5bf;
  --c-muted: #b2a78b;
  --c-accent: #e2b84a;
  --c-accent-hi: #f3d47a;
  --c-light: #fff1bf;   /* the hottest light: sparks, the projector core, the bright end of the gradients */
  --c-deep: #c99a32;    /* the dark end of the gold gradients */
  --c-line: #221d10;
  --c-line-strong: #4f4220;
  --c-drum: #2a2310;    /* the projector's lit side */
  /* the same colours as r g b, for see-through glows */
  --rgb-bg: 7 6 4;
  --rgb-band: 12 10 6;
  --rgb-accent: 226 184 74;
  --rgb-hi: 243 212 122;
  --rgb-light: 255 241 191;
  --rgb-deep: 201 154 50;
  --grad-cta: linear-gradient(100deg, var(--c-accent), var(--c-deep));
  --grad-cta-hover: linear-gradient(100deg, #f0cf6a, #d9ab3e);
  --grad-ink: linear-gradient(95deg, var(--c-light), var(--c-accent) 50%, var(--c-deep));
  --grad-cool: linear-gradient(95deg, #fffaec, #efe2bc);
  --grad-panel: linear-gradient(160deg, #15120a, var(--c-band) 60%, #120f08);
  --grad-closing: linear-gradient(120deg, #17130a, #0d0b06 50%, #18140a);
  /* gold light kept low so the dark leads: the page's two glows and the closing panel's light from its notch */
  --glow-page: radial-gradient(64rem 40rem at 84% -6rem, rgb(var(--rgb-accent) / .06), transparent 70%),
               radial-gradient(52rem 36rem at 6% 34rem, rgb(var(--rgb-deep) / .035), transparent 70%);
  --glow-closing: radial-gradient(60% 85% at 50% 0%, rgb(var(--rgb-accent) / .12), transparent 72%);
  /* the tile grid (Ernest, 2026-11-08): faint gold lines every 44px on the page, a little brighter inside the panels */
  --grid-page: linear-gradient(rgb(var(--rgb-accent) / .045) 1px, transparent 1px) 0 0 / 44px 44px,
               linear-gradient(90deg, rgb(var(--rgb-accent) / .045) 1px, transparent 1px) 0 0 / 44px 44px;
  --grid-panel: linear-gradient(rgb(var(--rgb-hi) / .04) 1px, transparent 1px) 0 0 / 44px 44px,
                linear-gradient(90deg, rgb(var(--rgb-hi) / .04) 1px, transparent 1px) 0 0 / 44px 44px;
  --display: "Outfit", system-ui, sans-serif;
  --body: "DM Sans", system-ui, sans-serif;
  --radius: 24px;
  --hdr: 4.5rem;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: auto; scroll-padding-top: calc(var(--hdr) + 1rem); -webkit-text-size-adjust: 100%; }
body { margin: 0; color: var(--c-text);
       background: var(--glow-page), var(--grid-page), var(--c-bg); font: 400 1rem/1.6 var(--body); overflow-x: hidden; }
img, svg { display: block; max-width: 100%; }
a { color: var(--c-accent-hi); }
h1, h2, h3 { font-family: var(--display); line-height: 1.1; letter-spacing: -.01em; text-wrap: balance; margin: 0; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
.sprite { position: absolute; }
/* SVG paint from the tokens: s- for gradient stops, f- for fills, t- for strokes */
.s-light { stop-color: var(--c-light); }
.s-hi { stop-color: var(--c-accent-hi); }
.s-acc { stop-color: var(--c-accent); }
.s-deep { stop-color: var(--c-deep); }
.s-band { stop-color: var(--c-band); }
.s-drum { stop-color: var(--c-drum); }
.f-light { fill: var(--c-light); }
.f-hi { fill: var(--c-accent-hi); }
.f-acc { fill: var(--c-accent); }
.f-surface { fill: var(--c-surface); }
.t-hi { stroke: var(--c-accent-hi); }
.t-acc { stroke: var(--c-accent); }
.t-line { stroke: var(--c-line-strong); }
.wrap { width: min(100% - 2rem, 72rem); margin-inline: auto; }
.i { width: 1.15em; height: 1.15em; flex: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nowrap { white-space: nowrap; }
.muted { color: var(--c-muted); }
.grad-text { background: var(--grad-ink); -webkit-background-clip: text; background-clip: text; color: transparent; }
.grad-text--cool { background: var(--grad-cool); -webkit-background-clip: text; background-clip: text; color: transparent; }
:focus-visible { outline: 2px solid var(--c-accent-hi); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: 1rem; top: -4rem; z-index: 100; background: var(--c-raised2); color: var(--c-text); padding: .6rem 1rem; border-radius: 10px; }
.skip:focus { top: 1rem; }

/* ---- header: a fixed-height bar; the backdrop is its own layer, faded in by site.js once the page scrolls */
.site-header { position: sticky; top: 0; z-index: 50; height: var(--hdr); }
.site-header__bg { position: absolute; inset: 0; background: rgb(var(--rgb-bg) / .94); border-bottom: 1px solid var(--c-line); opacity: 0; }
.site-header[data-scrolled="true"] .site-header__bg { opacity: 1; }
.site-header__bar { position: relative; height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .65rem; color: var(--c-text); text-decoration: none; font: 700 1.08rem/1.1 var(--display); text-transform: uppercase; letter-spacing: .02em; }
.brand__mark { width: 2.4rem; height: 2.4rem; }
.nav { display: flex; gap: 1.6rem; font-weight: 500; }
.nav a { color: var(--c-muted); text-decoration: none; padding: .5rem 0; }
.nav a:hover { color: var(--c-text); }

/* ---- buttons: one filled style (Play now), everything else a gradient-border ghost */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .55rem; min-height: 2.9rem; padding: .7rem 1.35rem; border-radius: 12px;
       font: 700 1rem/1 var(--body); text-decoration: none; white-space: nowrap; cursor: pointer; border: 0; }
.btn-primary { background: var(--grad-cta); color: var(--c-bg); }
.btn-primary:hover { background: var(--grad-cta-hover); }
.btn-ghost { color: var(--c-text); border: 1.5px solid transparent;
             background: linear-gradient(var(--ghost-bg, var(--c-band)), var(--ghost-bg, var(--c-band))) padding-box, var(--grad-ink) border-box; }
.btn-ghost:hover { --ghost-bg: var(--c-raised2); }
.cta-row { display: flex; flex-wrap: wrap; gap: .75rem; }
.cta-row--center { justify-content: center; }

/* ---- panels */
.panel { position: relative; overflow: hidden; background: var(--grad-panel); border: 1px solid var(--c-line); border-radius: var(--radius); }
.panel::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: var(--grid-panel); } /* over the cover art and its scrim */

/* ---- hero: the featured game */
.hero { padding-top: .5rem; }
.hero__panel { padding: 2rem 1.25rem 1.25rem; }
/* the featured game's wide cover sits behind the portal side only: masked off the text side, then a scrim on top */
.hero__art { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; object-fit: cover; object-position: 70% 50%; opacity: .3; pointer-events: none; display: none;
             -webkit-mask-image: linear-gradient(90deg, transparent 38%, #000 78%); mask-image: linear-gradient(90deg, transparent 38%, #000 78%); }
.hero__panel::before { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1;
                       background: linear-gradient(90deg, var(--c-band) 0%, rgb(var(--rgb-band) / .9) 45%, rgb(var(--rgb-band) / .55) 75%, rgb(var(--rgb-band) / .4) 100%); display: none; }
.hero__grid { position: relative; z-index: 2; display: grid; gap: 2rem; }
.hero h1 { font-size: clamp(2.3rem, 6vw, 4rem); max-width: 14ch; }
.lead { margin-top: 1.1rem; font-size: 1.08rem; color: var(--c-muted); max-width: 34rem; }
.hero .cta-row { margin-top: 1.6rem; }
.trust { margin-top: 2rem; display: grid; gap: 1rem; }
.trust li { display: flex; align-items: flex-start; gap: .75rem; font-size: .9rem; color: var(--c-muted); line-height: 1.4; }
.trust strong { display: block; color: var(--c-text); font-weight: 700; }
.tile { display: inline-grid; place-items: center; flex: none; width: 2.4rem; height: 2.4rem; border: 1px solid var(--c-line-strong); border-radius: 10px; color: var(--c-accent); }

/* the hologram (Ernest, 2026-11-08: "a hologram that is summoning the cover art"): a projector drum with turning
   rings throws a beam of light; the cover floats in it with scanlines, an edge glow and HUD corners. The stage SVG is
   400x470 like the figure, so the card's place in % lines up with the beam: top 14/470, width 47% (the beam's top
   is 232 wide, the card 188). */
.portal { position: relative; margin: 0 auto; width: min(100%, 26rem); aspect-ratio: 400 / 470; }
.holo__stage { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.holo__beam { opacity: .8; } /* no blend mode and no idle shimmer: a masked layer that big repaints every frame */
.holo__ring, .holo__core, .holo__aura, .holo__wave { transform-box: fill-box; transform-origin: center; }
.holo__card { position: absolute; left: 50%; top: 5%; width: 47%; aspect-ratio: 2 / 3; translate: -50% 0; }
.holo__screen { position: relative; width: 100%; height: 100%; overflow: hidden; border-radius: 12px;
                box-shadow: 0 0 0 1px rgb(var(--rgb-hi) / .6), 0 0 26px rgb(var(--rgb-accent) / .45), 0 0 70px rgb(var(--rgb-accent) / .18); }
.portal__cover { display: block; width: 100%; height: 100%; object-fit: cover; }
/* scanlines, and the beam's light on the card's lower edge */
.holo__lines { position: absolute; inset: 0; pointer-events: none; mix-blend-mode: screen;
               background: repeating-linear-gradient(180deg, rgb(var(--rgb-light) / .08) 0 1px, transparent 1px 3px),
                           linear-gradient(0deg, rgb(var(--rgb-accent) / .28), transparent 34%); }
/* a bright band that sweeps the card; site.js moves it (translateY in its own heights: the card is 5.6 of them) */
.holo__scan { position: absolute; left: 0; right: 0; top: 0; height: 18%; pointer-events: none; mix-blend-mode: screen; opacity: 0;
              background: linear-gradient(180deg, transparent, rgb(var(--rgb-hi) / .18) 60%, rgb(var(--rgb-light) / .7) 92%, transparent); }
.holo__corners { position: absolute; inset: -9px; pointer-events: none; --c: var(--c-accent-hi);
                 background: linear-gradient(var(--c), var(--c)) left top / 20px 2px, linear-gradient(var(--c), var(--c)) left top / 2px 20px,
                             linear-gradient(var(--c), var(--c)) right top / 20px 2px, linear-gradient(var(--c), var(--c)) right top / 2px 20px,
                             linear-gradient(var(--c), var(--c)) left bottom / 20px 2px, linear-gradient(var(--c), var(--c)) left bottom / 2px 20px,
                             linear-gradient(var(--c), var(--c)) right bottom / 20px 2px, linear-gradient(var(--c), var(--c)) right bottom / 2px 20px;
                 background-repeat: no-repeat; opacity: .85; }
/* sparks rising out of the projector (site.js adds them when motion is on) */
.holo__motes { position: absolute; inset: 0; pointer-events: none; }
.holo__mote { position: absolute; top: 78%; width: 4px; height: 4px; margin: -2px 0 0 -2px; border-radius: 50%; background: var(--c-light);
              box-shadow: 0 0 6px 2px rgb(var(--rgb-accent) / .75); opacity: 0; }
.portal__caption { position: absolute; left: 0; right: 0; bottom: 0; text-align: center; display: grid; gap: .1rem; }
.portal__caption strong { font: 700 1.2rem/1.2 var(--display); }
.portal__caption span { color: var(--c-muted); font-size: .9rem; }

/* the shelf at the foot of the panel picks the featured game */
.shelf { position: relative; z-index: 2; margin-top: 2rem; display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; padding: .5rem;
         border: 1px solid var(--c-line); border-radius: 16px; background: rgb(var(--rgb-bg) / .82); }
.shelf__item { display: grid; justify-items: center; gap: .5rem; padding: .6rem .4rem; border: 1px solid transparent; border-radius: 12px; background: none;
               color: var(--c-muted); font: inherit; text-align: center; cursor: pointer; }
.shelf__item img { width: 3.4rem; height: auto; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 6px; border: 1px solid var(--c-line-strong); }
.shelf__item strong { display: block; color: var(--c-text); font: 600 .88rem/1.2 var(--display); }
.shelf__item span span { font-size: .78rem; }
.shelf__item:hover { background: var(--c-raised); }
.shelf__item[aria-pressed="true"] { background: var(--c-raised2); border-color: var(--c-accent); }
.shelf__item[aria-pressed="true"] img { border-color: var(--c-accent-hi); }
.shelf__all { display: none; }

/* ---- dividers, each drawn from a game's own objects */
.divider { display: block; margin: 3rem 0; }
.divider--path svg { width: 100%; height: 44px; opacity: .7; } /* a quieter gold line, so the dark leads */
.divider--path .nodes circle { fill: var(--c-bg); stroke: var(--c-accent-hi); stroke-width: 2.5; }

/* ---- sections */
.section { padding: 1rem 0 4rem; }
.section__lead { max-width: 40rem; margin: -1rem auto 2.2rem; text-align: center; color: var(--c-muted); }
.rule-title { display: flex; align-items: center; gap: 1.2rem; margin-bottom: 2.4rem; font-size: clamp(1.7rem, 4.4vw, 3rem); text-transform: uppercase; letter-spacing: .01em; text-align: center; }
.rule-title__line { flex: 1; height: 1.5px; min-width: 1.5rem; background: linear-gradient(90deg, transparent, var(--c-accent-hi)); }
.rule-title__line--r { background: linear-gradient(90deg, var(--c-deep), transparent); }

/* the library: a cover card per game */
.games { display: grid; gap: 1.5rem; }
.game { display: flex; flex-direction: column; background: var(--c-surface); border: 1px solid var(--c-line); border-radius: 20px; overflow: hidden; }
.game__cover { display: block; background: var(--c-raised); }
.game__cover img { width: 100%; height: auto; aspect-ratio: 2 / 3; object-fit: cover; }
.game__body { display: flex; flex-direction: column; flex: 1; gap: .7rem; padding: 1.25rem 1.25rem 1.4rem; }
.game__meta { display: flex; align-items: center; justify-content: space-between; gap: .75rem; font-size: .85rem; color: var(--c-muted); }
.stamp { display: inline-flex; align-items: center; gap: .35rem; padding: .2rem .6rem; border-radius: 999px; border: 1px solid rgb(var(--rgb-accent) / .45); color: var(--c-accent-hi);
         font-size: .78rem; font-weight: 700; white-space: nowrap; }
.stamp--solo { border-color: var(--c-line-strong); color: var(--c-body); }
.game h3 { font-size: 1.35rem; }
.game__blurb { color: var(--c-muted); font-size: .95rem; }
.checks { display: grid; gap: .35rem; font-size: .92rem; color: var(--c-body); }
.checks li { display: flex; align-items: center; gap: .5rem; }
.checks .i { color: var(--c-accent); }
.game__play { margin-top: auto; align-self: flex-start; }
.game__body .checks { margin-bottom: .6rem; }

/* play with friends: step tiles with an XP bar on top that fills */
.steps { display: grid; gap: 1rem; counter-reset: none; }
.step { position: relative; padding: 1.5rem 1.25rem 1.4rem; background: var(--c-surface); border: 1px solid var(--c-line); border-radius: 16px; }
.step::before { content: ""; position: absolute; left: 1.25rem; right: 1.25rem; top: -1px; height: 2px; background: var(--grad-ink); transform-origin: left; transform: scaleX(var(--bar, 1)); }
.step__n { display: block; font: 700 2.3rem/1 var(--display); color: var(--c-accent); }
.step h3 { margin-top: .7rem; font-size: 1.15rem; }
.step p { margin-top: .4rem; color: var(--c-muted); font-size: .93rem; }

/* closing: a cartridge-shaped panel (chamfered corners and a label notch in the top edge), lit from the notch */
.closing__panel { padding: 3.2rem 1.4rem; text-align: center; color: var(--c-text);
                  background: var(--grid-panel), var(--glow-closing), var(--grad-closing);
                  clip-path: polygon(28px 0, calc(50% - 64px) 0, calc(50% - 50px) 14px, calc(50% + 50px) 14px, calc(50% + 64px) 0, calc(100% - 28px) 0, 100% 28px, 100% calc(100% - 28px), calc(100% - 28px) 100%, 28px 100%, 0 calc(100% - 28px), 0 28px); }
.closing h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.closing p { margin: 1rem auto 1.8rem; max-width: 38rem; overflow-wrap: anywhere; color: var(--c-body); }

/* ---- footer */
.site-footer { padding-bottom: 2rem; }
.divider--lives { display: flex; align-items: center; gap: 1rem; margin: 1rem 0 2.5rem; }
.divider__rule { flex: 1; height: 1.5px; background: linear-gradient(90deg, transparent, var(--c-line-strong)); }
.divider__rule + svg + .divider__rule { background: linear-gradient(90deg, var(--c-line-strong), transparent); }
.divider--lives svg { width: 5.5rem; height: auto; flex: none; }
.lives path { fill: var(--c-accent); stroke: var(--c-accent-hi); stroke-width: 2; stroke-linejoin: round; }
.footer__grid { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); }
.brand--foot { margin-bottom: .8rem; }
.footer__h { font: 700 1rem/1.2 var(--display); margin-bottom: .8rem; }
.site-footer ul { display: grid; gap: .45rem; }
.site-footer nav a { color: var(--c-muted); text-decoration: none; }
.site-footer nav a:hover { color: var(--c-text); text-decoration: underline; }
.legal { margin-top: 2.5rem; padding-top: 1.2rem; border-top: 1px solid var(--c-line); color: var(--c-muted); font-size: .85rem; }

/* ---- wider screens */
@media (min-width: 480px) {
  .trust { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 600px) {
  .games { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .shelf__item { grid-template-columns: auto 1fr; justify-items: start; align-items: center; text-align: left; }
}
@media (min-width: 900px) {
  .hero__panel { padding: 3.2rem 3rem 1.6rem; }
  .hero__art, .hero__panel::before { display: block; }
  .hero__grid { grid-template-columns: 1.08fr .92fr; align-items: center; }
  .shelf { grid-template-columns: repeat(3, 1fr) 3.4rem; }
  .shelf__all { display: grid; place-items: center; border-radius: 12px; background: var(--c-raised); color: var(--c-text); }
  .shelf__all:hover { background: var(--c-raised2); }
  .closing__panel { padding: 4rem 3rem; }
}
@media (min-width: 960px) {
  .games { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1000px) {
  .steps { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 599px) {
  .nav__wide { display: none; }
  .brand { font-size: .95rem; }
  .brand__name .grad-text { display: block; }
  .shelf__item { padding: .55rem .25rem; }
  .shelf__item strong { font-size: .8rem; }
}
