/* Academy · Nadja Trauner · Coastal Americana, sonnenverblichen, Kodak Portra.
   Schriften: Fraunces und Figtree frei (SIL Open Font License, Lizenztexte daneben),
   Salzwind ist Nadjas eigene Schrift (alle Rechte bei Nadja Trauner). Alles selbst gehostet, kein Google-Server.
   Salzwind nur für kurze Versal-Labels und Signaturzeilen, nie für Fließtext, nie unter 28 px. */
@font-face { font-family: "Fraunces"; src: url("/oeffentlich/schriften/Fraunces.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("/oeffentlich/schriften/Fraunces-Italic.woff2") format("woff2"); font-weight: 100 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("/oeffentlich/schriften/Figtree.woff2") format("woff2"); font-weight: 300 900; font-display: swap; }
@font-face { font-family: "Salzwind"; src: url("/oeffentlich/schriften/Salzwind-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }

/* Farben. Kein Schwarz: das Dunkelste ist Blaue-Stunde-Nacht.
   Rust nur auf hellem Grund, Amber nur auf dunklem, nie beide auf einer Fläche. Teal bleibt verwaschen.
   --faden ist Rust für Striche und große Labels; --faden-text ist dasselbe Rust, eine Spur tiefer,
   damit kleine Schrift 4.5:1 schafft (Rust pur hat auf Salzcreme nur 3.9:1). */
:root {
  --grund: #F4EEE1;           /* Salzcreme */
  --flaeche: #FBF8F1;         /* Salzcreme, eine Spur heller: Papier */
  --flaeche-2: #EFE7D6;       /* Salzcreme, eine Spur sandiger: ruhige Felder */
  --tinte: #2E3E48;           /* Dämmerungs-Navy */
  --leise: #4C5A64;           /* Body-Grau */
  --linie: #DDD5C4;           /* Haarlinie zwischen Sand und Creme */
  --rand: #7D8E98;            /* Feldränder, 3:1 auf Papier */
  --akzent: #1F3A3D;          /* Knöpfe: Blaue-Stunde-Nacht */
  --akzent-text: #F4EEE1;
  --akzent-hell: #E0D0B2;     /* Treibholz-Sand, aktive Zeilen */
  --faden: #C4562F;           /* Rust */
  --faden-text: #A6461F;      /* Rust für kleine Schrift */
  --ok: #6FA39B;              /* Handtuch-Teal */
  --ok-text: #1F3A3D;
  --ok-hell: #DCE7E2;
  --warn: #2E3E48;            /* bewusst keine Warnfarbe */
  --nacht: #1F3A3D;
  --fokus: #1F3A3D;
  --schatten: 0 1px 2px rgba(46, 62, 72, .05), 0 12px 32px -18px rgba(46, 62, 72, .28);
  --korn: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='k'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .18  0 0 0 0 .24  0 0 0 0 .28  0 0 0 .9 0'/></filter><rect width='100%' height='100%' filter='url(%23k)'/></svg>");
  --korn-deckkraft: .06;

  --schrift-titel: "Fraunces", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --schrift: "Figtree", "Avenir Next", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --schrift-salz: "Salzwind", "Fraunces", Georgia, serif;

  --rund: 14px; --rund-gross: 22px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --grund: #1F3A3D; --flaeche: #25454A; --flaeche-2: #2A4B50; --tinte: #F4EEE1; --leise: #C9D3CC;
    --linie: #36585C; --rand: #8AA3A6;
    --akzent: #EDAE52; --akzent-text: #1F3A3D; --akzent-hell: #2F5357;
    --faden: #EDAE52; --faden-text: #EDAE52;
    --ok: #6FA39B; --ok-text: #F4EEE1; --ok-hell: #2C5052; --warn: #F4EEE1; --fokus: #EDAE52;
    --schatten: 0 1px 2px rgba(10, 25, 27, .2), 0 14px 34px -18px rgba(10, 25, 27, .55);
    --korn-deckkraft: .05;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; }
body { min-height: 100vh; }
body {
  background: var(--grund); color: var(--tinte); font-family: var(--schrift); font-weight: 400;
  font-size: 17px; line-height: 1.7; -webkit-font-smoothing: antialiased; overflow-x: hidden; position: relative;
}
/* Filmkorn wie Portra 400: ruhig, steht still, liegt nur auf dem Grund */
body::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0; opacity: var(--korn-deckkraft); background-image: var(--korn);
}
body > * { position: relative; z-index: 1; }
h1, h2, h3 { font-family: var(--schrift-titel); font-weight: 380; font-variation-settings: "SOFT" 100, "opsz" 72; line-height: 1.15; margin: 0; text-wrap: balance; letter-spacing: .003em; }
p { margin: 0; }
a { color: var(--faden-text); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
img { max-width: 100%; }

/* Schrift-Rollen */
.hand { font-family: var(--schrift-titel); font-style: italic; font-variation-settings: "SOFT" 100, "WONK" 1; color: var(--faden-text); font-size: 1.3rem; line-height: 1.2; }
.salz { font-family: var(--schrift-salz); font-weight: 400; font-size: max(28px, 1.9rem); line-height: 1; letter-spacing: .06em; text-transform: uppercase; color: var(--faden); margin: 0; }
.salz.gross { font-size: clamp(40px, 7vw, 64px); letter-spacing: .05em; }
.gesperrt { font-family: var(--schrift); font-size: .76rem; font-weight: 600; text-transform: uppercase; letter-spacing: .16em; color: var(--leise); }
.strich { display: block; width: 64px; height: 2px; border-radius: 2px; background: var(--faden); }
.leise-text { color: var(--leise); font-size: .94rem; }
.beruhigt { color: var(--leise); font-size: 1rem; font-family: var(--schrift-titel); font-style: italic; font-variation-settings: "SOFT" 100; }

/* Knöpfe: rund, ruhig, immer mindestens 44 px */
button { font: inherit; color: inherit; }
input, textarea, select { font-family: var(--schrift); font-size: 1rem; color: inherit; }
.knopf {
  background: var(--akzent); color: var(--akzent-text); border: 1.5px solid var(--akzent); border-radius: 999px;
  padding: 10px 22px; font-weight: 600; font-size: .98rem; letter-spacing: .01em; cursor: pointer; min-height: 48px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; line-height: 1.25; text-align: center;
  transition: background-color .2s, border-color .2s, transform .2s;
}
.knopf:hover { text-decoration: none; filter: brightness(1.08); }
.knopf:active { transform: translateY(1px); }
.knopf.leise { background: transparent; color: var(--tinte); border-color: var(--rand); }
.knopf.leise:hover { border-color: var(--tinte); background: var(--flaeche); filter: none; }
.knopf.klein { min-height: 44px; padding: 6px 16px; font-size: .92rem; }
.knopf.gefahr { background: transparent; color: var(--tinte); border: 1.5px dashed var(--rand); }
.knopf.gefahr:hover { border-style: solid; border-color: var(--tinte); filter: none; }
.knopf:disabled { opacity: .6; cursor: not-allowed; filter: none; transform: none; }
:focus-visible { outline: 3px solid var(--fokus); outline-offset: 3px; border-radius: 6px; }
.knopf:focus-visible { border-radius: 999px; }
label.knopf:focus-within { outline: 3px solid var(--fokus); outline-offset: 3px; }

/* Felder */
input[type=text], input[type=email], input[type=url], input[type=password], input[type=date], input[type=time], input[type=number], textarea, select {
  background: var(--flaeche); border: 1.5px solid var(--rand); border-radius: 12px; padding: 11px 14px; width: 100%; min-width: 0; min-height: 48px;
  transition: border-color .2s, box-shadow .2s;
}
input:focus-visible, textarea:focus-visible, select:focus-visible { border-color: var(--tinte); outline: 3px solid var(--fokus); outline-offset: 2px; border-radius: 12px; }
input::placeholder, textarea::placeholder { color: var(--leise); opacity: .85; }
textarea { min-height: 160px; resize: vertical; line-height: 1.6; }
label.feld { display: grid; gap: 6px; font-weight: 600; font-size: .94rem; }

/* Sanfter Fortschritt */
.balken { height: 4px; background: var(--linie); border-radius: 99px; overflow: hidden; }
.balken > span { display: block; height: 100%; background: var(--ok); width: 0; transition: width .4s; }

/* Text in Lektionen und Briefen */
.text p { margin: 0 0 1em; }
.text ul { margin: 0 0 1em; padding-left: 1.3rem; }
.text li { margin-bottom: .3em; }
.text strong { color: var(--tinte); font-weight: 650; }
.text > :last-child { margin-bottom: 0; }
.text h3 { font-family: var(--schrift-titel); font-size: 1.15rem; color: var(--tinte); margin: 1.6em 0 .5em; }
.text ol.schritte { margin: 0 0 1em; padding-left: 1.5rem; }
.text ol.schritte li { margin-bottom: .5em; padding-left: .2rem; }
.text code { font-family: ui-monospace, Menlo, monospace; font-size: .92em; background: var(--flaeche-2); padding: .1em .35em; border-radius: 4px; }
.kopierkasten { position: relative; background: var(--flaeche-2); border: 1px solid var(--linie); border-left: 4px solid var(--faden); border-radius: 10px; padding: .9rem 1rem 3rem; margin: 0 0 1.2em; }
.kopierkasten pre { margin: 0; white-space: pre-wrap; word-break: break-word; font-family: var(--schrift); font-size: 1rem; line-height: 1.55; color: var(--tinte); }
.kopierkasten .kopieren { position: absolute; right: .7rem; bottom: .6rem; }
video { background: var(--nacht) !important; }

/* Bildstellen: echtes Foto obenauf, darunter eine ruhige Szene aus der Palette, falls das Foto (noch) fehlt */
:root {
  --szene-strand:
    radial-gradient(circle at 74% 30%, rgba(251, 242, 220, .95) 0 5%, rgba(251, 242, 220, 0) 20%),
    linear-gradient(180deg, #D3DCD7 0%, #ECE6D8 45%, #ABBFBC 45.4%, #94AFAC 51%, #C6D2CC 54.6%, #E8DCC2 55%, #E0D0B2 76%, #D3BF9B 100%);
  --szene-fenster:
    linear-gradient(90deg, transparent 0 49%, rgba(214, 196, 162, .95) 49% 51%, transparent 51%),
    linear-gradient(180deg, transparent 0 66%, #CDB792 66% 69%, #E0D0B2 69% 100%),
    radial-gradient(circle at 28% 34%, rgba(251, 242, 220, .95) 0 4%, transparent 16%),
    linear-gradient(180deg, #D9E0DA 0%, #EEE8DA 40%, #B3C5C1 40.4%, #9CB6B2 54%, #C9D3CC 66%);
  --szene-teal:      radial-gradient(circle at 78% 26%, rgba(251, 242, 220, .7) 0 4%, transparent 18%), linear-gradient(175deg, #DCE6E1 0%, #BFD3CE 48%, #A3C1BA 48.5%, #8FB3AC 100%);
  --szene-sand:      radial-gradient(circle at 24% 30%, rgba(255, 249, 235, .85) 0 5%, transparent 20%), linear-gradient(175deg, #F2EADB 0%, #E9DCC4 52%, #E0D0B2 52.5%, #D3BF9B 100%);
  --szene-denim:     radial-gradient(circle at 70% 34%, rgba(244, 238, 225, .55) 0 4%, transparent 17%), linear-gradient(175deg, #D6DEDB 0%, #AFC0C6 50%, #93A8B4 50.5%, #7E95A3 100%);
  --szene-daemmer:   radial-gradient(circle at 30% 50%, rgba(251, 232, 205, .85) 0 5%, transparent 19%), linear-gradient(175deg, #EBDCCB 0%, #DFC3AE 55%, #CBA48D 55.5%, #BE9580 100%);
  --szene-clapboard: repeating-linear-gradient(180deg, transparent 0 26px, rgba(46, 62, 72, .07) 26px 27px), linear-gradient(175deg, #E6EBE6 0%, #C9D3CC 60%, #B6C3BB 100%);
  --szene-nacht:     radial-gradient(circle at 72% 30%, rgba(237, 174, 82, .45) 0 3%, transparent 14%), linear-gradient(175deg, #46625F 0%, #2F4C4F 52%, #284447 52.5%, #1F3A3D 100%);
}
.bild {
  position: relative; display: block; overflow: hidden; border-radius: var(--rund-gross);
  background-color: #E0D0B2; background-image: var(--foto, none), var(--szene, var(--szene-strand));
  background-size: cover; background-position: center; background-repeat: no-repeat;
}
.bild::after { /* sonnenverblichen: ein Hauch Licht von links oben, dazu Korn */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(120% 90% at 0% 0%, rgba(251, 240, 214, .2), transparent 55%), var(--korn);
  opacity: .9; mix-blend-mode: soft-light;
}
.szene-strand { --szene: var(--szene-strand); }
.szene-fenster { --szene: var(--szene-fenster); }
.szene-1 { --szene: var(--szene-teal); }
.szene-2 { --szene: var(--szene-sand); }
.szene-3 { --szene: var(--szene-denim); }
.szene-4 { --szene: var(--szene-daemmer); }
.szene-5 { --szene: var(--szene-clapboard); }
.szene-6 { --szene: var(--szene-nacht); }
@media (prefers-color-scheme: dark) {
  .bild { filter: brightness(.84) saturate(.9); }
}

.sr-nur { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Ruhige Meldung */
.hinweis { background: var(--flaeche-2); border-radius: var(--rund); padding: 14px 18px; color: var(--tinte); border-left: 3px solid var(--faden); }

.fuss { color: var(--leise); font-size: .88rem; display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; padding: 28px 16px 36px; }
.fuss a { color: var(--leise); min-height: 44px; display: inline-flex; align-items: center; }

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