/* ============================================================
   Rezeptlabel — Design v1.0
   Warme, editoriale, vertrauenswürdige Ästhetik für Food-Anbieter.
   Selbstgehostete Schriften (DSGVO-konform), keine Drittanbieter.
   ============================================================ */

@font-face {
  font-family: "Fraunces";
  src: url("fonts/fraunces.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  font-style: normal;
}
@font-face {
  font-family: "Inter";
  src: url("fonts/inter.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  font-style: normal;
}

:root {
  --bg: #fbf8f2;          /* warmes Creme */
  --bg-soft: #f4eee2;     /* Sektions-Ton */
  --card: #ffffff;
  --ink: #2a2621;         /* fast schwarz, warm */
  --ink-soft: #5d564c;    /* Fließtext gedämpft */
  --muted: #8b8377;
  --line: #e7ded0;        /* warme Trennlinie */
  --primary: #2f7d4f;     /* Food-Grün */
  --primary-dark: #245f3d;
  --primary-tint: #eaf3ec;
  --accent: #c96f3c;      /* Terracotta-Akzent, sparsam */
  --shadow-sm: 0 1px 3px rgba(42, 38, 33, 0.06);
  --shadow-md: 0 6px 24px rgba(42, 38, 33, 0.08);
  --shadow-lg: 0 18px 48px rgba(42, 38, 33, 0.12);
  --radius: 14px;
  --radius-lg: 20px;
  --maxw: 1080px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

h1, h2, h3, h4 { font-family: "Fraunces", Georgia, "Times New Roman", serif; font-weight: 600; line-height: 1.15; letter-spacing: -0.01em; color: var(--ink); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 248, 242, 0.85);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 15px 24px; }
.logo { font-family: "Fraunces", Georgia, serif; font-size: 1.3rem; font-weight: 600; letter-spacing: -0.01em; }
.logo strong { font-weight: 600; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 24px; border-radius: 10px;
  font-family: "Inter", sans-serif; font-weight: 600; font-size: 1rem;
  text-decoration: none; cursor: pointer; border: 1.5px solid transparent;
  transition: transform .12s ease, background .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--primary-dark); box-shadow: var(--shadow-md); }
.btn-ghost { background: transparent; color: var(--primary); border-color: #cfe0d4; }
.btn-ghost:hover { background: var(--primary-tint); border-color: var(--primary); }
.btn-small { padding: 9px 16px; font-size: 0.92rem; border-radius: 8px; }
.btn-block { display: flex; width: 100%; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }

/* ---------- Hero ---------- */
.hero { padding: 84px 0 60px; text-align: center; position: relative; }
.eyebrow {
  display: inline-block; font-family: "Inter", sans-serif; font-weight: 600;
  font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--primary); background: var(--primary-tint);
  padding: 6px 14px; border-radius: 999px; margin-bottom: 22px;
}
.hero h1 { font-size: clamp(2rem, 5.2vw, 3.4rem); font-weight: 600; margin-bottom: 20px; }
.hero h1 .accent { color: var(--primary); font-style: italic; }
.sub { font-size: clamp(1.05rem, 2.2vw, 1.28rem); color: var(--ink-soft); max-width: 680px; margin: 0 auto 30px; line-height: 1.6; }
.hero-ctas { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 30px; }

/* Trust-Badges */
.trust-badges {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 22px;
  max-width: 760px; margin: 0 auto;
}
.trust-badges span {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 0.9rem; color: var(--ink-soft); font-weight: 500;
}
.trust-badges .check { color: var(--primary); font-weight: 700; }
.hero-note { font-size: 0.9rem; color: var(--muted); margin-top: 4px; }

/* ---------- Sections ---------- */
section { padding: 66px 0; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.15rem); margin-bottom: 12px; text-align: center; }
.section-sub { text-align: center; color: var(--ink-soft); margin-bottom: 40px; font-size: 1.05rem; }

/* ---------- Cards ---------- */
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-sm);
}
.cards-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 20px; margin-top: 30px; }
.cards-3 .card { transition: transform .15s ease, box-shadow .15s ease; }
.cards-3 .card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.cards-3 h3 { margin-bottom: 10px; font-size: 1.18rem; }
.cards-3 p { font-size: 0.98rem; color: var(--ink-soft); }

/* ---------- Demo / Rechner (Centerpiece) ---------- */
.demo-section { background: var(--bg-soft); position: relative; }
.demo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 34px; align-items: start; }
@media (max-width: 780px) { .demo-grid { grid-template-columns: 1fr; } }
.demo-input, .demo-output { box-shadow: var(--shadow-md); border-radius: var(--radius-lg); }
.demo-input h3, .demo-output h3 { margin-bottom: 16px; font-size: 1.22rem; }
.muted { color: var(--muted); font-weight: 400; font-size: 0.82em; font-family: "Inter", sans-serif; }

/* Typeahead */
.search-wrap { position: relative; margin-bottom: 16px; }
.search-wrap input { width: 100%; }
.search-results {
  position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; right: 0;
  list-style: none; margin: 0; padding: 5px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow-lg); max-height: 280px; overflow-y: auto;
}
.search-results li { padding: 9px 12px; border-radius: 8px; cursor: pointer; font-size: 0.93rem; }
.search-results li:hover, .search-results li.active { background: var(--primary-tint); }

/* Formularfelder */
select, input[type="number"], input[type="email"], input[type="text"] {
  padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 10px;
  font-size: 0.98rem; background: #fff; color: var(--ink); width: 100%;
  font-family: "Inter", sans-serif; transition: border-color .15s ease, box-shadow .15s ease;
}
select:focus, input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-tint); }

