/* ==========================================================================
   Echt Mallorca — Design System
   Ein einziger Ort für Farben, Typografie und Komponenten.
   ========================================================================== */

:root {
  /* Farben — Mediterran: Sand, Meer, Sonnenuntergang */
  --sand:        #FDF8F1;
  --sand-2:      #F6EDE0;
  --sea:         #0D3B4F;
  --sea-soft:    #1A5A73;
  --sunset:      #E8622C;
  --gold:        #F2A03D;
  --ink:         #1B2A32;
  --ink-soft:    #55676F;
  --line:        #E4D8C8;
  --surface:     #FFFFFF;

  --bg:      var(--sand);
  --fg:      var(--ink);
  --fg-soft: var(--ink-soft);
  --card:    var(--surface);
  --border:  var(--line);
  --accent:  var(--sunset);
  --brand:   var(--sea);

  /* Typografie */
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia,
          "Times New Roman", serif;

  /* Maße */
  --wrap: 1120px;
  --wrap-narrow: 720px;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(13, 59, 79, .06), 0 8px 24px rgba(13, 59, 79, .07);
  --shadow-lg: 0 2px 4px rgba(13, 59, 79, .08), 0 18px 48px rgba(13, 59, 79, .12);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:      #0E1A20;
    --fg:      #EAF0F2;
    --fg-soft: #9DB2BC;
    --card:    #16262E;
    --border:  #243B45;
    --brand:   #EAF0F2;
    --sand-2:  #16262E;
    --shadow:    0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35);
    --shadow-lg: 0 2px 4px rgba(0,0,0,.35), 0 18px 48px rgba(0,0,0,.45);
  }
}

/* --------------------------------------------------------------- Basis -- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; text-decoration-color: color-mix(in srgb, var(--accent) 55%, transparent); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--accent); }

h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.2; margin: 0 0 .5em; font-weight: 600; }
h1 { font-size: clamp(2rem, 5vw, 3.1rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.1rem); letter-spacing: -.01em; }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1.1em; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 20px; }
.wrap-narrow { max-width: var(--wrap-narrow); }

.eyebrow {
  font-family: var(--font);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 .6em;
}

.lead { font-size: 1.15rem; color: var(--fg-soft); }

.muted { color: var(--fg-soft); }

.skip-link {
  position: absolute; left: -9999px;
  background: var(--accent); color: #fff; padding: 10px 16px; border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; top: 0; z-index: 100; }

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

/* -------------------------------------------------------------- Header -- */

.site-header {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}

.site-header .wrap {
  display: flex; align-items: center; gap: 24px;
  min-height: 66px;
}

.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-display);
  font-size: 1.22rem; font-weight: 600; letter-spacing: -.01em;
  text-decoration: none; color: var(--brand);
  white-space: nowrap;
}
.brand svg { flex: none; }

.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.nav a {
  padding: 8px 12px; border-radius: var(--radius-sm);
  font-size: .95rem; text-decoration: none; color: var(--fg-soft);
}
.nav a:hover { background: var(--sand-2); color: var(--fg); }
.nav a[aria-current="page"] { color: var(--fg); font-weight: 600; }

.lang-switch {
  margin-left: 8px; padding-left: 14px;
  border-left: 1px solid var(--border);
  font-size: .85rem; color: var(--fg-soft);
}
.lang-switch a { padding: 6px 6px; text-decoration: none; }
.lang-switch a[aria-current="true"] { color: var(--fg); font-weight: 700; }

/* ---------------------------------------------------------------- Hero -- */

.hero {
  position: relative;
  padding: clamp(48px, 9vw, 104px) 0 clamp(40px, 7vw, 80px);
  background:
    radial-gradient(1000px 420px at 78% -10%, color-mix(in srgb, var(--gold) 26%, transparent), transparent 62%),
    radial-gradient(760px 380px at 12% 8%,  color-mix(in srgb, var(--sunset) 16%, transparent), transparent 60%);
}
.hero h1 { max-width: 16ch; }
.hero .lead { max-width: 52ch; font-size: 1.22rem; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* -------------------------------------------------------------- Buttons -- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px 22px;
  border: 1px solid transparent; border-radius: 999px;
  font: inherit; font-size: .98rem; font-weight: 600;
  text-decoration: none; cursor: pointer;
  transition: transform .12s ease, box-shadow .15s ease, background-color .15s ease;
}
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--accent); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 88%, #000); }

