/* ============================================================
   RezeptAtlas — Wochenmarkt-Plakat-Design
   Eine Familie (Archivo Variable), lokal gehostet.
   ============================================================ */

@font-face {
  font-family: 'Archivo';
  src: url('../fonts/archivo-var.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-stretch: 62.5% 125%;
  font-style: normal;
  font-display: swap;
}

:root {
  --paprika: #C93A1F;
  --paprika-dunkel: #A22D16;
  --safran: #E9A13B;
  --kraut: #3E6B3F;
  --papier: #FAF7F0;
  --karte: #FFFFFF;
  --tinte: #211B12;
  --muted: #6E6455;
  --linie: #E7DFD2;
  --radius: 10px;
  --max: 1180px;
  --schatten: 0 1px 2px rgba(33, 27, 18, .06), 0 8px 24px -12px rgba(33, 27, 18, .18);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { overflow-x: hidden; }
body {
  font-family: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  background: var(--papier);
  color: var(--tinte);
  line-height: 1.55;
  font-size: 16px;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; font-size: 1rem; }
:focus-visible { outline: 3px solid var(--safran); outline-offset: 2px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* Condensed Plakat-Typo */
.display {
  font-stretch: 72%;
  font-weight: 830;
  text-transform: uppercase;
  letter-spacing: .005em;
  line-height: .95;
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--tinte); color: #fff; padding: 10px 16px;
}
.skip-link:focus { left: 8px; top: 8px; }

/* ---------- Header (auto-hide) ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(250, 247, 240, .92);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--tinte);
  transition: transform .28s ease;
}
.site-header.hidden { transform: translateY(-100%); }
.header-inner {
  display: flex; align-items: center; gap: 16px;
  height: 62px;
}
.logo { display: flex; align-items: baseline; gap: 2px; flex-shrink: 0; }
.logo .display { font-size: 1.45rem; }
.logo-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--paprika); align-self: center; margin-left: 3px; }

.header-suche { flex: 1; max-width: 460px; position: relative; display: none; }
.header-suche input {
  width: 100%; padding: 9px 14px 9px 38px;
  border: 2px solid var(--tinte); border-radius: 999px;
  background: var(--karte); font-size: .95rem;
}
.header-suche svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); pointer-events: none; }
@media (min-width: 769px) { .header-suche { display: block; } }

.header-nav { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.nav-link {
  font-stretch: 78%; font-weight: 700; text-transform: uppercase;
  font-size: .85rem; letter-spacing: .04em; padding: 8px 10px;
  border-radius: 8px;
}
.nav-link:hover { background: rgba(201, 58, 31, .09); color: var(--paprika); }
.nav-link.aktiv { color: var(--paprika); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 2px solid var(--tinte); border-radius: 999px;
  padding: 10px 20px;
  font-stretch: 78%; font-weight: 780; text-transform: uppercase;
  font-size: .92rem; letter-spacing: .04em;
  background: var(--karte); color: var(--tinte);
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 3px 0 var(--tinte); }
.btn:active { transform: translateY(0); box-shadow: none; }
.btn-paprika { background: var(--paprika); border-color: var(--paprika-dunkel); color: #fff; }
.btn-paprika:hover { box-shadow: 0 3px 0 var(--paprika-dunkel); }
.btn-klein { padding: 7px 14px; font-size: .8rem; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }

.avatar { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--tinte); object-fit: cover; }
.user-menu { position: relative; }
.user-dropdown {
  position: absolute; right: 0; top: calc(100% + 8px);
  background: var(--karte); border: 2px solid var(--tinte); border-radius: var(--radius);
  box-shadow: var(--schatten); padding: 8px; min-width: 180px; z-index: 50;
}
.user-dropdown p { font-size: .85rem; padding: 6px 10px; color: var(--muted); border-bottom: 1px solid var(--linie); margin-bottom: 6px; }
.user-dropdown button { width: 100%; text-align: left; background: none; border: 0; padding: 8px 10px; border-radius: 6px; font-size: .9rem; }
.user-dropdown button:hover { background: var(--papier); }

/* ---------- Hero ---------- */
.hero { padding: 48px 0 40px; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 44px; align-items: center; }
.eyebrow {
  font-stretch: 78%; font-weight: 700; text-transform: uppercase;
  letter-spacing: .14em; font-size: .8rem; color: var(--paprika);
  margin-bottom: 14px;
}
.hero h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); margin-bottom: 20px; }
.hero h1 .akzent { color: var(--paprika); }
.hero-sub { color: var(--muted); font-size: 1.06rem; max-width: 46ch; margin-bottom: 24px; }

