/* ===
   Yono Game — base
   Reset, typography, container, grid, focus, prose, and the shared
   .card / .chip / .rail / text utilities.

   Class names are carried over from the previous design so every page and
   every JS hook keeps working — only the visual language is new.
   === */

/* --- RESET --- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  min-height: 100svh;
  font-family: var(--f-sans);
  font-size: var(--t-body);
  line-height: var(--lh-body);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
header, main, footer, .drawer { position: relative; z-index: var(--z-base); }

img, svg, video, canvas { display: block; max-width: 100%; }
img { height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; padding: 0; }
table { border-collapse: collapse; width: 100%; }

/* --- TYPOGRAPHY --- */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: var(--lh-head);
  letter-spacing: var(--tr-tight);
  color: var(--text);
  text-wrap: balance;
}
h1 { font-size: var(--t-h1); line-height: var(--lh-tight); font-weight: 800; }
h2 { font-size: var(--t-h2); font-weight: 750; }
h3 { font-size: var(--t-h3); }
h4 { font-size: var(--t-h4); }
h5 { font-size: .95rem; }

p { text-wrap: pretty; }
strong, b { font-weight: 650; color: var(--text); }
em { font-style: italic; }

.lead { font-size: clamp(1.04rem, 1.4vw, 1.16rem); line-height: 1.6; color: var(--text-2); }

/* Small uppercase label above a section title. */
.kicker {
  display: inline-block;
  font-size: var(--t-kick);
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: var(--tr-kick);
  color: var(--accent);
  margin-bottom: var(--s-3);
}

/* --- TEXT ROLE UTILITIES ---
   Inherited names from the earlier designs; every surface is light now, so
   they all resolve to the same text ramp.
   --- */
.on-felt, .h-felt, .on-card, .h-card { color: var(--text); }
.on-felt-soft, .on-card-soft         { color: var(--text-2); }
.on-felt-dim,  .on-card-dim          { color: var(--text-3); }

/* --- LAYOUT --- */
.wrap {
  width: min(100% - (var(--gutter) * 2), var(--wrap));
  margin-inline: auto;
}
.sec { padding-block: var(--sec-y); }
.sec-alt { background: var(--bg-2); }
.sec-lit { background: var(--bg-3); }

.grid { display: grid; gap: var(--gutter); }
.g-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
.g-2  { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3  { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-4  { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .g-3, .g-4 { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 600px) { .g-2, .g-3, .g-4 { grid-template-columns: minmax(0,1fr); } }

/* Wide content scrolls in its own box — the page never scrolls sideways. */
.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.sec-head { max-width: 62ch; margin-bottom: var(--s-7); }
.sec-head .lead { margin-top: var(--s-3); }

/* --- CARD --- */
.card {
  position: relative;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--r-panel);
  box-shadow: var(--shadow-sm);
  padding: var(--s-6);
}
.card-2     { background: var(--surface-2); }
.card-flush { padding: 0; }
.card p, .card li { color: var(--text-2); }

/* --- CHIP --- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: var(--r-pill);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: var(--t-xs);
  font-weight: 650;
  line-height: 1.5;
  white-space: nowrap;
}
.chip-red   { background: var(--hot);    color: #fff; }
.chip-teal  { background: var(--live);   color: #fff; }
.chip-bone  { background: var(--bg-3);   color: var(--text-2); }
.chip-jade  { background: var(--success); color: #fff; }
.chip-sm    { padding: 3px 9px; font-size: .72rem; }
.chip-dot   { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* Numeric readout — stats, RTP, timers, prices. */
.readout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.02em;
}
.readout-lg { font-size: clamp(1.7rem, 3.6vw, 2.5rem); }
.readout-disc { width: 2.9em; height: 2.9em; border-radius: 50%; background: var(--bg-3); }

/* --- RULE --- */
.rail { height: 1px; width: 100%; border: 0; background: var(--border); }
.rail-thin { height: 1px; }

/* --- PROSE --- */
.prose { color: var(--text-2); }
.prose > * + * { margin-top: var(--s-5); }
.prose p, .prose li { max-width: var(--measure); }
.prose h2, .prose h3, .prose h4 { color: var(--text); margin-top: var(--s-7); }
.prose h2:first-child, .prose h3:first-child { margin-top: 0; }
.prose strong { color: var(--text); }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.prose a:hover { color: var(--accent-2); }
.prose ul { display: grid; gap: var(--s-3); }
.prose ul li { position: relative; padding-left: 26px; }
.prose ul li::before {
  content: "";
  position: absolute;
  left: 7px;
  top: .68em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.prose ol { display: grid; gap: var(--s-3); counter-reset: n; }
.prose ol li { position: relative; padding-left: 32px; counter-increment: n; }
.prose ol li::before {
  content: counter(n);
  position: absolute;
  left: 0;
  top: .05em;
  width: 21px;
  height: 21px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: .72rem;
  font-weight: 700;
}

/* --- FOCUS --- */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--r-input);
}
.card:focus-visible, .g-card:focus-visible { border-radius: var(--r-panel); }
.chip:focus-visible, .btn:focus-visible { border-radius: var(--r-pill); }

.skip {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translate(-50%, -120%);
  z-index: var(--z-progress);
  background: var(--accent);
  color: var(--on-accent);
  padding: 10px 18px;
  border-radius: 0 0 var(--r-input) var(--r-input);
  font-weight: 650;
}
.skip:focus-visible { transform: translate(-50%, 0); }

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

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* --- UTILITIES --- */
.mt-2 { margin-top: var(--s-2); }
.mt-3 { margin-top: var(--s-3); }
.mt-4 { margin-top: var(--s-4); }
.mt-5 { margin-top: var(--s-5); }
.mt-6 { margin-top: var(--s-6); }
.mt-7 { margin-top: var(--s-7); }
.mt-8 { margin-top: var(--s-8); }
.mb-2 { margin-bottom: var(--s-2); }
.mb-4 { margin-bottom: var(--s-4); }
.mb-6 { margin-bottom: var(--s-6); }
.text-center { text-align: center; }
.stack    { display: grid; gap: var(--s-4); }
.stack-sm { display: grid; gap: var(--s-3); }
.row        { display: flex; flex-wrap: wrap; gap: var(--s-3); }
.row-center { justify-content: center; }
.narrow  { max-width: 54ch; margin-inline: auto; }
.pad-y   { padding-block: var(--s-8); }
.flush   { padding: 0; }
