/* ---------- Design Tokens (Westernstall) ---------- */
:root {
  --leather:    #a86a36;
  --leather-deep:#6f4220;
  --rust:       #b5432b;
  --rust-deep:  #8a2f1d;
  --tan:        #efd9af;
  --cream:      #faf1de;
  --paper:      #fffaf0;
  --ink:        #34251a;
  --ink-soft:   #75614c;
  --line:       #e2cda3;
  --shadow:     0 8px 24px rgba(90, 55, 20, 0.12);
  --radius:     14px;
  --maxw:       900px;
  --font-head:  "Rockwell", "Roboto Slab", Georgia, "Times New Roman", serif;
  font-family: "Segoe UI", "Helvetica Neue", Arial, system-ui, sans-serif;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
}
h1, h2, h3 { line-height: 1.2; font-family: var(--font-head); letter-spacing: 0.01em; }
a { color: var(--rust-deep); }
img { max-width: 100%; }
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0;
}

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
  padding: 0.7rem 1.2rem;
  background: rgba(255, 250, 240, 0.93);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.brand { font-family: var(--font-head); font-weight: 700; font-size: 1.1rem; text-decoration: none; color: var(--ink); }
.brand span { color: var(--rust); }
.nav { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.nav a { text-decoration: none; color: var(--ink-soft); font-weight: 600; font-size: 0.95rem; }
.nav a:hover { color: var(--ink); }
.nav-cta {
  background: var(--rust); color: #fff !important;
  padding: 0.4rem 0.9rem; border-radius: 999px;
}

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(circle at 82% -10%, rgba(245,183,80,0.45), transparent 55%),
    linear-gradient(160deg, #f6dca6 0%, #eccb8d 42%, #e7d4ad 100%);
  padding: 4rem 1.2rem 3.5rem;
  text-align: center;
  border-bottom: 3px solid var(--leather);
}
.hero-inner { max-width: var(--maxw); margin: 0 auto; }
.eyebrow {
  text-transform: uppercase; letter-spacing: 0.12em;
  font-weight: 700; color: var(--rust-deep); font-size: 0.85rem; margin: 0 0 0.6rem;
}
.hero h1 { font-size: clamp(2rem, 6vw, 3.4rem); margin: 0 0 1rem; color: var(--leather-deep); }
.lead { font-size: 1.15rem; color: var(--ink-soft); max-width: 640px; margin: 0 auto 1.6rem; }
.hero-actions { display: flex; gap: 0.8rem; justify-content: center; flex-wrap: wrap; }
.deadline { margin-top: 1.6rem; font-size: 0.98rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; cursor: pointer;
  font-weight: 700; font-size: 1rem;
  padding: 0.75rem 1.5rem; border-radius: 999px;
  text-decoration: none; border: 2px solid transparent;
  transition: transform .08s ease, box-shadow .15s ease, background .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--rust); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { background: var(--rust-deep); }
.btn-ghost { background: transparent; border-color: var(--leather); color: var(--leather-deep); }
.btn-ghost:hover { background: var(--leather); color: #fff; }

/* ---------- Sections ---------- */
.section { max-width: var(--maxw); margin: 0 auto; padding: 3rem 1.2rem; }
.section-alt { background: var(--paper); max-width: none; }
.section-alt > * { max-width: var(--maxw); margin-left: auto; margin-right: auto; }
.section h2 { font-size: 1.8rem; margin: 0 0 0.6rem; color: var(--leather-deep); }
.section h2::after {
  content: ""; display: block; width: 56px; height: 4px;
  background: var(--rust); border-radius: 4px; margin-top: 0.5rem;
}
.section-intro { color: var(--ink-soft); max-width: 680px; margin: 0 0 1.8rem; }

/* ---------- Facts ---------- */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0.9rem; }
.fact {
  display: flex; gap: 0.8rem; align-items: flex-start;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 0.9rem 1rem;
}
.fact-icon { font-size: 1.5rem; line-height: 1; }
.fact div { display: flex; flex-direction: column; font-size: 0.98rem; }
.fact strong { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-soft); }

/* ---------- Cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
.card {
  background: var(--cream); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.2rem;
}
.card h3 { margin: 0 0 0.4rem; font-size: 1.1rem; }
.card p { margin: 0; color: var(--ink-soft); font-size: 0.95rem; }

/* ---------- Rules ---------- */
.rules { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.6rem; }
.rules li {
  background: var(--paper); border: 1px solid var(--line);
  border-left: 4px solid var(--leather); border-radius: 10px;
  padding: 0.7rem 1rem;
}

