/* ZwergalPost – Website. Colours only through the variables in tokens.css. */

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

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  background: var(--app-bg);
  color: var(--app-ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}
/* Wide decorative shapes never make the page scroll sideways (clip, not hidden, so sticky parts keep working) */
main { overflow-x: clip; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3 { font-family: var(--font-display); color: var(--app-head); margin: 0; text-wrap: balance; }
p { margin: 0; }
a { color: var(--app-accent); text-underline-offset: 3px; }
a:hover { color: var(--app-head); }
:focus-visible { outline: 3px solid var(--app-accent); outline-offset: 3px; border-radius: var(--radius-sm); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 16px; top: -80px; z-index: 100;
  background: var(--app-head); color: var(--app-on-accent);
  padding: 12px 16px; border-radius: var(--radius-md);
}
.skip:focus { top: 12px; color: var(--app-on-accent); }

:root { --gutter: clamp(16px, 3.4vw, 48px); --bar-h: 68px; }

/* ---------- Page colour that shifts from section to section ---------- */
.backdrop { position: fixed; inset: 0; z-index: -2; pointer-events: none; }
.bd { position: absolute; inset: 0; transition: opacity 900ms var(--ease); }
.bd-base { background: var(--app-bg); }
.bd-sky { background: color-mix(in srgb, var(--app-sky) 60%, var(--app-bg)); opacity: 0; }
.bd-warm { background: var(--app-warm); opacity: 0; }
.bd.is-on { opacity: 1; }
main > section { position: relative; isolation: isolate; }

/* Soft parallax shapes behind a section */
.float-layer { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.blob { position: absolute; border-radius: 50%; filter: blur(56px); opacity: .55; }
.blob-a { width: 420px; height: 420px; background: var(--deco-1); left: -140px; top: 120px; }
.blob-b { width: 360px; height: 360px; background: var(--deco-2); right: -120px; top: 55%; opacity: .4; }
.blob-c { width: 460px; height: 460px; background: var(--deco-2); left: 6%; top: 28%; opacity: .5; }
.blob-d { width: 420px; height: 420px; background: var(--deco-1); right: 4%; top: 18%; opacity: .55; }
.blob-e { width: 380px; height: 380px; background: var(--deco-3); left: 42%; bottom: -60px; opacity: .45; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 22px;
  border-radius: var(--radius-md);
  font-family: var(--font-display); font-weight: 700; font-size: 16px;
  text-decoration: none; white-space: nowrap;
  transition: background-color var(--dur-base) var(--ease), color var(--dur-base) var(--ease), transform var(--dur-fast) var(--ease);
}
.btn:active { transform: scale(.97); }
.btn-lg { min-height: 56px; padding: 0 28px; font-size: 17px; }
.btn-primary { background: var(--app-accent); color: var(--app-on-accent); }
.btn-primary:hover { background: var(--app-head); color: var(--app-on-accent); }
.btn-secondary { background: var(--app-accent-soft); color: var(--app-head); }
.btn-secondary:hover { background: var(--app-sunken); color: var(--app-head); }

/* ---------- Bar ---------- */
.bar {
  position: sticky; top: 0; z-index: 50;
  height: var(--bar-h);
  display: flex; align-items: center; gap: 32px;
  padding: 0 var(--gutter);
  background: color-mix(in srgb, var(--app-bg) 84%, transparent);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
}
.mark { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--app-head); margin-right: auto; }
.mark img { width: 58px; height: auto; }
.mark span { font-family: var(--font-display); font-weight: 800; font-size: 21px; letter-spacing: -0.01em; }
.bar nav { display: flex; gap: 28px; }
.bar nav a { color: var(--app-ink); text-decoration: none; font-weight: 500; font-size: 16px; padding: 10px 0; }
.bar nav a:hover { color: var(--app-accent); text-decoration: underline; }
.btn-bar { min-height: 44px; }
@media (max-width: 860px) { .bar nav { display: none; } }
@media (max-width: 420px) {
  .mark span { font-size: 18px; }
  .mark img { width: 46px; }
  .btn-bar { padding: 0 14px; font-size: 15px; }
}

/* ---------- Hero ---------- */
.hero-pin {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 6fr);
  gap: clamp(24px, 3vw, 48px);
  align-items: center;
  padding: 0 var(--gutter) 24px;
  min-height: calc(100svh - var(--bar-h));
}
.hero-text { padding: 24px 0 40px; }
.hero-lead {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(22px, 2.15vw, 34px); line-height: 1.3; letter-spacing: -0.01em;
  color: var(--app-ink-2); max-width: 24ch;
}
.strike {
  --strike: 1;
  background-image: linear-gradient(var(--app-accent), var(--app-accent));
  background-repeat: no-repeat;
  background-position: 0 60%;
  background-size: calc(var(--strike) * 100%) .11em;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
  transition: color var(--dur-slow) var(--ease);
}
.hero h1 {
  margin-top: 18px;
  font-size: clamp(48px, 6.1vw, 112px); line-height: .98; letter-spacing: -0.04em; font-weight: 800;
  isolation: isolate;
}
.h1-a, .h1-b { display: inline-block; }
.h1-b { position: relative; }
.h1-word { display: inline-block; }
.marker {
  position: absolute; left: -.06em; right: -.04em; bottom: .02em; height: .34em;
  background: var(--deco-3); border-radius: .08em; z-index: -1;
  transform: scaleX(var(--mark, 1)); transform-origin: 0 50%;
}
.hero-sub { margin-top: 28px; font-size: clamp(18px, 1.3vw, 21px); max-width: 38ch; color: var(--app-ink); }
.hero-action { margin-top: 36px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; }
.link-more { font-weight: 600; color: var(--app-head); padding: 12px 0; }
.link-more::after { content: " ↓"; }

