/* Hoffest 2026 — Umsetzung des Entwurfs „2a Hof, dunkelgrün":
   Karte auf Sandgrund, dunkelgrüner Kopf und Fuß, Bitter für Überschriften, Karla für alles andere. */

@font-face {
  font-family: 'Karla';
  src: url('/fonts/karla.woff2') format('woff2-variations');
  font-weight: 400 800; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Bitter';
  src: url('/fonts/bitter.woff2') format('woff2-variations');
  font-weight: 400 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Bitter';
  src: url('/fonts/bitter-italic.woff2') format('woff2-variations');
  font-weight: 400 700; font-style: italic; font-display: swap;
}

:root {
  --grund: #e8e6e0;
  --papier: #f3ecdd;
  --feld: #fffdf8;
  --gruen: #17281f;
  --gruen-weich: #5a6b5f;
  --gruen-label: #4b5a4f;
  --gruen-hell: #6b7a6f;
  --gruen-wert: #3e4e43;
  --gruen-kopf: #7a8a7e;

  --linie: rgba(23, 40, 31, 0.24);
  --linie-weich: rgba(23, 40, 31, 0.14);
  --linie-zart: rgba(23, 40, 31, 0.12);

  /* Hex zuerst als Fallback, oklch überschreibt, wo es unterstützt wird. */
  --akzent: #a84811;
  --akzent: oklch(0.52 0.14 45);
  --akzent-hell: #c86830;
  --akzent-hell: oklch(0.62 0.14 48);
  --akzent-zart: #d7935a;
  --akzent-zart: oklch(0.72 0.11 60);

  --rand: clamp(1.5rem, 6vw, 3rem);
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  padding: clamp(0rem, 4vw, 3.5rem) clamp(0rem, 4vw, 2rem);
  background: var(--grund);
  color: var(--gruen);
  font-family: 'Karla', system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}

.karte {
  max-width: 620px;
  margin: 0 auto;
  background: var(--papier);
  box-shadow: 0 24px 60px rgba(23, 40, 31, 0.16);
}

:where(input, textarea, button):focus-visible {
  outline: 2px solid var(--akzent);
  outline-offset: 2px;
}

/* ---------- Kopf ---------- */

.kopf {
  padding: clamp(2.5rem, 8vw, 3.25rem) var(--rand) clamp(2rem, 6vw, 2.75rem);
  background: var(--gruen);
  color: var(--papier);
}

.kopf__titel {
  margin: 0;
  font-family: 'Bitter', Georgia, serif;
  font-weight: 700;
  font-size: clamp(2.6rem, 11vw, 4.25rem);
  line-height: 1;
  letter-spacing: -0.03em;
  white-space: nowrap;
}
.kopf__titel span { font-weight: 400; color: var(--akzent-hell); }

.kopf__zeile {
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(243, 236, 221, 0.24);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}

.kopf__countdown {
  font-family: 'Bitter', Georgia, serif;
  font-style: italic;
  font-size: 1rem;
  color: var(--akzent-zart);
}

/* ---------- Brief ---------- */

.brief {
  padding: clamp(2rem, 7vw, 2.75rem) var(--rand);
  border-bottom: 1px solid var(--linie-weich);
  display: flex;
  flex-direction: column;
  gap: 1.125rem;
  line-height: 1.65;
  text-wrap: pretty;
}
.brief p { margin: 0; }
.brief strong { font-weight: 700; }

/* ---------- Überschriften ---------- */

.titel {
  margin: 0;
  font-family: 'Bitter', Georgia, serif;
  font-weight: 600;
  font-size: clamp(1.5rem, 5vw, 1.875rem);
  line-height: 1.2;
}
.titel__sub { margin: 0.375rem 0 0; font-size: 0.94rem; color: var(--gruen-weich); }

/* ---------- Formular ---------- */

.eintrag { padding: clamp(2rem, 7vw, 2.75rem) var(--rand); border-bottom: 1px solid var(--linie-weich); }

.form { margin-top: 1.625rem; display: flex; flex-direction: column; gap: 1.375rem; }

.feld { display: flex; flex-direction: column; gap: 0.45rem; }

.label {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gruen-label);
}

