/* ==========================================================================
   Popsugars – Plakatwand
   Fix: Wand, Layout, Typo, Buttons. Variabel pro Party: --accent-* (via JS).
   ========================================================================== */

/* Handschrift wie auf dem Artwork: Gloria Hallelujah (SIL OFL 1.1), lokal gehostet */
@font-face {
  font-family: "Popsugars Hand";
  src: url("../fonts/gloria-hallelujah.ttf") format("truetype");
  font-display: swap;
  ascent-override: 92%;
  descent-override: 28%;
  line-gap-override: 0%;
}

:root {
  /* Wand & Tinte (fix) */
  --wall: #c9c6c0;  /* Sichtbeton */
  --wall-shade: #b3afa8;
  --paper: #fbfaf6;
  --ink: #151413;
  --ink-2: #57534c;
  --danger: #b3261e;

  /* Akzent (wird pro Party aus data/popsugars.json gesetzt) */
  --accent: #e2461b;        /* Rohfarbe: Glow, Speedlines, Sparkles */
  --accent-btn: #e2461b;    /* Button-Fläche, Kontrast >= 4.5:1 zum Label */
  --on-accent: #ffffff;     /* Label auf Button */
  --accent-shadow: #8f2c10; /* 3D-Kante des Buttons */
  --accent-ink: #c43a14;    /* Countdown-Ziffern, >= 3:1 zur Wand */
  --accent-glow: rgb(226 70 27 / .42);

  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-hand: "Popsugars Hand", "Comic Sans MS", cursive;

  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --ease-pop: cubic-bezier(.34, 1.56, .64, 1);
  --gutter: 16px;


  /* Licht & Tageszeit (per JS: html[data-time="day|dawn|dusk|night"]) */
  --wall-ink: #151413;
  --wall-ink-2: #45413b;
  --sx: 9px;   /* Schattenrichtung: folgt dem Licht */
  --sy: 15px;
  --ground: linear-gradient(0deg, rgb(92 104 64 / .55), rgb(120 128 96 / .25) 10%, transparent 26%);
  --lamp-x: 50%;
  --lamp-y: 34%;
  --tint: linear-gradient(transparent, transparent);
  --shade: radial-gradient(130% 100% at 50% 42%, transparent 50%, rgb(0 0 0 / .18));
  --light: radial-gradient(75% 60% at 28% 6%, rgb(255 250 238 / .32), transparent 70%);
}

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

html {
  background: var(--wall);
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100svh;
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  /* Große Sichtbetonwand (assets/concrete.jpg, nahtlose Kachel) */
  background:
    var(--light),
    var(--shade),
    var(--tint),
    var(--ground),
    url("../assets/concrete.jpg") calc(50% - 450px) 0 / 900px 900px,
    var(--wall);
  background-blend-mode: screen, multiply, multiply, multiply, normal, normal;
  background-attachment: fixed;
  overflow-x: clip;
}

/* Licht auf der Wand – wechselt mit der Tageszeit (Layer im body-Hintergrund) */
:root[data-time="dawn"] {
  --sx: 24px;
  --sy: 9px;
  --tint: linear-gradient(180deg, rgb(232 222 242 / .6), rgb(255 222 196 / .6));
  --light: radial-gradient(80% 70% at 0% 55%, rgb(255 178 120 / .42), transparent 70%);
  --shade: radial-gradient(130% 100% at 55% 45%, transparent 45%, rgb(60 40 50 / .25));
}

:root[data-time="dusk"] {
  --sx: -24px;
  --sy: 9px;
  --tint: linear-gradient(180deg, rgb(205 185 230 / .7), rgb(255 195 160 / .7));
  --light: radial-gradient(85% 70% at 100% 60%, rgb(255 150 90 / .45), transparent 70%);
  --shade: radial-gradient(130% 100% at 45% 45%, transparent 45%, rgb(60 30 50 / .28));
}

