/* ==========================================================================
   Rolimã · SPIEL Essen 2026 support site
   Comic line-art look: thick ink outlines, hard offset shadows, sky + asphalt.
   ========================================================================== */

:root {
  /* Surfaces */
  --paper: #f7f1e7;
  --paper-2: #efe6d6;
  --card: #fffdf8;
  --ink: #15171c;
  --ink-soft: #3b4150;
  --muted: #6a6f7c;

  /* Scene colours (sampled from the illustrations) */
  --sky: #29c3ea;
  --sky-light: #9eeaf5;
  --asphalt: #4a556c;
  --asphalt-dark: #2e3547;
  --wood: #e3a55c;

  /* The five racers */
  --c-red: #e8413c;
  --c-blue: #2f6fd6;
  --c-green: #2fa84f;
  --c-yellow: #f2b829;
  --c-purple: #8b4fc9;

  --gum: #ff5ca8;
  --qqj: #f80241;

  /* Type */
  --f-display: "Bangers", Impact, "Arial Black", sans-serif;
  --f-body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Shape */
  --line: 3px solid var(--ink);
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 5px 5px 0 var(--ink);
  --shadow-sm: 3px 3px 0 var(--ink);

  /* Motion */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);

  --wrap: 1160px;
  --gutter: clamp(16px, 4vw, 40px);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
p { margin: 0 0 1em; }

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

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px;
  text-decoration: none; font-weight: 800;
}
.skip:focus { top: 12px; }

/* ---------- Type ---------- */

.display,
h1, h2, h3.display {
  font-family: var(--f-display);
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 0.95;
  margin: 0;
}

h2.display { font-size: clamp(2.6rem, 6vw, 4.4rem); }

.kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 900; font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 14px;
}
.kicker::before {
  content: ""; width: 22px; height: 6px; border-radius: 3px;
  background: linear-gradient(90deg, var(--c-red) 0 20%, var(--c-blue) 20% 40%, var(--c-green) 40% 60%, var(--c-yellow) 60% 80%, var(--c-purple) 80%);
}

.lead { font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: var(--ink-soft); max-width: 60ch; }

/* ---------- Buttons ---------- */

