/* Genuss-Adventskalender */

:root {
  --creme: #feecba;
  --creme-hell: #fdf0d0;
  --creme-dunkel: #f7dc9c;
  --rot: #d42027;
  --rot-dunkel: #8a1820;
  --rot-text: #b3141c;      /* dunkleres Rot für Schrift, Kontrast ≥ 4.5:1 auf Creme */
  --titel: #6e2414;
  --text: #5e3418;
  --orange: #e8501a;
  --akzent: #ec6607;        /* Bestell-Button; weiße Schrift 3.25:1 = ok für große fette Schrift (≥ 19px bold) */
  --akzent-text: #bd4119;   /* Produkt-Link auf Creme (4.56:1) */
  --radius: 8px;
}

/* Markenschriften aus dem Shop: Pinselschrift für wenige Überschriften, Source Sans für Ziffern */
@font-face {
  font-family: "BornReady";
  src: url("/static/site/webfonts/3483AE_2_0.woff2") format("woff2"), url("/static/site/webfonts/3483AE_2_0.woff") format("woff");
  font-display: swap;
}
@font-face {
  font-family: "Source Sans Pro";
  font-weight: 900;
  src: url("/static/site/webfonts/source-sans-pro-v21-latin-900.woff2") format("woff2");
  font-display: swap;
}

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

body {
  margin: 0;
  background: var(--creme-hell);
  font-family: Arial, Helvetica, sans-serif;
  color: #7a1a1a;
}

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

/* ---------- Deckblatt ---------- */

.wrap { max-width: 640px; margin: 0 auto; position: relative; }

.cover {
  position: relative;
  width: 100%;
  aspect-ratio: 595 / 842;
  background: url(../deckblatt.jpg) center / 100% 100% no-repeat;
}

.shoplink { position: absolute; display: block; left: 65.2%; top: 1.4%; width: 28.6%; height: 9.7%; border-radius: var(--radius); }
.shoplink:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }

/* ---------- Türchen ---------- */

.door {
  position: absolute;
  display: block;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  cursor: pointer;
  perspective: 500px;
}
.door:focus-visible { outline: 3px solid var(--orange); }
.door.locked:hover { background: rgba(0, 0, 0, .12); }
.door.open:hover { background: rgba(232, 80, 26, .18); }

/* Haken für bereits angesehene Türchen */
.door.open::after {
  content: "✓";
  position: absolute; right: 4px; top: 2px;
  width: 1.5em; height: 1.5em; line-height: 1.5em;
  font-size: clamp(10px, 2.4vw, 16px);
  text-align: center;
  color: #fff;
  background: #c0392b;
  border-radius: 50%;
  opacity: 0;
}
.door.seen::after { opacity: 1; }

/* Leuchten hinter der aufschwingenden Tür */
.door::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: var(--radius);
  background: radial-gradient(circle at 50% 55%, #fffbe0 0%, #ffe08a 45%, #f2a71b 100%);
  opacity: 0;
  transition: opacity .25s;
  pointer-events: none;
}
.door.opening::before { opacity: 1; box-shadow: 0 0 26px 10px rgba(255, 214, 90, .95); }

/* Türflügel: Ausschnitt des Deckblatts (Größe/Position stehen im HTML) */
.leaf {
  position: absolute; inset: 0;
  border-radius: var(--radius);
  background-image: url(../deckblatt.jpg);
  background-repeat: no-repeat;
  transform-origin: left center;
  backface-visibility: hidden;
  pointer-events: none;
  transition: transform .65s cubic-bezier(.55, 0, .25, 1);
  box-shadow: 2px 0 6px rgba(0, 0, 0, .25);
}
.door.opening .leaf { transform: rotateY(-118deg); }

.door.shake { animation: shake .45s; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-4px) rotate(-1.5deg); }
  40% { transform: translateX(4px) rotate(1.5deg); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(3px); }
}