.stage {
  position: relative;
  height: calc(100svh - var(--bar-h) - 24px);
  min-height: 560px; max-height: 920px;
  background: var(--app-accent-soft);
  border-radius: 28px;
  overflow: hidden;
  container-type: size;
}

.hero-phone { position: absolute; left: 50%; top: 50%; translate: -50% -50%; z-index: 3; contain: layout style; }
.hero-phone .zp-phone { zoom: var(--phone-zoom, .62); }
@media (max-width: 860px) { .hero-phone .zp-phone { zoom: var(--phone-zoom, .56); } }

.stage-zwerg {
  position: absolute; z-index: 4;
  width: clamp(130px, 26cqw, 240px); height: auto;
  left: clamp(4px, calc(50% - 300px), 50%); bottom: 3%;
}
.sparks { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; }

/* The office pieces – shown only while the scroll scene runs */
.pieces { display: none; }
.scene-on .pieces { display: block; position: absolute; inset: 0; z-index: 1; font-size: clamp(11px, 1.55cqw, 15px); line-height: 1.35; }
.piece {
  position: absolute;
  background: var(--app-surface);
  border-radius: 12px;
  padding: .9em 1em 1em;
  box-shadow: var(--shadow-card);
  color: var(--app-ink);
}
.stage.is-moving .piece { will-change: transform, opacity; }
.piece p { margin: 0; }
.pc-app { font-weight: 700; font-size: .82em; color: var(--app-head); margin-bottom: .35em; }
.pc-title { font-family: var(--font-display); font-weight: 700; color: var(--app-head); margin-bottom: .45em; }
.pc-small { font-weight: 600; }
.pc-tiny { font-size: .86em; color: var(--app-ink-2); margin-top: .35em; }
.pc-file { color: var(--app-sky-ink); }
.xls { display: grid; grid-template-columns: 1.7fr 1fr 1fr 1fr; gap: 1px; background: var(--app-line); font-size: .86em; }
.xls span { background: var(--app-surface); padding: .15em .4em; white-space: nowrap; }
.xls-2 { grid-template-columns: 1.6fr 1fr; }
.pc-mail ul { list-style: none; margin: 0; padding: 0; font-size: .9em; }
.pc-mail li { padding: .3em 0; }
.pc-mail li + li { border-top: 1px solid var(--app-line); }
.pc-mail b { display: block; color: var(--app-head); }
.bub { background: var(--app-sunken); border-radius: .8em; padding: .35em .75em; margin-top: .4em !important; width: fit-content; max-width: 92%; font-size: .92em; }
.bub-r { background: color-mix(in srgb, var(--deco-4) 55%, var(--app-surface)); margin-left: auto; }
.tabs { display: flex; flex-wrap: wrap; gap: 2px; font-size: .74em; margin: -.3em -.4em .7em; }
.tabs span { background: var(--app-sunken); padding: .3em .6em; border-radius: .5em .5em 0 0; white-space: nowrap; }
.field { border: 1px solid var(--app-ctrl); border-radius: .45em; padding: .3em .55em; margin-top: .4em !important; color: var(--app-ink-2); font-size: .9em; }
.pc-sms { background: var(--app-head); color: var(--app-on-accent); }
.pc-sms .pc-app { color: var(--deco-1); }
.pc-sms .bub { background: var(--app-surface); color: var(--app-ink); }
.pc-folder { background: none; box-shadow: none; padding: 0; }
.folder-tab { width: 42%; height: 1.3em; background: var(--deco-3); border-radius: .6em .6em 0 0; }
.folder-body { background: var(--deco-3); border-radius: 0 .6em .6em .6em; padding: 1.5em 1em; font-family: var(--font-display); font-weight: 700; color: var(--app-head); box-shadow: var(--shadow-card); }
.pc-qr { text-align: center; }
.qr { background: var(--app-surface); }
.qr svg { width: 100%; height: auto; }
.qr-dark { fill: var(--app-ink); }
.pc-tally svg { width: 100%; height: auto; }
.pc-tally path { stroke: var(--app-ink); stroke-width: 2.4; stroke-linecap: round; fill: none; }
.pc-consent { background: none; box-shadow: none; padding: 0; }
.pc-consent .paper { position: absolute; inset: 0; background: var(--app-surface); border-radius: .6em; box-shadow: var(--shadow-card); }
.pc-consent .paper:nth-child(1) { rotate: 5deg; }
.pc-consent .paper:nth-child(2) { rotate: -4deg; }
.pc-consent .top { position: relative; padding: 1em; display: flex; flex-direction: column; gap: .3em; font-size: .92em; }
.pc-consent .top b { color: var(--app-head); hyphens: manual; }
.pc-note { background: var(--deco-3); font-family: var(--font-display); font-weight: 700; color: var(--app-head); border-radius: .3em; padding: 1em; }
.pc-note-2 { background: var(--deco-2); }

