/* ─────────────────────────────────────────────────────────────────────────────
   Wichtelgenie — „Waldwichtel, nicht Weihnachtsmarkt-Kitsch"
   Palette:  Schnee #F3F7F4 · Tanne #166A45 · Tannendunkel #0C4A2F
             Zipfelrot #C43B3B · Gold #D9A03A · Karte #FFFFFF · Nacht #1C2B22
   Typo:     Bricolage Grotesque (Display) · Instrument Sans (Body)
   Signatur: Die Los-Karte — Band in Zipfelrot, Mütze obendrauf, „Jetzt auslosen".
   ──────────────────────────────────────────────────────────────────────────── */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/assets/fonts/BricolageGrotesque.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("/assets/fonts/InstrumentSans.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --schnee: #F3F7F4;
  --karte: #FFFFFF;
  --tanne: #166A45;
  --tanne-dunkel: #0C4A2F;
  --zipfelrot: #C43B3B;
  --zipfelrot-dunkel: #96302D;
  --gold: #D9A03A;
  --nacht: #1C2B22;
  --nacht-soft: #5D7264;
  --linie: #DCE8DF;
  --radius: 18px;
  --max: 44rem;
  --font-display: "Bricolage Grotesque", "Avenir Next", system-ui, sans-serif;
  --font-body: "Instrument Sans", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  color: var(--nacht);
  background: var(--schnee);
  font: 17px/1.65 var(--font-body);
}

main { max-width: var(--max); margin: 0 auto; padding: 0 1.25rem 4.5rem; }

h1, h2 { font-family: var(--font-display); line-height: 1.1; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.1rem, 6vw, 3.3rem); font-weight: 800; margin: .4em 0 .3em; }
h2 { font-size: clamp(1.25rem, 3vw, 1.6rem); font-weight: 700; margin-top: 2.4rem; }
a { color: var(--tanne); }

/* Header / Footer */
.site-header, .site-footer {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  max-width: var(--max); margin: 0 auto; padding: 1.1rem 1.25rem;
}
.site-header .brand {
  font-family: var(--font-display); font-weight: 800; font-size: 1.25rem;
  text-decoration: none; color: var(--nacht);
}
.site-header .brand::before { content: "🧝 "; }
.site-header nav a {
  margin-left: 1.1rem; text-decoration: none; font-weight: 600; font-size: .95rem;
  color: var(--nacht);
}
.site-header nav a:hover { color: var(--zipfelrot); }
.site-footer { color: var(--nacht-soft); font-size: .88rem; flex-wrap: wrap; }
.site-footer nav a { margin-right: 1rem; color: var(--nacht-soft); }

/* Hero */
.hero { padding-top: 1.5rem; }
.eyebrow {
  font-size: .85rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--gold); margin: 0;
}
.hero h1 em {
  font-style: normal; color: var(--zipfelrot); position: relative; white-space: nowrap;
}
.hero h1 em::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: .06em; height: .18em;
  background: var(--gold); opacity: .35; border-radius: 2px; z-index: -1;
}
.hero-sub { font-size: 1.12rem; color: var(--nacht-soft); max-width: 36rem; }

/* AEO Direct-Answer */
.direct-answer {
  font-size: 1.1rem; background: var(--karte);
  border-left: 4px solid var(--gold); padding: 1rem 1.2rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  box-shadow: 0 1px 4px rgba(28, 43, 34, .06);
}

/* ── Signatur: die Los-Karte ───────────────────────────────────────────────── */
.los-wrap { position: relative; margin: 2.2rem 0 .6rem; }
.los-ribbon {
  position: absolute; inset: 0; pointer-events: none; z-index: 2;
  border-radius: var(--radius); overflow: hidden;
}
.los-ribbon::before {              /* vertikales Band in Zipfelrot */
  content: ""; position: absolute; top: 0; bottom: 0; left: 2.6rem; width: 14px;
  background: linear-gradient(180deg, var(--zipfelrot), var(--zipfelrot-dunkel));
  opacity: .92;
}
.los-muetze {
  position: absolute; top: -1.15rem; left: 2rem; z-index: 3;
  font-size: 1.7rem; transform: rotate(-10deg);
  filter: drop-shadow(0 2px 3px rgba(28, 43, 34, .25));
}
.los-card {
  position: relative; z-index: 1;
  background: var(--karte);
  border-radius: var(--radius);
  padding: 1.6rem 1.6rem 1.6rem 5rem;   /* Platz fürs Band */
  box-shadow: 0 10px 30px rgba(22, 106, 69, .14), 0 2px 8px rgba(28, 43, 34, .08);
}
@media (max-width: 540px) {
  .los-ribbon::before { left: 1.4rem; width: 10px; }
  .los-muetze { left: .85rem; font-size: 1.4rem; }
  .los-card { padding: 1.4rem 1.2rem 1.4rem 3.2rem; }
}