:root[data-time="night"] {
  --sx: 0px;
  --sy: 20px;
  --wall-ink: #f3eee6;
  --wall-ink-2: #cfc7ba;
  --tint: linear-gradient(rgb(92 104 150 / .9), rgb(70 80 125 / .92));
  --shade: radial-gradient(120% 90% at var(--lamp-x) var(--lamp-y), transparent 40%, rgb(10 12 30 / .35));
  /* Laterne von oben auf das Plakat */
  --light: radial-gradient(ellipse 45% 60% at var(--lamp-x) var(--lamp-y), rgb(255 200 135 / .6), rgb(255 175 105 / .22) 55%, transparent 80%);
}

/* Text direkt auf der Wand folgt dem Licht */
.foot, .back {
  --ink: var(--wall-ink);
  --ink-2: var(--wall-ink-2);
  color: var(--ink);
}

:root[data-time="night"] .btn--ghost { background: rgb(255 255 255 / .86); }
:root[data-time="night"] .drift--front .drifter { filter: brightness(.8) drop-shadow(calc(var(--sx) * 3.5) calc(var(--sy) * 3.5) 14px rgb(0 0 0 / .22)); }

img { max-width: 100%; display: block; }
a { color: inherit; }

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

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

/* --------------------------------------------------------------------------
   Grundlayout
   -------------------------------------------------------------------------- */

.site {
  position: relative;
  z-index: 1;
  min-height: 100svh;
  display: grid;
  grid-template-rows: 1fr auto;
  padding:
    max(10px, env(safe-area-inset-top))
    max(var(--gutter), env(safe-area-inset-right))
    max(10px, env(safe-area-inset-bottom))
    max(var(--gutter), env(safe-area-inset-left));
}

/* --------------------------------------------------------------------------
   Bühne: Plakat + Panel
   -------------------------------------------------------------------------- */

.stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding-block: 18px 8px;
}

