/* ==========================================================================
   LearnQuest – "Cracker" design system (session 4)
   Cream page, ink outlines, cherry section, lime actions, flame stickers.
   Vanilla CSS, no build step. Breakpoints: 1199 / 899 / 809 / 420.
   ========================================================================== */

/* ---------- Fonts (self-hosted, OFL) ---------- */
@font-face {
  font-family: 'LQ Display';
  src: url('../assets/fonts/lq-display.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Archivo';
  src: url('../assets/fonts/archivo-latin-var.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  /* Base */
  --cream: #F7F6F0;
  --cream-2: #EDEBE1;
  --white: #FFFFFF;
  --ink: #161616;
  --ink-2: #3D3D3D;
  --ink-3: #646464;
  --cherry: #580D14;
  --cherry-2: #6E1720;
  --on-cherry: #F7F6F0;
  --on-cherry-2: #E9D6D3;
  --lime: #C8FF2E;
  --lime-hover: #C0EB23;
  --lime-press: #A7D426;
  --flame: #F8330B;
  --flame-ink: #C02A08;     /* flame for small text on cream (AA) */
  --ok-ink: #1F7A4D;
  --kraft: #D9C29C;         /* TM tile rack */
  --night: #1C2240;         /* navy behind the ink-style images */

  /* Selective colour per game */
  --tm: #F6B544;
  --sc: #3FE2F2;
  --sc-2: #FF4FA8;

  /* Word-tile colours (product-english.md) */
  --t-s: #3B7BF0;  --t-aux: #E5484D;  --t-v: #F08C2E;
  --t-o: #2FA36B;  --t-p: #E8C13A;    --t-t: #9B5CF0;
  /* TenseMystery d20 dice (product-english.md §7): bronze = WHAT, silver = WHERE, gold = WHEN */
  --die-bronze: #C27C43;  --die-silver: #B8BEC6;  --die-gold: #E2B33C;

  /* Type */
  --f-display: 'LQ Display', 'Archivo', system-ui, sans-serif;
  --f-body: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --fs-hero: 80px;
  --fs-h2: 60px;
  --fs-h3: 40px;
  --fs-body: 20px;
  --fs-small: 15px;

  /* Shape */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 24px;
  --r-pill: 999px;
  --line: 2px solid var(--ink);
  --shadow-soft: 0 .3px .42px -.58px rgba(0,0,0,.07), 0 1.14px 1.6px -1.17px rgba(0,0,0,.08), 0 5px 7px -1.75px rgba(0,0,0,.13);
  --shadow-lift: 0 1px 2px rgba(0,0,0,.08), 0 10px 24px -8px rgba(0,0,0,.22);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --ease: cubic-bezier(.2, .8, .2, 1);

  /* Layout */
  --container: 1240px;
  --pad-y: 80px;     /* one info block = max one screen (session 4 height budget) */
  --pad-x: 40px;
  --header-h: 84px;
  --scallop: 20px;

  color-scheme: light;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: var(--header-h); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  font-family: var(--f-body);
  font-size: var(--fs-body);
  line-height: 1.5;
  color: var(--ink);
  background-color: var(--cream);
  overflow-x: clip;
  min-height: 100vh;
}
img, svg, canvas { display: block; max-width: 100%; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
ul, ol { list-style: none; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--lime); color: var(--ink); }

.sprite { position: absolute; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.icon { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; }
.container--narrow { max-width: 860px; }

/* ---------- Type ---------- */
h1, h2, h3, .display {
  font-family: var(--f-display);
  font-weight: 400;
  font-synthesis: none;
  text-transform: uppercase;
  line-height: 1;
  letter-spacing: .005em;
  text-wrap: balance;
}
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-weight: 800; font-size: 1rem; line-height: 1.3; }
p { text-wrap: pretty; }
/* One flame word per headline max (copy uses <em> or .flame) */
:is(h1, h2, h3) :is(em, .flame, .hl) { font-style: normal; color: var(--flame); }

/* Signature 1: sticker word */
.sticker {
  display: inline-block;
  padding: 6px 12px 8px;
  margin-inline: .04em;
  background: var(--ink);
  color: var(--lime);
  border: 6px solid var(--white);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lift);
  transform: rotate(-3deg);
  line-height: .9;
  vertical-align: .04em;
}
.sticker--sm { padding: 3px 8px 4px; border-width: 2px; border-radius: var(--r-sm); }

/* ---------- Sections ---------- */
.section { position: relative; padding: var(--pad-y) var(--pad-x); }
.section--alt { background: var(--cream-2); }
.section-head { max-width: 920px; margin: 0 auto 32px; text-align: center; }
.section-head__sub { margin: 10px auto 0; max-width: 64ch; color: var(--ink-2); font-size: 18px; }

/* Signature 2: scalloped "cracker" edges (half-circle bumps into the neighbour) */
.scallop { z-index: 1; }
.scallop::before, .scallop::after {
  content: ''; position: absolute; left: 0; right: 0; height: var(--scallop);
  background: inherit;
  pointer-events: none;
  -webkit-mask: radial-gradient(circle at 50% 100%, #000 calc(var(--scallop) - .5px), transparent var(--scallop)) 50% 0 / calc(var(--scallop) * 2) 100% repeat-x;
          mask: radial-gradient(circle at 50% 100%, #000 calc(var(--scallop) - .5px), transparent var(--scallop)) 50% 0 / calc(var(--scallop) * 2) 100% repeat-x;
}
.scallop::before { bottom: calc(100% - 1px); }
.scallop::after {
  top: calc(100% - 1px);
  -webkit-mask-image: radial-gradient(circle at 50% 0, #000 calc(var(--scallop) - .5px), transparent var(--scallop));
          mask-image: radial-gradient(circle at 50% 0, #000 calc(var(--scallop) - .5px), transparent var(--scallop));
}
.scallop--top::after { content: none; }

.section--cherry { background: var(--cherry); color: var(--on-cherry); }
.section--cherry .section-head__sub { color: var(--on-cherry-2); }
.section--cherry :focus-visible { outline-color: var(--lime); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 48px; padding: 12px 22px;
  border: var(--line); border-radius: var(--r-md);
  background: var(--white); color: var(--ink);
  font-family: var(--f-body); font-weight: 700; font-size: 1rem; line-height: 1.1;
  box-shadow: var(--shadow-soft);
  transition: transform .15s var(--ease), background-color .15s, box-shadow .15s;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: translateY(2px); box-shadow: none; }
.btn--primary { background: var(--lime); }
.btn--primary:hover { background: var(--lime-hover); }
.btn--primary:active { background: var(--lime-press); }
.btn--ghost { background: transparent; box-shadow: none; }
.btn--ghost:hover { background: var(--white); }
.btn--sm { min-height: 44px; padding: 8px 16px; font-size: .9375rem; }
.btn--lg { min-height: 56px; padding: 14px 28px; font-size: 1.0625rem; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .55; pointer-events: none; }

/* Signature 5: tactile buy button – white shell, lime pad, rolling label */
.btn--buy {
  padding: 4px; min-height: 0; border: 0; border-radius: var(--r-md);
  background: var(--white); box-shadow: var(--shadow-lift);
}
.btn--buy .btn__pad {
  display: flex; align-items: center; justify-content: center;
  width: 100%; min-height: 52px; padding: 0 26px;
  background: var(--lime); border: var(--line); border-radius: var(--r-sm);
  font-family: var(--f-display); font-weight: 400; font-size: 20px; text-transform: uppercase; letter-spacing: .02em;
  transition: background-color .15s;
}
.btn--buy:hover .btn__pad { background: var(--lime-hover); }
.btn--buy:active { transform: translateY(2px); box-shadow: var(--shadow-soft); }
.btn--buy:active .btn__pad { background: var(--lime-press); }
.btn__roll { display: block; height: 1.1em; overflow: hidden; line-height: 1.1; }
.btn__roll > span { display: block; transition: transform .35s var(--spring); }
.btn--buy:hover .btn__roll > span, .btn--buy:focus-visible .btn__roll > span { transform: translateY(-100%); }
.btn--buy.btn--sm .btn__pad { min-height: 40px; padding: 0 16px; font-size: 17px; }
.btn--buy.btn--lg .btn__pad { min-height: 60px; padding: 0 34px; font-size: 24px; }

.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; flex: none;
  border-radius: var(--r-pill); border: var(--line); background: var(--white);
  transition: background-color .15s;
}
.icon-btn:hover { background: var(--cream-2); }
.link-btn { color: inherit; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Tags (subject badge) ---------- */
.tag {
  display: inline-flex; align-items: center;
  padding: 5px 12px; border-radius: var(--r-pill);
  border: var(--line); background: var(--white);
  font-size: .875rem; font-weight: 700; line-height: 1.2;
}
.tag--tm { background: var(--tm); }
.tag--sc { background: var(--sc); }
.tag--primary { background: var(--lime); }

/* ---------- Price + Pre-Launch sticker ---------- */
.price-row { display: flex; align-items: center; gap: 10px; }
.price { font-family: var(--f-display); font-size: 32px; line-height: 1; white-space: nowrap; }
.price--lg { font-size: 44px; }
.prelaunch-sticker {
  flex: none;
  display: grid; place-items: center; text-align: center;
  width: 70px; aspect-ratio: 1; padding: 10px;
  background: var(--flame); color: var(--ink);
  font-family: var(--f-display); font-size: 12px; line-height: 1; text-transform: uppercase; letter-spacing: .02em;
  overflow-wrap: normal; -webkit-hyphens: auto; hyphens: auto;
  -webkit-mask: url('../assets/svg/scallop-badge.svg') center / 100% 100% no-repeat;
          mask: url('../assets/svg/scallop-badge.svg') center / 100% 100% no-repeat;
  transform: rotate(8deg);
}
.price--lg + .prelaunch-sticker { width: 78px; font-size: 13px; }
.price-note { margin-top: 8px; color: var(--ink-3); font-size: var(--fs-small); }

/* ---------- Header ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  padding: 14px var(--pad-x);
  transition: background-color .2s, box-shadow .2s, padding .2s;
}
.site-header.is-scrolled {
  background: rgba(247, 246, 240, .94);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: var(--shadow-soft);
  padding-block: 8px;
}
.site-header__bar {
  position: relative;
  max-width: var(--container); margin-inline: auto;
  display: flex; align-items: center; gap: 16px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--f-display); font-size: 24px; text-transform: uppercase; line-height: 1; }
.brand__mark {
  display: grid; place-items: center; width: 44px; height: 44px; flex: none;
  border-radius: var(--r-md); background: var(--ink); color: var(--lime);
  font-size: 18px; transform: rotate(-4deg);
}

.main-nav {
  margin-inline: auto;
  display: flex; gap: 2px; padding: 4px;
  background: var(--cream); border: 1px solid var(--ink); border-radius: var(--r-md);
}
.main-nav a {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 12px;
  border-radius: var(--r-sm); font-size: .9375rem; font-weight: 600; white-space: nowrap;
  transition: background-color .15s, color .15s;
}
.main-nav a:hover { background: var(--ink); color: var(--cream); }

.header-actions { display: flex; align-items: center; gap: 8px; }
.lang-toggle { display: inline-flex; padding: 3px; border: 1px solid var(--ink); border-radius: var(--r-md); background: var(--cream); }
.lang-toggle__btn { min-width: 40px; height: 38px; border-radius: var(--r-sm); font-size: .875rem; font-weight: 800; color: var(--ink-2); transition: background-color .15s, color .15s; }
.lang-toggle__btn:hover { background: var(--cream-2); }
.lang-toggle__btn.is-active { background: var(--ink); color: var(--lime); }

.cart-btn {
  position: relative; display: inline-grid; place-items: center;
  width: 46px; height: 46px; border-radius: var(--r-pill);
  background: var(--white); border: var(--line); box-shadow: var(--shadow-soft);
}
.cart-btn .icon { width: 22px; height: 22px; }
.cart-btn__badge {
  position: absolute; top: -6px; right: -6px;
  min-width: 22px; height: 22px; padding: 0 6px; border-radius: var(--r-pill);
  display: grid; place-items: center;
  background: var(--ink); color: var(--lime); border: 2px solid var(--white);
  font-size: .75rem; font-weight: 800; line-height: 1;
}
.cart-btn__badge.is-empty { display: none; }
.cart-btn.is-bump, #cart-badge-count.is-bump { animation: bump .5s var(--spring); }
@keyframes bump { 30% { transform: scale(1.18) rotate(-8deg); } 60% { transform: scale(.95); } }

.menu-btn { display: none; width: 46px; height: 46px; border-radius: var(--r-md); border: var(--line); background: var(--white); place-items: center; }
.menu-btn .icon { width: 22px; height: 22px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh; min-height: 100svh;   /* pinned by GSAP: fills exactly one screen */
  display: flex; flex-direction: column;
  padding: calc(var(--header-h) + 12px) var(--pad-x) 24px;
  background: var(--cream);
}
.hero__inner { flex: 1 1 auto; min-height: 0; width: 100%; max-width: var(--container); margin-inline: auto; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.hero__kicker {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 16px 6px 10px; border-radius: var(--r-pill);
  background: var(--white); border: 1px solid var(--ink);
  font-size: var(--fs-small); font-weight: 600; line-height: 1.3; text-align: left;
}
.dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--flame); box-shadow: 0 0 0 3px rgba(248, 51, 11, .2); }
.hero__title { margin-top: 18px; max-width: 16ch; font-size: var(--fs-hero); }
.hero__sub { margin-top: 16px; max-width: 62ch; color: var(--ink-2); font-size: 18px; }
.hero__hint { margin-top: 18px; color: var(--ink-3); font-size: 14px; }

.hero-boxes {
  /* boxes take the remaining height of the screen (stage flexes), capped on very tall screens */
  flex: 1 1 auto; min-height: 0; max-height: 620px;
  margin-top: 30px; width: 100%; max-width: 1140px;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: minmax(0, 1fr); gap: 36px;
  text-align: left;
}
.hero-box {
  --tilt: -1.2deg;
  display: flex; flex-direction: column;
  padding: 10px; border: var(--line); border-radius: var(--r-xl);
  background: var(--white); box-shadow: var(--shadow-lift);
  transform: rotate(var(--tilt));
}
.hero-box[data-game="sc"] { --tilt: 1.2deg; }
html[data-first="sc"] .hero-box[data-game="sc"] { order: -1; --tilt: -1.2deg; }
html[data-first="sc"] .hero-box[data-game="tm"] { --tilt: 1.2deg; }
.hero-box__stage {
  position: relative; overflow: hidden;
  flex: 1 1 0; min-height: 150px;
  border-radius: var(--r-lg); background: var(--night);
}
.hero-box__still, .hero-box__canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-box__canvas { z-index: 2; pointer-events: none; }
.hero-box.is-playing .hero-box__still { visibility: hidden; }
.hero-box__tag { position: absolute; z-index: 3; top: 10px; left: 10px; }
.hero-box__info { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding: 12px 6px 2px 8px; }
.hero-box__text { min-width: 0; }
.hero-box__name { font-size: 34px; }
.hero-box__line { margin-top: 6px; color: var(--ink-2); font-size: 15px; line-height: 1.4; max-width: 34ch; }
.hero-box__buy { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.hero-box__buy .prelaunch-sticker { width: 58px; font-size: 10.5px; padding: 8px; margin-block: -10px -4px; }

/* ---------- Fact ticker ---------- */
.ticker { position: relative; overflow: hidden; padding: 44px 0 52px; }
.ticker__track {
  display: flex; gap: 22px; width: max-content; padding-inline: 11px;
}
.js .ticker__track { animation: ticker 46s linear infinite; }
.ticker:hover .ticker__track { animation-play-state: paused; }
@keyframes ticker { to { transform: translateX(-50%); } }
.ticker__card {
  flex: none;
  padding: 18px 26px 16px;
  border: var(--line); border-radius: var(--r-lg);
  background: var(--cream); color: var(--ink);
  font-family: var(--f-display); font-size: 30px; line-height: 1; text-transform: uppercase; white-space: nowrap;
  box-shadow: var(--shadow-soft);
  transform: rotate(var(--r, -4deg));
}
.ticker__card:nth-child(even) { background: var(--cherry); color: var(--on-cherry); }
.ticker__card:nth-child(6n+1) { --r: -6deg; }
.ticker__card:nth-child(6n+2) { --r: 4deg; }
.ticker__card:nth-child(6n+3) { --r: -2deg; }
.ticker__card:nth-child(6n+4) { --r: 7deg; }
.ticker__card:nth-child(6n+5) { --r: -4deg; }
.ticker__card:nth-child(6n)   { --r: 3deg; }

/* ---------- Duo layout + mobile game switch ---------- */
.duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 56px; align-items: stretch; }
.duo__col { min-width: 0; --accent: var(--tm); --tilt: -2deg; }
.duo__col[data-game="sc"] { --accent: var(--sc); --tilt: 2deg; }
html[data-first="sc"] .duo__col[data-game="sc"] { order: -1; --tilt: -2deg; }
html[data-first="sc"] .duo__col[data-game="tm"] { --tilt: 2deg; }

.game-switch { display: none; }
.game-switch button {
  flex: 1; min-height: 46px; padding: 0 14px; border-radius: var(--r-sm);
  font-family: var(--f-display); font-size: 18px; text-transform: uppercase; line-height: 1;
  color: var(--ink-2); transition: background-color .15s, color .15s;
}
.game-switch button[aria-pressed="true"] { background: var(--ink); color: var(--lime); }
html[data-first="sc"] .game-switch [data-switch-game="sc"] { order: -1; }

/* Signature 6: image cards in a white passe-partout */
.frame {
  position: relative;
  padding: 10px; border: var(--line); border-radius: var(--r-lg);
  background: var(--white); box-shadow: var(--shadow-lift);
  transform: rotate(var(--tilt, -2deg));
}
.frame::after { /* thin game-colour stripe inside the passe-partout */
  content: ''; position: absolute; left: 10px; right: 10px; bottom: 3px; height: 4px; border-radius: 2px;
  background: var(--accent, var(--ink)); pointer-events: none;
}
.frame .media { border-radius: var(--r-sm); }

.media {
  position: relative; overflow: hidden;
  aspect-ratio: 1600 / 1175;
  background-color: var(--night);
}
.media::before { /* placeholder label, only visible when the image is missing */
  content: attr(data-ph);
  position: absolute; inset: 0; display: grid; place-items: center; padding: 12px;
  color: var(--cream); font-size: .875rem; font-weight: 600; text-align: center;
}
.media img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; }
.media.is-missing img { display: none; }
.hero-box__stage.media { aspect-ratio: auto; }

/* ---------- Spiele: product columns ----------
   Desktop: meta + name + text on top, gallery beside "Das lernt ihr", buy row at the bottom.
   Mobile: gallery first, "Das lernt ihr" folds into a <details>. */
.product {
  display: grid; align-content: start;
  grid-template-columns: minmax(0, 44%) minmax(0, 1fr);
  grid-template-areas: "intro intro" "gallery fold" "buy buy";
  column-gap: 28px;
}
@media (min-width: 900px) {
  .duo--products { grid-template-rows: auto auto auto; row-gap: 0; }
  .duo--products > .product { grid-row: span 3; grid-template-rows: subgrid; }
}
.product__intro { grid-area: intro; }
.product__gallery { grid-area: gallery; align-self: start; margin: 18px 4px 0; }
.product__gallery .media { aspect-ratio: 4 / 3; }
.product__fold { grid-area: fold; margin-top: 16px; }
.product__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.product__name { margin-top: 12px; font-size: 36px; }
.product__case { margin-top: 4px; font-weight: 700; font-size: 1.0625rem; }
.product__desc { margin-top: 8px; color: var(--ink-2); font-size: 16px; line-height: 1.5; }
.product__learn { font-family: var(--f-display); font-weight: 400; font-size: 22px; text-transform: uppercase; line-height: 1; }
.learn-list { margin-top: 12px; display: grid; gap: 6px; }
.learn-list li { position: relative; padding-left: 30px; font-size: 15px; line-height: 1.45; }
.learn-list li::before {
  content: ''; position: absolute; left: 0; top: .05em; width: 20px; height: 20px; border-radius: 50%;
  border: var(--line);
  background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23161616' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E") center / 11px no-repeat;
}
.specs { display: flex; flex-wrap: wrap; gap: 6px; }
.specs li {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 11px; border-radius: var(--r-pill); border: 1px solid var(--ink); background: var(--white);
  font-size: .875rem; font-weight: 600; line-height: 1.2;
}
.specs .icon { width: 15px; height: 15px; }
.buybox {
  grid-area: buy;
  align-self: end;
  width: 100%; margin-top: 16px; padding-top: 16px; border-top: 2px dashed var(--ink);
  display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "price btn" "note note"; align-items: center; gap: 4px 20px;
}
.buybox__price { display: contents; }
.buybox .price-row { grid-area: price; }
.buybox .btn--buy { grid-area: btn; }
.buybox .price--lg { font-size: 40px; }
.buybox .price--lg + .prelaunch-sticker { width: 66px; font-size: 11.5px; margin-block: -6px; }
.buybox .price-note { grid-area: note; margin-top: 0; font-size: 14px; line-height: 1.35; }
.buybox .btn--buy { min-width: 170px; }
.media-note { margin-top: 16px; text-align: center; color: var(--ink-3); font-size: var(--fs-small); }

/* Fold: a <details> that is collapsed on phones and always open on desktop */
.fold > summary { list-style: none; }
.fold > summary::-webkit-details-marker { display: none; }
@media (min-width: 900px) {
  .fold::details-content { content-visibility: visible; display: block; }
  .fold > summary { pointer-events: none; cursor: default; }
}

/* Carousel */
.carousel { position: relative; border-radius: var(--r-sm); overflow: hidden; }
.carousel__track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.carousel__track::-webkit-scrollbar { display: none; }
.carousel__slide { flex: 0 0 100%; scroll-snap-align: start; }
.carousel__slide .media { border-radius: 0; }
.carousel__arrow {
  position: absolute; top: 50%; z-index: 4; transform: translateY(-50%);
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: var(--white); border: var(--line); box-shadow: var(--shadow-soft);
  transition: background-color .15s;
}
.carousel__arrow:hover { background: var(--lime); }
.carousel__arrow--prev { left: 12px; }
.carousel__arrow--next { right: 12px; }
.product .carousel__arrow { width: 38px; height: 38px; }
.product .carousel__arrow--prev { left: 8px; }
.product .carousel__arrow--next { right: 8px; }
.carousel__dots { position: absolute; z-index: 4; bottom: 10px; left: 50%; transform: translateX(-50%); display: flex; padding: 0 4px; border-radius: var(--r-pill); background: rgba(22, 22, 22, .55); }
.carousel__dot { width: 26px; height: 26px; padding: 9px; background-clip: content-box; border-radius: var(--r-pill); background-color: rgba(247, 246, 240, .55); transition: width .25s var(--ease), background-color .2s; }
.carousel__dot.is-active { width: 40px; background-color: var(--lime); }
.carousel :focus-visible { outline-color: var(--lime); }

/* ---------- So wird gespielt ---------- */
.how {
  padding: 24px 30px 28px; border: var(--line); border-radius: var(--r-xl);
  background: var(--cream); box-shadow: var(--shadow-soft);
  border-top: 10px solid var(--accent);
}
.how__name { font-size: var(--fs-h3); }
.steps { margin-top: 18px; display: grid; gap: 16px; }
.step { display: grid; grid-template-columns: 52px 1fr; gap: 18px; align-items: start; }
.step__num {
  display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%;
  background: var(--accent); border: var(--line);
  font-family: var(--f-display); font-size: 28px; line-height: 1;
  transform: rotate(-6deg);
}
.step h4 { font-family: var(--f-display); font-weight: 400; font-size: 24px; line-height: 1; text-transform: uppercase; margin-top: 4px; }
.step p { margin-top: 6px; color: var(--ink-2); font-size: 16px; line-height: 1.5; }
/* Curriculum chip per step (which competence the step trains) */
.step__chip {
  display: inline-flex; align-items: center; gap: 7px; margin-top: 8px;
  padding: 4px 11px 4px 9px; border: var(--line); border-radius: var(--r-pill);
  background: var(--cream-2);
  font-size: 13px; font-weight: 700; line-height: 1.25;
}
.step__chip::before { content: ''; flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 1.5px var(--ink); }

/* ---------- Ausprobieren: demos ---------- */
.duo--demos > .duo__col { display: flex; }
.demo {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; gap: 16px;
  padding: 24px 28px; border: var(--line); border-radius: var(--r-xl);
  background: var(--white); box-shadow: var(--shadow-lift);
}
.demo h3 { margin-top: 8px; font-size: 30px; }
.demo__instr { margin-top: 6px; color: var(--ink-2); font-size: 15px; line-height: 1.45; }
.demo__feedback { min-height: 1.45em; font-weight: 700; font-size: 15px; line-height: 1.45; }
.demo__feedback:empty { min-height: 0; margin-top: -16px; }   /* no blank gap before the first answer */
.demo__feedback.is-ok { color: var(--ok-ink); }
.demo__feedback.is-err { color: var(--flame-ink); }
.demo__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; }

/* SlopeClash: square plot (~320px) with the controls beside it */
.demo__stage { display: grid; grid-template-columns: minmax(0, 290px) minmax(0, 1fr); gap: 20px; align-items: start; }

/* SlopeClash plotter: laser on an ink board */
.plot { border: var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--ink); color: var(--cream); }
.plot__svg { width: 100%; aspect-ratio: 1; }
.plot__grid line { stroke: rgba(63, 226, 242, .16); stroke-width: 1; vector-effect: non-scaling-stroke; }
.plot__grid .axis { stroke: rgba(247, 246, 240, .6); stroke-width: 1.6; }
/* two players: player 1 cyan, player 2 magenta (dashed, so colour is never the only cue) */
.demo--sc { --pc: var(--sc); }
.demo--sc.is-p2 { --pc: var(--sc-2); }
.plot__line { stroke: var(--sc); stroke-width: 3; vector-effect: non-scaling-stroke; }
.plot__line--p1 { stroke: var(--sc); filter: drop-shadow(0 0 3px rgba(63, 226, 242, .8)); }
.plot__line--p2 { stroke: var(--sc-2); stroke-dasharray: 10 4; filter: drop-shadow(0 0 3px rgba(255, 79, 168, .8)); }
.plot__line--preview { stroke: var(--pc); stroke-width: 2; stroke-dasharray: 3 5; opacity: .9; }
.demo--sc.is-over .plot__line--preview, .demo--sc.is-over .plot__tri, .demo--sc.is-over .plot__anchor { display: none; }
.plot__tri { fill: none; stroke: var(--pc); stroke-width: 1.4; stroke-dasharray: 2 3; vector-effect: non-scaling-stroke; opacity: .8; }
.plot__anchor { fill: var(--t-t); stroke: var(--white); stroke-width: 1; vector-effect: non-scaling-stroke; }
.plot__node circle { fill: var(--ink); stroke: var(--cream); stroke-width: 2; vector-effect: non-scaling-stroke; }
.plot__node.is-p1 circle { fill: var(--sc); stroke: var(--white); }
.plot__node.is-p2 circle { fill: var(--sc-2); stroke: var(--white); }
.plot__node text, .plot__base text { fill: var(--ink); font-weight: 800; font-family: var(--f-body); }
.plot__base text { fill: var(--cream); }
.plot__base rect { stroke: var(--white); stroke-width: 2; vector-effect: non-scaling-stroke; }
.plot__base--p1 rect { fill: var(--sc); }
.plot__base--p2 rect { fill: var(--sc-2); }
.plot__clash { fill: none; stroke: var(--white); stroke-width: 2; vector-effect: non-scaling-stroke; }
@keyframes pulse { from { transform: scale(.4); opacity: 1; } to { transform: scale(1.6); opacity: 0; } }
.plot__readout { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; padding: 8px 12px; border-top: 1px solid rgba(247, 246, 240, .25); font-size: 13px; line-height: 1.3; }
.plot__eq { font-weight: 800; color: var(--pc); font-variant-numeric: tabular-nums; }
.plot__turn { font-weight: 700; }
.demo--sc { gap: 12px; }
.demo--sc .demo__controls { gap: 12px; }
.demo--sc .demo__actions { margin-top: 0; }
.sc-players { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 36px; gap: 5px; }
.sc-player {
  display: flex; align-items: center; justify-content: space-between; gap: 4px; min-width: 0; min-height: 40px;
  padding: 4px 7px; border: var(--line); border-radius: var(--r-sm); background: var(--white);
  font-weight: 700; font-size: 12px; line-height: 1.1; text-align: left; white-space: nowrap;
}
.sc-player output { font-weight: 800; font-size: 16px; font-variant-numeric: tabular-nums; }
.sc-player--1[aria-pressed="true"] { background: var(--sc); }
.sc-player--2[aria-pressed="true"] { background: var(--sc-2); }
.sc-reset { display: grid; place-items: center; height: 40px; border: var(--line); border-radius: var(--r-sm); background: var(--white); }
.sc-reset:hover, .sc-player:hover { background-color: var(--cream-2); }
.sc-player[aria-pressed="true"]:hover { filter: brightness(.95); }
.demo--sc .chip[aria-pressed="true"] { background: var(--pc); }
/* full-width result strip under the board: fixed height, so the card never grows during play */
.sc-feedback { min-height: calc(3 * 1.4em); font-size: 14px; line-height: 1.4; }
.sc-feedback.is-hint { color: var(--ink-2); font-weight: 600; }
.demo__feedback.sc-feedback:empty { margin-top: 0; }
.demo--sc .btn[disabled] { opacity: .45; cursor: not-allowed; }
/* TenseMystery: tighter rhythm during play; the colour legend only before the first roll */
.demo--tm.is-playing { gap: 8px; }
.demo--tm.is-playing .tile-legend { display: none; }

