/* ==========================================================================
   Baumstriezelei – Stylesheet
   Aufbau: 1 Token · 2 Basis · 3 Layout · 4 Header/Footer · 5 Komponenten
           6 Seitenbereiche · 7 Responsiv
   ========================================================================== */

/* 1. Token ---------------------------------------------------------------- */
:root {
  /* Farben – aus dem Produkt abgeleitet: Mehl, Papier, Kruste, Zimt, Zucker */
  --mehl:          #F4EEE2;   /* Seitenhintergrund */
  --papier:        #FFFCF6;   /* helle Flächen, Karten */
  --kruste:        #8C4B1D;   /* Primärfarbe: Buttons, Links */
  --kruste-dunkel: #6B3810;   /* Hover */
  --zimt:          #2B1A10;   /* Fließtext */
  --zimt-hell:     #6E5A4B;   /* Nebentext */
  --zucker:        #D9A441;   /* goldener Akzent, sparsam */
  --linie:         #DCCFB9;   /* Trennlinien, Rahmen */
  --gruen:         #4C6A38;   /* Vegan-Hinweis */
  --rot:           #9B2E2E;   /* Fehlermeldung */

  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body:    'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --measure: 64ch;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --radius: 6px;
  --shadow: 0 1px 2px rgba(43, 26, 16, 0.06), 0 12px 32px -16px rgba(43, 26, 16, 0.18);
}

/* 2. Basis ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--zimt);
  background: var(--mehl);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  hyphens: auto;
  overflow-wrap: anywhere;
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.5rem, 5.5vw, 4rem); }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); }
h3 { font-size: 1.35rem; font-weight: 500; }
h4 { font-size: 1.1rem; font-weight: 500; font-family: var(--font-body); }

p, ul, ol { margin: 0 0 1.1em; }
p:last-child, ul:last-child, ol:last-child { margin-bottom: 0; }

a {
  color: var(--kruste);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
a:hover { color: var(--kruste-dunkel); }

:focus-visible {
  outline: 2px solid var(--kruste);
  outline-offset: 3px;
  border-radius: 2px;
}

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

strong { font-weight: 600; }
small { font-size: 0.9rem; color: var(--zimt-hell); }

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

/* 3. Layout --------------------------------------------------------------- */
.wrap {
  width: min(100% - 2 * var(--gutter), 72rem);
  margin-inline: auto;
}
.wrap--narrow { width: min(100% - 2 * var(--gutter), 46rem); }

.section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.section--tight { padding-block: clamp(2.5rem, 5vw, 4rem); }
.section--papier { background: var(--papier); }
.section + .section { border-top: 1px solid var(--linie); }

.prose { max-width: var(--measure); }
.prose p { margin-bottom: 1.2em; }

.lead {
  font-size: 1.2rem;
  line-height: 1.55;
  color: var(--zimt-hell);
  max-width: 48ch;
}
.intro {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  line-height: 1.4;
  max-width: 34ch;
  color: var(--zimt);
}

.grid-2 {
  display: grid;
  gap: clamp(2rem, 5vw, 4.5rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
  align-items: start;
}

/* 4. Header & Footer ------------------------------------------------------ */
.site-header {
  background: var(--papier);
  border-bottom: 1px solid var(--linie);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 5rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--zimt);
  font-family: var(--font-display);
  font-size: 1.35rem;
}
.brand img { width: 3.25rem; height: 3.25rem; }

.nav ul {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  gap: clamp(1rem, 2.5vw, 2rem);
  align-items: center;
}
.nav a {
  text-decoration: none;
  color: var(--zimt);
  font-weight: 500;
  padding: 0.35rem 0;
  border-bottom: 2px solid transparent;
}
.nav a:hover { color: var(--kruste); }
.nav a[aria-current="page"] { border-bottom-color: var(--kruste); color: var(--kruste); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--linie);
  border-radius: var(--radius);
  padding: 0.5rem 0.75rem;
  font: inherit;
  color: var(--zimt);
  cursor: pointer;
}

