/* Ortston — gemeinsames Aussehen aller Seiten unter ortston.de.
   Farben aus den Covern: Papier, Tinte (Linienzeichnung), Morgensonne. */

:root {
  color-scheme: light dark;
  --papier: #faf6ec;
  --flaeche: #ffffff;
  --tinte: #1c2a3f;
  --leise: #56627a;
  --linie: #ddd5c4;
  --feldrand: #b9b09d;
  --sonne: #f2b53a;
  --sonne-hell: #fdf1d3;
  --link: #1f4fb5;
  --fehler: #b3261e;
  --fehler-hell: #fbeae8;
  --gut: #1e6b3a;
  --gut-hell: #e7f4eb;
  --knopf: #1c2a3f;
  --knopf-text: #fffaf0;
}

@media (prefers-color-scheme: dark) {
  :root {
    --papier: #12161d;
    --flaeche: #1a202a;
    --tinte: #ece6d8;
    --leise: #a9b1bf;
    --linie: #323a47;
    --feldrand: #4a5363;
    --sonne: #f2c25b;
    --sonne-hell: rgba(242, 194, 91, .13);
    --link: #9cc4ff;
    --fehler: #ff9a8f;
    --fehler-hell: rgba(255, 154, 143, .12);
    --gut: #86d49f;
    --gut-hell: rgba(134, 212, 159, .12);
    --knopf: #f2c25b;
    --knopf-text: #1c2a3f;
  }
}

[hidden] { display: none !important; }

body {
  margin: 0;
  font: 17px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--tinte);
  background: var(--papier);
  -webkit-text-size-adjust: 100%;
}

a { color: var(--link); text-underline-offset: .15em; }
a:focus-visible { outline: 3px solid var(--sonne); outline-offset: 2px; border-radius: 3px; }

.kopf, main, .fuss { max-width: 40rem; margin: 0 auto; padding: 0 1.25rem; }

h1 { font-size: clamp(1.75rem, 1.3rem + 1.8vw, 2.2rem); line-height: 1.15; letter-spacing: -.01em; margin: 1.25rem 0 .6rem; }
h2 { font-size: 1.25rem; line-height: 1.3; margin: 2.25rem 0 .5rem; }
.einleitung { font-size: 1.08rem; }
.klein { font-size: .88rem; color: var(--leise); }

/* ---- Kopf und Fuß ---------------------------------------------------------- */

.kopf { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1.25rem; padding-top: 1.4rem; }
.marke { display: inline-flex; align-items: center; gap: .55rem; font-size: .9rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: inherit; text-decoration: none; }
.marke::before { content: ""; width: .8rem; height: .8rem; border-radius: 50%; background: var(--sonne); flex: none; }
.claim { font-weight: 400; opacity: .75; }
.navi { display: flex; gap: 1.1rem; font-size: .95rem; }
.navi a { color: inherit; text-decoration: none; padding: .2rem 0; border-bottom: 2px solid transparent; }
.navi a:hover, .navi a[aria-current="page"] { border-bottom-color: var(--sonne); }
@media (max-width: 30rem) { .claim { display: none; } }

.fuss { padding-top: 2.5rem; padding-bottom: 3rem; font-size: .9rem; color: var(--leise); }
.fuss nav { display: flex; flex-wrap: wrap; gap: .3rem 1.1rem; margin-bottom: .35rem; }
.fuss a { color: inherit; }
.fuss p { margin: 0; }

/* ---- Startseite: je Ort eine Kachel ----------------------------------------- */

.orte { display: grid; gap: 1.25rem 1rem; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); margin: 1rem 0 0; padding: 0; list-style: none; }
.ort-kachel { display: block; color: inherit; text-decoration: none; border-radius: 16px; }
.ort-kachel img { display: block; width: 100%; height: auto; aspect-ratio: 1; border: 1px solid var(--linie); border-radius: 14px; background: var(--flaeche); }
.ort-name { display: block; margin-top: .55rem; font-weight: 650; line-height: 1.3; }
.ort-text { display: block; margin-top: .1rem; font-size: .9rem; line-height: 1.35; color: var(--leise); }
.ort-kachel:hover .ort-name { text-decoration: underline; text-underline-offset: .15em; }
.ort-kachel:hover img { border-color: var(--tinte); }
.ort-kachel:focus-visible { outline: 3px solid var(--sonne); outline-offset: 4px; }
.ort-bald:hover .ort-name { text-decoration: none; }
.ort-bald:hover img { border-color: var(--linie); }

/* ---- Seite eines Orts ------------------------------------------------------ */

.zurueck { margin: 1rem 0 0; font-size: .92rem; }
.zurueck a::before { content: "← "; }
.ort-kopf { display: grid; grid-template-columns: 11rem 1fr; gap: 1.4rem; align-items: center; margin-top: 1.25rem; }
.ort-kopf img { display: block; width: 100%; height: auto; border: 1px solid var(--linie); border-radius: 14px; }
.ort-kopf h1 { margin-top: 0; }
.ort-kopf p { margin: .5rem 0 0; }
@media (max-width: 34rem) {
  .ort-kopf { grid-template-columns: 1fr; gap: 1rem; }
  .ort-kopf img { max-width: 13rem; }
}
.feed { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .95rem; word-break: break-all; }