.demo__controls { display: flex; flex-direction: column; gap: 16px; min-width: 0; align-self: stretch; }
.demo__controls .demo__feedback:empty { margin-top: -16px; }
.slope-picker { border: 0; min-width: 0; }
.slope-picker legend, .range__label { display: block; margin-bottom: 8px; font-size: 15px; font-weight: 700; line-height: 1.3; }
.slope-picker__chips { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 5px; }
.chip {
  min-width: 0; height: 38px; padding: 0; border-radius: var(--r-sm);
  border: var(--line); background: var(--white);
  font-weight: 800; font-size: 15px; letter-spacing: -.02em; font-variant-numeric: tabular-nums;
  transition: background-color .15s, color .15s;
}
.chip:hover { background: var(--cream-2); }
.chip[aria-pressed="true"] { background: var(--sc); }
.range__label { display: flex; justify-content: space-between; gap: 8px; }
.range output { font-weight: 800; font-variant-numeric: tabular-nums; }
input[type="range"] { width: 100%; accent-color: var(--ink); height: 28px; }

/* TenseMystery sentence builder: the kraft rack grows so both demo cards share one height */
.rack {
  flex: 1 1 auto; min-height: 88px; max-height: 210px; padding: 12px 14px; border-radius: var(--r-md);
  display: flex; flex-wrap: wrap; align-content: center; gap: 8px;
  background: var(--kraft); border: var(--line);
  box-shadow: inset 0 -10px 0 rgba(0, 0, 0, .1);
}
.rack__empty { width: 100%; color: var(--ink-2); font-size: 15px; font-weight: 600; text-align: center; }
.tile-pool { flex: 1 1 auto; display: flex; flex-wrap: wrap; align-content: center; gap: 8px; min-height: 96px; }
.tile {
  min-height: 44px; padding: 8px 14px; border-radius: var(--r-sm);
  border: var(--line); box-shadow: var(--shadow-soft);
  background: var(--tile); color: var(--ink); font-weight: 700; font-size: 1rem;
  transition: transform .15s var(--spring), box-shadow .15s;
}
.tile:hover { transform: translateY(-2px) rotate(-1deg); box-shadow: var(--shadow-lift); }
.tile.t-s, .tile.t-aux, .tile.t-t { color: var(--white); }
.tile-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 14px; color: var(--ink-2); }
.tile-legend li { display: inline-flex; align-items: center; gap: 6px; }
.tile-legend i { width: 14px; height: 14px; border-radius: 4px; background: var(--tile); border: 1.5px solid var(--ink); }
.t-s { --tile: var(--t-s); } .t-aux { --tile: var(--t-aux); } .t-v { --tile: var(--t-v); }
.t-o { --tile: var(--t-o); } .t-p { --tile: var(--t-p); } .t-t { --tile: var(--t-t); }