/* Chaos layout: a loose 3 × 5 pile on a wide stage */
.pc-sheet   { left: 2%;  top: 2%;  width: clamp(190px, 31cqw, 290px); }
.pc-letter  { left: 35%; top: 3%;  width: clamp(170px, 28cqw, 260px); }
.pc-mail    { left: 67%; top: 2%;  width: clamp(180px, 30cqw, 280px); }
.pc-folder  { left: 4%;  top: 23%; width: clamp(150px, 23cqw, 220px); }
.pc-qr      { left: 39%; top: 23%; width: clamp(104px, 15cqw, 150px); }
.pc-note    { left: 57%; top: 25%; width: clamp(110px, 15cqw, 150px); }
.pc-note-2  { left: 79%; top: 26%; width: clamp(110px, 16cqw, 160px); }
.pc-login-2 { left: 2%;  top: 42%; width: clamp(160px, 25cqw, 230px); }
.pc-browser { left: 34%; top: 41%; width: clamp(200px, 32cqw, 300px); }
.pc-chat    { left: 68%; top: 42%; width: clamp(180px, 29cqw, 270px); }
.pc-essen   { left: 3%;  top: 62%; width: clamp(160px, 26cqw, 240px); }
.pc-consent { left: 37%; top: 63%; width: clamp(160px, 24cqw, 230px); }
.pc-sms     { left: 68%; top: 61%; width: clamp(170px, 27cqw, 250px); }
.pc-tally   { left: 6%;  top: 82%; width: clamp(140px, 21cqw, 200px); }
.pc-login   { left: 40%; top: 82%; width: clamp(150px, 23cqw, 220px); }

/* A narrow stage (phone) gets fewer, larger pieces in two columns */
@container (max-width: 560px) {
  .scene-on .pieces { font-size: 11.5px; }
  .pc-narrow-hide { display: none; }
  .pc-sheet   { left: 2%;  top: 2%;  width: 49cqw; }
  .pc-letter  { left: 52%; top: 3%;  width: 46cqw; }
  .pc-mail    { left: 2%;  top: 22%; width: 48cqw; }
  .pc-folder  { left: 54%; top: 23%; width: 42cqw; }
  .pc-qr      { left: 5%;  top: 43%; width: 30cqw; }
  .pc-chat    { left: 40%; top: 42%; width: 58cqw; }
  .pc-browser { left: 2%;  top: 62%; width: 52cqw; }
  .pc-essen   { left: 56%; top: 62%; width: 42cqw; }
  .pc-sms     { left: 4%;  top: 82%; width: 50cqw; }
  .pc-note    { left: 58%; top: 83%; width: 38cqw; }
}