/* Spalte: LED-Anzeige über dem Plakat */
.poster-col {
  /* Mobile: Countdown, Plakat und Ticket-Button ohne Scrollen */
  --ph: clamp(280px, calc(100svh - 290px), calc((100vw - 80px) * 1.414));
  --pw: calc(var(--ph) / 1.414);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

/* LED-Pixelanzeige, an die Wand geschraubt */
.led {
  --led: #ff7a2e;
  position: relative;
  width: min(var(--pw) + 24px, 100%);
  padding: 10px 14px 7px;
  border-radius: 7px;
  background: linear-gradient(180deg, #1d1d20, #0c0c0e);
  box-shadow:
    inset 0 0 0 1.5px #2e2e33,
    inset 0 1px 0 rgb(255 255 255 / .1),
    inset 0 -8px 16px rgb(0 0 0 / .5),
    0 1px 1px rgb(0 0 0 / .4),
    var(--sx) var(--sy) 20px -6px rgb(0 0 0 / .45);
  z-index: 3;
}

.led__matrix { display: block; width: 100%; height: auto; }
.led__off { fill: #2a2622; }
.led__on {
  fill: var(--led);
  filter: drop-shadow(0 0 1.5px var(--led)) drop-shadow(0 0 5px var(--led));
}

.led__units {
  position: relative;
  height: 13px;
  margin-top: 4px;
  font-family: var(--font);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #8d877d;
}

.led__units span { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; }

.led__bolt {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #f2f3f5, #8b9098 60%, #50545b);
  box-shadow: 0 1px 1px rgb(0 0 0 / .6);
}

.led__bolt:nth-of-type(1) { top: 4px; left: 4px; }
.led__bolt:nth-of-type(2) { top: 4px; right: 4px; }
.led__bolt:nth-of-type(3) { bottom: 4px; left: 4px; }
.led__bolt:nth-of-type(4) { bottom: 4px; right: 4px; }

.board {
  --tilt: -1.6deg;
  position: relative;
  height: var(--ph);
  width: var(--pw);
  flex: none;
}

/* Tempo-/Speedlines hinter dem Plakat (Anime-Eyecatch) */
.burst {
  position: absolute;
  inset: -55% -80%;
  pointer-events: none;
  background: repeating-conic-gradient(from 3deg, transparent 0 5deg, var(--accent-glow) 5deg 6.2deg, transparent 6.2deg 11deg);
  -webkit-mask: radial-gradient(closest-side, transparent 28%, #000 44%, transparent 74%);
  mask: radial-gradient(closest-side, transparent 28%, #000 44%, transparent 74%);
  opacity: 0;
}

/* Ältere, abgerissene Plakate */
.history { position: absolute; inset: 0; pointer-events: none; }

.scrap {
  position: absolute;
  inset: 0;
  transform: translate(var(--x), var(--y)) rotate(var(--r));
  filter: drop-shadow(0 1px 1px rgb(0 0 0 / .18)) drop-shadow(0 6px 10px rgb(0 0 0 / .08));
}

.scrap__clip {
  position: absolute;
  inset: 0;
  background: #f4f1ea;
}

.scrap__clip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.72) contrast(.94) brightness(1.03);
  opacity: .92;
}

/* Das aktuelle Plakat */
.poster {
  position: absolute;
  inset: 0;
  display: block;
  transform: rotate(var(--tilt));
  transform-origin: 50% 0;
  perspective: 1400px;
  z-index: 2;
}

.poster__sheet {
  position: absolute;
  inset: 0;
  transform-origin: 50% 0;
  background: #fff;
  box-shadow:
    0 1px 1px rgb(0 0 0 / .2),
    calc(var(--sx) * .5) calc(var(--sy) * .5) 14px -6px rgb(0 0 0 / .26),
    var(--sx) var(--sy) 34px -10px rgb(0 0 0 / .28);
  overflow: hidden;
}

.poster__sheet img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Änderbarer QR-Code: überdeckt den gedruckten Code auf dem Plakat */
.poster__qr {
  position: absolute;
  left: var(--qx);
  top: var(--qy);
  width: var(--qs);
  aspect-ratio: 1;
  padding: 2.5%;
  padding: calc(var(--qs) * .025);
  background: #fff;
  border-radius: 7%;
  transform: translate(-50%, -50%) rotate(var(--qr));
  box-shadow: 0 0 10px 2px rgb(255 236 214 / .55);
}

.poster__qr svg { display: block; width: 100%; height: 100%; }

/* Papierwellen: sanfte Licht-/Schattenbahnen */
.poster__paper {
  position: absolute;
  inset: 0;
  pointer-events: none;
  mix-blend-mode: soft-light;
  background:
    linear-gradient(97deg,
      rgb(0 0 0 / .22) 0%, transparent 9%,
      rgb(255 255 255 / .35) 19%, transparent 30%,
      rgb(0 0 0 / .16) 44%, transparent 55%,
      rgb(255 255 255 / .28) 69%, transparent 81%,
      rgb(0 0 0 / .2) 100%),
    linear-gradient(180deg, rgb(255 255 255 / .35), transparent 16%, transparent 78%, rgb(0 0 0 / .25));
}

/* Wind hebt die Unterkante – Lichtkante folgt */
.poster__lift {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(0deg, rgb(255 255 255 / .28), transparent 28%);
  mix-blend-mode: screen;
  opacity: 0;
}

/* Folienglanz */
.poster__gloss {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 38%, rgb(255 255 255 / .55) 47%, rgb(255 255 255 / .12) 52%, transparent 60%);
  background-size: 260% 100%;
  background-position: 130% 0;
  mix-blend-mode: screen;
}

/* Tacker (Standard) */
.fastener {
  --r: -8deg;
  position: absolute;
  top: 12px;
  left: 14px;
  width: 20px;
  height: 5px;
  border-radius: 1.5px;
  background: linear-gradient(180deg, #fbfcfd, #c3c8cf 42%, #7a8089 58%, #dde1e6);
  box-shadow: 0 1px 1px rgb(0 0 0 / .4), 0 0 0 .5px rgb(0 0 0 / .25);
  transform: rotate(var(--r));
  z-index: 3;
}

.fastener--r { --r: 7deg; left: auto; right: 14px; }

/* Klebeband-Variante */
.deco-tape .fastener {
  --r: -38deg;
  top: -8px;
  left: -26px;
  width: 92px;
  height: 28px;
  border-radius: 0;
  background: rgb(252 249 236 / .74);
  box-shadow: 0 1px 2px rgb(0 0 0 / .14);
  clip-path: polygon(0 8%, 4% 0, 8% 10%, 12% 0, 88% 0, 92% 10%, 96% 0, 100% 8%, 100% 92%, 96% 100%, 92% 90%, 88% 100%, 12% 100%, 8% 90%, 4% 100%, 0 92%);
}

.deco-tape .fastener--r { --r: 36deg; left: auto; right: -26px; }

/* Sticker auf der Wand */
.stickers { position: absolute; inset: 0; pointer-events: none; z-index: 4; }

.sticker {
  position: absolute;
  width: clamp(54px, 18%, 84px);
  aspect-ratio: 1;
  transform: rotate(var(--r, 10deg));
  filter: drop-shadow(0 2px 1px rgb(0 0 0 / .18)) drop-shadow(0 6px 8px rgb(0 0 0 / .12));
}

.sticker svg { width: 100%; height: 100%; display: block; }
.sticker:nth-child(1) { --r: 12deg; right: -9%; bottom: 7%; }
.sticker:nth-child(2) { --r: -14deg; left: -10%; top: 38%; }

/* --------------------------------------------------------------------------
   Panel: Countdown + Buttons
   -------------------------------------------------------------------------- */

.panel {
  width: min(100%, 420px);
  display: grid;
  gap: 12px;
  position: relative;
  z-index: 5;
}

.actions { display: grid; gap: 10px; }

.actions__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.actions__row--solo { grid-template-columns: 1fr; }

/* Buttons */
.btn {
  --h: 50px;
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: var(--h);
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-family: var(--font-hand);
  font-size: 17px;
  font-weight: 400;
  letter-spacing: .04em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform .16s var(--ease-out), box-shadow .16s var(--ease-out), background-color .2s;
}

.btn:focus-visible { border-radius: 999px; }
.btn svg { width: 20px; height: 20px; flex: none; }

.btn--primary {
  --h: 60px;
  font-size: 22px;
  background: var(--accent-btn);
  color: var(--on-accent);
  box-shadow:
    0 4px 0 var(--accent-shadow),
    0 14px 26px -10px var(--accent-glow);
}

/* Y2K-Glanz auf der Pille */
.btn--primary::before {
  content: "";
  position: absolute;
  inset: 3px 14px auto;
  height: 46%;
  border-radius: 999px;
  background: linear-gradient(rgb(255 255 255 / .55), rgb(255 255 255 / 0));
  z-index: -1;
}

.btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 0 var(--accent-shadow), 0 18px 30px -10px var(--accent-glow);
}

.btn--primary:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--accent-shadow), 0 6px 14px -8px var(--accent-glow);
}