/* TenseMystery case: three d20-picked cards (WHAT / WHERE / WHEN), scene, case file, prompt */
.demo--tm { gap: 10px; }
.demo--tm.is-playing { padding-top: 22px; padding-bottom: 22px; }
.case-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.case-card {
  --die: var(--die-bronze);
  display: flex; flex-direction: column; gap: 2px; min-width: 0; min-height: 84px;
  padding: 8px 10px 10px; border: var(--line); border-radius: var(--r-md);
  background: var(--cream-2); box-shadow: inset 0 5px 0 var(--die);
  transition: background-color .2s;
}
.case-card--where { --die: var(--die-silver); }
.case-card--when { --die: var(--die-gold); }
.case-card.is-revealed { background: var(--cream); }
.case-card__deck {
  display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 3px;
  font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2);
}
.case-card__die {
  min-width: 30px; padding: 1px 6px; border: 1.5px solid var(--ink); border-radius: var(--r-sm);
  background: var(--die); color: var(--ink); text-align: center; font-variant-numeric: tabular-nums; letter-spacing: 0;
}
.case-card__title { font-size: 14px; line-height: 1.25; }
.case-card__text { font-size: 13px; line-height: 1.35; color: var(--ink-2); }
.case-card.is-rolling .case-card__die { animation: die-shake .16s linear infinite; }
@keyframes die-shake { 0%, 100% { transform: rotate(-8deg); } 50% { transform: rotate(8deg); } }
.no-gsap .case-card.is-rolling .case-card__die { animation: none; }
.tm-scene { font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.tm-story { padding-left: 1.4em; list-style: decimal; font-size: 15px; line-height: 1.4; font-style: italic; }
.tm-prompt { font-size: 15px; font-weight: 700; line-height: 1.4; }
.demo--tm .rack { flex: 0 0 auto; min-height: 58px; max-height: none; padding: 7px 10px; gap: 6px; }
.demo--tm .tile-pool { flex: 1 1 auto; min-height: 0; gap: 6px; align-content: flex-start; }
.demo--tm .tile { min-height: 40px; padding: 6px 11px; font-size: 15px; }
.demo--tm .tile-legend { font-size: 13px; gap: 4px 12px; }
.demo--tm.is-playing .demo__instr { display: none; }   /* the cards + scene explain the case once rolled */
@media (max-width: 600px) {
  /* phones: three narrow cards show deck, die and title; the scene below tells the details */
  .case-cards { gap: 6px; }
  .case-card { min-height: 0; padding: 7px 7px 8px; }
  .case-card__text { display: none; }
  .case-card__title { font-size: 13px; }
  .case-card__deck { font-size: 11px; }
  .case-card__die { min-width: 26px; padding: 0 4px; }
  .demo--tm .tile { min-height: 40px; padding: 5px 9px; font-size: 14px; }
  /* SlopeClash on phones: smaller board, tighter rhythm, so the card stays within one screen */
  .demo--sc { gap: 10px; }
  .demo--sc .demo__stage { gap: 10px; }
  .demo--sc .demo__controls { gap: 10px; }
  .demo--sc .plot { max-width: 240px; }
  .demo--sc .slope-picker legend, .demo--sc .range__label { margin-bottom: 6px; }
  .demo--sc .chip { height: 34px; }
}

/* ---------- Bildungsstandards: game action → competence ----------
   One card per game; every row reads left to right: what you do at the table → what it trains.
   The skill side carries the game colour as a highlighter stroke. */
.lp-col {
  display: flex; flex-direction: column;
  padding: 24px 30px 22px; border: var(--line); border-radius: var(--r-xl);
  background: var(--white); box-shadow: var(--shadow-soft);
  border-top: 10px solid var(--accent);
}
/* "KMK-Bildungsstandards" is one long word: scale it down on narrow phones so it never overflows */
#lehrplan-title { font-size: min(var(--fs-h2), 8.4vw); }
.lp-col__name { font-size: var(--fs-h3); }
.lp-rows { margin-top: 14px; display: grid; }
.lp-row {
  display: grid; grid-template-columns: minmax(0, .85fr) 34px minmax(0, 1.15fr); gap: 12px; align-items: center;
  padding: 11px 0; border-top: 1.5px dashed var(--ink-3);
}
.lp-row:first-child { border-top: 0; }
.lp-row__action { color: var(--ink-2); font-size: 15px; line-height: 1.4; }
.lp-row__arrow {
  width: 34px; height: 34px; padding: 7px; border: var(--line); border-radius: 50%;
  background: var(--accent); color: var(--ink); stroke-width: 2.5;
}
.lp-row__skill { /* the competence: bold, on a tint of the game colour */
  padding: 7px 12px; border-radius: var(--r-sm);
  background: color-mix(in srgb, var(--accent) 30%, var(--white));
  box-shadow: inset 4px 0 0 var(--accent);
  font-weight: 800; font-size: 15px; line-height: 1.35;
}
.lp-source { margin-top: auto; padding-top: 12px; border-top: var(--line); color: var(--ink-3); font-size: 13px; line-height: 1.4; }

/* ---------- Für Eltern & Schule (cherry) ---------- */
.par-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; align-items: stretch; }
.par-block {
  display: flex; flex-direction: column;
  padding: 26px 26px 28px; border: var(--line); border-radius: var(--r-lg);
  background: var(--cream); color: var(--ink); box-shadow: var(--shadow-lift);
  transform: rotate(var(--r, -1deg));
}
.par-block:nth-child(2) { --r: .8deg; }
.par-block:nth-child(3) { --r: -.6deg; }
.par-block h3 { font-size: 30px; }
.par-block__text { margin-top: 10px; color: var(--ink-2); font-size: 16px; line-height: 1.5; }

