/* Rechenbahn website. Colours and type follow the game (src/game/game.css). */

@font-face { font-family: Barlow; font-weight: 400; font-display: swap; src: url('fonts/barlow-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: Barlow; font-weight: 500; font-display: swap; src: url('fonts/barlow-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: Barlow; font-weight: 600; font-display: swap; src: url('fonts/barlow-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: Barlow; font-weight: 700; font-display: swap; src: url('fonts/barlow-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow Condensed'; font-weight: 600; font-display: swap; src: url('fonts/barlow-condensed-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow Condensed'; font-weight: 700; font-display: swap; src: url('fonts/barlow-condensed-latin-700-normal.woff2') format('woff2'); }

:root {
  --teal: #1f403d;
  --teal-soft: rgb(31 64 61 / 78%);
  --cream: #f6efe0;
  --paper: #fbf7ee;
  --red: #b5402f;
  --green: #2f6e4a;
  --mustard: #e3b54a;
  /* The hero video is recorded on this flat sky (scripts/site/hero.mjs). */
  --video-sky: #cfe3df;
  --sky-top: #a9cfd0;
  --sky-bottom: #e9efe6;
  /* Where the hero ends: the sky keeps fading into the paper over the next section's top (Max, 2026-12-01). */
  --sky-fade: #d4e6e1;
  --line: rgb(31 64 61 / 14%);
  --shadow: 0 6px 18px rgb(15 30 28 / 16%);
  --radius: 18px;
  --gutter: clamp(16px, 4vw, 40px);
  --measure: 1120px;
  --head: 'Barlow Condensed', 'Arial Narrow', system-ui, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: Barlow, system-ui, -apple-system, sans-serif;
  font-size: clamp(17px, 1.05vw + 12px, 19px);
  line-height: 1.55;
  color: var(--teal);
  background: var(--paper);
  overflow-x: hidden;
}

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

a { color: var(--teal); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--red); }
/* Browser surfaces in the game's colours: a visible focus ring on light and dark ground, and the text selection. */
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 6px; }
footer :focus-visible, .hero :focus-visible { outline-color: var(--mustard); }
::selection { background: rgb(227 181 74 / 45%); color: var(--teal); }

h1, h2, h3 { font-family: var(--head); font-weight: 700; line-height: 1.08; margin: 0 0 0.4em; letter-spacing: 0.01em; }
h1 { font-size: clamp(48px, 7vw, 92px); }
h2 { font-size: clamp(32px, 3.6vw, 48px); }
h3 { font-size: clamp(23px, 2vw, 28px); }
p { margin: 0 0 1em; }

.wrap { max-width: var(--measure); margin: 0 auto; padding: 0 var(--gutter); }

/* Header */
.top {
  position: absolute; inset: 0 0 auto 0; z-index: 10;
  display: flex; align-items: center; justify-content: flex-end; gap: 16px;
  padding: 16px var(--gutter);
}
.top .sign { margin-right: auto; }

/* The game's station sign: teal enamel, a cream line inside, condensed capitals (menu.css .title). */
.sign {
  display: inline-block;
  padding: 0.16em 0.6em 0.2em;
  border-radius: 0.3em;
  background: var(--teal);
  color: var(--cream);
  font-family: var(--head);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow: inset 0 0 0 3px rgb(31 64 61 / 93%), inset 0 0 0 4.5px rgb(246 239 224 / 55%), 0 4px 10px rgb(15 30 28 / 22%);
}
a.sign { font-size: 20px; padding: 10px 16px 11px; }
a.sign:hover { color: var(--cream); }
h1.sign { font-size: clamp(34px, 6vw, 80px); margin: 0 0 0.28em; padding-left: calc(0.6em + 0.14em); }
.lang { display: flex; gap: 4px; font-weight: 600; }
.lang a { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 10px; border-radius: 999px; text-decoration: none; }
.lang a[aria-current='page'] { background: var(--teal); color: var(--cream); }

/* Hero: a sky with the island video in the middle, islets and clouds around it. */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--sky-top) 0%, var(--video-sky) 34%, var(--video-sky) 90%, var(--sky-fade) 100%);
  padding: clamp(58px, 6.5vw, 84px) 0 clamp(28px, 4vw, 52px);
  isolation: isolate;
}
.hero-text { position: relative; z-index: 3; text-align: center; max-width: 760px; margin: 0 auto; padding: 0 var(--gutter); }
.hero-text p.lead { font-size: clamp(19px, 1.35vw + 12px, 23px); color: var(--teal-soft); max-width: 40ch; margin: 0 auto 0.9em; }