.btn {
  --btn-bg: var(--card);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 22px;
  font-family: var(--f-body); font-weight: 900; font-size: 1rem; text-decoration: none;
  color: var(--ink); background: var(--btn-bg);
  border: var(--line); border-radius: 999px; box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform 160ms var(--ease-out), box-shadow 160ms var(--ease-out);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.btn:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--ink); }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { transform: translate(-1px, -2px); box-shadow: 4px 5px 0 var(--ink); }
  .btn:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--ink); }
}
.btn--primary { --btn-bg: var(--c-yellow); }
.btn--gum { --btn-bg: var(--gum); color: #fff; text-shadow: 0 1px 0 rgba(0,0,0,.25); }
.btn--sm { min-height: 40px; padding: 8px 16px; font-size: 0.92rem; }

/* ---------- Top bar ---------- */

.topbar {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: var(--line);
}
.topbar__inner { display: flex; align-items: center; gap: 20px; min-height: 68px; }
.topbar__brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
.topbar__brand img { width: 108px; height: auto; margin: -18px 0; }
.topbar__nav { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.topbar__nav a {
  text-decoration: none; font-weight: 800; font-size: 0.95rem;
  padding: 8px 12px; border-radius: 999px;
  transition: background-color 160ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) { .topbar__nav a:not(.btn):hover { background: var(--paper-2); } }
.topbar__nav .btn { margin-left: 8px; }

.lang-pill { display: inline-flex; border: var(--line); border-radius: 999px; overflow: hidden; box-shadow: var(--shadow-sm); background: var(--card); }
.lang-pill a { padding: 6px 12px !important; border-radius: 0 !important; font-weight: 900; font-size: 0.85rem; }
.lang-pill a[aria-current="page"] { background: var(--ink); color: #fff; }

.menu-btn {
  display: none; margin-left: auto;
  width: 46px; height: 46px; border: var(--line); border-radius: 12px; background: var(--card);
  box-shadow: var(--shadow-sm); cursor: pointer; padding: 0;
  -webkit-tap-highlight-color: transparent;
}
.menu-btn span { display: block; width: 20px; height: 3px; background: var(--ink); margin: 4px auto; border-radius: 2px; }

@media (max-width: 900px) {
  .menu-btn { display: block; }
  .topbar__nav {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 2px;
    padding: 12px var(--gutter) 20px;
    background: var(--paper); border-bottom: var(--line);
    opacity: 0; transform: translateY(-8px); pointer-events: none; visibility: hidden;
    transition: opacity 180ms var(--ease-out), transform 180ms var(--ease-out), visibility 0s linear 180ms;
  }
  .topbar__nav a { padding: 12px 14px; font-size: 1.05rem; }
  .topbar__nav .btn { margin: 8px 0 0; }
  .topbar.is-open .topbar__nav {
    opacity: 1; transform: none; pointer-events: auto; visibility: visible;
    transition: opacity 180ms var(--ease-out), transform 180ms var(--ease-out), visibility 0s;
  }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: min(92svh, 860px);
  display: grid; place-items: center;
  padding: 56px 0 120px;
  background: var(--asphalt) url("bg-street.webp") center 85% / cover no-repeat;
  border-bottom: var(--line);
  isolation: isolate;
  overflow: hidden;
}
.hero::after {
  /* Softens the busy sky behind the logo so copy stays legible */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(60% 45% at 50% 32%, rgba(255,255,255,.55), transparent 70%);
}
.hero__inner { text-align: center; display: grid; justify-items: center; gap: 18px; }
.hero__badge {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--ink); color: #fff;
  font-weight: 900; font-size: 0.82rem; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 8px 16px; border-radius: 999px;
}
.hero__badge i { width: 8px; height: 8px; border-radius: 50%; background: var(--c-yellow); box-shadow: 0 0 0 3px rgba(242,184,41,.3); }
.hero__logo { width: min(620px, 88vw); margin: -30px 0 -46px; filter: drop-shadow(0 10px 0 rgba(21,23,28,.18)); }
.hero__tagline {
  font-family: var(--f-display); font-size: clamp(1.9rem, 4.6vw, 3.2rem); letter-spacing: 0.03em; line-height: 1;
  color: #fff; margin: 0;
  -webkit-text-stroke: 1.5px var(--ink);
  paint-order: stroke fill;
  text-shadow: 3px 3px 0 var(--ink);
}
.hero__sub {
  max-width: 560px; margin: 0; font-weight: 700; font-size: 1.08rem; color: var(--ink);
  background: rgba(255,253,248,.9); border: var(--line); border-radius: var(--radius-sm); padding: 12px 18px;
  box-shadow: var(--shadow-sm);
}
.hero__cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 6px; }

@media (prefers-reduced-motion: no-preference) {
  .hero__logo { animation: drop-in 520ms var(--ease-out) both; }
  .hero__tagline, .hero__sub, .hero__cta { animation: rise 420ms var(--ease-out) both; }
  .hero__tagline { animation-delay: 120ms; }
  .hero__sub { animation-delay: 180ms; }
  .hero__cta { animation-delay: 240ms; }
}
@keyframes drop-in { from { opacity: 0; transform: translateY(-18px) rotate(-3deg) scale(.96); } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }

/* Fact strip overlapping hero bottom */
.facts {
  position: relative; z-index: 2; margin-top: -58px;
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--card); border: var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  overflow: hidden;
}
.fact { padding: 18px 16px; text-align: center; border-right: 2px dashed rgba(21,23,28,.18); }
.fact:last-child { border-right: 0; }
.fact__value { font-family: var(--f-display); font-size: 2rem; line-height: 1; letter-spacing: .03em; }
.fact__label { font-size: 0.78rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-top: 6px; }
@media (max-width: 760px) {
  .facts { grid-template-columns: repeat(2, 1fr); }
  .fact { border-right: 0; border-bottom: 2px dashed rgba(21,23,28,.18); }
  .fact:nth-child(odd) { border-right: 2px dashed rgba(21,23,28,.18); }
  .fact:last-child { grid-column: 1 / -1; border-bottom: 0; border-right: 0; }
}