.suchbox { display: flex; gap: 0; max-width: 540px; margin-bottom: 14px; }
.suchbox input {
  flex: 1; padding: 15px 20px; font-size: 1.05rem;
  border: 2.5px solid var(--tinte); border-right: 0;
  border-radius: 14px 0 0 14px; background: var(--karte);
}
.suchbox button {
  padding: 0 26px; border: 2.5px solid var(--paprika-dunkel); border-radius: 0 14px 14px 0;
  background: var(--paprika); color: #fff;
  font-stretch: 75%; font-weight: 800; text-transform: uppercase; font-size: 1rem; letter-spacing: .03em;
}
.suchbox button:hover { background: var(--paprika-dunkel); }

.schnell-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1.5px solid var(--tinte); border-radius: 999px;
  padding: 6px 14px; font-size: .85rem; font-weight: 600;
  background: var(--karte); transition: background .12s, color .12s;
}
.chip:hover, .chip.aktiv { background: var(--tinte); color: var(--papier); }
.chip .anzahl { color: var(--muted); font-size: .78rem; font-weight: 500; }
.chip:hover .anzahl, .chip.aktiv .anzahl { color: rgba(250,247,240,.7); }

.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; }

/* Rezept des Tages */
.tages-karte {
  position: relative; background: var(--karte);
  border: 2.5px solid var(--tinte); border-radius: 16px;
  overflow: hidden; box-shadow: 6px 6px 0 var(--safran);
  transition: transform .15s ease;
}
.tages-karte:hover { transform: translate(-2px, -2px); }
.tages-banner {
  position: absolute; top: 14px; left: -6px; z-index: 2;
  background: var(--paprika); color: #fff;
  font-stretch: 75%; font-weight: 800; text-transform: uppercase;
  letter-spacing: .08em; font-size: .8rem;
  padding: 7px 16px 7px 18px;
  clip-path: polygon(0 0, 100% 0, calc(100% - 10px) 50%, 100% 100%, 0 100%);
}
.tages-karte img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.tages-info { padding: 18px 20px 20px; }
.tages-info h2 { font-size: 1.5rem; line-height: 1.1; margin-bottom: 8px; font-stretch: 80%; font-weight: 800; }
.meta-zeile { display: flex; flex-wrap: wrap; gap: 12px; color: var(--muted); font-size: .88rem; align-items: center; }
.meta-zeile .land { color: var(--paprika); font-weight: 700; }