/* ---------- Form ---------- */
.section-form {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-top: 1rem; margin-bottom: 3rem;
}
form { margin-top: 1rem; }
fieldset {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.2rem 1.2rem 1.4rem; margin: 0 0 1.4rem;
}
legend { font-family: var(--font-head); font-weight: 700; padding: 0 0.5rem; color: var(--leather-deep); }
.field { margin-bottom: 1rem; }
.field:last-child { margin-bottom: 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
label { font-weight: 600; }
.field > label, .field-label { display: block; margin-bottom: 0.35rem; }
.req { color: var(--rust); }
input[type="text"], input[type="number"], textarea {
  width: 100%; padding: 0.65rem 0.8rem;
  border: 1px solid var(--line); border-radius: 10px;
  background: #fff; font: inherit; color: var(--ink);
}
input:focus, textarea:focus { outline: 2px solid var(--leather); border-color: var(--leather); }
textarea { resize: vertical; }

.radio-group { display: flex; gap: 1.2rem; }
.radio-group label { font-weight: 500; }

.checkbox-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0.6rem; }
.checkbox-grid label { font-weight: 500; display: flex; align-items: center; gap: 0.5rem; }

.form-actions { display: flex; flex-direction: column; gap: 0.6rem; align-items: flex-start; }

.confirmation {
  margin-top: 1.4rem; padding: 1rem 1.2rem;
  background: #e9f1da; border: 1px solid var(--leather);
  border-radius: var(--radius); color: var(--leather-deep);
}
.confirmation strong { color: var(--ink); }
.input-error { border-color: #d23b3b !important; }

.btn-small { padding: 0.5rem 1rem; font-size: 0.9rem; }
.hint { color: var(--ink-soft); font-size: 0.9rem; margin: 0 0 0.9rem; }

/* Name + Laden-Button */
.name-row { display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: center; }
.name-row input { flex: 1 1 240px; }

/* Dynamische Buffet-Zeilen */
.buffet-rows { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 0.8rem; }
.buffet-row { display: flex; gap: 0.5rem; align-items: center; }
.buffet-row input { flex: 1; }
.remove-row {
  flex: 0 0 auto; width: 38px; height: 38px; line-height: 1;
  border: 1px solid var(--line); background: #fff; color: var(--rust-deep);
  border-radius: 10px; font-size: 1.2rem; cursor: pointer;
}
.remove-row:hover { background: var(--rust); color: #fff; border-color: var(--rust); }

/* ---------- Mitbring-Übersicht (anonym) ---------- */
.list-result { margin-top: 1.6rem; }
.agg-title { margin: 1.4rem 0 0.6rem; font-size: 1.15rem; color: var(--leather-deep); }
.agg-list {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0.5rem;
}
.agg-list li {
  background: var(--paper); border: 1px solid var(--line);
  border-left: 4px solid var(--leather); border-radius: 10px;
  padding: 0.55rem 0.9rem;
}
.agg-list li strong { color: var(--rust-deep); }
.greeting {
  background: var(--tan); border: 1px solid var(--leather);
  border-radius: var(--radius); padding: 1rem 1.2rem; margin-bottom: 1.4rem;
}
.greeting h3 { margin: 0 0 0.5rem; }
.greeting ul { margin: 0.3rem 0 0; padding-left: 1.2rem; }
.summary-bar {
  display: flex; gap: 1.4rem; flex-wrap: wrap;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 0.9rem 1.2rem; margin-bottom: 1.2rem;
}
.summary-bar b { font-size: 1.3rem; color: var(--rust-deep); display: block; font-family: var(--font-head); }
.summary-bar span { font-size: 0.85rem; color: var(--ink-soft); }
.list-table { width: 100%; border-collapse: collapse; background: var(--paper); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.list-table th, .list-table td { text-align: left; padding: 0.7rem 0.9rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.list-table th { background: var(--tan); font-family: var(--font-head); color: var(--leather-deep); font-size: 0.9rem; }
.list-table tr:last-child td { border-bottom: 0; }
.list-table tr.is-me { background: #fff4dd; }
.list-empty { color: var(--ink-soft); font-style: italic; }
.list-error { color: var(--rust-deep); background: #fde7e3; border: 1px solid var(--rust); border-radius: var(--radius); padding: 0.9rem 1.1rem; }

/* ---------- Footer ---------- */
.footer {
  text-align: center; padding: 2rem 1.2rem;
  color: var(--ink-soft); font-size: 0.9rem;
  border-top: 1px solid var(--line);
}

/* ---------- Responsive ---------- */
@media (max-width: 560px) {
  .field-row { grid-template-columns: 1fr; }
  .nav { gap: 0.7rem; }
  .nav a:not(.nav-cta) { display: none; }
  .summary-bar { gap: 1rem; }
}