.site-footer {
  background: var(--zimt);
  color: #E9DFD3;
  padding-block: 3.5rem 2rem;
  margin-top: auto;
}
.site-footer a { color: inherit; text-decoration: none; }
.site-footer a:hover { color: var(--zucker); }
.footer-grid {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
}
.footer-grid h3 {
  font-size: 1.25rem;
  color: #fff;
  margin-bottom: 0.75rem;
}
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 0.4rem; }
.footer-grid p { margin-bottom: 0.3rem; }
.footer-bottom {
  margin-top: 3rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 0.9rem;
  color: #B8A999;
}

/* 5. Komponenten ---------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--kruste);
  background: var(--kruste);
  color: #fff;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.btn:hover { background: var(--kruste-dunkel); border-color: var(--kruste-dunkel); color: #fff; }
.btn:disabled { opacity: 0.6; cursor: wait; }
.btn--outline { background: transparent; color: var(--kruste); }
.btn--outline:hover { background: var(--kruste); color: #fff; }
.btn--block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.card {
  background: var(--papier);
  border: 1px solid var(--linie);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 3vw, 2.5rem);
}

/* Checkliste mit Haken in Krustenfarbe */
.checklist {
  list-style: none;
  padding: 0;
  margin: 0;
}
.checklist li {
  position: relative;
  padding-left: 2rem;
  margin-bottom: 0.7rem;
}
.checklist li::before {
  content: '';
  position: absolute;
  left: 0.15rem; top: 0.45rem;
  width: 0.55rem; height: 0.95rem;
  border: solid var(--kruste);
  border-width: 0 2px 2px 0;
  transform: rotate(40deg);
}

/* Zutaten-/Faktenliste mit feiner Linie */
.lined-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.lined-list li {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--linie);
}

.steps { padding-left: 1.4rem; }
.steps li { margin-bottom: 0.8rem; padding-left: 0.3rem; }
.steps li::marker { font-family: var(--font-display); color: var(--kruste); font-weight: 600; }

.badge {
  display: inline-block;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  background: #E6EBDD;
  color: var(--gruen);
}

.pdf-link { font-weight: 600; }

/* Formulare */
.form-grid { display: grid; gap: 1.1rem; }
.form-grid--2 { grid-template-columns: 1fr 1fr; }
.field label {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.35rem;
}
.field input[type="text"],
.field input[type="email"] {
  width: 100%;
  padding: 0.75rem 0.9rem;
  font: inherit;
  color: var(--zimt);
  background: #fff;
  border: 1px solid var(--linie);
  border-radius: var(--radius);
}
.field input:focus { border-color: var(--kruste); outline: none; box-shadow: 0 0 0 3px rgba(140, 75, 29, 0.18); }

.consent {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
  align-items: start;
  font-size: 0.92rem;
  color: var(--zimt-hell);
}
.consent input { margin-top: 0.3rem; width: 1.1rem; height: 1.1rem; accent-color: var(--kruste); }

.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  border: 1px solid;
}
.alert--success { background: #EEF3E6; border-color: #C5D4B1; color: #2F4A1F; }
.alert--error   { background: #F8E9E9; border-color: #E2BCBC; color: var(--rot); }
.alert:focus { outline: none; }

/* 6. Seitenbereiche ------------------------------------------------------- */

/* Startseite – Hero mit Ringmotiv (Querschnitt eines Baumstriezels) */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--papier);
  border-bottom: 1px solid var(--linie);
}
.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  padding-block: clamp(3rem, 7vw, 6rem);
}
.hero h1 { margin-bottom: 0.6em; }
.hero .lead { margin-bottom: 2rem; }
.hero-visual {
  position: relative;
  display: grid;
  place-items: center;
}
.hero-rings {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 150%;
  max-width: none;
  height: auto;
  transform: translate(-50%, -50%);
  color: var(--kruste);
  opacity: 0.14;
  pointer-events: none;
}
.hero-visual img {
  position: relative;
  width: min(100%, 22rem);
  filter: drop-shadow(0 24px 32px rgba(43, 26, 16, 0.22));
}

/* Unterseiten – schlichter Seitenkopf */
.page-head {
  background: var(--papier);
  border-bottom: 1px solid var(--linie);
  padding-block: clamp(2.5rem, 6vw, 4.5rem);
}
.page-head .lead { margin-top: 0.5rem; }