.btn__meta {
  font-size: 14px;
  font-weight: 400;
  letter-spacing: .02em;
  padding-left: 10px;
  border-left: 1px solid currentColor;
  opacity: .82;
  white-space: nowrap;
}

.btn--ghost {
  background: rgb(255 255 255 / .62);
  color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--ink), 0 2px 0 rgb(0 0 0 / .12);
}

.btn--ghost:hover { background: #fff; transform: translateY(-1px); }
.btn--ghost:active { transform: translateY(1px); box-shadow: inset 0 0 0 1.5px var(--ink); }

[hidden] { display: none !important; }

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

.foot {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 18px;
  padding: 12px 0 4px;
  font-family: var(--font-hand);
  font-size: 14px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.foot a { text-decoration: none; padding: 4px 2px; }
.foot a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* --------------------------------------------------------------------------
   Ticketshop-Overlay (Weeztix)
   -------------------------------------------------------------------------- */

.shop {
  width: min(100% - 24px, 560px);
  max-width: none;
  max-height: none;
  height: min(100svh - 24px, 860px);
  margin: auto;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: visible;
}

.shop::backdrop {
  background: rgb(18 16 14 / .72);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.shop[open] .shop__sheet { animation: shop-in .35s var(--ease-pop); }

@keyframes shop-in {
  from { transform: translateY(24px) rotate(-1deg); opacity: 0; }
  to   { transform: none; opacity: 1; }
}

.shop__sheet {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border-radius: 6px;
  box-shadow: 0 30px 80px -20px rgb(0 0 0 / .6);
  overflow: hidden;
}

.shop__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 14px 10px 22px;
  border-bottom: 1.5px dashed rgb(0 0 0 / .15);
}

.shop__head h2 {
  margin: 0;
  font-family: var(--font-hand);
  font-weight: 400;
  font-size: 26px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.shop__close {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.shop__close:hover { background: rgb(0 0 0 / .06); }
.shop__close svg { width: 20px; height: 20px; }

.shop__consent {
  display: grid;
  gap: 16px;
  align-content: center;
  flex: 1;
  padding: 24px 22px 32px;
  text-align: center;
}

.shop__consent p { margin: 0; color: #2c2a27; font-size: 15px; }

.shop__alt {
  font-size: 14px;
  color: var(--ink-2);
  text-underline-offset: 3px;
}

.shop__frame {
  flex: 1;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  position: relative;
}

.shop__frame iframe { width: 100% !important; border: 0; }
.shop__frame .pretix-widget-wrapper { padding: 12px 16px 24px; }

.shop__status {
  margin: 0;
  padding: 40px 22px;
  text-align: center;
  color: var(--ink-2);
}

/* --------------------------------------------------------------------------
   Vom Wind getragen: Y2K-Geister, Fledermäuse, Kürbisse
   -------------------------------------------------------------------------- */

.drift {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.drift--back  { z-index: 0; }
.drift--front { z-index: 30; }

.drifter {
  position: absolute;
  left: 0;
  top: 0;
  will-change: transform;
  filter: drop-shadow(calc(var(--sx) * 3.5) calc(var(--sy) * 3.5) 14px rgb(0 0 0 / .2));
}

.drift--back .drifter { opacity: .85; filter: blur(.6px) drop-shadow(calc(var(--sx) * 1.4) calc(var(--sy) * 1.4) 5px rgb(0 0 0 / .2)); }
.drifter svg { display: block; width: 100%; height: 100%; overflow: visible; }

.drifter .wing { transform-box: fill-box; animation: flap .24s ease-in-out infinite alternate; }
.drifter .wing-l { transform-origin: 100% 40%; }
.drifter .wing-r { transform-origin: 0 40%; animation-name: flap-r; }

@keyframes flap   { from { transform: rotate(-22deg) scaleY(1.05); } to { transform: rotate(18deg) scaleY(.7); } }
@keyframes flap-r { from { transform: rotate(22deg) scaleY(1.05); }  to { transform: rotate(-18deg) scaleY(.7); } }

.drifter .tail { transform-box: fill-box; transform-origin: 50% 0; animation: wobble 1.2s ease-in-out infinite alternate; }
@keyframes wobble { from { transform: skewX(-8deg); } to { transform: skewX(8deg); } }

/* --------------------------------------------------------------------------
   Sparkles
   -------------------------------------------------------------------------- */

.spark {
  position: fixed;
  width: var(--s);
  height: var(--s);
  margin: calc(var(--s) / -2) 0 0 calc(var(--s) / -2);
  pointer-events: none;
  z-index: 100;
  background: var(--c);
  clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%);
  animation: spark var(--d, .7s) var(--ease-out) forwards;
}

@keyframes spark {
  0%   { transform: translate(0, 0) scale(0) rotate(0); opacity: 1; }
  30%  { transform: translate(calc(var(--dx) * .45), calc(var(--dy) * .45)) scale(1) rotate(45deg); }
  100% { transform: translate(var(--dx), var(--dy)) scale(0) rotate(120deg); opacity: .6; }
}

/* --------------------------------------------------------------------------
   Intro-Sequenz (nur mit Bewegung)
   -------------------------------------------------------------------------- */

.js .board .poster,
.js .board .fastener,
.js .board .sticker { opacity: 0; }

.is-ready .board .poster { opacity: 1; animation: slap .64s var(--ease-out) both; }
.is-ready .board .fastener { opacity: 1; animation: tack .32s var(--ease-pop) both .56s; }
.is-ready .board .fastener--r { animation-delay: .7s; }
.is-ready .board .sticker { opacity: 1; animation: stick .45s var(--ease-pop) both 1s; }
.is-ready .board .sticker:nth-child(2) { animation-delay: 1.15s; }
.is-ready .burst { animation: burst .95s var(--ease-out) .06s; }
.is-ready .poster__gloss { animation: sheen 1.1s var(--ease-out) 1.05s both; }
.is-ready .poster__sheet { animation: thunk .22s ease-out .6s, wind 8s ease-in-out 1.6s infinite; }
.is-ready .poster__lift { animation: wind-light 8s ease-in-out 1.6s infinite; }
.is-ready .scrap { animation: fade .5s ease-out both; }

@keyframes slap {
  0%   { opacity: 0; transform: translateY(-12%) scale(1.2) rotate(calc(var(--tilt) - 8deg)); }
  55%  { opacity: 1; transform: translateY(.8%) scale(.985) rotate(calc(var(--tilt) + .9deg)); }
  78%  { transform: translateY(0) scale(1.006) rotate(calc(var(--tilt) - .35deg)); }
  100% { opacity: 1; transform: rotate(var(--tilt)); }
}

@keyframes tack {
  0%   { opacity: 0; transform: translateY(-22px) scale(2.2) rotate(var(--r)); }
  100% { opacity: 1; transform: rotate(var(--r)); }
}

@keyframes stick {
  0%   { opacity: 0; transform: scale(1.6) rotate(calc(var(--r) - 25deg)); }
  100% { opacity: 1; transform: rotate(var(--r)); }
}

@keyframes burst {
  0%   { opacity: 0; transform: scale(.55) rotate(-6deg); }
  25%  { opacity: 1; }
  100% { opacity: 0; transform: scale(1.18) rotate(4deg); }
}

@keyframes sheen {
  from { background-position: 130% 0; }
  to   { background-position: -30% 0; }
}

@keyframes thunk {
  0%, 100% { translate: 0 0; }
  40% { translate: 0 2px; }
}

@keyframes wind {
  0%, 100% { transform: rotateX(0) skewX(0); }
  18% { transform: rotateX(4.5deg) skewX(-.35deg); }
  30% { transform: rotateX(1.5deg) skewX(.2deg); }
  42% { transform: rotateX(6deg) skewX(-.25deg); }
  58% { transform: rotateX(.6deg) skewX(0); }
  70% { transform: rotateX(0) skewX(0); }
}

@keyframes wind-light {
  0%, 58%, 70%, 100% { opacity: 0; }
  18% { opacity: .7; }
  30% { opacity: .25; }
  42% { opacity: 1; }
}

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* --------------------------------------------------------------------------
   Tablet & Desktop
   -------------------------------------------------------------------------- */

@media (min-width: 640px) {
  .poster-col { --ph: clamp(360px, calc(100svh - 320px), 740px); }
}

@media (min-width: 900px) {
  .site { padding-inline: 40px; }

  .stage {
    flex-direction: row;
    gap: clamp(110px, 11vw, 170px);
    padding-block: 12px;
  }

  .poster-col { --ph: clamp(420px, calc(100svh - 190px), 860px); }
  :root { --lamp-x: calc(50% - 250px); --lamp-y: 50%; }

  .panel { width: 360px; gap: 18px; }


  .foot { justify-content: center; }
}

/* --------------------------------------------------------------------------
   Unterseiten (Kontakt, Impressum, Datenschutz)
   -------------------------------------------------------------------------- */

.page { padding-block: 26px 20px; display: grid; justify-items: center; align-content: start; }

.back {
  justify-self: center;
  margin-bottom: 18px;
  font-family: var(--font-hand);
  font-size: 15px;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 999px;
}

.back:hover { background: rgb(255 255 255 / .6); }

.sheet {
  position: relative;
  width: min(100%, 680px);
  background: var(--paper);
  padding: 32px 22px 28px;
  transform: rotate(var(--sheet-tilt, .3deg));
  box-shadow: 0 1px 1px rgb(0 0 0 / .14), 0 16px 34px -14px rgb(0 0 0 / .3);
}

.sheet--form { --sheet-tilt: -.5deg; width: min(100%, 520px); }

.sheet::before,
.sheet::after {
  content: "";
  position: absolute;
  top: -12px;
  width: 96px;
  height: 28px;
  background: rgb(252 249 236 / .78);
  box-shadow: 0 1px 2px rgb(0 0 0 / .12);
  clip-path: polygon(0 8%, 4% 0, 8% 10%, 12% 0, 88% 0, 92% 10%, 96% 0, 100% 8%, 100% 92%, 96% 100%, 92% 90%, 88% 100%, 12% 100%, 8% 90%, 4% 100%, 0 92%);
}

.sheet::before { left: 18px; transform: rotate(-5deg); }
.sheet::after  { right: 18px; transform: rotate(4deg); }

.sheet h1, .sheet h2, .success h2, .alert h2 {
  font-family: var(--font-hand);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.sheet h1 { font-size: 34px; line-height: 1.15; margin: 0 0 8px; }
.sheet h2 { font-size: 20px; margin: 28px 0 6px; }
.sheet p, .sheet li { color: #2c2a27; }
.sheet .lede { color: var(--ink-2); margin: 0 0 22px; }

.todo {
  background: #fff3b0;
  padding: 0 4px;
  border-radius: 3px;
  font-weight: 600;
}

.note {
  font-size: 14px;
  background: #f2efe7;
  border-left: 3px solid var(--accent-ink);
  padding: 10px 12px;
  margin: 0 0 20px;
}

@media (min-width: 640px) {
  .sheet { padding: 44px 48px 40px; }
}

/* Formular */
.form { display: grid; gap: 16px; }

.field { display: grid; gap: 6px; }

.field label, .field legend {
  font-family: var(--font-hand);
  font-size: 15px;
  font-weight: 400;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.field .check { font-family: var(--font); text-transform: none; letter-spacing: 0; font-size: 14px; }

.field .opt { font-weight: 400; color: var(--ink-2); }

.input {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  font: inherit;
  color: var(--ink);
  background: #fff;
  border: 1.5px solid var(--ink);
  border-radius: 12px;
  transition: box-shadow .15s;
}

.input:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px var(--accent-glow);
}

textarea.input { min-height: 140px; resize: vertical; }

select.input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23151413' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 18px;
  padding-right: 44px;
}

.input[aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 3px rgb(179 38 30 / .15); }

.sheet .field__error {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--danger);
}

.field .check {
  font-weight: 400;
}

.check {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 10px;
  align-items: start;
  font-size: 14px;
}

.check input {
  width: 22px;
  height: 22px;
  margin: 1px 0 0;
  accent-color: var(--accent-btn);
}

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.alert {
  margin-bottom: 18px;
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 15px;
}

.alert--error {
  background: #fdecea;
  color: #5f1410;
  box-shadow: inset 0 0 0 1.5px var(--danger);
}

.alert--error ul { margin: 6px 0 0; padding-left: 18px; }
.alert h2 { font-size: 16px; margin: 0; }

.success {
  text-align: center;
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 12px 0 4px;
}

.success__badge {
  width: 88px;
  height: 88px;
}

.success h2 { font-size: 28px; margin: 4px 0 0; }
.success p { margin: 0; color: var(--ink-2); }

.form .btn--primary { width: 100%; }
.btn[aria-busy="true"] { opacity: .75; pointer-events: none; }

/* --------------------------------------------------------------------------
   Reduzierte Bewegung
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .js .board .poster,
  .js .board .fastener,
  .js .board .sticker { opacity: 1; }
  .drift { display: none; }
}