/* ---------- Sections ---------- */
.section { padding: 42px 0; position: relative; }
.section-kopf { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.section-kopf h2 { font-size: clamp(1.6rem, 3.2vw, 2.3rem); }
.section-kopf .mehr { font-weight: 700; color: var(--paprika); font-size: .95rem; white-space: nowrap; }
.section-kopf .mehr:hover { text-decoration: underline; }

/* Länder-Atlas */
.kontinent-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.laender-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.land-chip {
  display: flex; align-items: center; gap: 10px;
  background: var(--karte); border: 1.5px solid var(--linie);
  border-radius: var(--radius); padding: 10px 14px;
  transition: border-color .12s, transform .12s;
}
.land-chip:hover { border-color: var(--tinte); transform: translateY(-2px); }
.land-chip .flagge { font-size: 1.4rem; line-height: 1; }
.land-chip .name { font-weight: 700; font-size: .92rem; line-height: 1.2; }
.land-chip .anzahl { color: var(--muted); font-size: .78rem; display: block; font-weight: 500; }

/* Rezept-Karten */
.rezept-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.rezept-karte {
  background: var(--karte); border: 1.5px solid var(--linie);
  border-radius: 14px; overflow: hidden;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s;
  display: flex; flex-direction: column;
}
.rezept-karte:hover { transform: translateY(-3px); box-shadow: var(--schatten); border-color: var(--tinte); }
.rezept-karte .bild { position: relative; aspect-ratio: 1; overflow: hidden; background: var(--linie); }
.rezept-karte .bild img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.rezept-karte:hover .bild img { transform: scale(1.04); }
.badge-reihe { position: absolute; top: 10px; left: 10px; display: flex; gap: 6px; }
.badge {
  font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em;
  padding: 3px 9px; border-radius: 999px; color: #fff;
}
.badge-veggie { background: var(--kraut); }
.badge-zeit { background: rgba(33,27,18,.82); }
.badge-match { background: var(--paprika); }
.rezept-karte .info { padding: 13px 15px 15px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.rezept-karte h3 { font-size: 1.02rem; line-height: 1.25; font-weight: 750; font-stretch: 88%; }
.rezept-karte .unten { margin-top: auto; display: flex; justify-content: space-between; align-items: center; font-size: .82rem; color: var(--muted); }
.rezept-karte .land { color: var(--paprika); font-weight: 700; }

/* Kühlschrank-Kachel auf der Startseite */
.scanner-kachel {
  background: var(--tinte); color: var(--papier);
  border-radius: 20px; padding: 40px;
  display: grid; grid-template-columns: 1.2fr .8fr; gap: 32px; align-items: center;
  box-shadow: 8px 8px 0 var(--paprika);
}
.scanner-kachel .eyebrow { color: var(--safran); }
.scanner-kachel h2 { font-size: clamp(1.8rem, 3.6vw, 2.7rem); margin-bottom: 12px; }
.scanner-kachel p { color: rgba(250,247,240,.75); max-width: 48ch; margin-bottom: 22px; }
.scanner-illu { font-size: 5rem; text-align: center; line-height: 1.1; letter-spacing: .1em; }

/* ---------- Filter-Leiste (Suche) ---------- */
.filter-leiste { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 26px; align-items: center; }
.filter-leiste select {
  padding: 9px 12px; border: 1.5px solid var(--tinte); border-radius: 8px;
  background: var(--karte); font-size: .9rem; font-weight: 600;
}
.treffer-anzahl { color: var(--muted); font-size: .92rem; margin-left: auto; }

.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 34px; align-items: center; }
.pagination .seite { color: var(--muted); font-size: .92rem; padding: 0 10px; }

/* ---------- Rezept-Detail ---------- */
.zurueck { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 600; font-size: .92rem; margin: 22px 0 14px; }
.zurueck:hover { color: var(--paprika); }

.detail-kopf { display: grid; grid-template-columns: minmax(0, 460px) 1fr; gap: 38px; margin-bottom: 40px; }
.detail-bild { border: 2.5px solid var(--tinte); border-radius: 18px; overflow: hidden; box-shadow: 6px 6px 0 var(--safran); align-self: start; }
.detail-bild img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.detail-titel h1 { font-size: clamp(1.9rem, 4.2vw, 3.1rem); margin: 10px 0 14px; }
.detail-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }

.stat-reihe { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; margin-bottom: 20px; max-width: 560px; }
.stat {
  background: var(--karte); border: 1.5px solid var(--linie); border-radius: var(--radius);
  padding: 12px 8px; text-align: center;
}
.stat .wert { font-stretch: 75%; font-weight: 800; font-size: 1.35rem; line-height: 1.1; }
.stat .label { font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 600; }

.sterne { display: inline-flex; gap: 2px; color: var(--safran); font-size: 1.15rem; letter-spacing: 1px; }
.sterne.klein { font-size: .95rem; }
.sterne .leer { color: var(--linie); }
.bewertung-zeile { display: flex; align-items: center; gap: 10px; font-size: .95rem; color: var(--muted); }

