/* Kurhessenpalais – Farben angelehnt an den Frankfurter Bembel:
   grauer Steinzeug-Ton, Kobaltblau, dazu Kräutergrün für "vegetarisch". */
@font-face {
  font-family: "Bricolage";
  src: url("fonts/bricolage.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --stein: #e8e6e0;
  --papier: #f6f5f1;
  --tinte: #1b1f33;
  --grau: #585c6c;
  --linie: #cdcac2;
  --kobalt: #23419a;
  --kobalt-hell: #dde3f3;
  --kraut: #4b6a29;
  --kraut-hell: #e2ead6;
  --fokus: #23419a;
  --radius: 10px;
  --breite: 1180px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --stein: #141829;
    --papier: #1c2137;
    --tinte: #ebe9e3;
    --grau: #a3a7b8;
    --linie: #333a56;
    --kobalt: #93a9f0;
    --kobalt-hell: #262f52;
    --kraut: #a8c57e;
    --kraut-hell: #27331f;
    --fokus: #93a9f0;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --stein: #141829;
  --papier: #1c2137;
  --tinte: #ebe9e3;
  --grau: #a3a7b8;
  --linie: #333a56;
  --kobalt: #93a9f0;
  --kobalt-hell: #262f52;
  --kraut: #a8c57e;
  --kraut-hell: #27331f;
  --fokus: #93a9f0;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--stein);
  color: var(--tinte);
  font-family: "Bricolage", system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  font-weight: 380;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--kobalt); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--fokus); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.12; letter-spacing: -.015em; margin: 0 0 .5em; font-weight: 720; }
h1 { font-size: clamp(2.3rem, 6vw, 4.6rem); letter-spacing: -.03em; font-weight: 780; }
h2 { font-size: clamp(1.45rem, 2.6vw, 1.9rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
.gross { font-size: clamp(1.12rem, 1.8vw, 1.3rem); line-height: 1.5; color: var(--grau); max-width: 38em; }
.klein { font-size: .875rem; color: var(--grau); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--kobalt); color: var(--papier); padding: .6em 1em; z-index: 10; }
.skip:focus { left: 1rem; }
button { font: inherit; color: inherit; }

/* Bembel-Band: Ranke mit Blüten und Punkten, eingefärbt über mask */
.band {
  height: 18px;
  background: var(--kobalt);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='18'%3E%3Cpath d='M0 9C9 1 19 1 28 9s19 8 28 0' fill='none' stroke='%23000' stroke-width='1.8'/%3E%3Cg%3E%3Ccircle cx='14' cy='3.6' r='2.6'/%3E%3Ccircle cx='42' cy='14.4' r='2.6'/%3E%3Ccircle cx='5' cy='14' r='1.2'/%3E%3Ccircle cx='23' cy='14' r='1.2'/%3E%3Ccircle cx='33' cy='4' r='1.2'/%3E%3Ccircle cx='51' cy='4' r='1.2'/%3E%3C/g%3E%3C/svg%3E") repeat-x left center / 56px 18px;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='18'%3E%3Cpath d='M0 9C9 1 19 1 28 9s19 8 28 0' fill='none' stroke='%23000' stroke-width='1.8'/%3E%3Cg%3E%3Ccircle cx='14' cy='3.6' r='2.6'/%3E%3Ccircle cx='42' cy='14.4' r='2.6'/%3E%3Ccircle cx='5' cy='14' r='1.2'/%3E%3Ccircle cx='23' cy='14' r='1.2'/%3E%3Ccircle cx='33' cy='4' r='1.2'/%3E%3Ccircle cx='51' cy='4' r='1.2'/%3E%3C/g%3E%3C/svg%3E") repeat-x left center / 56px 18px;
}

/* Kopf */
.kopf { background: var(--papier); }
.kopf-innen {
  max-width: var(--breite); margin: 0 auto; padding: 1.1rem 16px .9rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}