/* 1: two stat tiles in the game colours */
.stats { margin-top: auto; padding-top: 20px; display: grid; gap: 12px; }
.stat {
  display: flex; flex-direction: column; gap: 6px;
  padding: 14px 16px 12px; border: var(--line); border-radius: var(--r-md);
  background: var(--tm); transform: rotate(-1deg);
}
.stat[data-game="sc"] { background: var(--sc); transform: rotate(1deg); }
.stat__num { font-family: var(--f-display); font-size: 48px; line-height: .9; text-transform: uppercase; white-space: nowrap; }
.stat__label { font-size: 14px; font-weight: 700; line-height: 1.3; }

/* 2: three levels per game (a real sequence, so numbered) */
.levels { margin-top: auto; padding-top: 18px; display: grid; gap: 14px; }
.levels__game { --accent: var(--tm); }
.levels__game[data-game="sc"] { --accent: var(--sc); }
.levels__name {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--f-display); font-weight: 400; font-size: 18px; line-height: 1; text-transform: uppercase;
}
.levels__name::before { content: ''; flex: none; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--ink); }
.levels__list { margin-top: 8px; display: grid; gap: 6px; counter-reset: lv; }
.levels__list li {
  counter-increment: lv;
  display: grid; grid-template-columns: 24px 1fr; gap: 10px; align-items: baseline;
  font-size: 15px; line-height: 1.35;
}
.levels__list li::before {
  content: counter(lv);
  display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  border: 1.5px solid var(--ink); background: var(--white);
  font-family: var(--f-display); font-size: 13px; line-height: 1;
  transform: translateY(5px);
}