.detail-body { display: grid; grid-template-columns: minmax(0, 400px) 1fr; gap: 38px; align-items: start; }

.zutaten-karte {
  background: var(--karte); border: 2px solid var(--tinte); border-radius: 16px;
  padding: 24px; position: sticky; top: 84px;
}
.zutaten-karte h2 { font-size: 1.35rem; margin-bottom: 4px; }
.portionen-stepper { display: flex; align-items: center; gap: 12px; margin: 14px 0 18px; }
.portionen-stepper button {
  width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--tinte);
  background: var(--karte); font-size: 1.2rem; font-weight: 800; line-height: 1;
}
.portionen-stepper button:hover { background: var(--tinte); color: var(--papier); }
.portionen-stepper .anzahl { font-weight: 800; font-size: 1.05rem; min-width: 100px; text-align: center; }
.zutaten-liste { list-style: none; }
.zutaten-liste li {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 9px 2px; border-bottom: 1px dashed var(--linie);
  font-size: .96rem; cursor: pointer;
}
.zutaten-liste li:last-child { border-bottom: 0; }
.zutaten-liste li .menge { font-weight: 750; white-space: nowrap; font-variant-numeric: tabular-nums; }
.zutaten-liste li.erledigt { opacity: .45; text-decoration: line-through; }

.schritte { list-style: none; counter-reset: schritt; }
.schritte li {
  counter-increment: schritt; position: relative;
  padding: 0 0 26px 58px; cursor: pointer;
}
.schritte li::before {
  content: counter(schritt);
  position: absolute; left: 0; top: -4px;
  width: 40px; height: 40px; border-radius: 50%;
  border: 2px solid var(--tinte); background: var(--karte);
  display: flex; align-items: center; justify-content: center;
  font-stretch: 75%; font-weight: 800; font-size: 1.15rem;
}
.schritte li:not(:last-child)::after {
  content: ''; position: absolute; left: 19px; top: 40px; bottom: 4px;
  border-left: 2px dashed var(--linie);
}
.schritte li.erledigt { opacity: .5; }
.schritte li.erledigt::before { background: var(--kraut); border-color: var(--kraut); color: #fff; content: '✓'; }

.naehrwerte { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 26px; }
.naehrwert {
  background: var(--papier); border: 1.5px solid var(--linie); border-radius: 999px;
  padding: 7px 16px; font-size: .88rem;
}
.naehrwert b { font-weight: 800; }

/* Bewertungen */
.bewertungen { margin-top: 46px; border-top: 2px solid var(--tinte); padding-top: 32px; }
.bewertungen h2 { font-size: 1.6rem; margin-bottom: 18px; }
.stern-eingabe { display: inline-flex; gap: 4px; font-size: 1.9rem; }
.stern-eingabe button { background: none; border: 0; color: var(--linie); padding: 2px; transition: transform .1s; }
.stern-eingabe button.an { color: var(--safran); }
.stern-eingabe button:hover { transform: scale(1.15); }
.bewertung-form { background: var(--karte); border: 1.5px solid var(--linie); border-radius: 14px; padding: 20px; margin-bottom: 26px; }
.bewertung-form textarea {
  width: 100%; min-height: 80px; border: 1.5px solid var(--linie); border-radius: 8px;
  padding: 12px; margin: 12px 0; resize: vertical;
}
.login-hinweis { background: var(--karte); border: 1.5px dashed var(--tinte); border-radius: 14px; padding: 20px; margin-bottom: 26px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px; justify-content: space-between; }
.kommentar { border-bottom: 1px solid var(--linie); padding: 16px 0; display: flex; gap: 12px; }
.kommentar .avatar { flex-shrink: 0; }
.kommentar .kopf { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.kommentar .name { font-weight: 750; font-size: .95rem; }
.kommentar .datum { color: var(--muted); font-size: .8rem; }
.kommentar p { font-size: .95rem; }

/* ---------- Kühlschrank-Seite ---------- */
.scanner-hero { text-align: center; max-width: 620px; margin: 40px auto 30px; }
.scanner-hero h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); margin-bottom: 14px; }
.scanner-hero p { color: var(--muted); font-size: 1.05rem; }

