/* Quirl-Website — ein Stylesheet für alle Seiten und beide Sprachen.
   Palette abgeleitet aus der App-Seed-Farbe #C0451F (lib/app/theme.dart),
   für Text auf Karten auf WCAG AA (4,5:1) abgedunkelt.
   Keine externen Ressourcen: System-Schriften, lokale Bilder, kein CDN. */

:root {
  --porzellan: #faf7f4;
  --pergament: #f1eae1;
  --gusseisen: #241b15;
  --rauch: #6b5d52;
  --terrakotta: #ad3e1b;   /* 5,05:1 auf --pergament (vorher #c0451f, 4,28:1) */
  --glut: #9a3517;
  --salbei: #566950;       /* 4,98:1 auf --pergament (vorher #667b5e, 3,86:1) */
  --linie: #e0d5c9;

  --grund: var(--porzellan);
  --karte: var(--pergament);
  --tinte: var(--gusseisen);
  --tinte-2: var(--rauch);
  --akzent: var(--terrakotta);
  --akzent-tief: var(--glut);
  --akzent-2: var(--salbei);
  --kontur: var(--linie);

  --serif: 'Iowan Old Style', 'Palatino Linotype', Palatino, 'Book Antiqua',
    Georgia, serif;
  --sans: system-ui, -apple-system, 'Segoe UI', Roboto, 'Noto Sans',
    sans-serif;
  --mono: ui-monospace, 'SF Mono', 'Cascadia Mono', Consolas, 'Liberation Mono',
    monospace;

  --mass: 72rem;
  --rund: 14px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --grund: #1d1611;
    --karte: #291f18;
    --tinte: #f3ebe4;
    --tinte-2: #b3a294;
    --akzent: #e0603a;
    --akzent-tief: #f0825f;
    --akzent-2: #8fa487;
    --kontur: #3d2f24;
    color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --grund: #1d1611;
  --karte: #291f18;
  --tinte: #f3ebe4;
  --tinte-2: #b3a294;
  --akzent: #e0603a;
  --akzent-tief: #f0825f;
  --akzent-2: #8fa487;
  --kontur: #3d2f24;
  color-scheme: dark;
}

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

body {
  margin: 0;
  background: var(--grund);
  color: var(--tinte);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--akzent); text-underline-offset: 3px; }
a:hover { color: var(--akzent-tief); }
:focus-visible {
  outline: 3px solid var(--akzent);
  outline-offset: 3px;
  border-radius: 4px;
}

img { max-width: 100%; height: auto; }

.hof { max-width: var(--mass); margin-inline: auto; padding-inline: 1.25rem; }

/* ---------- Kopf ---------- */

.kopf {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--grund) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--kontur);
}
.kopf-zeile {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 3.6rem;
}
.marke {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--serif);
  font-size: 1.35rem;
  text-decoration: none;
  color: var(--tinte);
}
.marke img {
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  border: 1px solid var(--kontur);
}
.sprunglink {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 20;
  background: var(--akzent);
  color: var(--grund);
  padding: 0.6rem 1rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
}
.sprunglink:focus { top: 0.6rem; color: var(--grund); }

.nav-breit {
  display: flex;
  gap: 1.1rem;
  margin-left: auto;
  flex-wrap: wrap;
}
.kopf nav a {
  color: var(--tinte-2);
  text-decoration: none;
  font-size: 0.95rem;
}
.kopf nav a:hover,
.kopf nav a[aria-current='page'] { color: var(--akzent); }

.menue { display: none; position: relative; }
.menue > summary {
  list-style: none;
  cursor: pointer;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--kontur);
  border-radius: 10px;
  font-size: 1.3rem;
  color: var(--tinte);
}
.menue > summary::-webkit-details-marker { display: none; }
.menue-symbol::before { content: '☰'; }
.menue[open] .menue-symbol::before { content: '✕'; }
.nav-menue {
  position: absolute;
  right: 0;
  top: calc(100% + 0.5rem);
  min-width: 14rem;
  display: flex;
  flex-direction: column;
  background: var(--grund);
  border: 1px solid var(--kontur);
  border-radius: var(--rund);
  padding: 0.4rem;
  box-shadow: 0 12px 32px rgb(0 0 0 / 0.18);
}
.nav-menue a {
  display: block;
  min-height: 2.75rem;
  padding: 0.6rem 0.9rem;
  border-radius: 8px;
  font-size: 1rem;
}
.nav-menue a:hover { background: var(--karte); }
.kopf-werkzeug {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.sprachwechsel {
  font-family: var(--mono);
  font-size: 0.8rem;
  text-decoration: none;
  color: var(--tinte-2);
  border: 1px solid var(--kontur);
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
}
.sprachwechsel:hover { color: var(--akzent); border-color: var(--akzent); }
#themawechsel {
  background: none;
  border: 1px solid var(--kontur);
  border-radius: 999px;
  width: 2.1rem;
  height: 2.1rem;
  cursor: pointer;
  color: var(--tinte-2);
  font-size: 1rem;
  line-height: 1;
}
#themawechsel:hover { color: var(--akzent); border-color: var(--akzent); }