.marke {
  font-size: clamp(1.45rem, 3vw, 1.9rem); font-weight: 800; letter-spacing: -.04em;
  color: var(--kobalt); text-decoration: none; line-height: 1;
}
.kopf nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: .25rem; }
.kopf nav a {
  display: block; padding: .45em .8em; border-radius: 999px; text-decoration: none;
  color: var(--tinte); font-weight: 520;
}
.kopf nav a:hover { background: var(--kobalt-hell); }
.kopf nav a[aria-current="page"] { background: var(--kobalt); color: var(--papier); }
.menu-knopf { display: none; }
@media (max-width: 640px) {
  .menu-knopf {
    display: block; background: none; border: 1.5px solid var(--linie); border-radius: 999px;
    padding: .35em .9em; font-weight: 560; cursor: pointer;
  }
  .kopf nav { flex-basis: 100%; display: none; }
  .kopf nav.offen { display: block; }
  .kopf nav ul { flex-direction: column; padding: .25rem 0 .5rem; }
  .kopf nav a { padding: .7em .8em; border-radius: 8px; }
}

/* Allgemeine Abschnitte */
main { display: block; }
.abschnitt { max-width: var(--breite); margin: 0 auto; padding: clamp(2.2rem, 5vw, 3.8rem) 16px 0; }
.abschnitt-kopf { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.abschnitt-kopf h2 { margin: 0; }
.abschnitt-kopf a { font-weight: 560; }

/* Startseite */
.held {
  max-width: var(--breite); margin: 0 auto; padding: clamp(2.5rem, 6vw, 5rem) 16px 0;
  display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center;
}
.held h1 { max-width: 9em; }
.held-bilder { margin: 0; position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.held-bilder img { border-radius: var(--radius); aspect-ratio: 4 / 5; object-fit: cover; width: 100%; background: var(--linie); }
.held-bilder img:last-child { transform: translateY(2.2rem); }
.held-suche { margin-top: 1.8rem; max-width: 34rem; }
.held-suche label { display: block; font-weight: 600; margin-bottom: .45rem; }
.such-zeile { display: flex; gap: .5rem; }
input[type="search"] {
  font: inherit; flex: 1; min-width: 0; padding: .75em 1em; border-radius: 999px;
  border: 1.5px solid var(--linie); background: var(--papier); color: var(--tinte);
}
input[type="search"]:focus { border-color: var(--kobalt); outline: none; box-shadow: 0 0 0 3px var(--kobalt-hell); }
.such-zeile button, .werkzeuge button, .portionen button {
  border: 0; background: var(--kobalt); color: var(--papier); border-radius: 999px;
  padding: .75em 1.2em; font-weight: 600; cursor: pointer; white-space: nowrap;
}
@media (max-width: 820px) {
  .held { grid-template-columns: 1fr; }
  .held-bilder { order: -1; }
  .held-bilder img:last-child { transform: translateY(1.2rem); }
}
@media (max-width: 480px) { .such-zeile { flex-direction: column; } }

/* Kategorien */
.kat-liste { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .6rem; }
.kat-liste a {
  display: inline-flex; gap: .6em; align-items: baseline; padding: .6em 1.05em; border-radius: 999px;
  background: var(--papier); border: 1.5px solid var(--linie); text-decoration: none; color: var(--tinte); font-weight: 560;
}
.kat-liste a:hover { border-color: var(--kobalt); }
.kat-liste .anzahl { color: var(--grau); font-weight: 400; font-variant-numeric: tabular-nums; }

/* Gedanken */
.gedanken { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.5rem, 4vw, 3rem); }
.gedanken h2 { font-size: 1.35rem; color: var(--kobalt); }
.gedanken p { color: var(--grau); }
@media (max-width: 820px) { .gedanken { grid-template-columns: 1fr; } }

/* Rezeptkarten */
.raster {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 2rem 1.4rem;
}
.karte a { display: block; text-decoration: none; color: inherit; }
.karte img {
  width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius); background: var(--linie);
}
.karte-text { display: block; padding-top: .7rem; }
.karte-titel { display: block; font-weight: 640; font-size: 1.12rem; line-height: 1.25; }
.karte a:hover .karte-titel { color: var(--kobalt); text-decoration: underline; text-underline-offset: .18em; }
.karte-meta { display: flex; flex-wrap: wrap; gap: .4rem .7rem; align-items: center; margin-top: .3rem; font-size: .9rem; color: var(--grau); }
.veg {
  display: inline-flex; align-items: center; gap: .3em; color: var(--kraut); font-weight: 560;
}
.veg::before {
  content: ""; width: .8em; height: .8em; background: currentColor;
  border-radius: 0 70% 0 70%; transform: rotate(-8deg);
}
.karte[hidden] { display: none; }