.upload-zone {
  max-width: 620px; margin: 0 auto 20px;
  border: 3px dashed var(--tinte); border-radius: 20px;
  background: var(--karte); padding: 44px 24px; text-align: center;
  transition: background .15s, border-color .15s;
}
.upload-zone.drag { background: #FFF3E4; border-color: var(--paprika); }
.upload-zone .icon { font-size: 3rem; margin-bottom: 10px; }
.upload-zone p { color: var(--muted); margin: 10px 0 18px; font-size: .95rem; }
.upload-buttons { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.zutaten-manuell { max-width: 620px; margin: 0 auto 40px; text-align: center; }
.zutaten-manuell .oder { color: var(--muted); font-size: .9rem; margin: 18px 0 12px; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; }
.manuell-eingabe { display: flex; gap: 8px; max-width: 460px; margin: 0 auto; }
.manuell-eingabe input {
  flex: 1; padding: 11px 16px; border: 2px solid var(--tinte); border-radius: 999px; background: var(--karte);
}

.erkannt-leiste { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 20px auto 30px; max-width: 700px; }
.zutat-tag {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--tinte); color: var(--papier);
  border-radius: 999px; padding: 7px 8px 7px 16px; font-size: .9rem; font-weight: 600;
}
.zutat-tag button {
  background: rgba(250,247,240,.18); color: var(--papier); border: 0;
  width: 20px; height: 20px; border-radius: 50%; font-size: .75rem; line-height: 1;
}
.zutat-tag button:hover { background: var(--paprika); }

.analyse-status { text-align: center; padding: 40px 20px; }
.kochtopf { font-size: 3.4rem; display: inline-block; animation: wackeln 1s ease-in-out infinite; }
@keyframes wackeln {
  0%, 100% { transform: rotate(-6deg); }
  50% { transform: rotate(6deg); }
}

/* ---------- Diverses ---------- */
.leer-zustand { text-align: center; padding: 60px 20px; color: var(--muted); }
.leer-zustand .icon { font-size: 3rem; margin-bottom: 12px; }
.leer-zustand h2 { color: var(--tinte); font-size: 1.5rem; margin-bottom: 8px; }

.lade-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.skeleton {
  background: linear-gradient(100deg, var(--linie) 40%, #F1EADD 50%, var(--linie) 60%);
  background-size: 200% 100%;
  animation: schimmer 1.3s infinite;
  border-radius: 14px; aspect-ratio: 1 / 1.32;
}
@keyframes schimmer { to { background-position: -200% 0; } }

.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--tinte); color: var(--papier);
  padding: 13px 24px; border-radius: 999px; font-weight: 600;
  z-index: 300; box-shadow: var(--schatten);
  animation: toast-rein .25s ease;
}
@keyframes toast-rein { from { opacity: 0; transform: translate(-50%, 12px); } }

.site-footer {
  margin-top: 60px; border-top: 2px solid var(--tinte);
  background: var(--karte); padding: 36px 0;
}
.footer-inner { display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; align-items: center; color: var(--muted); font-size: .9rem; }

/* Reveal beim Scrollen */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .5s ease, transform .5s ease; }
.reveal.sichtbar { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 920px) {
  .hero-grid { grid-template-columns: 1fr; gap: 30px; }
  .detail-kopf { grid-template-columns: 1fr; gap: 24px; }
  .detail-body { grid-template-columns: 1fr; }
  .zutaten-karte { position: static; }
  .scanner-kachel { grid-template-columns: 1fr; padding: 30px 24px; }
  .scanner-illu { display: none; }
}
@media (max-width: 560px) {
  .stat-reihe { grid-template-columns: repeat(2, 1fr); }
  .rezept-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
  .hero { padding: 30px 0 24px; }
  .suchbox input { padding: 12px 14px; }
  .header-nav .nav-link { display: none; }
}