/* ---------- Held: die Rezeptkarte ---------- */

.held {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 3rem;
  align-items: center;
  padding-block: 4.5rem 3.5rem;
}
.held h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.4rem, 5.5vw, 3.8rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0 0 1rem;
}
.held h1 em {
  font-style: italic;
  color: var(--akzent);
}
.held-text p {
  font-size: 1.15rem;
  color: var(--tinte-2);
  max-width: 34rem;
  margin: 0 0 1.75rem;
}
.held-aktionen { display: flex; gap: 0.8rem; flex-wrap: wrap; }
.knopf {
  display: inline-block;
  border-radius: 999px;
  padding: 0.7rem 1.4rem;
  font-weight: 600;
  text-decoration: none;
  border: 1.5px solid transparent;
}
.knopf-voll { background: var(--akzent); color: var(--grund); }
.knopf-voll:hover { background: var(--akzent-tief); color: var(--grund); }
.knopf-rand { border-color: var(--kontur); color: var(--tinte); }
.knopf-rand:hover { border-color: var(--akzent); color: var(--akzent); }

/* Die Signatur: Quirl, notiert als Rezept. */
.rezeptkarte {
  background: var(--karte);
  border: 1px solid var(--kontur);
  border-radius: var(--rund);
  padding: 1.6rem 1.7rem 1.4rem;
  box-shadow: 0 18px 40px -28px rgba(36, 27, 21, 0.5);
  rotate: 0.6deg;
}
.rezeptkarte header {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  border-bottom: 1px dashed var(--kontur);
  padding-bottom: 0.9rem;
  margin-bottom: 0.9rem;
}
.rezeptkarte header img {
  width: 3.4rem;
  height: 3.4rem;
  border-radius: 10px;
  border: 1px solid var(--kontur);
}
.rezeptkarte h2 {
  font-family: var(--serif);
  font-size: 1.45rem;
  margin: 0;
}
.rezeptkarte header p {
  margin: 0.1rem 0 0;
  font-size: 0.85rem;
  color: var(--tinte-2);
}
.karte-label {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--akzent);
  margin: 0.4rem 0;
}
.zutaten { list-style: none; margin: 0 0 0.6rem; padding: 0; }
.zutaten li {
  display: grid;
  grid-template-columns: 3.4rem 1fr;
  gap: 0.75rem;
  padding: 0.28rem 0;
  border-bottom: 1px solid
    color-mix(in srgb, var(--kontur) 55%, transparent);
}
.zutaten li:last-child { border-bottom: 0; }
.zutaten .menge {
  font-family: var(--mono);
  font-size: 0.88rem;
  color: var(--akzent);
  text-align: right;
}
.schritte { margin: 0; padding-left: 1.3rem; }
.schritte li { padding: 0.15rem 0; }
.schritte li::marker {
  font-family: var(--mono);
  color: var(--akzent);
  font-size: 0.85rem;
}

.einblenden { opacity: 0; translate: 0 8px; }
.geladen .einblenden {
  animation: einmessen 0.45s ease-out forwards;
}
.geladen .einblenden:nth-child(2) { animation-delay: 0.07s; }
.geladen .einblenden:nth-child(3) { animation-delay: 0.14s; }
.geladen .einblenden:nth-child(4) { animation-delay: 0.21s; }
.geladen .einblenden:nth-child(5) { animation-delay: 0.28s; }
@keyframes einmessen {
  to { opacity: 1; translate: 0 0; }
}
@media (prefers-reduced-motion: reduce) {
  .einblenden { opacity: 1; translate: 0 0; }
}

/* ---------- Zusagen ---------- */

.zusagen {
  border-block: 1px solid var(--kontur);
  padding-block: 1.1rem;
}
.zusagen ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  justify-content: center;
}
.zusagen li {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--tinte-2);
}
.zusagen li::before { content: '✓ '; color: var(--akzent-2); }

/* ---------- Abschnitte ---------- */

