/* y2kplayer.app 4.0: base. A modern reset and the page's ground rules.
   Full heights use svh/dvh (never a bare vh); safe areas are respected; nothing scrolls sideways at 320. */

/* the display face outside Safari: the INSTALLED Arial Rounded MT Bold (Mac, Windows with Office), nothing downloaded.
   It has one weight; declaring it 900 here stops the browser synthesising a second, smeared bold on top of it.
   size-adjust and the tighter tracking below bring its wide letters near SF Rounded Heavy's width (measured on "superpowers"). */
@font-face { font-family: "Y2K Rounded"; src: local("Arial Rounded MT Bold"), local("ArialRoundedMTBold"); font-weight: 100 1000; size-adjust: 97%; }

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + env(safe-area-inset-top) + var(--sp-4));
  hanging-punctuation: first last;
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  min-height: 100svh;
  min-height: 100dvh;
  background: var(--ground);
  color: var(--text-2);
  font-family: var(--font-body);
  font-size: var(--fs-3);
  line-height: var(--lh-body);
  overflow-x: clip;                       /* clip, not hidden: sticky children keep working */
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

img, picture, video, canvas, svg { display: block; max-width: 100%; }
img, video { height: auto; }               /* every <img> carries width and height: the box is reserved before it loads */
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
p, li, dd, figcaption { overflow-wrap: break-word; text-wrap: pretty; }
h1, h2, h3, h4 {
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 900;
  line-height: var(--lh-snug);
  text-wrap: balance;
  overflow-wrap: break-word;
}
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 0.2em; }
strong, b { color: var(--text); font-weight: 700; }
::selection { background: var(--plate); color: var(--plate-ink); }

/* focus: one ring everywhere, keyboard only */
:focus { outline: none; }
:focus-visible {
  outline: 3px solid var(--text);
  outline-offset: 3px;
  box-shadow: 0 0 0 7px rgb(30 215 96 / .55);
  border-radius: var(--r-xs);
}

/* 44 px minimum targets for every control */
a, button, summary, input, select, label[for] { touch-action: manipulation; }
button, [role="button"], summary, input[type="radio"] + label, .tap { min-height: var(--tap); min-width: var(--tap); }

/* the fluid container */
.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.measure { max-width: var(--measure); }
.stack > * + * { margin-top: var(--stack, var(--sp-4)); }
.cluster { display: flex; flex-wrap: wrap; gap: var(--cluster, var(--sp-3)); align-items: center; }
.center { text-align: center; }
.mx-auto { margin-inline: auto; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: var(--sp-4); top: -100px; z-index: 100;
  background: var(--plate); color: var(--plate-ink); font-weight: 800;
  padding: var(--sp-3) var(--sp-4); border-radius: var(--r-sm); text-decoration: none;
}
.skip:focus-visible { top: calc(env(safe-area-inset-top) + var(--sp-2)); }

/* the reveal: things arrive with overshoot only when motion is welcome; without JS, or with reduced motion, they are simply there */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] { opacity: 0; transform: translateY(24px) scale(.98) rotate(var(--reveal-turn, 0deg)); }
  .js [data-reveal].is-in {
    opacity: 1; transform: none;
    transition: opacity var(--dur-3) var(--ease-out), transform var(--dur-4) var(--ease-pop);
    transition-delay: calc(var(--i, 0) * 70ms);
  }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
}
