/* ==========================================================================
   Boğaz Köprüsü Yarışı: shared stylesheet (css/style.css)
   Light, flag-red, pastel, techy-precise design system. LTR, Turkish copy.
   Fonts come from the host: var(--mrc-font-en). Mono accents use system mono.

   MARKUP CONTRACT (all pages reuse this)
   --------------------------------------------------------------------------
   <html lang="tr" dir="ltr">; JS adds class "js" to <html> on load.
   <body>  (optional .nav-open while the mobile menu is open)
     <a class="skip-link" href="#main">İçeriğe geç</a>

     <header class="site-header" data-header>          (+ .is-scrolled)
       <div class="container site-header__inner">
         <a class="brand" href="index.php">
           <span class="motif" aria-hidden="true"></span>   (crescent + star)
           <span class="brand__name">…</span></a>
         <button class="nav-toggle" type="button" aria-expanded="false"
                 aria-controls="site-nav" data-nav-toggle>
           <span class="visually-hidden">Menü</span>
           <span class="nav-toggle__bar"></span> ×3 </button>
         <nav class="site-nav" id="site-nav" data-nav aria-label="Ana menü">  (+ .is-open)
           <ul class="site-nav__list">
             <li class="site-nav__item"><a class="site-nav__link" href="…">…</a></li>
             (active link: .is-active + aria-current="page")
             <li class="site-nav__item site-nav__item--cta">
               <a class="btn btn--ticket btn--sm" data-cta="primary" href="game.php">…</a></li>
     <main id="main">
       HERO  <section class="hero"><div class="container hero__grid">
               <div class="hero__copy" data-reveal>
                 <p class="eyebrow">…</p>
                 <h1 class="hero__title">… <span class="hero__title-accent">…</span></h1>
                 <p class="hero__lead">…</p>
                 <ul class="chip-list"><li class="chip">…</li></ul>
                 <div class="hero__actions">
                   <a class="btn btn--ticket btn--lg" data-cta="primary" href="game.php">…</a>
                   <a class="btn btn--ghost btn--lg" href="#oyun">…</a>  (scroll cue, NOT primary)
               <div class="hero__collage" data-reveal data-reveal-delay="2">
                 <figure class="hero__figure"><img src="img/hero-graphic.jpg" alt="…"></figure>
                 <span class="hero__layer hero__layer--a" aria-hidden="true"></span>
                 <span class="hero__layer hero__layer--b" aria-hidden="true"></span>
                 <span class="hero__tag">…</span>  <span class="hero__motif motif" aria-hidden="true"></span>
       GAME  <section class="section game-section" id="oyun">
               <div class="container">
                 <header class="section-head" data-reveal>
                   <p class="eyebrow">…</p><h2 class="section-head__title">…</h2>
                   <p class="section-head__lead">…</p></header>
                 <div class="game-panel" data-reveal>
                   <div class="hud" role="group" aria-label="…">
                     <div class="hud__item"> <span class="hud__label">…</span>
                       <span class="hud__value" data-hud="score|passed|time">0</span></div> ×3
                     (hud__item states: .hud__item--accent, .is-warning)
                   <div class="progress" role="progressbar" aria-valuemin="0" aria-valuemax="100"
                        aria-valuenow="0" data-progress>
                     <div class="progress__meta"><span class="progress__label">…</span>
                       <span class="progress__value" data-progress-value>0%</span></div>
                     <div class="progress__track"><span class="progress__bar" data-progress-bar
                       style="--progress:0%"></span><span class="progress__finish"></span></div></div>
                   <div class="game-stage">
                     <div data-game-root></div>             (game mounts here; never styled inside)
                     <div class="game-overlay game-overlay--win|lose" data-overlay="win|lose" hidden>
                       (+ .is-visible when shown; remove [hidden] first)
                       <div class="game-overlay__card">
                         <p class="game-overlay__kicker">…</p><h3 class="game-overlay__title">…</h3>
                         <p class="game-overlay__text">…</p>
                         <dl class="game-overlay__stats"><div><dt>…</dt><dd>…</dd></div></dl>
                         <button class="btn btn--ticket" type="button" data-game-action="restart">…</button>
                   <div class="touch-controls" aria-label="…">   (shown on touch devices only)
                     <div class="touch-controls__steer"><button class="touch-btn" type="button"
                       data-control="left|right">…</button></div>
                     <div class="touch-controls__pace"><button class="touch-btn" type="button"
                       data-control="gas|brake">…</button></div>
                     (touch-btn state: .is-pressed)
                   <p class="control-hint show-keys"><kbd class="kbd">←</kbd> …</p>
                   <p class="control-hint show-touch">…</p>
                   <p class="notice">…free-to-play note…</p>
       Generic: .section, .section-head, .card-grid > .card (.card--tint .card--s2|s3|s4|s6),
                .compare > .compare__col (.compare__col--best) > .compare__list,
                .pullquote > p + .pullquote__cite, .prose (legal/long-form documents),
                .page-head, .badge, .chip, .eyebrow, .lead, .text-mono, .measure
       Forms: <form class="form"> .form__prompt, .field > .field__label + .field__input
                (input/select/textarea) + .field__hint + .field__error, .check,
                .form__status[data-state="success|error"]
                states: .is-invalid / .is-valid on .field, [aria-invalid="true"], :disabled,
                .is-sent on .form
     <footer class="site-footer">
       <div class="container">
         <div class="site-footer__grid">
           <div class="footer-col footer-col--brand"><a class="brand">…</a><p class="footer-text">…</p></div>
           <nav class="footer-col" aria-labelledby="…"><h2 class="footer-title">…</h2>
             <ul class="footer-list"><li><a href="…">…</a></li></ul></nav>
         <div class="site-footer__bottom"><p class="site-footer__note">…</p>
           <p class="site-footer__copy">…</p></div>
       Compact variant: <footer class="site-footer site-footer--compact">

   Scroll reveal: elements with [data-reveal] (+ optional data-reveal-delay="1|2|3")
   get .is-visible from JS. They are only hidden when html has .js.
   Primary CTAs are always <a data-cta="primary" href="game.php">; no JS here.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --red: #E30A17;
  --red-deep: #B30010;
  --red-darker: #7E000B;
  --ink: #1F1F1F;
  --ink-soft: #4A4343;
  --white: #FFFFFF;

  --page: #FFFBFA;
  --surface: #FFFFFF;
  --tint-rose: #FFF0EE;
  --tint-rose-2: #FCE1DF;
  --tint-peach: #FFEDE0;
  --tint-sky: #EAF2F7;
  --line: #F0DAD7;
  --line-strong: #E2BCB8;

  --radius-sm: 8px;
  --radius: 10px;
  --radius-lg: 12px;

  --shadow-1: 0 1px 2px rgba(31, 31, 31, .06), 0 6px 18px rgba(179, 0, 16, .07);
  --shadow-2: 0 2px 4px rgba(31, 31, 31, .06), 0 18px 40px rgba(179, 0, 16, .13);

  --font-body: var(--mrc-font-en, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif);
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  --fs-body: clamp(1rem, .96rem + .2vw, 1.125rem);
  --fs-h1: clamp(2.125rem, 1.35rem + 3.6vw, 4rem);
  --fs-h2: clamp(1.625rem, 1.2rem + 1.9vw, 2.5rem);
  --fs-h3: clamp(1.2rem, 1.05rem + .7vw, 1.5rem);

  --space-section: clamp(3.5rem, 2.2rem + 6vw, 7rem);
  --gutter: clamp(1rem, .6rem + 2vw, 2rem);
  --header-h: 64px;
  --container: 1120px;
  --measure: 68ch;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  margin: 0;
  min-width: 0;
  overflow-x: hidden;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.65;
  color: var(--ink);
  background: var(--page);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3, h4 {
  margin: 0 0 .6em;
  line-height: 1.12;
  letter-spacing: -.02em;
  font-weight: 800;
  text-wrap: balance;
  overflow-wrap: anywhere;
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
p { margin: 0 0 1em; overflow-wrap: break-word; }
ul, ol { margin: 0 0 1em; padding-inline-start: 1.25em; }
a { color: var(--red-deep); text-underline-offset: .18em; }
a:hover { color: var(--red); }
hr { border: 0; border-top: 1px dashed var(--line-strong); margin: 2rem 0; }
::selection { background: var(--red); color: var(--white); }
[hidden] { display: none !important; }

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.measure { max-width: var(--measure); }
.section { padding-block: var(--space-section); }
.text-mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.lead { font-size: clamp(1.0625rem, 1rem + .5vw, 1.3rem); color: var(--ink-soft); max-width: 56ch; }

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

.skip-link {
  position: absolute;
  inset-inline-start: 1rem;
  top: -4rem;
  z-index: 100;
  padding: .75rem 1rem;
  background: var(--ink);
  color: var(--white);
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 700;
}
.skip-link:focus { top: 1rem; color: var(--white); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin: 0 0 1rem;
  font-family: var(--font-mono);
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--red-deep);
}
.eyebrow::before {
  content: "";
  width: .5rem; height: .5rem;
  background: var(--red);
  border-radius: 2px;
  flex: none;
}

.badge, .chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: .15rem .65rem;
  font-family: var(--font-mono);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--red-deep);
  background: var(--tint-rose);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
}
.badge { background: var(--red); color: var(--white); border-color: var(--red); }
.chip-list { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1.5rem; padding: 0; list-style: none; }

/* ---------- Crescent + star motif ---------- */
.motif {
  --motif-size: 1.75rem;
  --motif-color: var(--red);
  position: relative;
  display: inline-block;
  flex: none;
  width: calc(var(--motif-size) * 1.5);
  height: var(--motif-size);
}
.motif::before {
  content: "";
  position: absolute;
  left: 0; top: 0;
  width: var(--motif-size);
  height: var(--motif-size);
  border-radius: 50%;
  background: var(--motif-color);
  -webkit-mask: radial-gradient(circle at 64% 50%, transparent 0 49%, #000 50%);
  mask: radial-gradient(circle at 64% 50%, transparent 0 49%, #000 50%);
}
.motif::after {
  content: "";
  position: absolute;
  left: calc(var(--motif-size) * .78);
  top: 50%;
  width: calc(var(--motif-size) * .42);
  height: calc(var(--motif-size) * .42);
  transform: translateY(-50%);
  background: var(--motif-color);
  clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}
.motif--light { --motif-color: var(--white); }

/* ---------- Buttons (ticket / coupon-shaped primary) ---------- */
.btn {
  --btn-bg: var(--red);
  --btn-fg: var(--white);
  --notch-bg: var(--page);
  --notch-r: 7px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 48px;
  padding: .75rem 1.5rem;
  margin: 0;
  font: inherit;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.2;
  letter-spacing: .02em;
  text-align: center;
  text-decoration: none;
  color: var(--btn-fg);
  background: var(--btn-bg);
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: none;
}
.btn:hover { color: var(--btn-fg); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }

.btn--ticket {
  padding-inline: 2.25rem;
  isolation: isolate;
  box-shadow: 0 3px 0 var(--red-darker);
}
.btn--ticket::before {            /* dashed stitch line */
  content: "";
  position: absolute;
  inset: 4px;
  border: 1.5px dashed rgba(255, 255, 255, .75);
  border-radius: calc(var(--radius) - 3px);
  pointer-events: none;
}
.btn--ticket::after {             /* side notches */
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 0 50%, var(--notch-bg) 0 var(--notch-r), transparent calc(var(--notch-r) + .5px)),
    radial-gradient(circle at 100% 50%, var(--notch-bg) 0 var(--notch-r), transparent calc(var(--notch-r) + .5px));
}
.btn--ticket:hover { background: var(--red-deep); box-shadow: 0 3px 0 #5a0008; }
.btn--ticket:active { transform: translateY(3px); box-shadow: 0 0 0 #5a0008; background: var(--red-darker); }
.btn--ticket:focus-visible { outline: 3px solid var(--ink); outline-offset: 4px; border-radius: var(--radius); }

.btn--ghost {
  --btn-fg: var(--red-deep);
  background: transparent;
  box-shadow: inset 0 0 0 1.5px var(--red);
}
.btn--ghost:hover { background: var(--tint-rose-2); color: var(--red-darker); }
.btn--ghost:active { transform: translateY(1px); background: var(--line-strong); }

.btn--soft { --btn-fg: var(--red-deep); background: var(--tint-rose-2); }
.btn--soft:hover { background: var(--line-strong); color: var(--red-darker); }
.btn--soft:active { transform: translateY(1px); }

.btn--sm { min-height: 44px; padding: .5rem 1.25rem; font-size: .9375rem; --notch-r: 5px; }
.btn--lg { min-height: 52px; padding-block: .85rem; font-size: 1.0625rem; }
.btn--block { display: flex; width: 100%; }

.card .btn, .game-panel .btn, .game-overlay .btn, .form .btn { --notch-bg: var(--surface); }

/* ---------- Header / navigation ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 251, 250, .94);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header.is-scrolled { box-shadow: 0 6px 20px rgba(179, 0, 16, .08); }
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  min-height: 44px;
  font-weight: 800;
  font-size: 1.0625rem;
  letter-spacing: -.01em;
  color: var(--ink);
  text-decoration: none;
}
.brand:hover { color: var(--red-deep); }
.brand .motif { --motif-size: 1.5rem; }
.brand__name { overflow-wrap: anywhere; }

.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 44px; height: 44px;
  padding: 0;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  cursor: pointer;
  touch-action: manipulation;
}
.nav-toggle:hover { background: var(--tint-rose); }
.nav-toggle__bar {
  display: block;
  width: 20px; height: 2px;
  background: var(--ink);
  border-radius: 2px;
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-of-type(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-of-type(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-of-type(3) { transform: translateY(-7px) rotate(-45deg); }

.site-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0; right: 0;
  padding: .75rem var(--gutter) 1.25rem;
  background: var(--page);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 16px 28px rgba(179, 0, 16, .08);
}
.site-nav.is-open { display: block; animation: rise-in .25s ease both; }
.site-nav__list { display: grid; gap: .25rem; margin: 0; padding: 0; list-style: none; }
.site-nav__link {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: .25rem .75rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  border-radius: var(--radius-sm);
}
.site-nav__link:hover { background: var(--tint-rose); color: var(--red-deep); }
.site-nav__link.is-active,
.site-nav__link[aria-current="page"] { color: var(--red-deep); background: var(--tint-rose-2); }
.site-nav__item--cta { margin-top: .5rem; }
.site-nav__item--cta .btn { width: 100%; }

/* ---------- Hero (asymmetric: copy + layered collage) ---------- */
.hero { padding-block: clamp(2rem, 1rem + 5vw, 5.5rem); }
.hero__grid { display: grid; gap: 2.5rem; align-items: center; }
.hero__copy { min-width: 0; }
.hero__title { margin-bottom: .5em; }
.hero__title-accent { color: var(--red); }
.hero__lead {
  max-width: 46ch;
  margin-bottom: 1.5rem;
  font-size: clamp(1.0625rem, 1rem + .5vw, 1.25rem);
  color: var(--ink-soft);
}
.hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.hero__actions .btn { flex: 1 1 200px; }

.hero__collage {
  position: relative;
  isolation: isolate;
  width: 100%;
  max-width: 520px;
  aspect-ratio: 1 / 1;
  margin-inline: auto;
}
.hero__collage::before {          /* fine technical grid plate */
  content: "";
  position: absolute;
  inset: 8% 0 0 10%;
  z-index: -1;
  border-radius: var(--radius-lg);
  background-color: var(--tint-rose-2);
  background-image:
    linear-gradient(var(--line-strong) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-strong) 1px, transparent 1px);
  background-size: 24px 24px;
}
.hero__figure {
  position: absolute;
  inset: 0 14% 12% 0;
  z-index: 1;
  margin: 0;
  overflow: hidden;
  border: 5px solid var(--white);
  border-radius: var(--radius-lg);
  background: var(--tint-rose);
  box-shadow: var(--shadow-2);
}
.hero__figure img { width: 100%; height: 100%; object-fit: cover; }
.hero__layer {
  position: absolute;
  z-index: 2;
  border: 4px solid var(--white);
  border-radius: var(--radius);
  background-color: var(--tint-rose);
  background-image: url("../img/hero-graphic.jpg");
  background-repeat: no-repeat;
  box-shadow: var(--shadow-1);
}
.hero__layer--a { right: 0; bottom: 0; width: 38%; aspect-ratio: 1; background-size: 320%; background-position: 28% 22%; }
.hero__layer--b { right: 3%; top: 4%; width: 28%; aspect-ratio: 4 / 3; background-size: 280%; background-position: 70% 78%; }
.hero__tag {
  position: absolute;
  left: 4%; bottom: 3%;
  z-index: 3;
  padding: .45rem .75rem;
  font-family: var(--font-mono);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--red-deep);
  background: var(--white);
  border: 1.5px dashed var(--red);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-1);
}
.hero__motif { position: absolute; left: 2%; top: 3%; z-index: 3; --motif-size: 2.25rem; }