/* Rezeptübersicht */
.seitenkopf h1 { margin-bottom: .25em; }
.filter { margin-top: 1.4rem; display: grid; gap: .9rem; max-width: 52rem; }
.chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.chip {
  border: 1.5px solid var(--linie); background: var(--papier); border-radius: 999px;
  padding: .42em .95em; cursor: pointer; font-weight: 520; font-size: .95rem;
}
.chip:hover { border-color: var(--kobalt); }
.chip[aria-pressed="true"] { background: var(--kobalt); border-color: var(--kobalt); color: var(--papier); }
.veg-schalter { display: inline-flex; gap: .5em; align-items: center; font-weight: 520; cursor: pointer; width: fit-content; }
.veg-schalter input { width: 1.15rem; height: 1.15rem; accent-color: var(--kraut); }
.treffer { color: var(--grau); margin: 1rem 0 0; min-height: 1.6em; }
.leer { font-size: 1.15rem; padding: 2rem 0; }

/* Einzelnes Rezept */
.rezept { max-width: var(--breite); margin: 0 auto; padding: clamp(2rem, 5vw, 3.5rem) 16px 0; }
.rezept-kopf { max-width: 50rem; }
.rezept-kopf h1 { font-size: clamp(2.1rem, 5.4vw, 4rem); }
.kats { display: flex; flex-wrap: wrap; gap: .4rem .9rem; font-weight: 560; margin-bottom: .9rem; }
.datum { color: var(--grau); font-size: .95rem; }
.rezept-bild { margin: 1.6rem 0 0; }
.rezept-bild img {
  width: 100%; max-height: 72vh; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--radius); background: var(--linie);
}
.werkzeuge { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: 1.2rem; }
.werkzeuge button { background: var(--papier); color: var(--tinte); border: 1.5px solid var(--linie); padding: .55em 1.1em; }
.werkzeuge button:hover { border-color: var(--kobalt); }
.werkzeuge .wach[aria-pressed="true"] { background: var(--kobalt); color: var(--papier); border-color: var(--kobalt); }

.rezept-inhalt {
  display: grid; grid-template-columns: minmax(280px, 380px) 1fr; gap: clamp(1.5rem, 4vw, 3.5rem);
  margin-top: 2.2rem; align-items: start;
}
.zutaten {
  background: var(--papier); border-radius: var(--radius); padding: 1.5rem 1.4rem 1rem;
  position: sticky; top: 1rem; max-height: calc(100vh - 2rem); overflow: auto;
}
.zutaten h2 { margin-bottom: .6rem; }
.zutaten h3 { margin: 1.2rem 0 .3rem; color: var(--kobalt); font-size: 1rem; }
.zutaten ul { list-style: none; margin: 0; padding: 0; }
.zutaten li { border-bottom: 1px solid var(--linie); }
.zutaten li:last-child { border-bottom: 0; }
.zutaten label { display: flex; gap: .7rem; align-items: baseline; padding: .5rem 0; cursor: pointer; line-height: 1.4; }
.zutaten input { flex: none; width: 1.05rem; height: 1.05rem; accent-color: var(--kobalt); transform: translateY(.15em); }
.zutaten input:checked + span { color: var(--grau); text-decoration: line-through; text-decoration-color: var(--linie); }
.q { font-weight: 640; font-variant-numeric: tabular-nums; }
.abhaken { margin: .8rem 0 0; }
.portionen {
  display: inline-flex; align-items: center; gap: .5rem; margin-bottom: .6rem;
  background: var(--kobalt-hell); border-radius: 999px; padding: .25rem;
}
.portionen button { width: 2.2rem; height: 2.2rem; padding: 0; font-size: 1.2rem; line-height: 1; }
.portionen output { min-width: 6.5em; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }
.portionen-text { font-weight: 600; color: var(--grau); }