/* 3: Mentor-Zug as an ink note with a sticker heading */
.mentor {
  margin-top: auto; position: relative;
  padding: 30px 20px 20px; border-radius: var(--r-md);
  background: var(--ink); color: var(--cream);
}
.par-block--team .par-block__text { margin-bottom: 30px; }
.mentor__title { position: absolute; top: 0; left: 16px; transform: translateY(-55%); }
.mentor__title .sticker { font-family: var(--f-display); font-size: 22px; text-transform: uppercase; }
.mentor__text { font-size: 16px; line-height: 1.5; }

/* Slim strip: where and how the games are played */
.par-strip { margin-top: 36px; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 36px; }
.par-strip li { display: flex; align-items: center; gap: 10px; color: var(--on-cherry); font-weight: 700; font-size: 16px; }
.par-strip__icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--cream); color: var(--cherry); }
.par-strip__icon .icon { width: 20px; height: 20px; }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 12px; }
.faq details { border: var(--line); border-radius: var(--r-lg); background: var(--white); box-shadow: var(--shadow-soft); }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  min-height: 60px; padding: 12px 18px 12px 24px; font-weight: 700; font-size: 1.0625rem; line-height: 1.35;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+'; flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: var(--ink); color: var(--lime); font-family: var(--f-display); font-size: 24px; line-height: 1;
  transition: transform .25s var(--spring);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 24px 20px; color: var(--ink-2); font-size: 16px; max-width: 66ch; }