@media (min-width: 861px) {
  .scene-on .hero-pin { position: sticky; top: var(--bar-h); }
}
@media (max-width: 860px) {
  .hero-pin { display: block; min-height: 0; padding-bottom: 0; }
  .hero-text { padding: 12px 0 36px; }
  .hero h1 { font-size: clamp(44px, 12.4vw, 76px); }
  .hero-action .btn { width: 100%; }
  .stage { height: min(700px, calc(100svh - var(--bar-h) - 24px)); min-height: 500px; border-radius: 22px; }
  .scene-on .stage { position: sticky; top: calc(var(--bar-h) + 8px); }
}

/* ---------- Ein Montag ---------- */
.day { padding: clamp(72px, 8vw, 128px) var(--gutter) clamp(24px, 3vw, 48px); }
.day-intro { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: 48px; align-items: end; }
.day-intro h2 { font-size: clamp(30px, 3.9vw, 60px); line-height: 1.04; letter-spacing: -0.03em; }
.day-intro p { font-size: 18px; max-width: 42ch; }
@media (max-width: 860px) { .day-intro { grid-template-columns: 1fr; gap: 20px; } }

.day-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
  gap: clamp(32px, 5vw, 96px); margin-top: 56px; align-items: start;
}
.moments { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 40px; }
.moment {
  background: var(--app-surface); border-radius: 22px; box-shadow: var(--shadow-card);
  padding: 32px 32px 0;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px 32px; align-items: end;
  overflow: hidden;
  transition: box-shadow var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease);
}
.moment.is-now { box-shadow: 0 0 0 3px var(--app-sky-2), var(--shadow-card); }
.m-head { text-align: center; align-self: center; padding-bottom: 32px; }
.m-time { font-family: var(--font-display); font-weight: 800; font-size: clamp(38px, 3.6vw, 56px); line-height: 1; color: var(--app-accent); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.m-head h3 { margin-top: 14px; font-size: 22px; line-height: 1.25; }
.m-head p:last-child { margin-top: 10px; }
.m-media { display: flex; justify-content: center; }
.m-media .zp-content { padding-bottom: 4px; }

.moment-end { background: var(--app-sky); color: var(--app-sky-ink); padding-bottom: 0; }
.moment-end .m-time { color: var(--app-accent); }
.moment-end h3 { color: var(--app-sky-ink); }
.moment-end .m-punkt { font-family: var(--font-display); font-weight: 800; font-size: 34px; color: var(--app-head); letter-spacing: -0.02em; }
.end-scene { position: relative; height: 240px; overflow: hidden; align-self: stretch; }
.end-hill { position: absolute; left: -10%; right: -10%; bottom: -120px; height: 200px; border-radius: 50%; background: color-mix(in srgb, var(--deco-4) 70%, var(--app-sky)); }
.end-door { position: absolute; left: 8%; bottom: 40px; width: 70px; height: 100px; border-radius: 35px 35px 4px 4px; background: var(--app-accent); }
.end-door::after { content: ""; position: absolute; right: 12px; top: 52px; width: 9px; height: 9px; border-radius: 50%; background: var(--deco-3); }
.end-zwerg { position: absolute; width: min(190px, 52%); height: auto; bottom: 36px; right: 3%; }

/* The sky behind the clock: morning, noon, late afternoon */
.clock-col { position: sticky; top: calc(var(--bar-h) + 24px); }
.sky-panel {
  position: relative; overflow: hidden; isolation: isolate;
  border-radius: 28px; padding: 150px 32px 40px;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  min-height: 540px; justify-content: flex-end;
}
.sky { position: absolute; inset: 0; z-index: -2; }
.sky-morning { background: color-mix(in srgb, var(--deco-3) 38%, var(--app-warm)); opacity: var(--m, 0); }
.sky-noon { background: color-mix(in srgb, var(--deco-3) 78%, var(--app-surface)); z-index: -3; }
.sky-late { background: color-mix(in srgb, color-mix(in srgb, var(--deco-3) 70%, var(--app-danger)) 72%, var(--app-warm)); opacity: var(--l, 1); }
.sun {
  position: absolute; z-index: -1; left: 0; top: 0; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%;
  background: var(--deco-3);
  box-shadow: 0 0 0 14px color-mix(in srgb, var(--deco-3) 30%, transparent);
  transform: translate(var(--sx, 300px), var(--sy, 120px));
}
.sun::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: color-mix(in srgb, var(--deco-3) 55%, var(--app-danger)); opacity: var(--l, 1); }
.sun { background: color-mix(in srgb, var(--deco-3) 84%, var(--app-danger)); }
.cloud { position: absolute; z-index: -1; height: 26px; border-radius: 13px; background: var(--app-surface); opacity: .85; }
.cloud::before { content: ""; position: absolute; left: 22%; bottom: 10px; width: 46%; height: 30px; border-radius: 50%; background: inherit; }
.cloud-a { width: 110px; top: 70px; left: 8%; transform: translateX(var(--c1, 0px)); }
.cloud-b { width: 80px; top: 150px; right: 6%; transform: translateX(var(--c2, 0px)); }
.clock-wrap { display: flex; flex-direction: column; align-items: center; }
.clock { width: min(250px, 100%); height: auto; }
.clock-face { fill: var(--app-surface); }
.clock-ticks path { stroke: var(--app-sky-2); stroke-width: 5; stroke-linecap: round; }
.hand path { stroke-linecap: round; }
.hand-h path { stroke: var(--app-head); stroke-width: 9; }
.hand-m path { stroke: var(--app-accent); stroke-width: 6; }
.hand { transform-origin: 100px 100px; transform-box: view-box; }
.clock-pin { fill: var(--app-head); }
.clock-time { margin-top: 20px; font-family: var(--font-display); font-weight: 800; font-size: 60px; line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; color: var(--app-sky-ink); }
.clock-day { margin-top: 8px; color: var(--app-sky-ink); font-weight: 600; }