.btn-ghost { background: transparent; color: var(--fg); border-color: var(--border); }
.btn-ghost:hover { background: var(--sand-2); }

.btn-wa { background: #25D366; color: #06331A; }
.btn-wa:hover { background: #1FBA59; }

.btn-block { width: 100%; }

/* -------------------------------------------------------------- Layout -- */

section { padding-block: clamp(40px, 6vw, 76px); }

.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 28px; }
.section-head p { margin: 0; max-width: 58ch; }

.grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

/* --------------------------------------------------------------- Cards -- */

.card {
  display: flex; flex-direction: column;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none; color: inherit;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
a.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }

.card-media {
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, var(--gold), var(--sunset) 55%, var(--sea));
  position: relative;
}
.card-media[data-variant="sea"]    { background: linear-gradient(135deg, #6FC3D6, var(--sea-soft) 60%, var(--sea)); }
.card-media[data-variant="herb"]   { background: linear-gradient(135deg, #A8C66C, #4E8A5B 55%, #1E4A3D); }
.card-media[data-variant="night"]  { background: linear-gradient(135deg, #8E5AA8, #3C2A66 60%, #14163A); }

.card-media img { width: 100%; height: 100%; object-fit: cover; }

.card-body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-body h3 { margin: 0; }
.card-body p { margin: 0; font-size: .95rem; color: var(--fg-soft); }

.card-meta { margin-top: auto; padding-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; }

.tag {
  display: inline-block;
  padding: 3px 10px; border-radius: 999px;
  background: var(--sand-2); border: 1px solid var(--border);
  font-size: .76rem; font-weight: 600; letter-spacing: .02em;
  color: var(--fg-soft);
}
.tag-accent { background: color-mix(in srgb, var(--accent) 14%, transparent); border-color: color-mix(in srgb, var(--accent) 32%, transparent); color: color-mix(in srgb, var(--accent) 82%, var(--fg)); }

/* ------------------------------------------------------------- Rezepte -- */

.recipe-head { padding-block: clamp(32px, 5vw, 56px) 0; }

.recipe-hero {
  aspect-ratio: 21 / 9;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--gold), var(--sunset) 55%, var(--sea));
  margin-bottom: 32px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.recipe-hero img { width: 100%; height: 100%; object-fit: cover; display: block; }

.photo-credit {
  margin: -24px 0 32px;
  font-size: .8rem;
  color: var(--fg-soft);
  text-align: right;
}
.photo-credit a { color: inherit; }

.recipe-facts {
  display: flex; flex-wrap: wrap; gap: 0;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--card);
  margin: 0 0 32px; padding: 0;
  overflow: hidden;
}
.recipe-facts div {
  flex: 1 1 130px; padding: 14px 18px;
  border-right: 1px solid var(--border);
}
.recipe-facts div:last-child { border-right: 0; }
.recipe-facts dt { font-size: .74rem; text-transform: uppercase; letter-spacing: .1em; color: var(--fg-soft); font-weight: 700; }
.recipe-facts dd { margin: 3px 0 0; font-weight: 600; }

.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; }
.steps li {
  counter-increment: step;
  position: relative;
  padding: 0 0 18px 46px;
  border-left: 2px solid var(--border);
  margin-left: 15px;
}
.steps li:last-child { border-left-color: transparent; padding-bottom: 0; }
.steps li::before {
  content: counter(step);
  position: absolute; left: -16px; top: -2px;
  width: 31px; height: 31px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--accent); color: #fff;
  font-size: .88rem; font-weight: 700;
}

/* --------------------------------------------- Bestell-Modul (Kernstück) */

.order-box {
  border: 1px solid color-mix(in srgb, var(--accent) 34%, var(--border));
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin: 36px 0;
}

.order-box > header {
  padding: 18px 22px;
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 22%, var(--border));
}
.order-box > header h3 { margin: 0 0 2px; font-size: 1.15rem; }
.order-box > header p  { margin: 0; font-size: .9rem; color: var(--fg-soft); }

.order-list { list-style: none; margin: 0; padding: 8px 12px; }
.order-list li { border-bottom: 1px solid var(--border); }
.order-list li:last-child { border-bottom: 0; }

.order-list label {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 10px; cursor: pointer;
  font-size: .97rem;
}
.order-list label:hover { background: var(--sand-2); border-radius: var(--radius-sm); }
.order-list input[type="checkbox"] { width: 19px; height: 19px; accent-color: var(--accent); flex: none; }
.order-list .qty { margin-left: auto; color: var(--fg-soft); font-size: .88rem; font-variant-numeric: tabular-nums; }
.order-list .opt { font-size: .78rem; color: var(--fg-soft); font-style: italic; }

.order-actions { padding: 6px 20px 20px; display: grid; gap: 10px; }
.order-note { padding: 0 22px 18px; margin: 0; font-size: .82rem; color: var(--fg-soft); }

/* ------------------------------------------------------------- Banner -- */

.ad-slot {
  display: grid; place-items: center;
  min-height: 110px;
  border: 1px dashed var(--border); border-radius: var(--radius);
  background: var(--sand-2);
  color: var(--fg-soft); font-size: .82rem; text-align: center;
  padding: 18px;
}

.callout {
  border-left: 4px solid var(--accent);
  background: var(--sand-2);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 16px 20px;
  margin: 28px 0;
}
.callout p:last-child { margin-bottom: 0; }

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

.faq { border-top: 1px solid var(--border); }
.faq details { border-bottom: 1px solid var(--border); padding: 4px 0; }
.faq summary {
  cursor: pointer; padding: 16px 4px; font-weight: 600;
  list-style: none; display: flex; justify-content: space-between; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 1.4rem; line-height: 1; flex: none; }
.faq details[open] summary::after { content: "–"; }
.faq details > div { padding: 0 4px 16px; color: var(--fg-soft); }

/* -------------------------------------------------------------- Footer -- */

.site-footer {
  margin-top: 40px;
  border-top: 1px solid var(--border);
  background: var(--sand-2);
  padding-block: 48px 32px;
  font-size: .93rem;
}
.footer-grid { display: grid; gap: 30px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.footer-grid h4 { font-family: var(--font); font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--fg-soft); margin-bottom: .9em; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-grid a { text-decoration: none; color: var(--fg-soft); }
.footer-grid a:hover { color: var(--fg); text-decoration: underline; }

.footer-legal {
  margin-top: 36px; padding-top: 22px;
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  color: var(--fg-soft); font-size: .84rem;
}

/* ------------------------------------------------- Overlays: Alter/Cookies */

.overlay {
  position: fixed; inset: 0; z-index: 90;
  display: grid; place-items: center;
  background: rgba(13, 26, 32, .72);
  backdrop-filter: blur(4px);
  padding: 20px;
}
.overlay[hidden] { display: none; }

.overlay-card {
  background: var(--card); color: var(--fg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  max-width: 420px; width: 100%;
  padding: 30px 28px 26px;
  text-align: center;
}
.overlay-card h2 { font-size: 1.4rem; }
.overlay-card p { font-size: .95rem; color: var(--fg-soft); }
.overlay-card .btn { margin-top: 6px; }

.cookie-bar {
  position: fixed; z-index: 80;
  left: 16px; right: 16px; bottom: 16px;
  max-width: 620px; margin-inline: auto;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  padding: 18px 20px;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  font-size: .9rem;
}
.cookie-bar[hidden] { display: none; }
.cookie-bar p { margin: 0; flex: 1 1 260px; color: var(--fg-soft); }
.cookie-bar .btn { padding: 9px 18px; font-size: .9rem; }

/* -------------------------------------------------------------- Mobile -- */

@media (max-width: 720px) {
  body { font-size: 16px; }
  .site-header .wrap { flex-wrap: wrap; gap: 10px; min-height: 0; padding-block: 12px; }
  .nav { margin-left: 0; width: 100%; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 2px; }
  .nav a { white-space: nowrap; }
  .lang-switch { margin-left: auto; }
  .recipe-facts div { flex-basis: 50%; }
}

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