/* ---------- Final CTA ---------- */
.section--cta { background: var(--cream-2); }
.cta__inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) minmax(0, 1fr); gap: 40px; align-items: center; }
.cta__body h2 { font-size: calc(var(--fs-h2) * .9); }
.cta__body { text-align: center; display: flex; flex-direction: column; align-items: center; }
.cta__text { margin-top: 18px; max-width: 42ch; color: var(--ink-2); }
.cta__body .btn--buy { margin-top: 28px; }
.cta__note { margin-top: 16px; color: var(--ink-3); font-size: var(--fs-small); }
.cta__box--tm { --accent: var(--tm); --tilt: -5deg; }
.cta__box--sc { --accent: var(--sc); --tilt: 4deg; }

/* ---------- Footer ---------- */
.site-footer { position: relative; z-index: 2; padding: 88px var(--pad-x) 0; background: var(--ink); color: var(--cream); }
.site-footer::before {
  content: ''; position: absolute; left: 0; right: 0; bottom: calc(100% - 1px); height: var(--scallop);
  background: var(--ink);
  -webkit-mask: radial-gradient(circle at 50% 100%, #000 calc(var(--scallop) - .5px), transparent var(--scallop)) 50% 0 / calc(var(--scallop) * 2) 100% repeat-x;
          mask: radial-gradient(circle at 50% 100%, #000 calc(var(--scallop) - .5px), transparent var(--scallop)) 50% 0 / calc(var(--scallop) * 2) 100% repeat-x;
}
.site-footer :focus-visible { outline-color: var(--lime); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; }
.brand--light .brand__mark { background: var(--lime); color: var(--ink); }
.footer-brand p { margin-top: 16px; color: rgba(247, 246, 240, .72); max-width: 42ch; font-size: 1rem; }
.footer-title { font-size: 22px; margin-bottom: 14px; }
.footer-links { display: grid; gap: 8px; font-size: 1rem; }
.footer-links a, .footer-links .link-btn { color: rgba(247, 246, 240, .78); text-decoration: none; }
.footer-links a:hover, .footer-links .link-btn:hover { color: var(--lime); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 56px; padding-block: 24px; border-top: 1px solid rgba(247, 246, 240, .2); color: rgba(247, 246, 240, .65); font-size: .875rem; }

/* ---------- Cart drawer ---------- */
.cart-backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(22, 22, 22, .5); opacity: 0; pointer-events: none; transition: opacity .3s; }
.cart-backdrop.is-active { opacity: 1; pointer-events: auto; }
.cart-drawer {
  position: fixed; z-index: 61; top: 0; right: 0; bottom: 0;
  width: min(460px, 100%);
  display: flex; flex-direction: column;
  background: var(--cream); border-left: var(--line);
  box-shadow: -20px 0 40px -20px rgba(0, 0, 0, .3);
  transform: translateX(105%); transition: transform .4s var(--ease);
}
.cart-drawer.is-active { transform: translateX(0); }
.cart-drawer__head { display: flex; justify-content: space-between; align-items: center; padding: 20px 24px; border-bottom: var(--line); }
.cart-drawer__head h2 { font-size: 32px; }
.cart-drawer__body { flex: 1; overflow-y: auto; padding: 20px 24px; display: grid; align-content: start; gap: 14px; }
.cart-drawer__foot { padding: 20px 24px 24px; border-top: var(--line); display: grid; gap: 14px; background: var(--white); }
.cart-total { display: flex; justify-content: space-between; align-items: baseline; font-weight: 600; font-size: 1rem; }
.cart-total strong { font-family: var(--f-display); font-weight: 400; font-size: 32px; }
.cart-hint { display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--ink-2); font-size: .875rem; font-weight: 600; text-align: center; }

.cart-item { display: grid; grid-template-columns: 84px 1fr; gap: 14px; padding: 12px; border-radius: var(--r-lg); background: var(--white); border: var(--line); }
.cart-item .media { aspect-ratio: 1; border-radius: var(--r-sm); }
.cart-item .media::before { font-size: .7rem; }
.cart-item__title { font-family: var(--f-display); font-size: 22px; line-height: 1; text-transform: uppercase; }
.cart-item__price { margin-top: 4px; color: var(--ink-2); font-size: .9375rem; font-weight: 600; }
.cart-item__controls { margin-top: 10px; display: flex; align-items: center; gap: 6px; }
.qty-btn { display: grid; place-items: center; width: 36px; height: 36px; border-radius: var(--r-sm); border: var(--line); background: var(--cream); }
.qty-btn:hover { background: var(--lime); }
.qty-val { min-width: 28px; text-align: center; font-weight: 800; font-variant-numeric: tabular-nums; }
.remove-btn { margin-left: auto; min-height: 36px; font-size: .875rem; color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; }
.remove-btn:hover { color: var(--flame-ink); }
.cart-empty { text-align: center; padding: 48px 12px; display: grid; justify-items: center; gap: 16px; color: var(--ink-2); }
.cart-empty__tiles { display: flex; gap: 6px; }
.cart-empty__tiles span { width: 26px; height: 18px; border-radius: 4px; border: 1.5px solid var(--ink); background: var(--tile); }
.cart-empty .btn--outline { background: var(--white); }

/* "Passt dazu" suggestion (D renders .suggest into #cart-suggest) */
.cart-suggest { padding: 0 24px 18px; }
.cart-suggest:empty { display: none; }
.suggest__title { margin-bottom: 4px; color: var(--ink-2); font-size: .8125rem; font-weight: 700; line-height: 1.2; }
.suggest {
  display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 12px; align-items: center;
  padding: 10px 12px 10px 10px; border: 2px dashed var(--ink); border-radius: var(--r-lg); background: var(--cream-2);
}
.suggest__img { width: 64px; height: 64px; border-radius: var(--r-sm); overflow: hidden; background: var(--night); }
.suggest__img img { width: 100%; height: 100%; object-fit: cover; }
img.suggest__img { object-fit: cover; }
.suggest__name { font-family: var(--f-display); font-size: 20px; line-height: 1; text-transform: uppercase; }
.suggest__price { margin-top: 4px; font-size: .9375rem; font-weight: 600; color: var(--ink-2); }
.suggest__add {
  min-height: 44px; padding: 0 14px; border-radius: var(--r-sm);
  border: var(--line); background: var(--lime);
  font-weight: 800; font-size: .9375rem; white-space: nowrap;
  transition: background-color .15s, transform .15s;
}
.suggest__add:hover { background: var(--lime-hover); }
.suggest__add:active { transform: translateY(2px); background: var(--lime-press); }

/* ---------- Dialogs ---------- */
dialog.modal {
  width: min(580px, calc(100% - 24px)); max-height: calc(100dvh - 24px);
  margin: auto; padding: 0; border: 0; background: transparent; color: var(--ink);
  overflow: visible;
}
dialog.modal::backdrop { background: rgba(22, 22, 22, .55); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.modal__card {
  position: relative;
  max-height: calc(100dvh - 24px); overflow-y: auto;
  padding: 36px;
  background: var(--cream); border: var(--line); border-radius: var(--r-xl);
  box-shadow: var(--shadow-lift);
}
dialog[open] .modal__card { animation: pop .35s var(--spring); }
@keyframes pop { from { transform: translateY(16px) scale(.97); opacity: 0; } }
.modal__close { position: absolute; top: 16px; right: 16px; }
.modal__progress { display: flex; align-items: center; gap: 12px; color: var(--ink-2); font-size: .875rem; font-weight: 600; margin-bottom: 18px; padding-right: 52px; }
.modal__title { font-size: 36px; padding-right: 40px; }
.modal__text { margin-top: 14px; color: var(--ink-2); font-size: 1.0625rem; }
.modal__step { display: grid; gap: 4px; }
.modal__step[hidden] { display: none; }
.modal__actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 24px; }
.modal__success { text-align: center; justify-items: center; gap: 14px; }
.modal__success .modal__title { padding-right: 0; }
.success-badge {
  display: grid; place-items: center; width: 88px; height: 88px;
  background: var(--lime); color: var(--ink);
  -webkit-mask: url('../assets/svg/starburst.svg') center / 100% 100% no-repeat;
          mask: url('../assets/svg/starburst.svg') center / 100% 100% no-repeat;
  transform: rotate(-8deg);
}
.success-badge .icon { width: 34px; height: 34px; stroke-width: 3; }
.success-summary { width: 100%; padding: 16px 18px; border-radius: var(--r-md); border: 1px solid var(--ink); background: var(--white); text-align: left; font-size: .9375rem; color: var(--ink-2); }
.success-summary strong { color: var(--ink); }