/* ---------- Sections ---------- */

.section { padding: clamp(72px, 10vw, 128px) 0; position: relative; }
.section--tight { padding-top: clamp(56px, 7vw, 88px); }
.section--sky {
  background: linear-gradient(180deg, var(--sky) 0%, var(--sky-light) 100%);
  border-block: var(--line);
}
.section--asphalt {
  background: var(--asphalt-dark); color: #fff;
  border-block: var(--line);
}
.section--asphalt .kicker, .section--asphalt .lead { color: rgba(255,255,255,.78); }
.section__head { max-width: 760px; margin-bottom: clamp(36px, 5vw, 56px); }
.section__head--center { margin-inline: auto; text-align: center; }
.section__head--center .kicker { justify-content: center; }
.section__head .lead { margin-top: 18px; }
.section__head--center .lead { margin-inline: auto; }

/* Two-column split */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.split--wide-left { grid-template-columns: 1.15fr .85fr; }
@media (max-width: 860px) { .split, .split--wide-left { grid-template-columns: 1fr; } }

.box-art { position: relative; }
.box-art img { width: 100%; max-width: 520px; margin-inline: auto; filter: drop-shadow(10px 14px 0 rgba(21,23,28,.16)); }
.box-art__sticker {
  position: absolute; left: 6%; bottom: 8%;
  width: 118px; height: 118px; border-radius: 50%;
  display: grid; place-items: center; text-align: center;
  background: var(--gum); color: #fff; border: var(--line); box-shadow: var(--shadow-sm);
  font-family: var(--f-display); font-size: 1.25rem; line-height: 1; letter-spacing: .03em;
  transform: rotate(-10deg);
  -webkit-text-stroke: .6px var(--ink); paint-order: stroke fill;
}

.prose p { font-size: 1.1rem; }
.prose strong { font-weight: 900; }

/* Pitch bullets */
.ticks { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 12px; }
.ticks li { display: grid; grid-template-columns: 30px 1fr; gap: 12px; align-items: start; font-weight: 700; }
.ticks li::before {
  content: "✓"; display: grid; place-items: center;
  width: 28px; height: 28px; border-radius: 8px; border: 2.5px solid var(--ink);
  background: var(--c-green); color: #fff; font-weight: 900; font-size: .9rem;
}

/* ---------- Loop (how it plays) ---------- */

.loop { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; counter-reset: step; }
@media (max-width: 900px) { .loop { grid-template-columns: 1fr; } }
.panel {
  position: relative;
  background: var(--card); color: var(--ink);
  border: var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 28px 24px 24px;
}
.panel__num {
  position: absolute; top: -20px; left: 20px;
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--f-display); font-size: 1.6rem; line-height: 1;
  background: var(--c-yellow); border: var(--line);
}
.panel h3 { font-family: var(--f-display); font-weight: 400; font-size: 2rem; letter-spacing: .03em; line-height: 1; margin: 8px 0 10px; }
.panel p { margin: 0; color: var(--ink-soft); }
.panel__art { height: 92px; display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }

/* Mini cards used in diagrams */
.mini-card {
  --c: var(--c-blue);
  width: 52px; height: 72px; border-radius: 8px; border: 2.5px solid var(--ink);
  background: linear-gradient(180deg, #7fdcf2, #bdeff8);
  display: grid; place-items: start; padding: 4px 6px;
  font-family: var(--f-display); font-size: 1.7rem; line-height: 1; color: var(--c);
  -webkit-text-stroke: .5px var(--ink); paint-order: stroke fill;
  box-shadow: 2px 2px 0 var(--ink);
}
.mini-card:nth-child(1) { transform: rotate(-6deg); }
.mini-card:nth-child(3) { transform: rotate(5deg); }
.mini-card--back { background: repeating-linear-gradient(45deg, var(--asphalt) 0 6px, var(--asphalt-dark) 6px 12px); }

.chip {
  --c: var(--c-blue);
  width: 30px; height: 30px; border-radius: 50%; border: 2.5px solid var(--ink);
  background: var(--c); box-shadow: 2px 2px 0 var(--ink); flex-shrink: 0;
}

/* Podium */
.finale { margin-top: 28px; display: grid; grid-template-columns: 1fr 1.1fr; gap: 28px; align-items: center;
  background: var(--card); color: var(--ink); border: var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(24px, 4vw, 40px); }
@media (max-width: 860px) { .finale { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 440px) {
  .podium { gap: 4px; }
  .podium__step { width: 52px; }
  .podium__step--x { width: 40px; }
  .podium__step b { font-size: 1.4rem; }
  .podium__step--x b { font-size: 1rem; }
}
.finale h3 { font-family: var(--f-display); font-weight: 400; font-size: clamp(2rem, 4vw, 2.8rem); letter-spacing: .03em; line-height: 1; margin: 0 0 12px; }
.finale p { color: var(--ink-soft); }

.podium { display: flex; align-items: flex-end; justify-content: center; gap: 8px; padding-top: 40px; }
.podium__step {
  position: relative; width: 70px;
  background: var(--wood); border: var(--line); border-bottom-width: 0; border-radius: 8px 8px 0 0;
  display: grid; place-items: center; align-content: center;
  font-family: var(--f-display); line-height: 1; letter-spacing: .02em;
}
.podium__step b { font-size: 1.7rem; font-weight: 400; }
.podium__step small { font-family: var(--f-body); font-weight: 900; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: rgba(21,23,28,.7); }
.podium__step .chip { position: absolute; top: -40px; left: 50%; margin-left: -15px; }
.podium__step--1 { height: 132px; }
.podium__step--2 { height: 104px; }
.podium__step--3 { height: 80px; }
.podium__step--x { height: 40px; background: #cfc6b6; width: 56px; }
.podium__step--x b { font-size: 1.2rem; }
.podium-base { height: 6px; background: var(--ink); border-radius: 3px; max-width: 360px; margin: 0 auto; }

/* ---------- Gallery / components ---------- */

.showcase { display: grid; grid-template-columns: repeat(12, 1fr); gap: 22px; align-items: start; }
.frame {
  background: var(--card); border: var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  overflow: hidden; margin: 0;
}
.frame figcaption { padding: 14px 18px; font-weight: 800; font-size: .95rem; border-top: var(--line); background: var(--paper); }
.frame--soft { background: radial-gradient(circle at 50% 45%, #fff 0%, #e8f7fb 60%, #cdeef6 100%); }
.frame--soft img { padding: 8px; }
.showcase > :nth-child(1) { grid-column: span 7; }
.showcase > :nth-child(2) { grid-column: span 5; }
@media (max-width: 860px) { .showcase > * { grid-column: 1 / -1 !important; } }

.component-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 860px) { .component-list { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .component-list { grid-template-columns: 1fr; } }
.component-list li {
  display: flex; align-items: center; gap: 14px;
  background: var(--card); border: 2.5px solid var(--ink); border-radius: var(--radius-sm); padding: 12px 14px;
  font-weight: 700; font-size: .98rem;
}
.component-list b { font-family: var(--f-display); font-weight: 400; font-size: 1.8rem; line-height: 1; min-width: 36px; text-align: center; }

/* Racers band */
.racers { position: relative; overflow: hidden; }
.racers__img { width: 100%; max-width: 720px; margin-inline: auto; border: var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.swatch { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border: 2.5px solid var(--ink); border-radius: 999px; background: var(--card); color: var(--ink); font-weight: 800; font-size: .92rem; }

/* ---------- Designers ---------- */

.duo { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(36px, 6vw, 88px); align-items: center; }
@media (max-width: 860px) { .duo { grid-template-columns: 1fr; } }

.duo__photo {
  margin: 0; justify-self: center; width: min(100%, 380px);
  background: var(--card); border: var(--line); border-radius: 6px; box-shadow: var(--shadow);
  padding: 14px 14px 0;
  transform: rotate(-2.5deg);
  position: relative;
}
.duo__photo::before {
  /* strip of tape */
  content: ""; position: absolute; top: -14px; left: 50%; width: 110px; height: 28px; margin-left: -55px;
  background: rgba(242, 184, 41, .85); border: 2px solid rgba(21,23,28,.25);
  transform: rotate(3deg);
}
.duo__photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: center 18%; border: 2px solid var(--ink); border-radius: 2px; }
.duo__photo figcaption { font-family: var(--f-display); font-size: 1.7rem; letter-spacing: .03em; text-align: center; padding: 10px 0 12px; }

.duo__names { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.nameplate {
  flex: 1 1 180px;
  background: var(--card); border: var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow-sm);
  padding: 14px 18px;
}
.nameplate b { display: block; font-family: var(--f-display); font-weight: 400; font-size: 1.8rem; letter-spacing: .03em; line-height: 1; }
.nameplate small { display: block; margin-top: 6px; font-weight: 900; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.duo__plus {
  flex: 0 0 auto; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--c-yellow); border: var(--line);
  font-family: var(--f-body); font-weight: 900; font-size: 1.7rem; line-height: 1; padding-bottom: 2px;
}
@media (max-width: 480px) { .duo__plus { margin-inline: auto; } .nameplate { flex-basis: 100%; } }

/* ---------- Publisher CTA ---------- */

.deal {
  display: grid; grid-template-columns: 1.2fr .8fr; gap: clamp(24px, 5vw, 64px); align-items: center;
  background: var(--c-yellow); border: var(--line); border-radius: 28px; box-shadow: 8px 8px 0 var(--ink);
  padding: clamp(28px, 5vw, 64px);
  position: relative; overflow: hidden;
}
@media (max-width: 860px) { .deal { grid-template-columns: 1fr; } }
.deal h2 { font-size: clamp(2.6rem, 6vw, 4.6rem); }
.deal .lead { color: var(--ink); margin-top: 16px; }
.deal__mail {
  display: block; margin-top: 22px;
  font-family: var(--f-display); font-size: clamp(1.5rem, 3.6vw, 2.4rem); letter-spacing: .03em; line-height: 1.1;
  word-break: break-word; text-decoration: none;
  color: var(--ink);
}
.deal__mail span { background: linear-gradient(transparent 62%, rgba(255,255,255,.7) 62%); }
.deal__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.deal__side { display: grid; justify-items: center; gap: 18px; text-align: center; }
.deal__side img { width: min(180px, 50vw); }
.deal__side p { margin: 0; font-weight: 800; font-size: .95rem; }
.copied { font-weight: 800; font-size: .9rem; min-height: 1.4em; margin: 10px 0 0; }

/* ---------- Rules teaser ---------- */

.rules-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
@media (max-width: 720px) { .rules-cards { grid-template-columns: 1fr; } }
.rules-card {
  position: relative; display: flex; align-items: center; gap: 20px; text-decoration: none;
  background: var(--card); border: var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 22px 24px;
  transition: transform 180ms var(--ease-out), box-shadow 180ms var(--ease-out);
}
.rules-card:active { transform: translate(4px, 4px); box-shadow: 1px 1px 0 var(--ink); }
@media (hover: hover) and (pointer: fine) {
  .rules-card:hover { transform: translate(-2px, -3px); box-shadow: 7px 8px 0 var(--ink); }
  .rules-card:active { transform: translate(4px, 4px); box-shadow: 1px 1px 0 var(--ink); }
}
.rules-card__flag { width: 64px; height: 64px; flex-shrink: 0; border-radius: 14px; border: var(--line); display: grid; place-items: center; font-family: var(--f-display); font-size: 1.8rem; background: var(--sky); }
.rules-card--de .rules-card__flag { background: var(--c-red); color: #fff; }
.rules-card h3 { font-family: var(--f-display); font-weight: 400; font-size: 1.9rem; letter-spacing: .03em; line-height: 1; margin: 0 0 4px; }
.rules-card p { margin: 0; color: var(--ink-soft); font-size: .98rem; }
.rules-card__arrow { margin-left: auto; font-size: 1.6rem; font-weight: 900; }

/* ---------- Footer ---------- */

.footer { background: var(--ink); color: rgba(255,255,255,.75); padding: 44px 0 36px; font-size: .95rem; }
.footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.footer__brand { display: flex; align-items: center; gap: 16px; }
.footer__brand img { width: 52px; }
.footer a { color: #fff; font-weight: 800; }
.footer__links { display: flex; flex-wrap: wrap; gap: 18px; }

/* ---------- Scroll reveal (subtle, once) ---------- */

@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(14px); transition: opacity 420ms var(--ease-out), transform 420ms var(--ease-out); }
  .js .reveal.is-in { opacity: 1; transform: none; }
}

/* ==========================================================================
   Rulebook pages
   ========================================================================== */

.rules-hero {
  background: var(--asphalt) url("bg-street.webp") center 70% / cover no-repeat;
  border-bottom: var(--line);
  position: relative; isolation: isolate;
  padding: 48px 0 56px;
}
.rules-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(247,241,231,.95) 0%, rgba(247,241,231,.82) 45%, rgba(247,241,231,0) 80%); }
.rules-hero__inner { display: flex; align-items: center; gap: 28px; }
.rules-hero__logo { width: 190px; flex-shrink: 0; margin: -24px -10px; }
.rules-hero h1 { font-size: clamp(2.8rem, 7vw, 5rem); }
.rules-hero p { margin: 10px 0 0; font-weight: 800; color: var(--ink-soft); max-width: 46ch; }
@media (max-width: 640px) { .rules-hero__inner { flex-direction: column; align-items: flex-start; gap: 8px; } .rules-hero__logo { width: 150px; margin: -20px -8px -12px; } }

.rules-layout { display: grid; grid-template-columns: 250px 1fr; gap: clamp(28px, 5vw, 64px); padding: 48px 0 96px; }
@media (max-width: 960px) { .rules-layout { grid-template-columns: 1fr; } }

.toc { position: sticky; top: 88px; align-self: start; }
.toc__box { background: var(--card); border: var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 18px 16px; }
.toc__title { font-weight: 900; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px 8px; }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.toc a { display: block; padding: 7px 10px; border-radius: 10px; text-decoration: none; font-weight: 800; font-size: .95rem; transition: background-color 160ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .toc a:hover { background: var(--paper-2); } }
.toc a.is-active { background: var(--ink); color: #fff; }
.toc__actions { display: grid; gap: 10px; margin-top: 16px; }
@media (max-width: 960px) {
  .toc { position: static; }
  .toc ol { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}

.rulebook { min-width: 0; max-width: 780px; }
.rule-section { scroll-margin-top: 96px; padding-bottom: 44px; margin-bottom: 44px; border-bottom: 2px dashed rgba(21,23,28,.2); }
.rule-section:last-child { border-bottom: 0; }
.rule-section h2 { font-family: var(--f-display); font-weight: 400; font-size: clamp(2.2rem, 5vw, 3rem); letter-spacing: .03em; line-height: 1; margin: 0 0 18px; }
.rule-section h3 { font-weight: 900; font-size: 1.15rem; margin: 28px 0 8px; }
.rule-section ul, .rule-section ol { padding-left: 1.3em; }
.rule-section li { margin-bottom: 6px; }
.rule-section li::marker { font-weight: 900; }
.term { font-weight: 900; font-variant: small-caps; letter-spacing: .03em; }

.story { font-size: 1.2rem; font-weight: 700; }
.story p:last-child { margin-bottom: 0; }

.callout {
  --accent: var(--sky);
  margin: 22px 0; padding: 16px 18px 16px 20px;
  background: var(--card); border: 2.5px solid var(--ink); border-left: 10px solid var(--accent); border-radius: var(--radius-sm);
}
.callout p:last-child, .callout ul:last-child { margin-bottom: 0; }
.callout__title { font-weight: 900; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; margin: 0 0 6px; }
.callout--two { --accent: var(--c-purple); }
.callout--example { --accent: var(--c-yellow); }
.callout--hill { --accent: var(--c-green); }

.steps { list-style: none; padding: 0 !important; counter-reset: s; display: grid; gap: 12px; }
.steps > li { counter-increment: s; position: relative; padding: 14px 16px 14px 62px; background: var(--card); border: 2.5px solid var(--ink); border-radius: var(--radius-sm); margin: 0 !important; }
.steps > li::before {
  content: counter(s); position: absolute; left: 14px; top: 12px;
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--f-display); font-size: 1.3rem; background: var(--c-yellow); border: 2.5px solid var(--ink);
}

.comp-table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--card); border: 2.5px solid var(--ink); border-radius: var(--radius-sm); overflow: hidden; }
.comp-table td { padding: 10px 14px; border-bottom: 1.5px solid rgba(21,23,28,.15); vertical-align: top; }
.comp-table tr:last-child td { border-bottom: 0; }
.comp-table td:first-child { font-family: var(--f-display); font-size: 1.5rem; line-height: 1.1; width: 56px; text-align: center; }
.comp-table .sub td { background: var(--paper); font-size: .95rem; }
.comp-table .sub td:first-child { font-size: 1.2rem; }

.figure { margin: 24px 0; }
.figure img { border: 2.5px solid var(--ink); border-radius: var(--radius-sm); background: radial-gradient(circle at 50% 45%, #fff 0%, #e8f7fb 70%); }
.figure figcaption { font-size: .9rem; font-weight: 700; color: var(--muted); margin-top: 8px; }

/* Hill diagram (positions) */
.hill {
  margin: 24px 0; padding: 18px; border: 2.5px solid var(--ink); border-radius: var(--radius-sm);
  background: var(--asphalt); color: #fff;
  display: grid; gap: 8px;
}
.hill__row { display: grid; grid-template-columns: 1fr 64px; gap: 10px; align-items: center; }
.hill__lane { display: flex; justify-content: flex-end; gap: 8px; min-height: 48px; align-items: center; padding: 0 10px; border-radius: 10px; background: rgba(255,255,255,.08); }
.hill__card { height: 48px; border-radius: 8px; border: 2.5px solid var(--ink); background: var(--asphalt-dark); display: grid; place-items: center; font-size: .66rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; text-align: center; line-height: 1.1; }
.hill__card--start { background: var(--sky-light); color: var(--ink); }
.hill__card--finish { background: repeating-conic-gradient(#fff 0 25%, var(--ink) 0 50%) 0 0 / 16px 16px; color: transparent; }
.hill__card--open { background: #fff7e0; color: var(--ink); }
.hill .chip { width: 34px; height: 34px; display: grid; place-items: center; font-family: var(--f-display); font-size: 1.1rem; color: #fff; -webkit-text-stroke: .5px var(--ink); paint-order: stroke fill; }
.hill__legend { font-size: .82rem; color: rgba(255,255,255,.75); font-weight: 700; margin-top: 6px; }

.score-table { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 18px 0; }
.score-table div { background: var(--card); border: 2.5px solid var(--ink); border-radius: 10px; text-align: center; padding: 10px 4px; }
.score-table b { display: block; font-family: var(--f-display); font-weight: 400; font-size: 1.8rem; line-height: 1; }
.score-table small { font-weight: 900; font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.score-table div:nth-child(n+4) { background: var(--paper-2); }

.bets { display: flex; gap: 10px; flex-wrap: wrap; margin: 12px 0; }
.bet { display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border: 2.5px solid var(--ink); border-radius: 999px; background: var(--card); font-weight: 800; font-size: .92rem; }
.bet .chip { width: 24px; height: 24px; }
.gumdots { color: var(--gum); letter-spacing: 1px; }

.credits dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0; }
.credits dt { font-weight: 900; }
.credits dd { margin: 0; color: var(--ink-soft); }
@media (max-width: 560px) { .credits dl { grid-template-columns: 1fr; } .credits dd { margin-bottom: 8px; } }

.back-top { display: inline-flex; margin-top: 12px; font-weight: 800; }

/* Print: clean rulebook */
@media print {
  .topbar, .toc, .footer, .rules-hero::after, .skip, .no-print { display: none !important; }
  body { background: #fff; font-size: 11pt; }
  .rules-hero { background: none; padding: 0 0 12pt; border: 0; }
  .rules-layout { display: block; padding: 0; }
  .rule-section { break-inside: avoid-page; padding-bottom: 12pt; margin-bottom: 12pt; }
  .hill, .callout, .steps > li { break-inside: avoid; }
  a { text-decoration: none; }
}