/* Zutatenliste */
.ingredient-list { display: flex; flex-direction: column; gap: 9px; }
.ingredient-row { display: flex; gap: 8px; align-items: center; padding: 4px 0; }
.ing-name { flex: 1; font-size: 0.94rem; line-height: 1.35; }
.ing-grams { width: 80px; text-align: right; }
.ing-unit { color: var(--muted); font-size: 0.9rem; }
.ingredient-row .remove {
  background: none; border: none; color: var(--muted); font-size: 1.1rem;
  cursor: pointer; padding: 4px 6px; line-height: 1; border-radius: 6px; transition: color .12s;
}
.ingredient-row .remove:hover { color: #b3402e; background: #faeee9; }
.demo-disclaimer { font-size: 0.78rem; color: var(--muted); margin-top: 18px; line-height: 1.5; }

/* Nährwerttabelle */
.nutrition-table { width: 100%; border-collapse: collapse; border: 2px solid var(--ink); border-radius: 4px; }
.nutrition-table td { padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 0.96rem; }
.nutrition-table tr:last-child td { border-bottom: none; }
.nutrition-table .val { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600; }
.nutrition-table .indent td:first-child { padding-left: 30px; color: var(--ink-soft); font-size: 0.9rem; }
.demo-hint { font-size: 0.86rem; color: var(--muted); margin-top: 13px; line-height: 1.5; }
.demo-hint .warn { color: var(--accent); display: block; margin-top: 6px; }
.output-actions { margin-top: 20px; display: flex; flex-direction: column; gap: 11px; }

/* Allergene */
.allergen-box { margin-top: 18px; padding: 15px 17px; background: #fdf6ec; border: 1px solid #ecdcbf; border-radius: 12px; }
.allergen-box h4 { font-family: "Inter", sans-serif; font-size: 0.86rem; font-weight: 700; margin-bottom: 9px; color: #8a6516; letter-spacing: 0.01em; }
.allergen-list { list-style: none; display: flex; flex-wrap: wrap; gap: 7px; }
.allergen-list li { background: #fff; border: 1px solid #ecdcbf; border-radius: 999px; padding: 4px 13px; font-size: 0.84rem; }
.allergen-note { font-size: 0.74rem; color: #a1813f; margin-top: 11px; line-height: 1.45; }

/* ---------- Warum ---------- */
.why-section .cards-3 h3 { display: flex; align-items: center; gap: 8px; }

/* ---------- Steps ---------- */
.how-section { background: var(--bg-soft); }
.steps { max-width: 660px; margin: 30px auto 0; padding: 0; list-style: none; counter-reset: step; }
.steps li {
  position: relative; padding: 0 0 22px 56px; margin: 0;
  font-size: 1.04rem; color: var(--ink-soft); counter-increment: step;
}
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: -2px;
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--primary); color: #fff; font-family: "Fraunces", serif; font-weight: 600;
  display: flex; align-items: center; justify-content: center; font-size: 1.05rem;
}
.steps li:not(:last-child)::after {
  content: ""; position: absolute; left: 18.5px; top: 40px; bottom: 6px; width: 2px; background: var(--line);
}
.steps li strong { color: var(--ink); }

/* ---------- Pricing / Warteliste ---------- */
.pricing-section { text-align: center; }
.pricing-card { max-width: 500px; margin: 34px auto 0; text-align: center; border: 1px solid var(--line); box-shadow: var(--shadow-lg); border-radius: var(--radius-lg); padding: 34px; }
.price { font-family: "Fraunces", serif; font-size: 2.6rem; margin-bottom: 8px; }
.price-old { text-decoration: line-through; color: var(--muted); font-size: 1.4rem; margin-right: 10px; font-weight: 400; }
.price strong { color: var(--primary); }
.price-sub { color: var(--ink-soft); font-size: 0.98rem; margin-bottom: 26px; }
.form-row { display: flex; gap: 10px; margin-bottom: 14px; }
@media (max-width: 560px) { .form-row { flex-direction: column; } }
.form-message { margin-top: 14px; font-weight: 600; min-height: 1.4em; }
.form-message.ok { color: var(--primary-dark); }
.form-message.err { color: #b3402e; }
.form-note { font-size: 0.82rem; color: var(--muted); margin-top: 12px; }

/* ---------- FAQ ---------- */
.faq-section details {
  max-width: 740px; margin: 0 auto 12px; background: var(--card);
  border: 1px solid var(--line); border-radius: 12px; padding: 16px 20px; transition: box-shadow .15s;
}
.faq-section details[open] { box-shadow: var(--shadow-sm); }
.faq-section summary { font-weight: 600; cursor: pointer; list-style: none; position: relative; padding-right: 28px; font-size: 1.02rem; }
.faq-section summary::-webkit-details-marker { display: none; }
.faq-section summary::after { content: "+"; position: absolute; right: 2px; top: -2px; font-size: 1.4rem; color: var(--primary); font-weight: 400; transition: transform .2s; }
.faq-section details[open] summary::after { transform: rotate(45deg); }
.faq-section details p { margin-top: 12px; color: var(--ink-soft); font-size: 0.98rem; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 30px 0; margin-top: 20px; background: var(--bg-soft); }
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 0.9rem; color: var(--muted); }
.site-footer a { color: var(--ink-soft); text-decoration: none; }
.site-footer a:hover { color: var(--primary); }
.bls-attribution { font-size: 0.74rem; color: var(--muted); margin-top: 12px; max-width: 640px; }

/* ---------- Rechtsseiten (Impressum/Datenschutz) ---------- */
.legal { max-width: 760px; padding-top: 44px; padding-bottom: 64px; }
.legal h2 { text-align: left; }
.legal h3 { margin: 26px 0 8px; font-size: 1.15rem; }
.legal p { margin-top: 10px; color: var(--ink-soft); }
.legal a { color: var(--primary); }