section[id] { scroll-margin-top: 4.5rem; }
.abschnitt { padding-block: 3.6rem; }
.augenbraue {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--akzent);
  margin: 0 0 0.5rem;
}
.abschnitt > .hof > h2,
.abschnitt-titel {
  font-family: var(--serif);
  font-size: clamp(1.7rem, 3.4vw, 2.3rem);
  line-height: 1.15;
  margin: 0 0 1.6rem;
}

.merkmale {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr));
  gap: 1.1rem;
}
.merkmal {
  background: var(--karte);
  border: 1px solid var(--kontur);
  border-radius: var(--rund);
  padding: 1.3rem 1.4rem;
}
.merkmal h3 {
  font-family: var(--serif);
  font-size: 1.2rem;
  margin: 0 0 0.5rem;
}
.merkmal p { margin: 0; color: var(--tinte-2); font-size: 0.98rem; }
.merkmal.gruen h3 { color: var(--akzent-2); }

/* ---------- Screenshots ---------- */

.galerie {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding-block: 0.5rem 1rem;
  scroll-snap-type: x proximity;
}
.galerie figure {
  margin: 0;
  flex: 0 0 auto;
  scroll-snap-align: start;
}
.galerie img {
  height: 460px;
  width: auto;
  border-radius: 18px;
  border: 1px solid var(--kontur);
  box-shadow: 0 14px 30px -22px rgba(36, 27, 21, 0.55);
}
.galerie figcaption {
  text-align: center;
  font-size: 0.82rem;
  color: var(--tinte-2);
  margin-top: 0.4rem;
}
.galerie-hinweis { color: var(--tinte-2); font-size: 0.9rem; }

/* Screenshot-Varianten: Ohne JavaScript folgt das Bild dem Seiten-Design
   (Systemwahl wie data-theme-Umschalter) — die :where()-Hülle hält die
   Spezifität niedrig. Mit JavaScript setzt der Galerie-Schalter data-thema
   direkt an .galerie; diese Regeln stehen zuletzt und gewinnen damit
   unabhängig vom Seiten-Design. Ein Bild ohne Klasse (nur eine Fassung
   vorhanden) bleibt immer sichtbar. */
.galerie .bild-dunkel { display: none; }
@media (prefers-color-scheme: dark) {
  :where(:root:not([data-theme='light'])) .galerie .bild-hell {
    display: none;
  }
  :where(:root:not([data-theme='light'])) .galerie .bild-dunkel {
    display: inline;
  }
}
:where(:root[data-theme='dark']) .galerie .bild-hell { display: none; }
:where(:root[data-theme='dark']) .galerie .bild-dunkel { display: inline; }

.galerie[data-thema='light'] .bild-hell { display: inline; }
.galerie[data-thema='light'] .bild-dunkel { display: none; }
.galerie[data-thema='dark'] .bild-hell { display: none; }
.galerie[data-thema='dark'] .bild-dunkel { display: inline; }

/* Der Schalter selbst: kleine Segmentleiste über der Galerie. */
.galerie-schalter {
  display: inline-flex;
  gap: 0;
  border: 1px solid var(--kontur);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 0.9rem;
}
.galerie-schalter button {
  background: none;
  border: 0;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--tinte-2);
  padding: 0.35rem 1rem;
}
.galerie-schalter button + button { border-left: 1px solid var(--kontur); }
.galerie-schalter button[aria-pressed='true'] {
  background: var(--akzent);
  color: var(--grund);
}
.galerie-schalter button:hover:not([aria-pressed='true']) {
  color: var(--akzent);
}

/* ---------- Downloads ---------- */

.plattformen {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 1rem;
}
.plattform {
  border: 1px solid var(--kontur);
  border-radius: var(--rund);
  padding: 1.2rem 1.3rem;
  background: var(--karte);
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.plattform h3 { margin: 0; font-size: 1.05rem; }
.plattform p { margin: 0; font-size: 0.88rem; color: var(--tinte-2); }
.plattform .status {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--tinte-2);
  margin-top: auto;
  padding-top: 0.6rem;
}
.plattform .status.bereit { color: var(--akzent-2); }
.plattform a { font-weight: 600; }

/* ---------- FAQ ---------- */

.faq details {
  border-bottom: 1px solid var(--kontur);
  padding-block: 0.4rem;
}
.faq summary {
  cursor: pointer;
  font-weight: 600;
  padding-block: 0.55rem;
  list-style-position: outside;
}
.faq summary::marker { color: var(--akzent); }
.faq details p {
  margin: 0.2rem 0 0.9rem;
  color: var(--tinte-2);
}

/* ---------- Fließtext-Seiten (Datenschutz, Impressum) ---------- */

