/* =====================================================================
   AT1865 – Grundgestaltung
   Corpsfarben schmücken (Band, Wortmarke, Login-Hintergrund),
   die Bedienung selbst bleibt ruhig und neutral.
   ===================================================================== */

:root {
  /* Corpsfarben */
  --gruen: #1E7A3C;
  --rot: #8B2635;
  --gold: #C8A44B;
  --tief: #1B3A28;

  /* Neutrale Flächen */
  --papier: #F5F3EE;
  --flaeche: #FFFFFF;
  --flaeche-leise: #FAF8F4;
  --linie: #E2DED3;
  --linie-stark: #CFC9BB;

  /* Text */
  --text: #1D2320;
  --text-leise: #5C635E;

  /* Zustände */
  --fokus: #1E7A3C;
  --fehler-text: #8B2635;
  --fehler-flaeche: #F8ECEC;
  --ok-text: #1B5E31;
  --ok-flaeche: #EAF3EC;

  --schrift: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --schrift-marke: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;

  --radius: 8px;
  --band: linear-gradient(to bottom,
            var(--gruen) 0 33.33%, var(--rot) 33.33% 66.66%, var(--gold) 66.66% 100%);

  color-scheme: light;
}

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

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

body {
  margin: 0;
  background: var(--papier);
  color: var(--text);
  font-family: var(--schrift);
  font-size: 1rem;
  line-height: 1.5;
}

a { color: var(--gruen); text-underline-offset: 2px; }
a:hover { color: var(--tief); }

h1, h2, h3 { line-height: 1.25; margin: 0 0 .5rem; }
h1 { font-family: var(--schrift-marke); font-weight: 600; font-size: 1.75rem; letter-spacing: .01em; }
h2 { font-size: 1.125rem; font-weight: 650; }
p { margin: 0 0 1rem; }

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

/* ---------- Couleurband ---------------------------------------------- */
.band { height: 6px; background: var(--band); }

/* ---------- Kopfzeile ------------------------------------------------ */
.kopf { background: var(--flaeche); border-bottom: 1px solid var(--linie); }
.kopf-innen {
  max-width: 960px; margin: 0 auto; padding: .75rem 1rem;
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
}
.marke { display: flex; flex-direction: column; text-decoration: none; color: var(--tief); line-height: 1.1; }
.marke-name { font-family: var(--schrift-marke); font-size: 1.375rem; font-weight: 700; letter-spacing: .04em; }
.marke-zusatz { font-size: .75rem; color: var(--text-leise); letter-spacing: .02em; }

.navi { display: flex; align-items: center; gap: .25rem; margin-left: auto; flex-wrap: wrap; }
.navi a {
  color: var(--text); text-decoration: none; padding: .4rem .65rem; border-radius: 6px;
  border-bottom: 2px solid transparent;
}
.navi a:hover { background: var(--flaeche-leise); }
.navi a[aria-current="page"] { border-bottom-color: var(--gold); border-radius: 6px 6px 0 0; font-weight: 600; }
.navi form { margin: 0; }

/* ---------- Inhalt --------------------------------------------------- */
.inhalt { max-width: 960px; margin: 0 auto; padding: 1.5rem 1rem 3rem; }
.seitenkopf { margin-bottom: 1.5rem; }
.seitenkopf p { color: var(--text-leise); margin: 0; }

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

.karte {
  background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius);
  padding: 1.25rem;
}
.karte h2 { margin-bottom: .25rem; }
.karte p:last-child { margin-bottom: 0; }
.karte-leise { color: var(--text-leise); font-size: .9375rem; }

.marker {
  display: inline-block; font-size: .75rem; font-weight: 600; letter-spacing: .03em;
  padding: .1rem .5rem; border-radius: 999px; background: var(--flaeche-leise);
  border: 1px solid var(--linie); color: var(--text-leise); vertical-align: middle;
}

.karte h3 { font-size: 1.125rem; font-weight: 650; margin: 0 0 .25rem; }
.karte-arbeit { border-top: 3px solid var(--gold); }
.marker-arbeit { background: #FBF5E6; border-color: #E8D9AE; color: #6E5A22; }

/* ---------- Abschnitte Startseite ------------------------------------ */
.abschnitt { margin-bottom: 2.25rem; }
.abschnitt-titel {
  font-size: .8125rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-leise); margin-bottom: .75rem;
}
.abschnitt-hinweis { color: var(--text-leise); font-size: .9375rem; margin-bottom: 1.25rem; max-width: 60ch; }
.unterabschnitt { font-size: 1rem; font-weight: 650; margin: 1.25rem 0 .5rem; }