.stage { position: relative; z-index: 1; max-width: 1120px; margin: clamp(4px, 1.2vw, 12px) auto 0; padding: 0 var(--gutter); }
.island {
  position: relative;
  aspect-ratio: 2 / 1;
  width: 100%;
  /* The video's flat sky fades into the page's sky at its four edges. */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent), linear-gradient(180deg, transparent, #000 5%, #000 96.5%, transparent);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent), linear-gradient(180deg, transparent, #000 5%, #000 96.5%, transparent);
  mask-composite: intersect;
}
.island img, .island video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.island video { opacity: 0; transition: opacity 0.6s ease; }
.island video.playing { opacity: 1; }

.sky { position: absolute; inset: 0; pointer-events: none; }
.sky img { position: absolute; height: auto; will-change: transform; user-select: none; }
.sky.back { z-index: 0; }
.sky.front { z-index: 2; }
.sky .cloud-a { width: clamp(160px, 20vw, 310px); left: -4%; top: 14%; }
.sky .cloud-b { width: clamp(110px, 13vw, 200px); right: 4%; top: 9%; opacity: 0.9; }
.sky .cloud-c { width: clamp(130px, 16vw, 240px); right: -3%; bottom: 10%; }
.sky .islet-l { width: clamp(70px, 8.5vw, 140px); left: 3%; bottom: 12%; }
.sky .islet-m { width: clamp(50px, 6vw, 110px); right: 7%; top: 30%; }
.sky .islet-s { width: clamp(34px, 4vw, 70px); left: 14%; top: 34%; opacity: 0.85; }
.sky .balloon { width: clamp(56px, 5.5vw, 92px); right: 16%; top: 12%; }
@media (max-width: 700px) {
  .hero { padding: 68px 0 32px; }
  .sky .islet-l, .sky .islet-m, .sky .islet-s { display: none; }
  .sky .cloud-a { width: 120px; left: -12%; top: 1%; opacity: 0.68; }
  .sky .cloud-b { width: 92px; right: -4%; top: 9%; opacity: 0.72; }
  .sky .cloud-c { width: 104px; right: -10%; bottom: 1%; opacity: 0.72; }
  .sky .balloon { top: 14px; left: 18px; right: auto; bottom: auto; width: 34px; }
}

.drift { animation: drift 14s ease-in-out infinite alternate; }
.drift.slow { animation-duration: 22s; }
@keyframes drift { from { translate: 0 0; } to { translate: 0 -10px; } }
@media (prefers-reduced-motion: reduce) { .drift { animation: none; } }

/* Pre-launch availability pill and parent trust line in the hero. */
.soon-pill {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 10px;
  margin: 0;
  padding: 8px 16px 8px 10px;
  border-radius: 24px;
  background: rgb(251 247 238 / 88%);
  box-shadow: inset 0 0 0 1.5px rgb(31 64 61 / 18%), 0 4px 12px rgb(15 30 28 / 8%);
  font-size: 16px;
  font-weight: 600;
  color: var(--teal);
}
.soon-pill .tag {
  display: inline-block;
  padding: 3px 10px 2px;
  border-radius: 999px;
  background: var(--mustard);
  color: var(--teal);
  font-family: var(--head);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow: inset 0 0 0 1.5px rgb(31 64 61 / 28%);
}
.trust {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 8px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
  font-weight: 500;
  color: var(--teal);
}
.trust li {
  padding: 3px 10px;
  border-radius: 999px;
  background: rgb(31 64 61 / 7%);
}
@media (max-width: 480px) {
  .soon-pill { font-size: 14px; padding: 7px 13px 7px 8px; gap: 6px 7px; }
  .soon-pill .tag { font-size: 13px; padding: 2px 8px 1px; }
  .trust { font-size: 13px; }
}