.los-card form, .genie form { display: grid; gap: .95rem; }
.los-card label, .genie label { font-weight: 600; font-size: .93rem; display: block; margin-bottom: .3rem; }
.label-hint { font-weight: 400; color: var(--nacht-soft); font-size: .85rem; }
.los-card input, .los-card select, .los-card textarea,
.genie input, .genie select, .genie textarea {
  width: 100%; padding: .7rem .85rem; border: 1.5px solid var(--linie);
  border-radius: 10px; font: inherit; background: #FCFEFC; color: var(--nacht);
}
.los-card :is(input, select, textarea, button):focus-visible,
.genie :is(input, select, textarea, button):focus-visible,
.chip:focus-visible, a:focus-visible, .paket:focus-visible, .copy-button:focus-visible {
  outline: 3px solid var(--gold); outline-offset: 2px;
}
.los-card ::placeholder, .genie ::placeholder { color: #A9BCAE; }

.los-card button[type="submit"], .genie button[type="submit"] {
  font-family: var(--font-display);
  background: var(--tanne); color: #fff; border: 0; cursor: pointer;
  padding: .95rem 1.6rem; border-radius: 999px; font-size: 1.08rem; font-weight: 700;
  transition: transform .15s ease, background .15s ease;
}
.los-card button[type="submit"]:hover, .genie button[type="submit"]:hover {
  background: var(--tanne-dunkel); transform: translateY(-1px);
}
.los-card button[type="submit"]:active, .genie button[type="submit"]:active { transform: scale(.98); }
.tool-cta { color: var(--nacht-soft); font-size: .9rem; margin-top: .5rem; }
.privat-hinweis { color: var(--nacht-soft); font-size: .85rem; margin: .2rem 0 0; }

/* ── Lose-Liste (Ergebnis der Auslosung) ───────────────────────────────────── */
.lose-liste { display: grid; gap: .7rem; margin-top: 1.2rem; padding: 0; list-style: none; }
.los-karte {
  display: flex; align-items: center; justify-content: space-between; gap: .8rem;
  flex-wrap: wrap;
  background: var(--karte); border: 1.5px solid var(--linie); border-radius: 14px;
  padding: .85rem 1.05rem;
  animation: auspacken .45s ease backwards;
  animation-delay: calc(var(--i, 0) * 80ms);
}
.los-name { font-size: 1rem; }
.los-aktionen { display: flex; gap: .5rem; align-items: center; }
.wa-button {
  display: inline-block; text-decoration: none; font-weight: 700; font-size: .88rem;
  background: #25D366; color: #fff; padding: .45rem .9rem; border-radius: 999px;
  transition: transform .15s ease;
}
.wa-button:hover { transform: translateY(-1px); }
.copy-button {
  font: inherit; font-weight: 600; font-size: .88rem; cursor: pointer;
  background: var(--schnee); color: var(--nacht);
  border: 1.5px solid var(--linie); border-radius: 999px; padding: .45rem .9rem;
  transition: border-color .15s ease, color .15s ease;
}
.copy-button:hover { border-color: var(--tanne); color: var(--tanne); }

/* ── Reveal (/los/) ────────────────────────────────────────────────────────── */
.reveal { text-align: center; padding: 1rem 0 .5rem; }
.reveal-gruss { font-size: 1.1rem; }
.paket {
  background: none; border: 0; cursor: pointer; padding: 1rem;
  display: inline-grid; justify-items: center; gap: .4rem;
}
.paket[hidden] { display: none; }
.paket-emoji {
  font-size: 5rem; display: inline-block;
  animation: wackeln 2.2s ease-in-out infinite;
  filter: drop-shadow(0 6px 12px rgba(28, 43, 34, .2));
}
@keyframes wackeln {
  0%, 100% { transform: rotate(0); }
  10% { transform: rotate(-6deg) scale(1.03); }
  20% { transform: rotate(5deg); }
  30% { transform: rotate(-3deg); }
  40% { transform: rotate(0); }
}
.paket.offen .paket-emoji { animation: aufreissen .6s ease forwards; }
@keyframes aufreissen {
  40% { transform: scale(1.25) rotate(8deg); opacity: 1; }
  100% { transform: scale(.4) rotate(-14deg) translateY(-30px); opacity: 0; }
}
.paket-text {
  font-family: var(--font-display); font-weight: 700; color: var(--tanne);
}
.reveal-du { margin: .6rem 0 0; color: var(--nacht-soft); }
.reveal-name {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(2rem, 7vw, 3rem); margin: .1em 0 .2em; color: var(--zipfelrot);
  animation: auspacken .5s ease backwards;
}
.los-meta { display: flex; gap: .5rem; justify-content: center; flex-wrap: wrap; margin: .4rem 0; }
.los-meta-chip {
  font-size: .88rem; font-weight: 600; background: var(--karte);
  border: 1.5px solid var(--linie); border-radius: 999px; padding: .3rem .8rem;
}
.reveal-psst { color: var(--nacht-soft); font-size: .9rem; }
.genie { margin-top: 1.8rem; }
.genie h2 { margin-top: 0; font-size: 1.2rem; }

/* Ergebnis: Ideen-Karten */
.ideen-liste { display: grid; gap: .9rem; margin-top: 1.4rem; padding: 0; list-style: none; }
.idee {
  background: var(--karte); border: 1.5px solid var(--linie); border-radius: 14px;
  padding: 1rem 1.15rem; position: relative;
  animation: auspacken .45s ease backwards;
  animation-delay: calc(var(--i, 0) * 90ms);
}
@keyframes auspacken {
  from { opacity: 0; transform: translateY(10px) scale(.98); }
  to   { opacity: 1; transform: none; }
}
.idee h3 {
  font-family: var(--font-display); font-size: 1.05rem; font-weight: 700; margin: 0 0 .25rem;
}
.idee .warum { margin: 0 0 .5rem; color: var(--nacht); }
.idee .meta { display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; }
.idee .preis {
  font-size: .85rem; font-weight: 600; color: var(--nacht);
  background: var(--schnee); border: 1px dashed var(--gold);
  padding: .15rem .6rem; border-radius: 999px;
}
.idee .such-link { font-size: .9rem; font-weight: 600; color: var(--zipfelrot); }
.tool-status { padding: 1rem 0; color: var(--nacht-soft); }
.tool-status.fehler { color: var(--zipfelrot-dunkel); }

/* Warte-Erlebnis */
.warten { text-align: center; padding: 1.2rem 0 .4rem; }
.warten-genie {
  font-size: 2.6rem; display: inline-block;
  animation: schuetteln 1.6s ease-in-out infinite;
}
@keyframes schuetteln {
  0%, 100% { transform: rotate(0); }
  15% { transform: rotate(-9deg) scale(1.04); }
  30% { transform: rotate(8deg); }
  45% { transform: rotate(-6deg); }
  60% { transform: rotate(4deg) scale(1.02); }
  75% { transform: rotate(0); }
}
.warten-text {
  font-family: var(--font-display); font-weight: 700; font-size: 1.05rem;
  margin: .5rem 0 .8rem; min-height: 1.5em;
}
.warten-balken {
  height: 8px; border-radius: 999px; background: var(--linie);
  overflow: hidden; max-width: 22rem; margin: 0 auto;
}
.warten-fuellung {
  height: 100%; width: 0; border-radius: 999px;
  background: linear-gradient(90deg, var(--tanne), var(--gold));
  animation: fuellen 28s cubic-bezier(.25,.6,.4,.9) forwards;
}
@keyframes fuellen { 0% { width: 2%; } 70% { width: 78%; } 100% { width: 93%; } }
.warten-hinweis { color: var(--nacht-soft); font-size: .85rem; margin-top: .6rem; }

.idee.skeleton { pointer-events: none; }
.sk-line {
  height: .9rem; border-radius: 6px; margin: .5rem 0;
  background: linear-gradient(90deg, var(--linie) 25%, var(--schnee) 50%, var(--linie) 75%);
  background-size: 200% 100%;
  animation: schimmern 1.6s linear infinite;
}
.sk-titel { width: 55%; height: 1.05rem; }
.sk-kurz { width: 35%; }
@keyframes schimmern { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) {
  .warten-genie, .sk-line, .paket-emoji { animation: none; }
  .warten-fuellung { animation: fuellen 28s linear forwards; }
}

/* Themen-Chips */
.chips-section { margin-top: 2.6rem; }
.chips { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .9rem; }
.chip {
  display: inline-block; text-decoration: none; font-weight: 600; font-size: .95rem;
  color: var(--nacht); background: var(--karte);
  border: 1.5px solid var(--linie); border-radius: 999px; padding: .5rem 1rem;
  transition: transform .15s ease, border-color .15s ease, color .15s ease;
}
.chip:hover { transform: translateY(-2px); border-color: var(--zipfelrot); color: var(--zipfelrot); }

/* Schritte */
.steps { padding-left: 1.2rem; display: grid; gap: .6rem; }
.steps li::marker { color: var(--zipfelrot); font-weight: 700; }

/* FAQ */
.faq details { border-bottom: 1.5px solid var(--linie); padding: .7rem 0; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq summary::marker { color: var(--gold); }

section { margin-top: 2rem; }
.backlink { margin-top: 2.5rem; }