.schritte { list-style: none; counter-reset: s; margin: 0; padding: 0; max-width: 40rem; }
.schritte li { counter-increment: s; position: relative; padding: 0 0 1.4rem 3.4rem; font-size: 1.1rem; line-height: 1.6; }
.schritte li::before {
  content: counter(s); position: absolute; left: 0; top: -.05em; width: 2.3rem; height: 2.3rem;
  border-radius: 50%; border: 1.8px solid var(--kobalt); color: var(--kobalt);
  display: grid; place-items: center; font-weight: 700; font-size: 1rem; font-variant-numeric: tabular-nums;
}
.tipp { margin-top: 1rem; padding: 1.2rem 1.4rem; border-radius: var(--radius); background: var(--kraut-hell); max-width: 40rem; }
.tipp h3 { color: var(--kraut); margin-bottom: .3rem; }
.tipp p { margin: 0; }
.hinweis { color: var(--grau); font-style: italic; }
@media (max-width: 820px) {
  .rezept-inhalt { grid-template-columns: 1fr; }
  .zutaten { position: static; max-height: none; }
  .schritte li { padding-left: 3rem; font-size: 1.05rem; }
}

.mehr-bilder { margin-top: 3rem; }
.bildreihe { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 1rem; }
.bildreihe img { aspect-ratio: 1; object-fit: cover; border-radius: var(--radius); width: 100%; background: var(--linie); }

.nachbarn { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 3.5rem; border-top: 1.5px solid var(--linie); padding-top: 1.5rem; }
.nachbarn a { text-decoration: none; font-weight: 620; font-size: 1.1rem; color: var(--tinte); }
.nachbarn a:hover { color: var(--kobalt); }
.nachbarn span { display: block; font-weight: 420; font-size: .9rem; color: var(--grau); }
.nachbarn .vor { text-align: right; grid-column: 2; }

/* Galerie */
.galerie { list-style: none; margin: 0; padding: 0; columns: 3 260px; column-gap: 1.2rem; }
.galerie li { break-inside: avoid; margin-bottom: 1.2rem; }
.galerie img { width: 100%; border-radius: var(--radius); background: var(--linie); }
.galerie p { margin: .5rem 0 0; font-weight: 560; }

/* Lightbox */
.lightbox { border: 0; padding: 0; background: transparent; max-width: 94vw; max-height: 92vh; }
.lightbox::backdrop { background: rgb(15 18 32 / .88); }
.lightbox img { max-width: 94vw; max-height: 86vh; border-radius: 8px; margin: 0 auto; }
.lb-zu {
  display: block; margin: 0 0 .6rem auto; background: var(--papier); color: var(--tinte);
  border: 0; border-radius: 999px; padding: .45em 1.1em; font-weight: 600; cursor: pointer;
}

/* Textseiten */
.text { max-width: 46rem; }
.text h2 { font-size: 1.3rem; margin-top: 2rem; }
.info { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); max-width: var(--breite); }
.text:has(.info) { max-width: var(--breite); }
.info-bilder { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-content: start; }
.info-bilder img { border-radius: var(--radius); aspect-ratio: 4 / 5; object-fit: cover; width: 100%; background: var(--linie); }
.info-bilder img:nth-child(even) { transform: translateY(1.8rem); }
@media (max-width: 820px) { .info { grid-template-columns: 1fr; } }

/* Fuß */
.fuss { margin-top: clamp(3.5rem, 8vw, 6rem); background: var(--papier); }
.fuss-innen { max-width: var(--breite); margin: 0 auto; padding: 2rem 16px 2.4rem; }
.fuss-marke { font-size: 1.5rem; font-weight: 800; letter-spacing: -.04em; color: var(--kobalt); margin-bottom: .3rem; }
.fuss-links { list-style: none; padding: 0; margin: 1rem 0; display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; }
.theme-knopf { background: none; border: 0; padding: 0; color: var(--kobalt); cursor: pointer; text-decoration: underline; text-underline-offset: .18em; text-decoration-thickness: 1px; }

@media (prefers-reduced-motion: no-preference) {
  .held-bilder img { animation: auftauchen .7s cubic-bezier(.2, .7, .2, 1) both; }
  .held-bilder img:last-child { animation-delay: .12s; }
  @keyframes auftauchen { from { opacity: 0; translate: 0 18px; } }
}

/* Drucken: nur das Rezept */
@media print {
  .kopf, .fuss, .werkzeuge, .mehr-bilder, .nachbarn, .abhaken, .portionen button, .skip, dialog { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .rezept-bild img { max-height: 8cm; }
  .rezept-inhalt { grid-template-columns: 7cm 1fr; }
  .zutaten { position: static; max-height: none; background: none; padding: 0; }
  .zutaten input { display: none; }
  .gross { color: #333; }
}
