/* ============================================================
   Zeit&Wort – Website (zeitundwort.de)
   Eis, Fjordblau und Tiefsee. Gold nur am Buch und auf der dunklen Bühne.
   Gilt nur für die Website. Die App und das Buch-PDF nutzen weiter styles.css.
   ============================================================ */

/* ---- Schriften: selbst gehostet (keine Anfragen an Google oder Bunny) ---- */
@font-face { font-family: 'Newsreader'; font-style: normal; font-weight: 400; font-display: swap; src: url('assets/fonts/newsreader-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Newsreader'; font-style: italic; font-weight: 400; font-display: swap; src: url('assets/fonts/newsreader-latin-400-italic.woff2') format('woff2'); }
@font-face { font-family: 'Newsreader'; font-style: normal; font-weight: 500; font-display: swap; src: url('assets/fonts/newsreader-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Newsreader'; font-style: italic; font-weight: 500; font-display: swap; src: url('assets/fonts/newsreader-latin-500-italic.woff2') format('woff2'); }
@font-face { font-family: 'Source Sans 3'; font-style: normal; font-weight: 400; font-display: swap; src: url('assets/fonts/source-sans-3-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Source Sans 3'; font-style: normal; font-weight: 600; font-display: swap; src: url('assets/fonts/source-sans-3-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Source Sans 3'; font-style: normal; font-weight: 700; font-display: swap; src: url('assets/fonts/source-sans-3-latin-700-normal.woff2') format('woff2'); }

:root {
  /* Flächen */
  --eis:     #EEF5FA;   /* Seitengrund */
  --frost:   #DDEBF5;   /* zweite Fläche, Bühnen */
  --weiss:   #FFFFFF;   /* Karten, Felder, Buchseiten */
  --linie:   #C6DAE9;   /* Haarlinien */
  --linie-2: #9EC4DE;   /* kräftigere Linien */
  --feld:    #6F8FA9;   /* Rand von Eingabefeldern, 3,4:1 auf Weiß */

  /* Text */
  --tinte:   #0E2A43;   /* 13,3:1 auf --eis */
  --tinte-2: #3B5A75;   /*  6,6:1 auf --eis, 6,0:1 auf --frost */

  /* Akzent: Fjordblau für Knöpfe und Links */
  --fjord:      #1F5E8F; /* weiße Schrift darauf 6,9:1 */
  --fjord-tief: #0E2A43;

  /* Nacht: die eine dunkle Bühne */
  --nacht:    #0B1A2A;
  --nacht-1:  #DCEBF5;  /* Text auf Nacht */
  --nacht-2:  #A9C2D6;  /* 9,5:1 auf Nacht */

  /* Gold: nur Buch und dunkle Bühne */
  --gold:     #D8A23A;  /* 7,7:1 auf Nacht */
  --folie:    #E3B862;

  /* Einband, per Auswahl umschaltbar */
  --einband:      #1B3A57;
  --einband-foto: transparent; /* Foto zeigt bereits Marine */

  --serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --sans:  'Source Sans 3', 'Segoe UI', system-ui, -apple-system, sans-serif;

  --maxw: 1240px;
  --rand: clamp(20px, 5vw, 56px);
  --abschnitt: clamp(80px, 11vw, 150px);
  --r-gross: 32px;
  --r-mittel: 20px;
  --r-klein: 14px;
}

/* ---- Farbwelt folgt der Einbandfarbe, die der Kunde wählt ----
   Marine ist der Standard oben in :root. Alle Kombinationen sind auf Kontrast geprüft:
   Tinte auf Eis ab 13:1, Tinte-2 auf Eis ab 6,6:1, weiße Schrift auf Fjord ab 6,8:1. */
html[data-einband="wald"] {
  --einband: #2F4A3A; --einband-foto: #2A5240;
  --eis: #EFF5F1; --frost: #DCEAE0; --linie: #C3D8CA; --linie-2: #98BFA6; --feld: #6B8C75;
  --tinte: #122E1E; --tinte-2: #3A5A45; --fjord: #2C6644; --fjord-tief: #122E1E;
  --nacht: #0C1C13; --nacht-1: #DCEBE1; --nacht-2: #A6C4B0;
}
html[data-einband="anthrazit"] {
  --einband: #3A3F45; --einband-foto: #4A4F55;
  --eis: #F2F3F5; --frost: #E1E4E8; --linie: #CDD2D8; --linie-2: #A9B1BB; --feld: #727B86;
  --tinte: #1D2228; --tinte-2: #48505A; --fjord: #363D46; --fjord-tief: #1D2228;
  --nacht: #14171B; --nacht-1: #E1E4E8; --nacht-2: #AEB5BE;
}
html[data-einband="bordeaux"] {
  --einband: #6E2430; --einband-foto: #7E2130;
  --eis: #F9F1F1; --frost: #F0DFE0; --linie: #E6CDD0; --linie-2: #D3A5AC; --feld: #987076;
  --tinte: #3A1419; --tinte-2: #663F47; --fjord: #7A2834; --fjord-tief: #3A1419;
  --nacht: #1E0C10; --nacht-1: #F2E1E3; --nacht-2: #D2ADB3;
}

/* Weicher Übergang beim Wechsel (nur nach einer Auswahl, nicht beim Laden) */
@property --eis { syntax: '<color>'; inherits: true; initial-value: #EEF5FA; }
@property --frost { syntax: '<color>'; inherits: true; initial-value: #DDEBF5; }
@property --linie { syntax: '<color>'; inherits: true; initial-value: #C6DAE9; }
@property --linie-2 { syntax: '<color>'; inherits: true; initial-value: #9EC4DE; }
@property --feld { syntax: '<color>'; inherits: true; initial-value: #6F8FA9; }
@property --tinte { syntax: '<color>'; inherits: true; initial-value: #0E2A43; }
@property --tinte-2 { syntax: '<color>'; inherits: true; initial-value: #3B5A75; }
@property --fjord { syntax: '<color>'; inherits: true; initial-value: #1F5E8F; }
@property --fjord-tief { syntax: '<color>'; inherits: true; initial-value: #0E2A43; }
@property --nacht { syntax: '<color>'; inherits: true; initial-value: #0B1A2A; }
@property --nacht-1 { syntax: '<color>'; inherits: true; initial-value: #DCEBF5; }
@property --nacht-2 { syntax: '<color>'; inherits: true; initial-value: #A9C2D6; }
@property --einband { syntax: '<color>'; inherits: true; initial-value: #1B3A57; }
html.farbwechsel { transition: --eis .7s ease, --frost .7s ease, --linie .7s ease, --linie-2 .7s ease, --feld .7s ease, --tinte .7s ease, --tinte-2 .7s ease,
  --fjord .7s ease, --fjord-tief .7s ease, --nacht .7s ease, --nacht-1 .7s ease, --nacht-2 .7s ease, --einband .5s ease; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0; background: var(--eis); color: var(--tinte);
  font-family: var(--sans); font-size: 19px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
picture { display: contents; }
a { color: var(--fjord); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--tinte); }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; margin: 0; color: inherit; text-wrap: balance; }
p { margin: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

:where(a, button, summary, input, [tabindex]):focus-visible { outline: 3px solid var(--tinte); outline-offset: 3px; border-radius: 6px; }
.nacht :where(a, button, summary, input):focus-visible { outline-color: var(--nacht-1); }

.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--rand); }

/* ---- Typografie ---- */
.h-gross { font-size: clamp(2.9rem, 6.4vw, 5.5rem); line-height: 1.0; letter-spacing: -0.03em; }
.h-abschnitt { font-size: clamp(2.3rem, 4.8vw, 4rem); line-height: 1.05; letter-spacing: -0.022em; }
.h-klein { font-size: clamp(1.5rem, 2.2vw, 1.85rem); line-height: 1.2; letter-spacing: -0.01em; }
.lead { font-size: clamp(1.18rem, 1.6vw, 1.35rem); line-height: 1.55; color: var(--tinte-2); max-width: 32em; text-wrap: pretty; }
.leise { color: var(--tinte-2); }

/* ---- Knöpfe ---- */
.btn {
  appearance: none; border: 0; cursor: pointer; text-decoration: none; white-space: nowrap;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 0 28px; border-radius: 999px;
  font-family: var(--sans); font-size: 1.05rem; font-weight: 600; line-height: 1.2;
  background: var(--fjord); color: #fff; transition: background-color .2s ease;
}
.btn:hover { background: var(--fjord-tief); color: #fff; }
.btn:disabled { background: var(--linie); color: var(--tinte-2); cursor: not-allowed; }
.btn-klein { min-height: 46px; padding: 0 20px; font-size: 1rem; }

/* ---- Navigation ---- */
.nav { position: sticky; top: 0; z-index: 50; background: var(--eis); border-bottom: 1px solid transparent; transition: border-color .25s ease; }
.nav.gescrollt { border-color: var(--linie); }
.nav-innen { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 78px; }
.wortmarke { font-family: var(--serif); font-size: 1.7rem; font-weight: 500; letter-spacing: -0.01em; color: var(--tinte); text-decoration: none; white-space: nowrap; padding: 8px 0; }
.wortmarke:hover { color: var(--tinte); }
.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a:not(.btn) { color: var(--tinte-2); text-decoration: none; font-weight: 600; font-size: 1rem; padding: 10px 0; }
.nav-links a:not(.btn):hover { color: var(--tinte); }
@media (max-width: 940px) { .nav-links a:not(.btn) { display: none; } }
@media (max-width: 560px) { .nav-innen { height: 66px; } .wortmarke { font-size: 1.45rem; } .nav .btn-klein { padding: 0 16px; } }

/* ---- Formular: Vormerken ---- */
.capture { display: flex; flex-wrap: wrap; gap: 12px; max-width: 540px; }
.capture input {
  flex: 1 1 240px; min-width: 0; min-height: 56px; padding: 0 22px; border-radius: 999px;
  border: 1.5px solid var(--feld); background: var(--weiss); color: var(--tinte);
  font-family: var(--sans); font-size: 1.08rem;
}
.capture input::placeholder { color: var(--tinte-2); opacity: .85; }
.capture input:focus { outline: none; border-color: var(--fjord); box-shadow: 0 0 0 4px color-mix(in srgb, var(--fjord) 18%, transparent); }
.capture.invalid input { border-color: #A23A2C; }
.form-note { margin-top: 12px; font-size: 1rem; color: var(--tinte-2); }
.form-error { display: flex; gap: 9px; align-items: flex-start; max-width: 540px; margin-top: 12px; padding: 10px 14px; border-radius: 12px; background: var(--weiss); border: 1px solid var(--linie); border-left: 3px solid #A23A2C; color: #7E2A1F; font-size: 1rem; line-height: 1.45; }
.form-error[hidden] { display: none; }
.form-error > span:first-child { font-weight: 700; flex: none; }
.form-success { display: none; align-items: center; gap: 10px; font-weight: 600; color: var(--tinte); font-size: 1.08rem; }
.form-success svg { flex: none; color: var(--fjord); }
.hero-start { margin: 0; }
.hero-start[hidden], .start-note[hidden] { display: none; }
.start-note { margin-top: 12px; font-size: 1rem; color: var(--tinte-2); }

/* ---- Fußzeile ---- */
.fuss { border-top: 1px solid var(--linie); padding: 48px 0 56px; font-size: 1rem; color: var(--tinte-2); }
.fuss-innen { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 40px; }
.fuss nav { display: flex; flex-wrap: wrap; gap: 6px 28px; }
.fuss a { color: var(--tinte-2); text-decoration: none; font-weight: 600; padding: 8px 0; display: inline-block; }
.fuss a:hover { color: var(--tinte); }
.fuss .wortmarke { font-size: 1.5rem; }
.fuss-zeile { width: 100%; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 32px; padding-top: 20px; border-top: 1px solid var(--linie); }
.fuss-zeile a { font-weight: 400; padding: 0; text-decoration: underline; }

/* ---- Rechtliche Seiten und einfache Textseiten ---- */
.textseite { max-width: 760px; padding-block: clamp(56px, 8vw, 104px) clamp(72px, 9vw, 120px); }
.textseite h1 { font-size: clamp(2.5rem, 5.2vw, 4rem); line-height: 1.05; letter-spacing: -0.022em; margin-bottom: 1.6rem; }
.textseite h2 { font-size: 1.55rem; line-height: 1.25; margin: 2.6rem 0 .7rem; }
.textseite h3 { font-size: 1.2rem; margin: 1.7rem 0 .4rem; }
.textseite p, .textseite address, .textseite ul { color: var(--tinte-2); line-height: 1.75; margin: 0 0 .9rem; font-style: normal; }
.textseite ul { padding-left: 1.3rem; }
.textseite li { margin-bottom: .35rem; }
.textseite strong { color: var(--tinte); }
.textseite .vorspann { font-size: 1.15rem; color: var(--tinte-2); }

@media (max-width: 560px) { body { font-size: 18px; } }

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

/* Sprunglink: unsichtbar, bis er per Tastatur fokussiert wird */
a.sr:focus { position: fixed; left: 16px; top: 12px; z-index: 100; width: auto; height: auto; clip: auto; padding: 12px 18px; border-radius: 999px; background: var(--tinte); color: #fff; text-decoration: none; }

/* Gemeinsame Abschnitts-Bausteine (Startseite und Über uns) */
.abschnitt { padding-block: var(--abschnitt); }
.frost-band { background: var(--frost); }