/* ---------- Section heads, cards, comparison, quotes ---------- */
.section-head { max-width: var(--measure); margin-bottom: 2rem; }
.section-head__title { margin-bottom: .4em; }
.section-head__lead { color: var(--ink-soft); margin: 0; }

.card-grid { display: grid; gap: 1rem; }
.card {
  min-width: 0;
  padding: clamp(1.25rem, 1rem + 1.2vw, 2rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-1);
}
.card--tint { background: var(--tint-rose); }
.card--peach { background: var(--tint-peach); }
.card--sky { background: var(--tint-sky); }
.card__eyebrow { font-family: var(--font-mono); font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--red-deep); margin: 0 0 .5rem; }
.card__title { font-size: var(--fs-h3); margin-bottom: .4em; }
.card__body { margin: 0; color: var(--ink-soft); }

.compare { display: grid; gap: 1rem; }
.compare__col {
  position: relative;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.compare__col--best { border: 2px solid var(--red); box-shadow: var(--shadow-2); }
.compare__list { margin: 1rem 0 0; padding: 0; list-style: none; display: grid; gap: .5rem; }
.compare__list li { padding-block: .5rem; border-top: 1px dashed var(--line-strong); font-size: .9375rem; }

.pullquote {
  max-width: 34ch;
  margin: 2.5rem 0;
  padding-inline-start: 1.25rem;
  border-inline-start: 4px solid var(--red);
  font-size: clamp(1.4rem, 1.1rem + 1.4vw, 2.1rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -.01em;
}
.pullquote p { margin: 0 0 .6rem; }
.pullquote__cite {
  font-family: var(--font-mono);
  font-size: .8125rem;
  font-weight: 500;
  font-style: normal;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* ---------- Content documents (legal / long-form) ---------- */
.page-head { padding-block: clamp(2.5rem, 1.5rem + 4vw, 5rem) 1.5rem; max-width: var(--measure); }
.prose { max-width: var(--measure); padding-bottom: var(--space-section); }
.prose h2 { margin-top: 2.2em; padding-top: .6em; border-top: 1px dashed var(--line-strong); }
.prose h3 { margin-top: 1.8em; }
.prose li { margin-bottom: .4em; }
.prose blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  background: var(--tint-rose);
  border-inline-start: 4px solid var(--red);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.prose table { width: 100%; border-collapse: collapse; font-size: .9375rem; display: block; overflow-x: auto; }
.prose th, .prose td { padding: .6rem .75rem; text-align: start; border-bottom: 1px solid var(--line); }
.prose th { font-family: var(--font-mono); font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--red-deep); }
.prose code { font-family: var(--font-mono); font-size: .9em; padding: .1em .35em; background: var(--tint-rose); border-radius: 4px; }

/* ---------- Game section (frame only; the game styles itself) ---------- */
.game-section { padding-top: clamp(1.5rem, 1rem + 3vw, 4rem); }
.game-panel {
  display: grid;
  gap: 1rem;
  padding: clamp(.75rem, .5rem + 1.5vw, 1.5rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-2);
}

.hud { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; }
.hud__item {
  min-width: 0;
  padding: .5rem .65rem;
  background: var(--tint-rose);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.hud__label {
  display: block;
  font-family: var(--font-mono);
  font-size: .625rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  overflow-wrap: anywhere;
}
.hud__value {
  display: block;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--ink);
}
.hud__item--accent .hud__value { color: var(--red-deep); }
.hud__item.is-warning { background: var(--tint-rose-2); border-color: var(--red); }
.hud__item.is-warning .hud__value { color: var(--red); }

.progress { display: grid; gap: .4rem; }
.progress__meta {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-family: var(--font-mono);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.progress__value { color: var(--red-deep); font-variant-numeric: tabular-nums; }
.progress__track {
  position: relative;
  height: 12px;
  border-radius: 6px;
  background-color: var(--tint-rose-2);
  background-image: repeating-linear-gradient(90deg, transparent 0 calc(10% - 1px), rgba(179, 0, 16, .22) calc(10% - 1px) 10%);
  overflow: hidden;
}
.progress__bar {
  display: block;
  width: var(--progress, 0%);
  max-width: 100%;
  height: 100%;
  border-radius: 6px;
  background: linear-gradient(90deg, #F36B73, var(--red) 70%, var(--red-deep));
  transition: width .12s linear;
}
.progress__finish {
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: 14px;
  background: conic-gradient(var(--ink) 25%, var(--white) 0 50%, var(--ink) 0 75%, var(--white) 0) 0 0 / 7px 7px;
}

.game-stage {
  position: relative;
  isolation: isolate;
  width: 100%;
  min-height: 320px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line-strong);
  background:
    linear-gradient(180deg, #FFE3D2 0%, #FFC9B5 34%, #F7A6A0 56%, #F4C9BE 56.2%, #E9A3A3 74%, #C97384 100%);
}
.game-stage::before {             /* low sun */
  content: "";
  position: absolute;
  z-index: -1;
  left: 50%; top: 30%;
  width: min(34vw, 180px);
  aspect-ratio: 1;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, #FFF6E8 0 40%, rgba(255, 220, 190, .7) 62%, rgba(255, 220, 190, 0) 72%);
}
.game-stage::after {              /* city skyline silhouette */
  content: "";
  position: absolute;
  z-index: -1;
  left: 0; right: 0;
  top: 41%;
  height: 15%;
  background: rgba(179, 0, 16, .3);
  clip-path: polygon(
    0 100%, 0 72%, 4% 72%, 4% 58%, 7% 58%, 7% 70%, 10% 70%, 10% 30%, 10.6% 8%, 11.2% 30%, 11.2% 66%,
    15% 66%, 15% 50%, 17% 38%, 19% 50%, 19% 62%, 24% 62%, 24% 46%, 27% 46%, 27% 68%, 32% 68%,
    32% 36%, 32.6% 12%, 33.2% 36%, 33.2% 64%, 38% 64%, 38% 56%, 42% 56%, 42% 70%, 48% 70%,
    48% 52%, 51% 40%, 54% 52%, 54% 66%, 60% 66%, 60% 28%, 60.6% 6%, 61.2% 28%, 61.2% 62%,
    66% 62%, 66% 54%, 70% 54%, 70% 68%, 76% 68%, 76% 44%, 79% 44%, 79% 64%, 84% 64%, 84% 34%,
    84.6% 10%, 85.2% 34%, 85.2% 60%, 90% 60%, 90% 52%, 94% 52%, 94% 70%, 100% 70%, 100% 100%
  );
}

[data-game-root] { display: block; width: 100%; }

.game-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: none;
  place-items: center;
  padding: 1rem;
  background: rgba(31, 31, 31, .35);
}
.game-overlay.is-visible { display: grid; animation: fade-in .3s ease both; }
.game-overlay__card {
  width: min(100%, 380px);
  padding: 1.5rem;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 5px solid var(--red);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-2);
  animation: rise-in .35s ease both;
}
.game-overlay--lose .game-overlay__card { border-top-color: var(--ink); }
.game-overlay__kicker {
  margin: 0 0 .5rem;
  font-family: var(--font-mono);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--red-deep);
}
.game-overlay--lose .game-overlay__kicker { color: var(--ink-soft); }
.game-overlay__title { font-size: clamp(1.6rem, 1.3rem + 1.5vw, 2.1rem); margin-bottom: .3em; }
.game-overlay__text { color: var(--ink-soft); margin-bottom: 1rem; }
.game-overlay__stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap: .5rem;
  margin: 0 0 1.25rem;
}
.game-overlay__stats > div { padding: .5rem; background: var(--tint-rose); border-radius: var(--radius-sm); }
.game-overlay__stats dt { font-family: var(--font-mono); font-size: .625rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
.game-overlay__stats dd { margin: 0; font-family: var(--font-mono); font-size: 1.25rem; font-weight: 700; font-variant-numeric: tabular-nums; }

/* Touch controls (coarse pointers / small screens only) */
.touch-controls {
  display: none;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
}
.touch-controls__steer, .touch-controls__pace { display: flex; gap: .75rem; }
.touch-controls__pace { flex-direction: column; }
.touch-btn {
  min-width: 72px;
  min-height: 64px;
  padding: .5rem .9rem;
  font: inherit;
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 700;
  color: var(--red-deep);
  background: var(--surface);
  border: 2px solid var(--red);
  border-radius: var(--radius-lg);
  box-shadow: 0 3px 0 var(--red-deep);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.touch-btn:active, .touch-btn.is-pressed {
  color: var(--white);
  background: var(--red);
  transform: translateY(3px);
  box-shadow: 0 0 0 var(--red-deep);
}

.control-hint { margin: 0; font-size: .9375rem; color: var(--ink-soft); }
.kbd {
  display: inline-block;
  min-width: 1.9em;
  padding: .1em .5em;
  font-family: var(--font-mono);
  font-size: .85em;
  font-weight: 600;
  text-align: center;
  color: var(--ink);
  background: var(--tint-rose);
  border: 1px solid var(--line-strong);
  border-bottom-width: 3px;
  border-radius: 6px;
}
.show-touch { display: none; }
.show-keys { display: block; }

.notice {
  margin: 0;
  padding: .85rem 1rem;
  font-size: .9375rem;
  color: var(--ink);
  background: var(--tint-peach);
  border: 1px dashed var(--red);
  border-radius: var(--radius);
}

/* ---------- Forms (conversational) ---------- */
.form { display: grid; gap: 1.25rem; max-width: 560px; }
.form__prompt { margin: 0; font-size: var(--fs-h3); font-weight: 700; letter-spacing: -.01em; }
.field { display: grid; gap: .4rem; min-width: 0; }
.field__label { font-weight: 700; font-size: .9375rem; }
.field__hint { margin: 0; font-size: .8125rem; color: var(--ink-soft); }
.field__input {
  width: 100%;
  min-height: 48px;
  padding: .7rem .9rem;
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius);
  appearance: none;
  -webkit-appearance: none;
}
textarea.field__input { min-height: 140px; resize: vertical; }
.field__input::placeholder { color: #7A7070; }
.field__input:hover { border-color: var(--red); }
.field__input:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; border-color: var(--red); }
.field__input:disabled { opacity: .55; background: var(--tint-rose); cursor: not-allowed; }
.field__error { display: none; margin: 0; font-size: .8125rem; font-weight: 600; color: var(--red-deep); }
.field.is-invalid .field__input, .field__input[aria-invalid="true"] { border-color: var(--red); background: #FFF6F5; }
.field.is-invalid .field__error { display: block; }
.field.is-valid .field__input { border-color: #2F7D4F; }
.check { display: flex; gap: .75rem; align-items: flex-start; min-height: 44px; font-size: .9375rem; }
.check input { flex: none; width: 22px; height: 22px; margin-top: .15rem; accent-color: var(--red); }
.form__status {
  margin: 0;
  padding: .85rem 1rem;
  font-weight: 600;
  border-radius: var(--radius);
  background: var(--tint-rose);
  border: 1px solid var(--line-strong);
}
.form__status[data-state="success"] { background: #EAF6EE; border-color: #2F7D4F; color: #1D5A37; }
.form__status[data-state="error"] { background: #FFF1F0; border-color: var(--red); color: var(--red-darker); }
.form.is-sent .field, .form.is-sent .btn { opacity: .6; pointer-events: none; }

/* ---------- Footer ---------- */
.site-footer {
  margin-top: var(--space-section);
  padding-block: 2.5rem 1.5rem;
  border-top: 1px solid var(--line-strong);
  font-size: .9375rem;
}
.site-footer__grid { display: grid; gap: 2rem; padding-bottom: 2rem; }
.footer-col { min-width: 0; }
.footer-title {
  margin: 0 0 .75rem;
  font-family: var(--font-mono);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--red-deep);
}
.footer-text { margin: .75rem 0 0; max-width: 38ch; color: var(--ink-soft); }
.footer-list { margin: 0; padding: 0; list-style: none; }
.footer-list a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink);
  text-decoration: none;
}
.footer-list a:hover { color: var(--red-deep); text-decoration: underline; }
.site-footer__bottom {
  display: grid;
  gap: .5rem;
  padding-top: 1.25rem;
  border-top: 1px dashed var(--line-strong);
}
.site-footer__note { margin: 0; color: var(--ink); font-weight: 600; max-width: 62ch; }
.site-footer__copy { margin: 0; font-family: var(--font-mono); font-size: .75rem; letter-spacing: .04em; color: var(--ink-soft); }
.site-footer__bottom a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; }
.site-footer--compact { padding-block: 1.5rem; }
.site-footer--compact .site-footer__grid { display: none; }
.site-footer--compact .site-footer__bottom { border-top: 0; padding-top: 0; }

/* ---------- Motion: subtle reveal (fade + rise only) ---------- */
@keyframes rise-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

.js [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s ease, transform .6s ease;
}
.js [data-reveal].is-visible { opacity: 1; transform: none; }
.js [data-reveal-delay="1"] { transition-delay: .08s; }
.js [data-reveal-delay="2"] { transition-delay: .16s; }
.js [data-reveal-delay="3"] { transition-delay: .24s; }

/* ---------- Breakpoints ---------- */
@media (min-width: 360px) {
  .hud__label { font-size: .6875rem; }
  .hud__value { font-size: 1.5rem; }
  .hero__actions .btn { flex: 0 1 auto; }
}

@media (min-width: 768px) {
  :root { --header-h: 72px; }

  .nav-toggle { display: none; }
  .site-nav {
    display: block;
    position: static;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
  }
  .site-nav__list { display: flex; align-items: center; gap: .25rem; }
  .site-nav__link { min-height: 44px; padding-inline: .9rem; }
  .site-nav__item--cta { margin: 0 0 0 .5rem; }
  .site-nav__item--cta .btn { width: auto; }

  .hero__grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 3rem; }

  .card-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1.25rem; }
  .card-grid > .card { grid-column: span 3; }
  .card-grid > .card--s2 { grid-column: span 2; }
  .card-grid > .card--s3 { grid-column: span 3; }
  .card-grid > .card--s4 { grid-column: span 4; }
  .card-grid > .card--s6 { grid-column: span 6; }

  .compare { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; }
  .compare__col--best { margin-top: -.75rem; padding-top: 2.25rem; }

  .game-panel { gap: 1.25rem; }
  .game-stage { min-height: 420px; }
  .hud__item { padding: .75rem 1rem; }
  .hud__value { font-size: 1.75rem; }

  .site-footer__grid { grid-template-columns: 1.4fr 1fr 1fr; }
  .site-footer__bottom { grid-template-columns: 1fr auto; align-items: center; gap: 1.5rem; }
}

@media (min-width: 1200px) {
  .hero__grid { gap: 5rem; }
  .game-stage { min-height: 520px; }
  .site-footer__grid { grid-template-columns: 1.6fr 1fr 1fr 1fr; }
  .card-grid > .card--s2 { grid-column: span 2; }
}

/* Touch devices: on-screen controls instead of key hints */
@media (hover: none), (pointer: coarse), (max-width: 767px) {
  .touch-controls { display: flex; }
  .show-touch { display: block; }
  .show-keys { display: none; }
}

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