.spark {
  position: absolute;
  z-index: 5;
  font-size: clamp(12px, 3vw, 20px);
  line-height: 1;
  text-shadow: 0 0 6px rgba(255, 220, 120, .9);
  pointer-events: none;
}

/* Heutiges Türchen */
.door.heute.open { box-shadow: 0 0 0 3px #ffd447, 0 0 18px 6px rgba(255, 212, 71, .75); animation: heute 2s ease-in-out infinite; }
@keyframes heute { 50% { box-shadow: 0 0 0 3px #ffd447, 0 0 28px 12px rgba(255, 212, 71, .95); } }
@media (prefers-reduced-motion: reduce) { .door.heute.open { animation: none; } }

/* ---------- Countdown vor dem 1. Dezember (über dem Deckblatt) ---------- */

.countdown {
  padding: 22px 16px 20px;
  text-align: center;
  color: var(--titel);
}
.countdown-titel {
  margin: 0 0 12px;
  font-family: "BornReady", Arial, sans-serif;
  font-weight: normal;
  font-size: clamp(30px, 7vw, 42px);
  line-height: 1;
  color: var(--rot-dunkel);
}
.countdown-tueren {
  display: inline-grid;
  grid-template-columns: repeat(4, minmax(64px, 84px));
  gap: clamp(6px, 2vw, 12px);
}
/* jede Einheit ist ein kleines Türchen: Kalenderrot mit Goldrahmen wie auf dem Deckblatt */
.countdown-tuer {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  background: var(--rot-dunkel);
  color: var(--creme-hell);
  box-shadow: inset 0 0 0 4px var(--rot-dunkel), inset 0 0 0 5px rgba(255, 212, 71, .75), 0 3px 8px rgba(110, 36, 20, .25);
}
.countdown-zahl {
  font-family: "Source Sans Pro", Arial, sans-serif;
  font-weight: 900;
  font-size: clamp(28px, 7.5vw, 40px);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.countdown-einheit {
  margin-top: 6px;
  font-size: 12px;
  letter-spacing: .04em;
  color: var(--creme-dunkel);
}
.countdown-text { margin: 14px auto 0; max-width: 34em; font-size: 15px; line-height: 1.45; color: var(--text); }

/* ---------- Hinweis ---------- */

.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 20;
  max-width: 90vw;
  padding: 12px 20px;
  border-radius: 24px;
  background: #7a1a1a;
  color: #fff;
  font-size: 15px;
  text-align: center;
  opacity: 0;
  transform: translate(-50%, 20px);
  transition: .25s;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Rezeptseite ---------- */

.seite-rezept { padding: 0 16px 40px; }
.seite-rezept main, .rezept-nav { max-width: 760px; margin: 0 auto; }

.skip-link {
  position: absolute; left: 8px; top: -60px; z-index: 50;
  padding: 8px 14px; border-radius: 20px;
  background: #fff; color: #7a1a1a; font-weight: bold;
  transition: top .15s;
}
.skip-link:focus { top: 8px; }

/* Kleine Navigation oben */
.rezept-nav {
  position: sticky; top: 0; z-index: 10;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 0;
  background: var(--creme-hell);
}
.nav-tage { display: flex; gap: 8px; }
.rezept-nav a, .knopf {
  display: inline-block;
  padding: 8px 14px;
  line-height: 20px;
  white-space: nowrap;
  border-radius: 20px;
  background: #fff;
  color: #7a1a1a;
  font-size: 14px;
  font-weight: bold;
  text-decoration: none;
  box-shadow: 0 1px 4px rgba(110, 36, 20, .2);
}
.rezept-nav a:hover, .knopf:hover { background: var(--creme); }
.nav-tag.leer { display: inline-block; min-width: 1px; }
.rezept-nav .kurz { display: none; }
.rezept-nav a.zu { color: rgba(122, 26, 26, .45); background: rgba(255, 255, 255, .55); box-shadow: none; cursor: not-allowed; }

/* Vorheriges / nächstes Rezept unten */
.rezept-weiter {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  margin-top: 20px;
}
.rezept-weiter a {
  display: flex; flex-direction: column; gap: 2px;
  padding: 14px 18px;
  border-radius: 10px;
  background: var(--creme);
  color: var(--titel);
  text-decoration: none;
  box-shadow: 0 2px 10px rgba(110, 36, 20, .12);
}
.rezept-weiter a:hover { background: var(--creme-dunkel); }
.weiter-next { text-align: right; grid-column: 2; }
.weiter-label { color: var(--rot-text); font-size: 13px; font-weight: bold; letter-spacing: .06em; text-transform: uppercase; }
.weiter-titel { font-weight: bold; line-height: 1.3; }
.rezept-weiter a.zu { opacity: .6; box-shadow: none; cursor: not-allowed; }
.rezept-weiter a.zu .weiter-titel { font-weight: normal; }

.rezept-nav a:focus-visible, .rezept-weiter a:focus-visible, .knopf:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }

/* Gesperrtes Türchen (Seite direkt aufgerufen, bevor es offen ist) */
.gesperrt-hinweis { display: none; }
.gesperrt .rezept, .gesperrt .nav-druck, .gesperrt .rezept-weiter { display: none; }
.gesperrt .gesperrt-hinweis {
  display: block;
  padding: 48px 28px;
  border-radius: 10px;
  background: var(--creme);
  color: var(--text);
  text-align: center;
}
.gesperrt-titel { margin: 0 0 8px; color: var(--titel); font-size: 26px; font-weight: bold; }
.gesperrt-hinweis .knopf { margin-top: 12px; }

/* ---------- Rezeptblatt ---------- */

.rezept {
  overflow: hidden;
  border-radius: 10px;
  background: var(--creme);
  color: var(--text);
  line-height: 1.45;
  box-shadow: 0 6px 30px rgba(110, 36, 20, .18);
}

.rezept-kopf { position: relative; }

/* Welle mit Titel und Logo, ragt wie auf dem gedruckten Blatt über das Foto */
.rezept-kopf::before {
  content: "";
  position: relative; z-index: 1;
  display: block;
  aspect-ratio: 1500 / 323;
  margin-bottom: -8.2%;   /* = transparenter Teil der Grafik, das Foto schiebt sich darunter */
  background: url(../rezepte/welle-oben.webp) top / 100% auto no-repeat;
  pointer-events: none;
}

.rezept-bild { position: relative; margin: 0; }
.rezept-bild img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 5 / 3;
  object-fit: cover;
  background: var(--creme-dunkel);
}
.rezept-bild figcaption {
  position: absolute; left: 12px; bottom: 8px;
  color: rgba(0, 0, 0, .7);
  font-size: 12px;
  letter-spacing: .02em;
  /* heller Schein, damit der Hinweis auch auf dunklen Bildstellen lesbar bleibt */
  text-shadow: 0 0 4px rgba(255, 255, 255, .9), 0 0 2px rgba(255, 255, 255, .9);
}

.rezept-text { padding: 22px 28px 28px; }

.kicker {
  margin: 0 0 4px;
  color: var(--rot-text);
  font-size: 13px;
  font-weight: bold;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.rezept h1 {
  margin: 0 0 10px;
  color: var(--titel);
  font-size: clamp(24px, 4.6vw, 34px);
  line-height: 1.15;
}

.rezept .eckdaten {
  display: flex; flex-wrap: wrap; gap: 4px 28px;
  margin: 0 0 20px;
  padding: 0;
  color: var(--titel);
  font-size: 17px;
}
.rezept .eckdaten li { padding: 0; border: 0; }
.rezept .eckdaten li::before { content: "•"; margin-right: .45em; color: var(--orange); }

/* Produkt mit Bestell-Button */
.produkt-box {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px;
  max-width: 720px;
  margin: 0 0 26px;
  padding: 20px 34px;
  border-radius: 24px;
  background: var(--titel);
  color: #fff;
  font-size: 17px;
}
.produkt-box p { margin: 0; line-height: 1.3; }
.produkt-label { display: block; color: var(--akzent); font-size: 19px; font-weight: bold; }
.produkt { display: block; color: #fff; font-size: 19px; font-weight: bold; text-decoration: none; }
.produkt:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.produkt:focus-visible { outline: 3px solid var(--akzent); outline-offset: 2px; border-radius: 2px; }
.produkt-artnr { display: block; font-size: 16px; }

.bestellen {
  flex: none;
  padding: 14px 30px;
  border-radius: 999px;
  background: var(--akzent);
  color: #fff;
  font-size: 19px;
  font-weight: bold;
  text-align: center;
  text-decoration: none;
  transition: background .15s, transform .15s;
}
.bestellen:hover { background: #d45a05; transform: translateY(-1px); }
.bestellen:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

.rezept h2 {
  margin: 0 0 6px;
  color: var(--titel);
  font-size: 16px;
}

.rezept ul, .rezept ol { margin: 0; }
.rezept ul { padding: 0; list-style: none; }
.rezept ul li { padding: 3px 0; border-bottom: 1px dotted rgba(110, 36, 20, .25); }
.rezept ol { padding-left: 1.4em; }
.rezept ol li { padding: 3px 0 3px .2em; }
.rezept ol li::marker { color: var(--titel); font-weight: bold; }

.zutaten, .zubereitung { margin-bottom: 22px; }

.tipp {
  margin: 0;
  padding: 14px 18px;
  border-radius: var(--radius);
  background: var(--creme-dunkel);
}
.tipp strong { color: var(--titel); }
.teilen { grid-column: 1 / -1; margin: 18px 0 0; }
.teilen-knopf {
  padding: 10px 20px; border: 2px solid var(--titel); border-radius: 999px;
  background: transparent; color: var(--titel); font: bold 15px Arial, Helvetica, sans-serif; cursor: pointer;
}
.teilen-knopf:hover { background: #fff7e0; }
.teilen-knopf:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }

@media (min-width: 640px) {
  .rezept-text {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
    gap: 0 32px;
  }
  .rezept h1, .rezept .eckdaten, .produkt-box, .tipp { grid-column: 1 / -1; }
}

@media (max-width: 480px) {
  .seite-rezept { padding: 0 8px 24px; }
  .rezept-nav { flex-wrap: nowrap; gap: 6px; }
  .rezept-nav a { padding: 6px 11px; font-size: 13px; }
  .nav-tage { gap: 6px; }
  /* kurze Beschriftung, Screenreader lesen weiter den vollen Text */
  .rezept-nav .kurz { display: inline; }
  .rezept-nav .lang { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .weiter-label { font-size: 12px; }
  .rezept-weiter a { padding: 12px 14px; }
  .rezept-text { padding: 18px 18px 22px; }
  .rezept .eckdaten { gap: 2px 18px; font-size: 15px; }
  .produkt-box { padding: 18px 20px; border-radius: 18px; }
  .bestellen { width: 100%; padding: 13px 20px; }
}

/* ---------- Erinnerung (unter dem Deckblatt, bis 24.12.) ---------- */

.erinnerung {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas: "blatt inhalt" "blatt knoepfe" "hinweis hinweis";
  gap: 4px 20px;
  margin: 22px 16px 40px;
  padding: 20px 22px;
  border-radius: var(--radius);
  background: #fff;
  color: var(--text);
  box-shadow: 0 1px 4px rgba(110, 36, 20, .2);
}
/* Abreißkalender-Blatt */
.erinnerung-blatt {
  grid-area: blatt;
  align-self: start;
  display: flex; flex-direction: column; align-items: center;
  width: 92px;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--creme-hell);
  box-shadow: 0 0 0 1px var(--creme-dunkel), 0 3px 0 -1px var(--creme), 0 3px 0 0 var(--creme-dunkel);
}
.blatt-kopf {
  align-self: stretch;
  padding: 5px 0 4px;
  background: var(--rot-dunkel);
  color: var(--creme-hell);
  font-size: 12px; font-weight: bold; text-align: center;
}
.blatt-zeit {
  padding-top: 8px;
  font-family: "Source Sans Pro", Arial, sans-serif;
  font-weight: 900; font-size: 28px; line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--rot-dunkel);
}
.blatt-fuss { padding: 2px 0 9px; font-size: 12px; color: var(--titel); }

.erinnerung-inhalt { grid-area: inhalt; }
.erinnerung h2 {
  margin: 0 0 4px;
  font-family: "BornReady", Arial, sans-serif;
  font-weight: normal;
  font-size: 30px; line-height: 1.05;
  color: var(--rot-dunkel);
}
.erinnerung p { margin: 0; font-size: 15px; line-height: 1.45; }

.erinnerung-knoepfe {
  grid-area: knoepfe;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px;
  margin-top: 14px;
}
/* Knopf mit Symbol, Hauptzeile und Zeile "für welche Geräte" */
.erinnerung-knopf {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px 10px 12px;
  border-radius: 12px;
  text-decoration: none;
  transition: background .15s, transform .15s;
}
.erinnerung-knopf:hover { transform: translateY(-1px); }
.erinnerung-knopf:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
.erinnerung-icon {
  flex: none; width: 26px; height: 26px;
  fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.erinnerung-knopf-text { display: flex; flex-direction: column; gap: 1px; line-height: 1.25; }
.erinnerung-knopf-text strong { font-size: 15px; }
.erinnerung-knopf-text > span { font-size: 13px; }
.knopf-voll { background: var(--rot-dunkel); color: #fff; }
.knopf-voll .erinnerung-knopf-text > span { color: var(--creme); }
.knopf-voll:hover { background: #6f1219; }
.knopf-rand { background: #fff; color: var(--rot-dunkel); box-shadow: inset 0 0 0 2px var(--rot-dunkel); }
.knopf-rand .erinnerung-knopf-text > span { color: var(--text); }
.knopf-rand:hover { background: var(--creme-hell); }
@media (prefers-reduced-motion: reduce) { .erinnerung-knopf, .erinnerung-knopf:hover { transition: none; transform: none; } }

.erinnerung .erinnerung-hinweis {
  grid-area: hinweis;
  display: flex; gap: 8px; align-items: flex-start;
  margin-top: 16px; padding-top: 12px;
  border-top: 1px dotted rgba(110, 36, 20, .3);
  font-size: 13px; line-height: 1.45; color: var(--text);
}
.erinnerung-hinweis-icon {
  flex: none; width: 17px; height: 17px; margin-top: 1px;
  fill: none; stroke: var(--titel); stroke-width: 1.8; stroke-linecap: round;
}

@media (max-width: 480px) {
  .erinnerung { grid-template-areas: "blatt inhalt" "knoepfe knoepfe" "hinweis hinweis"; padding: 18px 16px; gap: 4px 14px; }
  .erinnerung-blatt { width: 76px; }
  .blatt-zeit { font-size: 23px; }
  .erinnerung h2 { font-size: 26px; }
}

/* ---------- Druck (für die Druckversion gibt es zusätzlich das Rezeptblatt als Bild) ---------- */

@media print {
  body { background: #fff; }
  .seite-rezept { padding: 0; }
  .rezept-nav, .rezept-weiter, .skip-link, .teilen, .erinnerung, .countdown, .cookie-info { display: none; }
  .rezept { box-shadow: none; border-radius: 0; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .produkt-box { break-inside: avoid; }
  .rezept-bild img { max-height: 9cm; }
  .rezept ol li, .rezept ul li, .tipp { break-inside: avoid; }
}
