/* ==========================================================================
   hard2play - shared foundation
   Palette tokens are NOT defined here: the studio and the project pages each
   own their own world and declare their own. This file owns the reset, the
   type system, the rhythm primitives and the accessibility floor.
   ========================================================================== */

/* --- fonts ---------------------------------------------------------------
   Oswald (variable 200-700) and Manrope are the two faces the game itself
   ships with, so the site and the product speak in one voice.              */

@font-face {
  font-family: 'Oswald';
  src: url('../fonts/oswald-var.woff2') format('woff2-variations');
  font-weight: 200 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Manrope';
  src: url('../fonts/manrope-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Manrope';
  src: url('../fonts/manrope-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* --- reset ---------------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body, h1, h2, h3, h4, p, figure, blockquote, dl, dd, ul, ol {
  margin: 0;
  padding: 0;
}

ul[class], ol[class] { list-style: none; }

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

button, input, select, textarea { font: inherit; color: inherit; }

a { color: inherit; text-decoration: none; }

/* --- type scale -----------------------------------------------------------
   Every step is fluid between a 360px phone and a 1440px desktop.           */

:root {
  --font-display: 'Oswald', 'Arial Narrow', system-ui, sans-serif;
  --font-body: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --step--1: clamp(0.78rem, 0.75rem + 0.12vw, 0.84rem);
  --step-0:  clamp(0.95rem, 0.90rem + 0.22vw, 1.06rem);
  --step-1:  clamp(1.12rem, 1.02rem + 0.42vw, 1.35rem);
  --step-2:  clamp(1.45rem, 1.24rem + 0.92vw, 2.05rem);
  --step-3:  clamp(1.95rem, 1.55rem + 1.75vw, 3.05rem);
  --step-4:  clamp(2.55rem, 1.80rem + 3.30vw, 4.60rem);
  --step-5:  clamp(3.20rem, 1.90rem + 5.80vw, 7.00rem);

  /* vertical rhythm */
  --gap-xs: 0.5rem;
  --gap-s:  0.85rem;
  --gap-m:  1.5rem;
  --gap-l:  2.5rem;
  --gap-xl: clamp(3.5rem, 2.2rem + 5vw, 6.5rem);
  --gap-2xl: clamp(5rem, 3rem + 8vw, 10rem);

  --measure: 62ch;
  --shell: 1200px;
  --pad: clamp(1.15rem, 0.6rem + 2.4vw, 2.75rem);

  --radius: 3px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

body {
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* --- shared primitives ---------------------------------------------------- */

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.eyebrow {
  font-family: var(--font-body);
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.display {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 0.94;
  letter-spacing: -0.005em;
  text-transform: uppercase;
}

.prose p + p { margin-top: 1.05em; }
.prose { max-width: var(--measure); }

/* --- accessibility floor --------------------------------------------------- */

:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  left: var(--pad);
  top: -100px;
  z-index: 999;
  padding: 0.7rem 1.1rem;
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: top 0.18s var(--ease);
}
.skip-link:focus { top: 0.75rem; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Reveal-on-scroll: elements start hidden ONLY when JS is driving them, so a
   no-JS or failed-script page still shows all of its content. */
[data-reveal] { opacity: 1; }
.js [data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.75s var(--ease), transform 0.75s var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}
.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .js [data-reveal] { opacity: 1; transform: none; }
}