@media (max-width: 1100px) {
  .moment { grid-template-columns: minmax(0, 1fr); padding: 32px 20px 0; gap: 8px; }
  .m-media { min-width: 0; }
  .m-head { padding-bottom: 16px; }
  .end-scene { height: 210px; }
}
@media (max-width: 960px) {
  .day-grid { display: flex; flex-direction: column; gap: 20px; margin-top: 32px; }
  .clock-col { order: -1; top: var(--bar-h); z-index: 5; align-self: stretch; padding: 4px 0 8px; }
  .sky-panel { flex-direction: row; justify-content: center; padding: 10px 16px; border-radius: 18px; min-height: 0; box-shadow: var(--shadow-card); }
  .clock-wrap { flex-direction: row; gap: 14px; }
  .clock { width: 50px; }
  .clock-time { margin: 0; font-size: 30px; }
  .clock-day { margin: 0; }
  .sun, .cloud { display: none; }
  .moments { gap: 28px; }
}

/* ---------- Fragen: glass cards ---------- */
.questions { padding: clamp(56px, 6vw, 96px) var(--gutter) clamp(160px, 14vw, 220px); }
.q-intro { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 48px; align-items: end; }
.q-intro h2 { font-size: clamp(30px, 4.2vw, 64px); line-height: 1.04; letter-spacing: -0.03em; max-width: 16ch; }
.q-intro p { font-size: 18px; max-width: 42ch; }
.q-wall {
  list-style: none; margin: 56px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px;
}
.q {
  --rot: 0deg; --rx: 0deg; --ry: 0deg;
  transform: perspective(900px) rotate(var(--rot)) rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform 260ms var(--ease);
}
.q:nth-child(odd) { --rot: -1deg; }
.q:nth-child(3n) { --rot: 1.2deg; }
.q-1, .q-6 { --tint: var(--deco-3); }
.q-2, .q-7 { --tint: var(--deco-2); }
.q-3, .q-8 { --tint: var(--deco-1); }
.q-4, .q-5 { --tint: var(--deco-4); }
.q-card {
  all: unset; box-sizing: border-box; cursor: pointer;
  display: grid; width: 100%; min-height: 268px;
  border-radius: 22px;
}
.q-card:focus-visible { outline: 3px solid var(--app-accent); outline-offset: 4px; }
.q-front, .q-back {
  grid-area: 1 / 1;
  border-radius: 22px;
  padding: 26px 20px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  text-align: center;
  border: 1px solid color-mix(in srgb, var(--app-surface) 85%, transparent);
  backdrop-filter: blur(18px) saturate(1.35);
  -webkit-backdrop-filter: blur(18px) saturate(1.35);
  box-shadow: inset 0 1px 0 var(--app-surface), 0 12px 32px color-mix(in srgb, var(--app-head) 10%, transparent);
}
.q-front { background: color-mix(in srgb, var(--app-surface) 58%, transparent); }
.q-back { background: color-mix(in srgb, var(--tint) 34%, color-mix(in srgb, var(--app-surface) 62%, transparent)); }
.q-ico { width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; background: var(--tint); }
.q-ico svg { width: 30px; height: 30px; fill: none; stroke: var(--app-head); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.q-ico-sm { width: 40px; height: 40px; background: var(--app-surface); }
.q-ico-sm svg { width: 22px; height: 22px; }
.q-text { font-family: var(--font-display); font-weight: 700; font-size: 21px; line-height: 1.25; color: var(--app-head); letter-spacing: -0.01em; }
.q-answer { font-size: 17px; line-height: 1.45; color: var(--app-ink); font-weight: 500; }
.q-snip { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }

/* Without the flip script: both sides, one under the other */
html:not(.flip-on) .q-card { cursor: default; }
html:not(.flip-on) .q-front { border-radius: 22px 22px 0 0; }
html:not(.flip-on) .q-back { grid-area: 2 / 1; border-radius: 0 0 22px 22px; }

/* A real turn: the front swings away to its edge, then the back swings in */
.flip-on .q-front { transform: perspective(900px) rotateY(0deg); transition: transform 260ms cubic-bezier(.2,.7,.3,1) 240ms; }
.flip-on .q-back { transform: perspective(900px) rotateY(90deg); transition: transform 240ms cubic-bezier(.6,0,.9,.4) 0ms; }
.flip-on .q-card[aria-pressed="true"] .q-front { transform: perspective(900px) rotateY(-90deg); transition: transform 240ms cubic-bezier(.6,0,.9,.4) 0ms; }
.flip-on .q-card[aria-pressed="true"] .q-back { transform: perspective(900px) rotateY(0deg); transition: transform 260ms cubic-bezier(.2,.7,.3,1) 240ms; }
.flip-still .q-front, .flip-still .q-back { transition: none !important; }

@media (max-width: 1100px) { .q-wall { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .q-intro { grid-template-columns: 1fr; gap: 20px; }
  .q-wall { margin-top: 36px; gap: 16px; }
  .q-card { min-height: 230px; }
  .q-text { font-size: 18px; }
  .q-answer { font-size: 16px; }
  .q-front, .q-back { padding: 20px 12px; }
  .q-ico { width: 50px; height: 50px; }
}
@media (max-width: 380px) { .q-wall { grid-template-columns: 1fr; } }

/* ---------- Pilot: the card overlaps the edge of the section above ---------- */
.pilot { padding: 0 var(--gutter) clamp(72px, 8vw, 120px); margin-top: calc(clamp(160px, 14vw, 220px) * -1 + 40px); }
.pilot::before { content: ""; position: absolute; inset: 160px 0 0; background: var(--app-accent); z-index: -1; }
.pilot-card {
  position: relative;
  max-width: 760px; margin: 0 auto;
  background: var(--app-surface); border-radius: 28px;
  padding: clamp(40px, 5vw, 64px) clamp(20px, 5vw, 64px);
  text-align: center; display: flex; flex-direction: column; align-items: center;
  box-shadow: var(--shadow-card);
}
.peek { position: absolute; left: 50%; bottom: 100%; width: 200px; height: 104px; margin-left: -100px; overflow: hidden; }
.pilot-zwerg { width: 200px; height: auto; }
.pilot h2 { font-size: clamp(36px, 5vw, 72px); line-height: 1; letter-spacing: -0.03em; }
.pilot-card > p { margin-top: 20px; font-size: 18px; max-width: 44ch; }
.pilot-actions { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.pilot-card > .pilot-direct { margin-top: 20px; font-size: 16px; }
.pilot-card > .trust { margin-top: 28px; font-size: 14px; color: var(--app-ink-2); max-width: 52ch; }
@media (max-width: 560px) {
  .pilot-actions { flex-direction: column; align-self: stretch; }
  .pilot-actions .btn { width: 100%; }
  .peek { width: 160px; height: 84px; margin-left: -80px; }
  .pilot-zwerg { width: 160px; }
}

/* ---------- Demo und Preis (FAQ) ---------- */
.faq {
  padding: clamp(72px, 8vw, 112px) var(--gutter);
  display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 48px; align-items: start;
}
.faq h2 { font-size: clamp(28px, 3vw, 44px); line-height: 1.1; letter-spacing: -0.02em; max-width: 14ch; }
.faq-text { columns: 2; column-gap: 56px; }
.faq-text p { break-inside: avoid; margin-bottom: 24px; max-width: 40ch; }
.faq-text strong { display: block; margin-bottom: 6px; font-weight: 600; color: var(--app-head); }
@media (max-width: 860px) {
  .faq { grid-template-columns: 1fr; gap: 24px; }
  .faq-text { columns: 1; }
}

/* ---------- Footer ---------- */
.foot {
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 24px; align-items: center;
  padding: 36px var(--gutter); font-size: 15px; color: var(--app-ink-2);
  background: var(--app-sunken);
}
.foot-links { display: flex; gap: 24px; }
.foot-links a { color: var(--app-ink); padding: 10px 0; }
@media (max-width: 767px) {
  .foot { grid-template-columns: 1fr; gap: 8px; text-align: center; }
  .foot-links { justify-content: center; }
}

/* ---------- Text pages (Impressum, Datenschutz, 404) ---------- */
.page { padding: clamp(48px, 8vw, 120px) var(--gutter) clamp(72px, 9vw, 140px); display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 48px; }
.page h1 { font-size: clamp(36px, 5vw, 72px); line-height: 1; letter-spacing: -0.03em; }
.page-side p { margin-top: 20px; color: var(--app-ink-2); font-size: 16px; }
.page-side img { width: min(240px, 60%); height: auto; margin-top: 32px; }
.prose { max-width: 68ch; }
.prose h2 { font-size: 22px; line-height: 1.3; margin: 40px 0 10px; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose ul { margin: 0 0 12px; }
@media (max-width: 860px) { .page { grid-template-columns: 1fr; gap: 24px; } .page-side img { display: none; } }

.lost { padding: clamp(48px, 10vw, 140px) var(--gutter); display: flex; flex-direction: column; align-items: center; text-align: center; min-height: calc(100svh - var(--bar-h) - 120px); justify-content: center; }
.lost img { width: min(360px, 80%); height: auto; }
.lost h1 { margin-top: 32px; font-size: clamp(32px, 4.4vw, 60px); line-height: 1.05; letter-spacing: -0.03em; max-width: 18ch; }
.lost p { margin-top: 16px; font-size: 18px; max-width: 44ch; }
.lost .btn { margin-top: 32px; }

/* =====================================================================
   Motion – only with html.motion (set by boot.js when motion is allowed).
   Without it every scene shows its final, still state.
   ===================================================================== */
.motion [data-rise] { opacity: 0; transform: translateY(24px); transition: opacity 560ms var(--ease), transform 560ms var(--ease); }
.motion [data-rise].is-in { opacity: 1; transform: none; }
.motion .blob { will-change: transform; }

/* Hero: headline lands, the chaos line gets struck through while the pieces fly in */
.motion .hero-lead, .motion .h1-a, .motion .h1-b, .motion .hero-sub, .motion .hero-action { animation: rise-in 760ms var(--ease) both; }
.motion .h1-a { animation-delay: 120ms; }
.motion .h1-b { animation-delay: 220ms; }
.motion .hero-sub { animation-delay: 340ms; }
.motion .hero-action { animation-delay: 440ms; }
.motion .strike { --strike: 0; }
.motion .hero:not(.is-struck) .hero-lead { color: var(--app-ink); }
.motion .marker { --mark: 0; transition: transform 620ms cubic-bezier(.2,.9,.25,1.15); }
.motion .hero.is-landed .marker { --mark: 1; }
.motion .hero.is-landed .h1-word { animation: land 620ms cubic-bezier(.2,.9,.25,1.2); }
@keyframes rise-in { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
@keyframes land { 0% { transform: translateY(0) scale(1); } 35% { transform: translateY(-6px) scale(1.035); } 100% { transform: none; } }

/* Monday: each card performs its app step once it is reached */
.motion .moment:not(.is-done) .swap .was { visibility: visible; }
.motion .moment:not(.is-done) .swap .now { visibility: hidden; }
.motion .moment.is-done .swap .now { animation: pill-in 420ms cubic-bezier(.2,.9,.3,1.3) 260ms both; }
.motion .moment.is-done .tap { animation: tap 420ms var(--ease) 40ms; }
@keyframes pill-in { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }
@keyframes tap { 0%, 100% { transform: none; } 40% { transform: scale(.94); } }
.motion .moment { transform: translateY(18px); opacity: 0; transition: transform 520ms var(--ease), opacity 520ms var(--ease), box-shadow var(--dur-slow) var(--ease); }
.motion .moment.is-seen { transform: none; opacity: 1; }

/* 16:45: the gnome hops out of the door and off to the right */
.motion .end-zwerg { transform-origin: 50% 100%; }

/* Pilot: the gnome peeks over the card when it arrives */
.motion .pilot-zwerg { transition: transform 900ms cubic-bezier(.2,.9,.25,1.2); }
.motion .pilot:not(.is-peek) .pilot-zwerg { transform: translateY(100%); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; }
}

/* 16:45: the hill runs under the whole card */
.moment-end { position: relative; isolation: isolate; }
.moment-end::before { content: ""; position: absolute; left: -10%; right: -10%; bottom: -130px; height: 200px; border-radius: 50%; background: color-mix(in srgb, var(--deco-4) 70%, var(--app-sky)); z-index: -1; }
.end-hill { display: none; }
@media (max-width: 1100px) { .moment-end::before { bottom: -150px; } }

/* Performance: the browser skips layout and paint of cards and sections that are far off-screen */
.moment { content-visibility: auto; contain-intrinsic-block-size: auto 440px; }
.questions, .faq { content-visibility: auto; contain-intrinsic-block-size: auto 1100px; }

/* Hero, round 3: every card is whole and in place right after loading; the flight into the phone is the show */
.motion .scene-on .piece { animation: card-in 640ms cubic-bezier(.2,.9,.3,1.15) backwards; animation-delay: calc(var(--i, 0) * 45ms + 150ms); }
@keyframes card-in { from { opacity: 0; transform: translateY(-18px) scale(.92); } }
.motion .stage.is-revealed .hero-phone .zp-phone { animation: phone-pop 700ms cubic-bezier(.2,.9,.25,1.3); }
@keyframes phone-pop { 0% { transform: scale(.94); } 45% { transform: scale(1.045); } 100% { transform: none; } }
.hero-phone::before {
  content: ""; position: absolute; inset: -6%; border-radius: 40%; z-index: -1;
  background: var(--deco-3); filter: blur(42px); opacity: 0; transform: scale(.7);
  transition: opacity 600ms var(--ease), transform 900ms var(--ease);
}
.stage.is-revealed .hero-phone::before, html:not(.motion) .hero-phone::before { opacity: .55; transform: none; }
@media (min-width: 861px) { .scene-on .hero { height: 300vh; } }
@media (max-width: 860px) { .scene-on .hero-scene { height: 260svh; } }

/* Stagger for the cards' entrance */
.piece:nth-child(1) { --i: 0; }
.piece:nth-child(2) { --i: 1; }
.piece:nth-child(3) { --i: 2; }
.piece:nth-child(4) { --i: 3; }
.piece:nth-child(5) { --i: 4; }
.piece:nth-child(6) { --i: 5; }
.piece:nth-child(7) { --i: 6; }
.piece:nth-child(8) { --i: 7; }
.piece:nth-child(9) { --i: 8; }
.piece:nth-child(10) { --i: 9; }
.piece:nth-child(11) { --i: 10; }
.piece:nth-child(12) { --i: 11; }
.piece:nth-child(13) { --i: 12; }
.piece:nth-child(14) { --i: 13; }
.piece:nth-child(15) { --i: 14; }