.prosa { max-width: 46rem; padding-block: 3rem 4rem; }
.prosa h1 {
  font-family: var(--serif);
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  line-height: 1.15;
}
.prosa h2 {
  font-family: var(--serif);
  font-size: 1.35rem;
  margin-top: 2.2rem;
}
.prosa li { margin-block: 0.3rem; }
.platzhalter {
  background: color-mix(in srgb, var(--akzent) 12%, var(--karte));
  border: 1px dashed var(--akzent);
  border-radius: 8px;
  padding: 0.1rem 0.45rem;
  font-family: var(--mono);
  font-size: 0.9em;
}

/* ---------- Fuß ---------- */

.fuss {
  border-top: 1px solid var(--kontur);
  padding-block: 2rem 2.6rem;
  font-size: 0.9rem;
  color: var(--tinte-2);
}
.fuss-raster {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 1.4rem 2rem;
  align-items: start;
}
.fuss-titel {
  margin: 0 0 0.4rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--tinte-2);
}
.fuss-gruppe ul { list-style: none; margin: 0; padding: 0; }
.fuss-gruppe li { margin-block: 0.25rem; }
.fuss a[aria-current='page'] { color: var(--tinte); font-weight: 600; }
.fuss a { color: var(--tinte-2); }
.fuss a:hover { color: var(--akzent); }
.fuss .marke { font-size: 1.05rem; }
.fuss .marke img { width: 1.5rem; height: 1.5rem; }

/* ---------- Schmal ---------- */

@media (max-width: 52rem) {
  .held {
    grid-template-columns: 1fr;
    gap: 2.2rem;
    padding-block: 2.8rem 2.4rem;
  }
  .rezeptkarte { rotate: 0deg; }
  .nav-breit { display: none; }
  .menue { display: block; }
  .kopf-werkzeug { margin-left: auto; }
  .galerie img { height: 380px; }
}

/* ---------- Unterstützen ---------- */

.unterstuetzen .hof > p { max-width: 46rem; margin: 0 0 1.6rem; }
.unterstuetzen .plattform .knopf {
  margin-top: auto;
  align-self: flex-start;
}
.unterstuetzen .plattform .knopf { padding: 0.55rem 1.1rem; }
.plattform a.knopf-voll { color: var(--grund); }
.knopf-klein { padding: 0.5rem 1rem; font-size: 0.92rem; margin-top: auto; align-self: flex-start; }

/* ---------- Seitenkopf der Unterseiten ---------- */

.seitenkopf {
  padding-block: 0.5rem 1.4rem;
  border-bottom: 1px solid var(--kontur);
  margin-bottom: 1.8rem;
}
.seitenkopf h1 { margin: 0 0 0.6rem; }
.seitenkopf-text { margin: 0; color: var(--tinte-2); font-size: 1.1rem; max-width: 40rem; }

/* ---------- Installationsseite ---------- */

.plattformwahl {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 0.9rem;
  margin-bottom: 1.6rem;
}
.plattform-karte {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 1rem 1.2rem;
  border: 1px solid var(--kontur);
  border-radius: var(--rund);
  background: var(--karte);
  color: var(--tinte);
  text-decoration: none;
}
.plattform-karte span { color: var(--tinte-2); font-size: 0.9rem; }
.plattform-karte:hover { border-color: var(--akzent); color: var(--tinte); }
.plattform-karte.dein-geraet { border: 2px solid var(--akzent); }
.plattform-karte .marke-geraet {
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--akzent);
}
.hinweis {
  border-left: 4px solid var(--akzent);
  background: var(--karte);
  border-radius: 0 var(--rund) var(--rund) 0;
  padding: 0.6rem 1.2rem;
  margin-block: 1rem;
}
.formate {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
.format {
  border: 1px solid var(--kontur);
  border-radius: var(--rund);
  background: var(--karte);
  padding: 1rem 1.2rem;
}
.format h3 { margin-top: 0; }
.format summary {
  cursor: pointer;
  font-weight: 600;
  min-height: 2.75rem;
  display: flex;
  align-items: center;
}
.befehl {
  position: relative;
  background: var(--grund);
  border: 1px solid var(--kontur);
  border-radius: 8px;
  padding: 0.7rem 0.9rem;
  padding-right: 6.5rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 0.85rem;
}
.befehl .kopieren {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  min-height: 2.2rem;
  padding: 0.3rem 0.8rem;
  border: 1px solid var(--kontur);
  border-radius: 8px;
  background: var(--karte);
  color: var(--tinte);
  font: inherit;
  font-size: 0.8rem;
  cursor: pointer;
}
.nur-screenreader {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