.hoeren { display: flex; flex-wrap: wrap; gap: .6rem; margin: .75rem 0 1rem; }
.hoer-knopf { display: inline-block; padding: .6rem 1.15rem; border: 1px solid var(--tinte); border-radius: 999px; background: var(--flaeche); color: inherit; font-weight: 600; text-decoration: none; }
.hoer-knopf::after { content: " ↗"; font-weight: 400; color: var(--leise); }
.hoer-knopf:hover { background: var(--sonne-hell); }
.hoer-knopf:focus-visible { outline: 3px solid var(--sonne); outline-offset: 2px; }

/* Player erst nach Klick (player.js). Vorher ein Platzhalter mit Hinweis. */
.player-paar { display: grid; gap: 1rem; margin-top: .75rem; }
.einbettung { display: grid; gap: .5rem; justify-items: start; padding: 1.1rem 1.2rem; border: 1px dashed var(--feldrand); border-radius: 12px; background: var(--flaeche); }
.einbettung p { margin: 0; }
.einbettung-titel { font-weight: 650; }
.einbettung.geladen { display: block; padding: 0; border: 0; background: none; }
.knopf.knopf-klein { font-size: .95rem; padding: .55rem 1.15rem; }

.kacheln { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); margin: 1rem 0 0; padding: 0; list-style: none; }
.kachel { display: block; height: 100%; box-sizing: border-box; padding: 1rem 1.1rem; border: 1px solid var(--linie); border-radius: 14px; background: var(--flaeche); color: inherit; text-decoration: none; }
.kachel strong { display: block; font-size: 1.05rem; margin-bottom: .3rem; }
.kachel span { display: block; color: var(--leise); font-size: .93rem; line-height: 1.45; }
.kachel:hover { border-color: var(--tinte); }

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

fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; }
.anliegen > legend { font-size: 1.25rem; font-weight: 700; margin-bottom: .8rem; }

.karten { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.karte { display: grid; grid-template-columns: auto 1fr; column-gap: .65rem; row-gap: .15rem; align-items: start; align-content: start; padding: .8rem .95rem; border: 1px solid var(--linie); border-radius: 12px; background: var(--flaeche); cursor: pointer; }
.karte input { grid-row: 1 / span 2; width: 1.05rem; height: 1.05rem; margin: .2rem 0 0; accent-color: var(--tinte); }
.karte-titel { font-weight: 650; }
.karte-text { grid-column: 2; color: var(--leise); font-size: .92rem; line-height: 1.4; }
.karte:hover { border-color: var(--tinte); }
.karte:has(input:checked) { border-color: var(--tinte); box-shadow: inset 0 0 0 1px var(--tinte); background: var(--sonne-hell); }
.karte:has(input:focus-visible) { outline: 3px solid var(--sonne); outline-offset: 2px; }

.felder { display: grid; gap: 1.15rem; margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--linie); }
.feld { display: grid; gap: .35rem; align-content: start; }
.feld-reihe { display: grid; gap: 1.15rem; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); }
.feld > label:not(.haken), .gruppe > legend { font-weight: 600; font-size: .98rem; }
.gruppe > legend { margin-bottom: .3rem; }
.optional { font-weight: 400; color: var(--leise); }

input[type="text"], input[type="email"], input[type="tel"], input[type="date"], select, textarea {
  box-sizing: border-box; width: 100%; min-height: 2.9rem;
  font: inherit; font-size: 1rem; color: var(--tinte);
  background: var(--flaeche); border: 1px solid var(--feldrand); border-radius: 10px;
  padding: .6rem .8rem;
}
textarea { min-height: 9.5rem; resize: vertical; line-height: 1.5; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--sonne); outline-offset: 1px; border-color: var(--tinte); }
input::placeholder, textarea::placeholder { color: var(--leise); opacity: .8; }
.hilfe { margin: 0; font-size: .9rem; color: var(--leise); }

.haken { display: flex; gap: .6rem; align-items: flex-start; padding: .25rem 0; cursor: pointer; }
.haken input { flex: none; width: 1rem; height: 1rem; margin: .3rem 0 0; accent-color: var(--tinte); }

@media (prefers-color-scheme: dark) {
  .karte input, .haken input { accent-color: var(--sonne); }
}

.abschluss { display: grid; gap: .8rem; justify-items: start; }
.knopf { font: inherit; font-size: 1.05rem; font-weight: 650; padding: .8rem 1.5rem; border: 0; border-radius: 999px; background: var(--knopf); color: var(--knopf-text); cursor: pointer; }
.knopf:hover { filter: brightness(1.18); }
.knopf:focus-visible { outline: 3px solid var(--sonne); outline-offset: 3px; }
.knopf:disabled { opacity: .6; cursor: progress; }
.meldung { justify-self: stretch; margin: 0; padding: .75rem 1rem; border: 1px solid currentColor; border-radius: 10px; background: var(--fehler-hell); color: var(--fehler); }
.meldung:focus { outline: none; }
.status { min-height: 1.4em; margin: 0; font-size: .95rem; color: var(--leise); }
.notiz { margin: 1.25rem 0; padding: .9rem 1.1rem; border: 1px solid var(--sonne); border-radius: 12px; background: var(--sonne-hell); }

.danke { margin-top: 1.25rem; padding: 1.25rem 1.4rem; border: 1px solid var(--gut); border-radius: 14px; background: var(--gut-hell); }
.danke:focus { outline: none; }
.danke h2 { margin-top: 0; }

/* Honigtopf: für Menschen unsichtbar, für Bots ein ganz normales Feld. */
.hp { position: absolute !important; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