/* Store badges (ready for launch day once store URLs exist; assets sit in assets/badges/). */
.badges { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px 16px; margin: 0; padding: 0; list-style: none; }
.badges a { display: block; border-radius: 10px; }
.badges .apple img { height: 50px; width: auto; }
.badges .google img { height: 74px; width: auto; margin: -12px -10px; }
@media (max-width: 420px) {
  .badges .apple img { height: 44px; }
  .badges .google img { height: 65px; margin: -10px -8px; }
}

/* Sections */
section { padding: clamp(52px, 7vw, 92px) 0; }
section.tint { background: var(--cream); }
/* Section titles and intros sit centred, so the short measure doesn't leave the right side empty (Max, 2026-12-01). */
/* Phones keep them left-aligned: a centred block of 6+ lines is hard to read. */
.intro { max-width: 62ch; margin-left: auto; margin-right: auto; color: var(--teal-soft); font-size: 1.06em; }
@media (min-width: 661px) {
  section > .wrap > h2, .intro { text-align: center; }
}

.card { background: #fff; border-radius: var(--radius); padding: 24px; box-shadow: 0 1px 0 var(--line), var(--shadow); }
section.tint .card { background: var(--paper); }
.card p:last-child { margin-bottom: 0; }

/* The three eras as one line of track: each train stands on the same rail, its station sign below. */
.era-line { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); list-style: none; margin: 36px 0 0; padding: 0; }
.era-line li { display: grid; grid-template-rows: auto auto 1fr; padding: 0 clamp(12px, 2vw, 28px) 0 0; }
.era-train {
  height: 104px; display: flex; align-items: flex-end; justify-content: flex-start; padding: 0 0 6px;
  /* The rail runs on from one era to the next: a wooden strip with sleepers, as in the footer. */
  margin-right: calc(-1 * clamp(12px, 2vw, 28px));
  background:
    linear-gradient(#c9a36b, #c9a36b) bottom 0 left 0 / 100% 7px no-repeat,
    repeating-linear-gradient(90deg, #b48a52 0 6px, transparent 6px 30px) bottom 7px left 0 / 100% 4px no-repeat;
}
.era-train img { height: 62px; width: auto; max-width: 100%; object-fit: contain; object-position: left bottom; filter: drop-shadow(0 5px 6px rgb(15 30 28 / 16%)); }
.era-sign { display: flex; align-items: center; gap: 12px; margin: 18px 0 10px; }
.era-sign .grade { font-family: var(--head); font-weight: 600; font-size: 19px; color: var(--teal-soft); }
.era-line p { margin: 0; font-size: 0.96em; line-height: 1.45; max-width: 34ch; }
.era-line li:last-child { padding-right: 0; }
.era-line li:last-child .era-train { margin-right: 0; }
@media (max-width: 860px) {
  .era-line { grid-template-columns: 1fr; gap: 28px; }
  .era-line li { padding: 0; }
  .era-train { margin-right: 0; height: 84px; }
  .era-train img { height: 54px; }
  .era-sign { margin-top: 14px; }
  .era-line p { max-width: none; }
}
.plate {
  flex: none;
  display: grid;
  place-items: center;
  min-width: 72px;
  padding: 6px 9px 7px;
  border-radius: 10px;
  background: var(--paper);
  box-shadow: inset 0 0 0 2px var(--teal);
  font-family: var(--head);
  font-weight: 700;
  font-size: 22px;
  line-height: 1.05;
  white-space: nowrap;
}
.plate small { display: block; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 600; margin-bottom: 2px; color: var(--teal-soft); }

.sum { font-family: var(--head); font-weight: 700; font-size: 28px; letter-spacing: 0.02em; white-space: nowrap; }
.sum .plus { color: var(--green); }
.sum .minus { color: var(--red); }

/* Steps with pictures */
.steps { display: grid; gap: clamp(32px, 5vw, 60px); margin-top: 36px; }
.step { display: grid; gap: clamp(20px, 3vw, 48px); align-items: center; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
.step:nth-child(even) { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); }
.step:nth-child(even) .device { order: 2; }
.step .num { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--mustard); font-family: var(--head); font-weight: 700; font-size: 24px; margin-bottom: 12px; }
@media (max-width: 760px) {
  .step, .step:nth-child(even) { grid-template-columns: 1fr; }
  .step:nth-child(even) .device { order: 0; }
}

/* Realistic hardware device frames (aluminum tablet, titanium iPhone, charcoal Android; no brand marks). */
.device {
  position: relative;
  box-shadow: 0 28px 54px -14px rgb(15 30 28 / 28%), 0 8px 18px -4px rgb(15 30 28 / 14%);
}
.device .bezel {
  position: relative;
  background: #101214;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 8%), 0 0 0 1px rgb(0 0 0 / 55%);
}
.device img {
  display: block;
  width: 100%;
  height: auto;
  background: var(--video-sky);
  box-shadow: 0 0 0 1px rgb(255 255 255 / 6%);
}

/* Tablet: brushed silver aluminum unibody, top volume rocker + side power button, glassy camera optic. */
.device.tablet {
  padding: 5px;
  border-radius: 26px;
  background: linear-gradient(145deg, #e5eaee 0%, #bcc3ca 34%, #9aa2aa 68%, #d7dde2 100%);
  box-shadow:
    inset 0 1px 1px rgb(255 255 255 / 90%),
    inset 0 -1px 1px rgb(0 0 0 / 26%),
    0 28px 54px -14px rgb(15 30 28 / 28%),
    0 8px 18px -4px rgb(15 30 28 / 14%);
}
.device.tablet::before {
  content: '';
  position: absolute;
  top: -3px;
  right: 9%;
  width: 7.5%;
  height: 3px;
  border-radius: 2px 2px 0 0;
  background: linear-gradient(90deg, #b5bcc3 0 43%, transparent 43% 57%, #b5bcc3 57% 100%);
  box-shadow: 0 -1px 1px rgb(255 255 255 / 60%);
}
.device.tablet::after {
  content: '';
  position: absolute;
  top: 12%;
  right: -3px;
  width: 3px;
  height: 7%;
  border-radius: 0 2px 2px 0;
  background: linear-gradient(180deg, #cfd5da, #9ca4ac);
}
.device.tablet .bezel {
  padding: 3.1%;
  border-radius: 21px;
}
.device.tablet img { border-radius: 10px; }
.device.tablet .bezel::after {
  content: '';
  position: absolute;
  top: 1.55%;
  left: 50%;
  width: 1.25%;
  aspect-ratio: 1;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle at 38% 36%, #3f6e78 0%, #17272c 38%, #07090b 75%);
  box-shadow: 0 0 0 1px rgb(255 255 255 / 12%);
}

/* iPhone: brushed dark titanium frame, side buttons, concentric OLED bezel + subtle left camera island. */
.device.iphone {
  padding: 4.5px;
  border-radius: 36px;
  background: linear-gradient(150deg, #72767e 0%, #3d4047 32%, #23262b 68%, #5b5f67 100%);
  box-shadow:
    inset 0 1px 1px rgb(255 255 255 / 38%),
    inset 0 -1px 1px rgb(0 0 0 / 55%),
    0 26px 50px -12px rgb(15 30 28 / 30%),
    0 8px 16px -4px rgb(15 30 28 / 16%);
}
.device.iphone::before {
  content: '';
  position: absolute;
  top: -3px;
  left: 20%;
  width: 16%;
  height: 3px;
  border-radius: 2px 2px 0 0;
  background: linear-gradient(90deg, #52565e 0 14%, transparent 14% 25%, #52565e 25% 58%, transparent 58% 67%, #52565e 67% 100%);
}
.device.iphone::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 26%;
  width: 13%;
  height: 3px;
  border-radius: 0 0 2px 2px;
  background: linear-gradient(90deg, #4b4f56, #2d3036);
}
.device.iphone .bezel {
  padding: 2.2% 2.6% 2.2% 3.5%;
  border-radius: 31.5px;
}
.device.iphone img { border-radius: 24px; }
.device.iphone .bezel::after {
  content: '';
  position: absolute;
  left: 1.75%;
  top: 50%;
  width: 1.35%;
  height: 22%;
  border-radius: 99px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle at 50% 24%, #2c515c 0%, #090b0d 34%, #020304 100%);
  box-shadow: 0 0 0 1px rgb(255 255 255 / 10%);
}

/* Android: brushed matte graphite-sage frame, top rocker + power button, slim bezel + sapphire micro-lens. */
.device.android {
  padding: 4px;
  border-radius: 26px;
  background: linear-gradient(145deg, #626c6a 0%, #343b39 38%, #1e2322 72%, #505957 100%);
  box-shadow:
    inset 0 1px 1px rgb(255 255 255 / 32%),
    inset 0 -1px 1px rgb(0 0 0 / 50%),
    0 26px 50px -12px rgb(15 30 28 / 28%),
    0 8px 16px -4px rgb(15 30 28 / 15%);
}
.device.android::before {
  content: '';
  position: absolute;
  top: -3px;
  left: 24%;
  width: 7%;
  height: 3px;
  border-radius: 2px 2px 0 0;
  background: linear-gradient(90deg, #525b59, #373f3d);
}
.device.android::after {
  content: '';
  position: absolute;
  top: -3px;
  left: 34%;
  width: 12%;
  height: 3px;
  border-radius: 2px 2px 0 0;
  background: linear-gradient(90deg, #525b59, #373f3d);
}
.device.android .bezel {
  padding: 2% 2.3% 2% 3.3%;
  border-radius: 22px;
}
.device.android img { border-radius: 15px; }
.device.android .bezel::after {
  content: '';
  position: absolute;
  left: 1.65%;
  top: 50%;
  width: 1.3%;
  aspect-ratio: 1;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle at 38% 36%, #3f6e78 0%, #142227 42%, #050708 78%);
  box-shadow: 0 0 0 1.5px #2b302f;
}

.step .device { width: 100%; }
.step .device.iphone, .step .device.android { width: 94%; margin: 0 auto; }
@media (max-width: 600px) {
  .device.tablet { border-radius: 20px; padding: 4px; }
  .device.tablet .bezel { border-radius: 16px; }
  .device.tablet img { border-radius: 8px; }
  .device.iphone { border-radius: 26px; padding: 3.5px; }
  .device.iphone .bezel { border-radius: 22.5px; }
  .device.iphone img { border-radius: 17px; }
  .device.android { border-radius: 20px; padding: 3.5px; }
  .device.android .bezel { border-radius: 16.5px; }
  .device.android img { border-radius: 11px; }
}

.parent-shot { margin-top: 28px; border-radius: var(--radius); overflow: hidden; box-shadow: 0 0 0 1px var(--line), 0 18px 40px rgb(15 30 28 / 16%); }
.parent-shot img { width: 100%; height: auto; }

/* Promise list */
.promises { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 14px 32px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.promises li { position: relative; padding-left: 36px; }
.promises li::before {
  content: ''; position: absolute; left: 0; top: 4px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%23f6efe0' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat;
}

.price { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); margin-top: 28px; }
.price .card h3 { margin-bottom: 0.2em; }
@media (max-width: 600px) { .price { gap: 32px; } }

/* Footer, with the game's train driving across once it comes into view. */
footer { position: relative; background: var(--teal); color: var(--cream); padding: 40px 0 48px; font-size: 16px; }
.rail { position: relative; height: 92px; overflow: hidden; background: linear-gradient(#c9a36b, #c9a36b) bottom 0 left 0 / 100% 8px no-repeat, var(--paper); }
.rail::after { content: ''; position: absolute; left: 0; right: 0; bottom: 8px; height: 4px; background: repeating-linear-gradient(90deg, #b48a52 0 6px, transparent 6px 34px); }
.rail img { position: absolute; bottom: 6px; left: 0; width: 240px; height: auto; transform: translateX(-260px); }
.rail.go img { animation: ride 9s cubic-bezier(0.45, 0.05, 0.55, 0.95) forwards; }
@keyframes ride { from { transform: translateX(-260px); } to { transform: translateX(calc(100vw + 20px)); } }
@media (prefers-reduced-motion: reduce) {
  .rail img { transform: translateX(calc(50vw - 120px)); }
  .rail.go img { animation: none; }
}
footer a { color: var(--cream); text-decoration: none; }
footer a:hover { text-decoration: underline; }
footer .row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px; align-items: center; }
footer nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }
footer nav a { display: inline-flex; align-items: center; min-height: 44px; }

/* Text pages: privacy, support, imprint */
.page { background: linear-gradient(180deg, var(--sky-top), var(--video-sky) 260px, var(--paper) 520px); }
.page main { padding: 120px 0 72px; }
.page article { max-width: 760px; margin: 0 auto; padding: 0 var(--gutter); }
.page article h1 { font-size: clamp(40px, 5vw, 60px); }
.page article h2 { font-size: clamp(26px, 2.6vw, 34px); margin-top: 1.6em; }
.page article h3 { margin-top: 1.4em; }
.page article ul { padding-left: 1.2em; }
.page article li { margin-bottom: 0.4em; }
.page .updated { color: var(--teal-soft); font-size: 0.92em; }
.todo { background: #fff3cd; border-radius: 6px; padding: 0 4px; }
details { background: #fff; border-radius: 14px; padding: 4px 20px; margin: 10px 0; box-shadow: 0 1px 0 var(--line); }
summary { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center; }
details[open] summary { margin-bottom: 4px; }

/* "Mehr im Spiel": the features the price section names, with pictures from the game. */
.more-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: clamp(48px, 6vw, 68px) 0 18px; }
.more-title { margin: 0; font-size: clamp(24px, 2vw + 12px, 32px); }
.more-nav { display: flex; gap: 8px; }
.more-nav[hidden] { display: none; }
.more-nav button {
  display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%;
  background: var(--paper); color: var(--teal); cursor: pointer;
  box-shadow: inset 0 0 0 1.5px rgb(31 64 61 / 22%), 0 2px 6px rgb(15 30 28 / 8%);
  transition: background-color 0.18s ease, opacity 0.2s ease;
}
.more-nav button:hover { background: #fff; }
.more-nav button[aria-disabled='true'] { opacity: 0.35; cursor: default; }
.more-nav svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* "Mehr zu entdecken": a row of cards that scrolls sideways and snaps, wider than the page on purpose,
   so the next card always peeks in (Max, 2026-12-01). */
.more {
  display: grid; grid-auto-flow: column; grid-auto-columns: clamp(250px, 26vw, 330px); gap: 18px;
  /* Full bleed: the row runs to the screen edges, its first card lines up with the text column. */
  --bleed: max(var(--gutter), calc(50 * var(--vw, 1vw) - var(--measure) / 2 + var(--gutter)));
  margin: 0 calc(50% - 50 * var(--vw, 1vw)); padding: 6px var(--bleed) 22px; list-style: none;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--bleed); overscroll-behavior-x: contain;
  /* No scrollbar: arrows on wide screens, swipe on touch (Max, 2026-12-01). */
  scrollbar-width: none;
}
.more::-webkit-scrollbar { display: none; }
.feature { scroll-snap-align: start; display: flex; flex-direction: column; background: var(--paper); border-radius: var(--radius); padding: 20px 22px 22px; box-shadow: 0 1px 0 var(--line), var(--shadow); }
.feature h4 { font-family: var(--head); font-weight: 700; font-size: 24px; margin: 14px 0 6px; color: var(--teal); }
.feature p { margin: 0; font-size: 0.96em; }
.feature .art { height: 92px; display: flex; align-items: center; justify-content: center; }
.feature .art img { max-height: 100%; width: auto; max-width: 100%; object-fit: contain; filter: drop-shadow(0 4px 6px rgb(15 30 28 / 12%)); }
.feature .art .stack { display: flex; }
.feature .art .stack img { height: 72px; margin-right: -18px; }
.feature .art .stack img:last-child { margin-right: 0; }
.feature .art .stack img:nth-child(1) { transform: rotate(-8deg); }
.feature .art .stack img:nth-child(2) { transform: rotate(5deg) translateY(4px); }
.feature .art .stack img:nth-child(3) { transform: rotate(-3deg); }
@media (max-width: 660px) {
  .more { grid-auto-columns: 78%; gap: 14px; }
  .feature .art { height: 76px; }
  .feature .art .stack img { height: 60px; }
}


/* Ink stamps on the price cards. */
.price .card { position: relative; }
.price .stamp { position: absolute; top: -20px; right: 8px; width: 76px; height: auto; transform: rotate(9deg); opacity: 0.92; pointer-events: none; }
.price .card:nth-child(2) .stamp { transform: rotate(-7deg); }
.price .card h3 { padding-right: 60px; }

/* The page ends where it started: availability note, with the train riding past below. */
.closing { text-align: center; }
.closing .intro { margin-left: auto; margin-right: auto; margin-bottom: 20px; }

/* Animated 9 + 6 = 15 wooden train worked example. */
.worked { margin: 28px 0 32px; }
.worked-demo {
  position: relative;
  background: var(--cream);
  border-radius: var(--radius);
  padding: clamp(18px, 2.6vw, 28px) clamp(18px, 3vw, 36px) clamp(20px, 2.8vw, 30px);
  box-shadow: 0 0 0 1px var(--line), var(--shadow);
}
.demo-head {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-bottom: clamp(12px, 1.8vw, 20px);
}
.demo-sum {
  font-family: var(--head);
  font-weight: 700;
  font-size: clamp(34px, 3.6vw, 52px);
  line-height: 1;
  letter-spacing: 0.02em;
  color: var(--teal);
  font-variant-numeric: tabular-nums;
  display: inline-flex;
  align-items: baseline;
  gap: 0.16em;
}
.demo-op {
  padding: 2px 10px 4px;
  border-radius: 10px;
  transition: background-color 0.28s ease, box-shadow 0.28s ease;
}
.worked-demo.adding .demo-op,
.worked-demo.done .demo-op {
  background: rgb(227 181 74 / 42%);
  box-shadow: inset 0 0 0 1.5px rgb(227 181 74 / 80%);
}
.demo-eq {
  color: var(--green);
  transition: opacity 0.35s ease, transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.worked-demo.hide-eq .demo-eq {
  opacity: 0;
  transform: translateY(6px);
}
.demo-replay {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 6px 14px;
  border: 0;
  border-radius: 999px;
  background: var(--paper);
  color: var(--teal);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: inset 0 0 0 1.5px rgb(31 64 61 / 18%), 0 2px 6px rgb(15 30 28 / 8%);
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: visibility 0s linear 0.3s, opacity 0.3s ease, background-color 0.18s ease, transform 0.18s ease;
}
.demo-replay.show { opacity: 1; pointer-events: auto; visibility: visible; transition-delay: 0s; }
.demo-replay:hover { background: #fff; color: var(--red); }
.demo-replay:active { transform: translateY(-50%) scale(0.96); }

.demo-train {
  --car-w: clamp(148px, 24vw, 266px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: clamp(12px, 2.4vw, 28px);
}
.demo-count {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  align-self: center;
  min-width: clamp(64px, 7.5vw, 96px);
  text-align: center;
}
.demo-count b {
  font-family: var(--head);
  font-weight: 700;
  font-size: clamp(46px, 5.4vw, 76px);
  line-height: 0.95;
  color: var(--teal);
  font-variant-numeric: tabular-nums;
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), color 0.2s ease;
}
.demo-count b.pop { transform: scale(1.14); color: #9a6f12; }
.demo-count b.ten { transform: scale(1.22); color: var(--green); }
.demo-count small {
  margin-top: 6px;
  font-family: var(--head);
  font-weight: 700;
  font-size: clamp(12px, 1.2vw, 15px);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal-soft);
}
.demo-cars {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  filter: drop-shadow(0 8px 10px rgb(15 30 28 / 14%));
}
.demo-car {
  position: relative;
  flex: none;
  width: var(--car-w);
  aspect-ratio: 434 / 272;
  margin: 0 calc(var(--car-w) * -0.012);
  transition: filter 0.3s ease;
}
.demo-car.ten-flash {
  filter: drop-shadow(0 0 14px rgb(227 181 74 / 85%));
}
.demo-car .car-body {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.demo-loco {
  flex: none;
  width: calc(var(--car-w) * 1.157);
  height: auto;
  margin-left: calc(var(--car-w) * -0.012);
}
/* Exact 5x2 seat window from sideTrains.json (coach-count). */
.demo-seats {
  position: absolute;
  left: 16.07%;
  top: 24.27%;
  width: 67.88%;
  height: 43.54%;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 2px 3px;
  padding: 2px 3px 0;
}
.demo-seat {
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  border-radius: 4px 4px 0 0;
  background: rgb(150 120 90 / 9%);
  box-shadow: inset 0 0 0 1px rgb(150 120 90 / 24%);
  transition: background-color 0.25s ease, box-shadow 0.25s ease;
}
.demo-seat.on {
  background: rgb(150 120 90 / 13%);
  box-shadow: none;
}
.demo-seat.on.moved {
  background: rgb(227 181 74 / 58%);
  box-shadow: inset 0 0 0 2px var(--mustard);
}
.demo-seat img {
  height: 118%;
  width: auto;
  margin-top: 6%;
  opacity: 0;
  transform: translateY(65%) scale(0.6);
  transition: opacity 0.28s ease, transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.demo-seat.on img {
  opacity: 1;
  transform: none;
}
.worked figcaption { margin: 16px auto 0; max-width: 62ch; color: var(--teal-soft); }
@media (min-width: 661px) { .worked figcaption { text-align: center; } }
@media (max-width: 660px) {
  .worked { margin: 24px 0 28px; }
  .worked-demo { padding: 16px 14px 18px; }
  .demo-head { justify-content: space-between; min-height: 40px; }
  .demo-replay { position: static; transform: none; }
  .demo-replay:active { transform: scale(0.96); }
  /* The train runs on past the right edge: the engine is cut, not hidden, so the direction stays clear. */
  .worked-demo { overflow: hidden; }
  .demo-train { --car-w: clamp(108px, 30vw, 180px); gap: 6px; justify-content: flex-start; }
  .demo-cars { flex: none; }
  .demo-count { min-width: 44px; }
  .demo-count b { font-size: 40px; }
  .demo-count small { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  .demo-seat img, .demo-eq, .demo-count b { transition: none; }
}

/* The card row bleeds to the screen edges; clip the 100vw scrollbar overhang instead of scrolling the page. */
main { overflow-x: clip; }
.demo-train:focus { outline: none; }

/* The sky fades out over the top of the first section instead of stopping at the hero's edge. */
.hero + section { background: linear-gradient(180deg, var(--sky-fade) 0, var(--sky-bottom) 180px, var(--paper) 420px) no-repeat; }

/* The studio behind the game, linked to its own site (Max, 2026-12-01). */
footer .maker { display: inline-flex; align-items: center; gap: 14px; flex-wrap: wrap; }
footer .studio { display: inline-flex; align-items: center; min-height: 44px; }
footer .studio img { height: 18px; width: auto; }