/* Geschichte */
.story p:first-of-type::first-letter {
  font-family: var(--font-display);
  font-size: 3.6em;
  line-height: 0.8;
  float: left;
  padding-right: 0.12em;
  padding-top: 0.08em;
  color: var(--kruste);
}

/* Team */
.team {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  max-width: 40rem;
}
.team figure { margin: 0; }
.team img {
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius);
}
.team figcaption { margin-top: 0.8rem; }
.team figcaption strong { display: block; font-family: var(--font-display); font-size: 1.25rem; font-weight: 500; }
.team figcaption span { color: var(--zimt-hell); }

/* Abschluss-Aufruf */
.cta-band {
  background: var(--kruste);
  color: #fff;
}
.cta-band .wrap {
  padding-block: clamp(3rem, 6vw, 5rem);
  display: grid;
  gap: 1.5rem;
  justify-items: start;
}
.cta-band h2 { color: #fff; max-width: 24ch; }
.cta-band .btn { background: #fff; color: var(--kruste); border-color: #fff; }
.cta-band .btn:hover { background: var(--mehl); border-color: var(--mehl); }
.cta-band small { color: rgba(255, 255, 255, 0.75); }

/* Shop */
.product {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}
.product-image {
  background: var(--papier);
  border: 1px solid var(--linie);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 4vw, 3rem);
  display: grid;
  place-items: center;
}
.product-image img { max-height: 32rem; width: auto; }

.price-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0 1rem;
}
.price-table th, .price-table td {
  text-align: left;
  padding: 0.85rem 0.5rem;
  border-bottom: 1px solid var(--linie);
  vertical-align: baseline;
}
.price-table th { font-weight: 600; font-size: 0.9rem; color: var(--zimt-hell); }
.price-table td:nth-child(2), .price-table th:nth-child(2),
.price-table td:nth-child(3), .price-table th:nth-child(3) { text-align: right; white-space: nowrap; }
.price-table .price {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--kruste);
}
.price-table tbody tr:first-child td { padding-top: 1rem; }

/* Kontakt */
.contact-list {
  list-style: none;
  padding: 0; margin: 0;
  display: grid;
  gap: 1.25rem;
}
.contact-list li { padding-bottom: 1.25rem; border-bottom: 1px solid var(--linie); }
.contact-list li:last-child { border-bottom: 0; }
.contact-list strong { display: block; margin-bottom: 0.2rem; }
.map {
  border: 1px solid var(--linie);
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--papier);
}
.map iframe { width: 100%; height: 100%; border: 0; display: block; }

/* Rechtstexte */
.legal h2 { font-size: 1.5rem; margin-top: 2.2rem; }
.legal h2:first-of-type { margin-top: 0; }
.legal ul { padding-left: 1.3rem; }
.legal a { overflow-wrap: anywhere; }

/* Gratisgeschenk */
.gift-image {
  border-radius: var(--radius);
  aspect-ratio: 4 / 3;
  object-fit: cover;
  width: 100%;
}
.gift-free {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.8rem);
  color: var(--kruste);
  line-height: 1;
  margin-bottom: 0.3em;
}

/* 7. Responsiv ------------------------------------------------------------ */
@media (max-width: 56rem) {
  .hero .wrap, .product { grid-template-columns: minmax(0, 1fr); }
  .hero-visual { order: -1; }
  .hero-visual img { width: min(70%, 16rem); }
}

@media (max-width: 44rem) {
  .nav-toggle { display: inline-flex; }
  .nav {
    position: absolute;
    left: 0; right: 0;
    top: 100%;
    background: var(--papier);
    border-bottom: 1px solid var(--linie);
    display: none;
    z-index: 10;
  }
  .nav.is-open { display: block; }
  .nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem var(--gutter) 1rem;
  }
  .nav a { display: block; padding: 0.8rem 0; border-bottom: 1px solid var(--linie); }
  .nav a[aria-current="page"] { border-bottom-color: var(--linie); }
  .site-header { position: relative; }
  .form-grid--2 { grid-template-columns: 1fr; }
  .price-table th { white-space: normal; }
  .price-table th, .price-table td { padding-inline: 0.25rem; }
}