.vorschau {
  list-style: none; margin: 0; padding: 0;
  background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius);
}
.vorschau li {
  display: grid; grid-template-columns: 13rem 1fr; gap: .25rem 1rem;
  padding: .75rem 1.25rem; border-top: 1px solid var(--linie);
}
.vorschau li:first-child { border-top: none; }
.vorschau strong { font-weight: 600; }
.vorschau span { color: var(--text-leise); }
@media (max-width: 640px) {
  .vorschau li { grid-template-columns: 1fr; padding: .75rem 1rem; }
}

.angaben { display: grid; grid-template-columns: max-content 1fr; gap: .4rem 1.25rem; margin: 0; }
.angaben dt { color: var(--text-leise); }
.angaben dd { margin: 0; }

/* ---------- Formulare & Schaltflächen ------------------------------- */
.feld { margin-bottom: 1rem; }
.feld label { display: block; font-weight: 600; font-size: .9375rem; margin-bottom: .3rem; }
.feld input {
  width: 100%; font: inherit; color: var(--text); background: var(--flaeche);
  border: 1px solid var(--linie-stark); border-radius: 6px; padding: .65rem .75rem;
  min-height: 44px;
}
.feld input:focus { border-color: var(--fokus); outline: 2px solid var(--fokus); outline-offset: 0; }
.feld .hilfe { font-size: .8125rem; color: var(--text-leise); margin-top: .3rem; }
.feld .fehler { font-size: .875rem; color: var(--fehler-text); margin-top: .3rem; }
.feld-code input { font-size: 1.5rem; letter-spacing: .15em; text-align: center; font-variant-numeric: tabular-nums; }

.knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
  min-height: 44px; padding: .55rem 1.1rem; border-radius: 6px;
  border: 1px solid var(--linie-stark); background: var(--flaeche); color: var(--text);
}
.knopf:hover { background: var(--flaeche-leise); }
.knopf-haupt { background: var(--tief); border-color: var(--tief); color: #fff; }
.knopf-haupt:hover { background: #24492f; color: #fff; }
.knopf-breit { width: 100%; }
.knopf-klein { min-height: 36px; padding: .3rem .75rem; font-weight: 500; }
.knopf-link { background: none; border: none; padding: .4rem .65rem; min-height: 0; font-weight: 400; }
.knopf-link:hover { background: var(--flaeche-leise); }

/* ---------- Meldungen ------------------------------------------------ */
.meldung { border-radius: 6px; padding: .75rem 1rem; margin-bottom: 1rem; border: 1px solid; }
.meldung-fehler { background: var(--fehler-flaeche); border-color: #E8C9CC; color: var(--fehler-text); }
.meldung-ok { background: var(--ok-flaeche); border-color: #C9DFCF; color: var(--ok-text); }
.meldung-info { background: var(--flaeche-leise); border-color: var(--linie); color: var(--text); }

/* ---------- Anmeldeseiten -------------------------------------------- */
.anmeldung {
  min-height: 100vh; min-height: 100dvh; background: var(--tief);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 2rem 1rem;
}
.anmeldung-marke { text-align: center; margin-bottom: 1.5rem; color: var(--gold); }
.anmeldung-marke .marke-name { font-size: 2.25rem; display: block; }
.anmeldung-marke .marke-zusatz { color: #CBD6CE; font-size: .875rem; }
.anmeldung-karte {
  width: 100%; max-width: 400px; background: var(--flaeche); border-radius: var(--radius);
  overflow: hidden; box-shadow: 0 12px 32px rgba(0, 0, 0, .25);
}
.anmeldung-karte .innen { padding: 1.5rem; }
.anmeldung-karte h1 { font-size: 1.375rem; }
.anmeldung-fuss { margin-top: 1.25rem; font-size: .8125rem; color: #B9C6BD; text-align: center; max-width: 400px; }
.anmeldung-fuss a { color: var(--gold); }

.umschalter {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin-bottom: 1.25rem;
  background: var(--flaeche-leise); border: 1px solid var(--linie); border-radius: 8px;
}
.umschalter a {
  text-align: center; text-decoration: none; color: var(--text-leise);
  padding: .5rem; border-radius: 6px; font-size: .9375rem;
}
.umschalter a[aria-current="true"] {
  background: var(--flaeche); color: var(--text); font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .08);
}

@media (max-width: 480px) {
  h1 { font-size: 1.5rem; }
  .navi { margin-left: -.5rem; width: calc(100% + 1rem); gap: 0; }
  .navi a, .navi .knopf-link { padding: .4rem .5rem; font-size: .9375rem; }
}