.field { margin-top: 24px; border: 0; }
.field__label { display: block; margin-bottom: 12px; font-weight: 800; font-size: 1.0625rem; line-height: 1.35; }
.field__hint { margin-top: 8px; color: var(--ink-3); font-size: .875rem; }
.field__hint--check { margin-top: 6px; padding-left: 38px; }
.field__error { margin-top: 8px; color: var(--flame-ink); font-size: .9375rem; font-weight: 700; }
.field__error::before { content: ''; display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--flame); vertical-align: .1em; }
.input {
  width: 100%; min-height: 52px; padding: 12px 14px;
  border-radius: var(--r-md); border: var(--line); background: var(--white);
  font-size: 1rem; transition: box-shadow .15s;
}
.input::placeholder { color: var(--ink-3); }
.input:focus { outline: none; box-shadow: 0 0 0 4px var(--lime); }
textarea.input { resize: vertical; min-height: 80px; }
.input[aria-invalid="true"] { border-color: var(--flame); box-shadow: 0 0 0 3px rgba(248, 51, 11, .25); }
.input-icon { position: relative; }
.input-icon .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--ink-3); }
.input-icon .input { padding-left: 44px; }

.wtp-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.wtp-option { position: relative; }
.wtp-option input { position: absolute; opacity: 0; pointer-events: none; }
.wtp-option span {
  display: flex; align-items: center; justify-content: center; text-align: center;
  min-height: 54px; padding: 10px; border-radius: var(--r-md);
  border: var(--line); background: var(--white);
  font-weight: 800; font-size: 1.0625rem; font-variant-numeric: tabular-nums;
  cursor: pointer; transition: background-color .15s, color .15s, transform .15s;
}
.wtp-option span:hover { background: var(--cream-2); }
.wtp-option input:focus-visible + span { outline: 3px solid var(--ink); outline-offset: 3px; }
.wtp-option input:checked + span { background: var(--ink); color: var(--lime); transform: rotate(-1.5deg); }
.wtp-option--wide { grid-column: 1 / -1; }
.wtp-option--wide span { font-weight: 600; }