.form input[type="text"],
.form input[type="number"],
.form textarea {
  font: inherit;
  color: inherit;
  padding: 0.8rem 0.875rem;
  background: var(--feld);
  border: 1px solid var(--linie);
  border-radius: 2px;
  outline: none;
}
.form textarea { resize: vertical; font-family: inherit; }
.form input::placeholder, .form textarea::placeholder { color: #a3a396; }
.form input:focus, .form textarea:focus { border-color: var(--akzent); }

.reihe { display: grid; grid-template-columns: 1fr 150px; gap: 1.125rem; align-items: end; }
.reihe .feld { gap: 0.6rem; }

.wahl { display: flex; gap: 0.625rem; }
.wahl__option {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.75rem;
  font-size: 0.94rem;
  background: var(--feld);
  border: 1px solid var(--linie);
  border-radius: 2px;
  cursor: pointer;
}
.wahl__option input { accent-color: var(--akzent); margin: 0; }
.wahl__option:has(input:checked) { border-color: var(--akzent); }

.hinweis { margin: -0.75rem 0 0; font-size: 0.88rem; color: var(--gruen-hell); }

.form__fuss { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }

.senden {
  align-self: flex-start;
  padding: 0.875rem 2.125rem;
  font: 700 1rem/1 'Karla', sans-serif;
  letter-spacing: 0.04em;
  color: var(--papier);
  background: var(--gruen);
  border: none;
  border-radius: 2px;
  cursor: pointer;
  transition: background-color 0.15s;
}
.senden:hover { background: var(--akzent); }
.senden[disabled] { opacity: 0.6; cursor: progress; }

.meldung { margin: 0; font-size: 0.9rem; color: var(--gruen-weich); }
.meldung--ok { color: var(--akzent); }
.meldung--fehler { color: #8f2f1c; }

/* ---------- Liste ---------- */

.liste { padding: clamp(2rem, 7vw, 2.75rem) var(--rand); }

.liste__kopf {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}
.liste__zaehler { margin: 0; font-size: 0.94rem; color: var(--gruen-weich); }
.liste__zaehler strong { font-weight: 700; color: var(--akzent); }

.liste__leer {
  margin: 1.375rem 0 0;
  padding: 1.625rem;
  border: 1px dashed rgba(23, 40, 31, 0.28);
  text-align: center;
  font-family: 'Bitter', Georgia, serif;
  font-style: italic;
  color: var(--gruen-hell);
}

.tabelle { margin-top: 1.25rem; }

.tabelle__kopf, .zeile {
  display: grid;
  grid-template-columns: 1.1fr 0.8fr 0.7fr 1.1fr 2rem;
  gap: 0.875rem;
}

.tabelle__kopf {
  padding-bottom: 0.625rem;
  border-bottom: 1px solid var(--linie);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gruen-kopf);
}

.zeile {
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--linie-zart);
  align-items: baseline;
  font-size: 1rem;
}
.zeile__name { font-family: 'Bitter', Georgia, serif; overflow-wrap: anywhere; }

.zeile__werkzeug { justify-self: end; }

.stift {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  color: var(--gruen-kopf);
  background: none;
  border: 1px solid transparent;
  border-radius: 100px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background-color 0.15s;
}
.stift svg { width: 0.9rem; height: 0.9rem; fill: currentColor; }
.stift:hover {
  color: var(--akzent);
  border-color: var(--linie);
  background: rgba(168, 72, 17, 0.07);
}
.zeile__anzahl { font-size: 0.94rem; color: var(--gruen-wert); }
.zeile__status { font-size: 0.88rem; color: var(--akzent); }
.zeile--vielleicht .zeile__status { color: var(--gruen-hell); }
.zeile__bringt { color: var(--gruen-wert); overflow-wrap: anywhere; }
.zeile__notiz { grid-column: 1 / -1; margin-top: 0.2rem; font-size: 0.88rem; color: var(--gruen-hell); }
.zeile--eigen .zeile__name { font-weight: 700; }
.zeile--bearbeitet { background: rgba(168, 72, 17, 0.06); box-shadow: -0.75rem 0 0 rgba(168, 72, 17, 0.06), 0.75rem 0 0 rgba(168, 72, 17, 0.06); }

.abbrechen {
  padding: 0.875rem 1.25rem;
  font: 500 0.94rem/1 'Karla', sans-serif;
  color: var(--gruen-weich);
  background: none;
  border: 1px solid var(--linie);
  border-radius: 2px;
  cursor: pointer;
}
.abbrechen:hover { color: var(--gruen); border-color: var(--gruen); }

/* ---------- Fuß ---------- */

.fuss {
  padding: 1.625rem var(--rand) 2.125rem;
  background: var(--gruen);
  color: var(--papier);
}
.fuss__text { margin: 0; font-size: 0.94rem; opacity: 0.82; }
.fuss__klein {
  margin: 0.625rem 0 0;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.5;
}

/* ---------- Schmale Displays ---------- */

@media (max-width: 34rem) {
  .reihe { grid-template-columns: 1fr; }
  .hinweis { margin-top: -0.5rem; }
  .tabelle__kopf { display: none; }
  .zeile {
    grid-template-columns: 1fr auto 2rem;
    gap: 0.15rem 0.75rem;
    padding: 0.875rem 0;
  }
  .zeile__name { grid-column: 1; }
  .zeile__status { grid-column: 2; text-align: right; }
  .zeile__werkzeug { grid-column: 3; grid-row: 1 / span 2; align-self: center; }
  .zeile__anzahl, .zeile__bringt { grid-column: 1 / 3; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 0.01ms !important; }
}