.check { margin-top: 20px; display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; cursor: pointer; }
.check input { position: absolute; opacity: 0; pointer-events: none; }
.check__box { display: grid; place-items: center; width: 26px; height: 26px; margin-top: 1px; border-radius: 7px; border: var(--line); background: var(--white); color: transparent; transition: background-color .15s; }
.check__box .icon { width: 16px; height: 16px; stroke-width: 3; }
.check input:checked + .check__box { background: var(--ink); color: var(--lime); }
.check input:focus-visible + .check__box { outline: 3px solid var(--ink); outline-offset: 3px; }
.check__text { color: var(--ink-2); font-size: .875rem; line-height: 1.5; }
.check__text button { color: var(--ink); font-weight: 700; text-decoration: underline; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

dialog.modal--legal { width: min(720px, calc(100% - 24px)); }
.legal h2 { font-size: 36px; margin-bottom: 18px; padding-right: 48px; }
.legal-page h1 { font-size: 36px; margin-bottom: 18px; }
/* Static legal pages (impressum.html, datenschutz.html, integritetspolicy.html), generated by tools/build-legal.mjs */
.legal-page { max-width: 720px; margin-inline: auto; padding: 40px 16px 64px; }
.legal-page__nav { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: var(--fs-small); }
.legal-page__nav a { text-decoration: underline; text-underline-offset: 3px; }
.legal-page__nav--top { margin-bottom: 32px; }
.legal-page__nav--bottom { margin-top: 48px; padding-top: 20px; border-top: var(--line); }
.legal + .legal { margin-top: 48px; padding-top: 32px; border-top: var(--line); }
.legal h3 { margin-top: 24px; font-family: var(--f-body); font-weight: 800; font-size: 1.0625rem; text-transform: none; line-height: 1.3; }
.legal p, .legal li { margin-top: 10px; color: var(--ink-2); font-size: .9375rem; }
.legal ul { list-style: disc; padding-left: 20px; }
.legal strong { color: var(--ink); }
.legal a { text-decoration: underline; text-underline-offset: 2px; }

/* Shown once after the double opt-in click (/?confirmed=1) */
.confirmed-note {
  position: fixed; z-index: 70; left: 50%; bottom: 24px; transform: translateX(-50%);
  width: min(560px, calc(100% - 32px));
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 12px 12px 20px;
  background: var(--ink); color: var(--cream); border-radius: var(--r-lg); box-shadow: var(--shadow-lift);
  font-size: 1rem;
}
.confirmed-note strong { color: var(--lime); }
.confirmed-note[hidden] { display: none; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1199px) {
  :root {
    --fs-hero: 64px; --fs-h2: 52px; --fs-h3: 32px; --fs-body: 18px;
    --pad-y: 72px; --pad-x: 32px;
  }
  .main-nav a { padding: 0 10px; font-size: .9375rem; }
  .site-header .brand__name { display: none; }
  .duo { gap: 40px; }
  .par-grid { gap: 20px; }
  .par-block { padding: 22px 20px 24px; }
  .par-block h3 { font-size: 26px; }
  .stat { padding: 12px 14px 10px; }
  .stat__num { font-size: 38px; }
  .lp-col { padding: 22px 22px 20px; }
  .lp-row { grid-template-columns: minmax(0, .85fr) 30px minmax(0, 1.15fr); gap: 10px; }
  .lp-row__arrow { width: 30px; height: 30px; padding: 6px; }
  .hero-box__name { font-size: 28px; }
  .how { padding: 26px 26px 30px; }
  .product { column-gap: 22px; }
  .demo { padding: 24px; }
  .demo__stage { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .plot { width: 100%; max-width: 300px; margin-inline: auto; }
  .slope-picker__chips { grid-template-columns: repeat(11, minmax(0, 1fr)); gap: 4px; }
  .demo__controls .demo__actions { margin-top: 0; }
}

/* Six nav links need ~1100px; below that the nav collapses into the burger menu */
@media (max-width: 1279px) {
  .site-header .brand__name { display: none; }
}
@media (max-width: 1099px) {
  .main-nav {
    position: absolute; top: calc(100% + 10px); left: 0; right: 0; margin: 0;
    flex-direction: column; gap: 2px; padding: 8px;
    background: var(--cream); border: var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-lift);
    opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .2s, transform .2s, visibility .2s;
  }
  .main-nav a { min-height: 48px; padding: 0 16px; font-size: 1.0625rem; }
  .site-header.nav-open .main-nav { opacity: 1; visibility: visible; transform: none; }
  .header-actions { margin-left: auto; }
  .menu-btn { display: inline-grid; }
}

@media (max-width: 899px) {
  :root { --header-h: 72px; }

  /* Hero: boxes stay side by side, compact */
  .hero-boxes { max-height: 420px; }
  .hero-boxes { gap: 14px; margin-top: 24px; }
  .hero-box { padding: 6px; border-radius: var(--r-lg); }
  .hero-box__stage { min-height: 96px; border-radius: var(--r-md); }
  .hero-box__tag { top: 6px; left: 6px; padding: 3px 8px; font-size: .75rem; }
  .hero-box__info { flex-direction: column; align-items: stretch; padding: 10px 4px 2px; gap: 10px; }
  .hero-box__name { font-size: 22px; }
  .hero-box__line { font-size: 14px; }
  .hero-box__buy { flex-direction: column; align-items: stretch; gap: 8px; }
  .hero-box__buy .price-row { justify-content: space-between; }
  .hero-box__buy .price { font-size: 24px; }
  .hero-box__buy .btn--buy { width: 100%; }

  /* Duo: one column; with JS the switch shows one game at a time */
  .duo { grid-template-columns: minmax(0, 1fr); gap: 56px; }
  html[data-game] .game-switch {
    display: flex; gap: 4px; max-width: 420px; margin: -16px auto 28px; padding: 4px;
    border: var(--line); border-radius: var(--r-md); background: var(--white);
  }
  html[data-game="tm"] .duo__col[data-game="sc"],
  html[data-game="sc"] .duo__col[data-game="tm"] { display: none; }

  /* Product: single column, gallery first, "Das lernt ihr" collapsed */
  .product { grid-template-columns: minmax(0, 1fr); grid-template-areas: "gallery" "intro" "fold" "buy"; max-width: 640px; margin-inline: auto; width: 100%; }
  .product__gallery { margin: 0 4px 22px; }
  .product__gallery .media { aspect-ratio: 16 / 10; }
  .product__fold { margin-top: 16px; border: var(--line); border-radius: var(--r-md); background: var(--white); }
  .fold > summary {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    min-height: 52px; padding: 10px 12px 10px 16px; cursor: pointer;
  }
  .fold > summary::after {
    content: '+'; flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
    background: var(--ink); color: var(--lime); font-family: var(--f-display); font-size: 22px; line-height: 1;
    transition: transform .25s var(--spring);
  }
  .fold[open] > summary::after { transform: rotate(45deg); }
  .fold .learn-list { margin: 0; padding: 0 16px 16px; }
  .product__learn { font-size: 20px; }
  .buybox { margin-top: 18px; padding-top: 16px; }

  /* Demos: plot on top, controls below; slope chips in one row */
  .demo { max-width: 640px; margin-inline: auto; }
  .demo__stage { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .plot { width: 100%; max-width: 340px; margin-inline: auto; }
  .slope-picker__chips { grid-template-columns: repeat(11, minmax(0, 1fr)); gap: 4px; }
  .chip { height: 38px; padding: 0; font-size: 15px; }
  .demo__controls .demo__actions { margin-top: 0; }
  .how { max-width: 640px; margin-inline: auto; }

  .lp-col { max-width: 640px; margin-inline: auto; width: 100%; }
  .par-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; max-width: 640px; margin-inline: auto; }
  .stats { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .stat__num { font-size: 40px; }
  .cta__inner { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 24px; }
  .cta__body { grid-column: 1 / -1; grid-row: 2; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 809px) {
  :root {
    --fs-hero: 48px; --fs-h2: 40px; --fs-h3: 26px; --fs-body: 16px; --fs-small: 14px;
    --pad-y: 56px; --pad-x: 20px; --header-h: 64px; --scallop: 14px;
  }
  .site-header { padding-block: 10px; }
  .brand__mark { width: 42px; height: 42px; font-size: 17px; }
  .header-actions { gap: 6px; }
  .lang-toggle__btn { min-width: 36px; }
  .section-head { margin-bottom: 28px; }
  .section-head__sub { margin-top: 10px; font-size: 16px; }
  .hero { padding-bottom: 16px; }
  .hero-boxes { max-height: 340px; }
  .hero__kicker { font-size: 13px; padding: 5px 12px 5px 8px; }
  .hero__title { margin-top: 14px; }
  .hero__sub { margin-top: 12px; font-size: 15px; }
  .hero__hint { margin-top: 14px; font-size: 13px; }
  .sticker { padding: 3px 8px 5px; border-width: 4px; border-radius: var(--r-md); }
  .price--lg { font-size: 36px; }
  .ticker { padding: 32px 0 40px; }
  .ticker__card { font-size: 22px; padding: 14px 18px 12px; }
  .ticker__track { gap: 16px; }
  .product__gallery { margin-bottom: 18px; }
  .product__desc { font-size: 15px; }
  .buybox { gap: 6px 16px; }
  .buybox .price--lg { font-size: 34px; }
  .buybox .price--lg + .prelaunch-sticker { width: 58px; font-size: 10px; }
  .buybox .btn--buy { width: 100%; }
  .how { padding: 22px 18px 24px; border-radius: var(--r-lg); }
  .steps { margin-top: 18px; gap: 18px; }
  .step { grid-template-columns: 44px 1fr; gap: 14px; }
  .step__num { width: 44px; height: 44px; font-size: 23px; }
  .step h4 { font-size: 20px; }
  .step p { font-size: 15px; }
  .demo { padding: 20px 16px; gap: 14px; border-radius: var(--r-lg); }
  .demo h3 { font-size: 24px; }
  .plot { max-width: 270px; }
  .slope-picker__chips { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 5px; }
  .chip { height: 36px; }
  .demo__controls { gap: 14px; }
  .demo__controls .demo__feedback:empty { margin-top: -14px; }
  .tile-pool { min-height: 0; }
  .rack { flex: none; min-height: 84px; }
  .par-grid { gap: 24px; }
  .par-block { padding: 20px 18px 22px; }
  .par-block h3 { font-size: 26px; }
  .stats { grid-template-columns: minmax(0, 1fr); }
  .stat__num { font-size: 40px; }
  .par-strip { flex-direction: column; align-items: flex-start; gap: 10px; max-width: 640px; margin: 28px auto 0; }
  .lp-col { padding: 20px 18px 18px; border-radius: var(--r-lg); }
  /* Row stacks: action on top, arrow + skill below */
  .lp-row { grid-template-columns: 26px minmax(0, 1fr); grid-template-areas: "action action" "arrow skill"; gap: 6px 10px; padding: 12px 0; }
  .lp-row__action { grid-area: action; font-size: 15px; }
  .lp-row__arrow { grid-area: arrow; width: 26px; height: 26px; padding: 5px; }
  .lp-row__skill { grid-area: skill; font-size: 15px; }
  .faq summary { font-size: 1rem; padding: 14px 16px 14px 18px; }
  .faq details p { padding: 0 18px 18px; font-size: 1rem; }
  .modal__card { padding: 26px 20px; border-radius: var(--r-lg); }
  .modal__title { font-size: 28px; }
  .modal__actions { flex-direction: column-reverse; }
  .modal__actions .btn { width: 100%; }
  .legal h2 { font-size: 28px; }
  .cart-drawer__head h2 { font-size: 26px; }
}

/* Short laptop screens: the pinned hero must fit one screen */
@media (min-width: 900px) and (max-height: 820px) {
  :root { --fs-hero: 56px; }
  .hero__title { margin-top: 12px; }
  .hero__sub { margin-top: 10px; font-size: 16px; }
  .hero-boxes { margin-top: 20px; }
  .hero-box__stage { min-height: 110px; }
  .hero__hint { margin-top: 10px; }
}

/* Short phones: the pinned hero must still fit one screen */
@media (max-width: 809px) and (max-height: 720px) {
  .hero__sub { display: none; }
  .hero__hint { display: none; }
}

@media (max-width: 420px) {
  :root { --fs-hero: 40px; }
  .site-header { padding-inline: 14px; }
  .header-buy { display: none; }
  .hero { padding-inline: 14px; }
  .hero-box__line { display: none; }
  .hero-box__info { padding-top: 8px; }
  .hero-box__name { font-size: 19px; }
  .hero-box__buy .price { font-size: 21px; }
  .hero-box__buy .prelaunch-sticker { width: 48px; padding: 6px; font-size: 8.5px; margin-block: -6px -2px; }
  .hero-box__buy .btn--buy .btn__pad { min-height: 44px; padding: 0 10px; font-size: 17px; }
  .wtp-grid { grid-template-columns: 1fr 1fr; }
  .cta__inner { gap: 20px 14px; }
  .footer-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Motion fallbacks: no GSAP or reduced motion → everything visible, ticker static
   ========================================================================== */
.no-gsap .ticker__track { animation: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .js .ticker__track { animation: none; }
}
html:not(.js) .ticker__card, .no-gsap .ticker__card { white-space: normal; max-width: 100%; text-align: center; }
html:not(.js) .ticker__track,
.no-gsap .ticker__track { flex-wrap: wrap; justify-content: center; width: auto; row-gap: 26px; padding-inline: var(--pad-x); }
.no-gsap .ticker__card[aria-hidden="true"] { display: none; }
@media (prefers-reduced-motion: reduce) {
  .ticker__track { flex-wrap: wrap; justify-content: center; width: auto; row-gap: 26px; padding-inline: var(--pad-x); }
  .ticker__card { white-space: normal; max-width: 100%; text-align: center; }
  .ticker__card[aria-hidden="true"] { display: none; }
}
/* Static ticker (no JS / reduced motion): softer rotation + more row gap so wrapped cards never overlap */
html:not(.js) .ticker__track, .no-gsap .ticker__track { row-gap: 40px; }
html:not(.js) .ticker__card:nth-child(odd), .no-gsap .ticker__card:nth-child(odd) { --r: -2deg; }
html:not(.js) .ticker__card:nth-child(even), .no-gsap .ticker__card:nth-child(even) { --r: 2deg; }
@media (prefers-reduced-motion: reduce) {
  .ticker__track { row-gap: 40px; }
  .ticker .ticker__card:nth-child(odd) { --r: -2deg; }
  .ticker .ticker__card:nth-child(even) { --r: 2deg; }
}
