/* ### BLOCK: base-fontface ### */
/*
  Inter als selbst-gehostete Variable Font (SIL Open Font License).
  Ein @font-face deckt den gesamten Gewichtsbereich 100–900 ab.
  font-display: swap → Text sofort sichtbar (System-Fallback),
  tauscht auf Inter sobald geladen. Kein Layout-Blocking.
*/
@font-face {
  font-family: "Inter";
  src: url("../assets/fonts/Inter-Variable.woff2") format("woff2");
  font-weight: 100 900;   /* Variable: ganzer Bereich */
  font-style: normal;
  font-display: swap;
}

/*
  Fraunces entfernt (06.08.): Wurde per @font-face geladen, aber nirgends
  verwendet - --font-heading steht auf Lora. Zwei Schriftdateien ohne
  jede Wirkung, dazu die TTF-Originale daneben.
  Die Kommentare in tokens.css und components.css nennen Fraunces noch
  als Ueberschriftenschrift; sie beschreiben einen alten Stand.
*/

/*
  Lora (SIL OFL) – Serif für JÆCK-Logo & Überschriften.
  Ruhigere Buchstabenkonstruktion als Fraunces, gerades J.
  TEST-PHASE: aktuell nur Bold vorhanden. Falls Lora bleibt,
  muss Lora-Regular.woff2 nachgeliefert werden (400er Gewicht
  fällt sonst auf die Systemschrift zurück).
*/
@font-face {
  font-family: "Lora";
  src: url("../assets/fonts/Lora-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
/*
  Caveat (SIL OFL) – Handschrift für Lyrics/Quotes auf der Pinnwand.
*/
@font-face {
  font-family: "Caveat";
  src: url("../assets/fonts/Caveat-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
/* ### /BLOCK: base-fontface ### */

/*
================================================================
  MANIFEST – css/base.css
  ┌──────────────────────┬─────────────────────────────────────────────────────────┐
  │ Block-ID             │ Beschreibung                                            │
  ├──────────────────────┼─────────────────────────────────────────────────────────┤
  │ reset                │ Moderner CSS-Reset                                      │
  │ base-root            │ html/body Basis, Scrollverhalten                        │
  │ base-typography      │ Überschriften, Text, Links, Listen                      │
  │ base-media           │ Bilder, Video, Audio normalisiert                       │
  │ base-forms           │ Formular-Elemente normalisiert                          │
  │ base-focus           │ :focus-visible – WCAG 2.4.11 / 2.4.13                   │
  │ base-skip-link       │ Skip-Link sichtbar bei Fokus                            │
  │ base-utilities       │ .visually-hidden, .container, .section, .btn, etc.      │
  │ base-page-transition │ Fade-In beim Seitenload (reduced-motion-safe)           │
  │ base-motion          │ prefers-reduced-motion                                  │
  └──────────────────────┴─────────────────────────────────────────────────────────┘
  Abhängigkeiten: tokens.css
================================================================
*/

/* ### BLOCK: reset ### */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  hanging-punctuation: first last;
}
body { min-height: 100dvh; }
img, picture, video, canvas, svg { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; }
p, h1, h2, h3, h4, h5, h6 { overflow-wrap: break-word; }
ul, ol { list-style: none; }
table { border-collapse: collapse; }
/* ### /BLOCK: reset ### */


/* ### BLOCK: base-root ### */
html {
  font-family: var(--font-sans);
  font-size: var(--font-size-body);
  line-height: var(--line-height-body);
  color: var(--c-text-primary);
  background-color: var(--c-bg-base);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* Schutz gegen versehentliches horizontales Wischen (v. a. iOS-Safari) */
  overflow-x: hidden;
  /* Reserviert Platz fuer klassische Scrollleisten, damit Seiten mit und
     ohne Scrollbalken gleich breit bleiben und der Header beim
     Seitenwechsel nicht seitlich springt.
     ⚠️ EHRLICHE EINORDNUNG (gemessen 30.07.): Auf Bendikts Chrome sind die
     Leisten ueberlagernd - dort belegen sie null Breite und diese Regel
     bewirkt NICHTS. Sie bleibt fuer Besucher mit klassischen Leisten.
     Der frueher beobachtete Header-Sprung war zum Messzeitpunkt behoben,
     die Ursache ist damit NICHT belegt. Nicht als geklaert weiterreichen. */
  scrollbar-gutter: stable;
  /* Scrollleiste im Theme - dieselben Werte wie das Lyrics-Panel.
     Bewusst NUR die Standard-Eigenschaften: Sobald ein Browser
     scrollbar-color kennt, ignoriert er ::-webkit-scrollbar-Regeln
     komplett. Beides zu pflegen waere von vornherein toter Code.
     Sehr alte Safari-Versionen zeigen die Standardleiste - voll
     benutzbar, nur ungefaerbt. Bewusst akzeptiert.
     Farben kommen aus dem Token, folgen also beiden Modi:
     Champagner im Dunkeln, Karamell im Hellen. */
  scrollbar-width: thin;
  scrollbar-color: var(--c-accent) transparent;
}

body {
  display: flex;
  flex-direction: column;
  /* Zweiter Riegel auf Body-Ebene – fängt überstehende Layer ab */
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
}

main { flex: 1; }
/* ### /BLOCK: base-root ### */


/* ### BLOCK: base-typography ### */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--font-weight-heading);
  line-height: var(--line-height-heading);
  letter-spacing: var(--tracking-tight);
  color: var(--c-text-primary);
}

h1 { font-size: var(--font-size-h1); }
h2 { font-size: var(--font-size-h2); }
h3 { font-size: var(--font-size-h3); }
h4 { font-size: var(--font-size-h4); }
h5 { font-size: var(--text-xl); }
h6 { font-size: var(--text-lg); }

p {
  max-width: 65ch;
  color: var(--c-text-secondary);
}

a {
  color: var(--c-text-link);
  text-decoration: underline;
  text-underline-offset: 0.2em;
  transition: color var(--dur-fast) var(--ease);
}

a:hover { color: var(--c-text-link-hover); }

strong { font-weight: var(--weight-semibold); color: var(--c-text-primary); }

small {
  font-size: var(--font-size-small);
  color: var(--c-text-muted);
}

blockquote {
  border-left: 2px solid var(--c-accent);
  padding-left: var(--space-5);
  color: var(--c-text-secondary);
  font-style: italic;
}

hr {
  border: none;
  border-top: 1px solid var(--c-border-subtle);
  margin-block: var(--space-8);
}

code, kbd, pre {
  font-family: var(--font-mono);
  font-size: 0.875em;
}

code {
  background: var(--c-bg-inset);
  padding: 0.1em 0.4em;
  border-radius: var(--radius-sm);
  color: var(--c-text-link);
}

pre {
  background: var(--c-bg-inset);
  padding: var(--space-5);
  border-radius: var(--radius-lg);
  overflow-x: auto;
  border: 1px solid var(--c-border-subtle);
}
/* ### /BLOCK: base-typography ### */


/* ### BLOCK: base-media ### */
img, video {
  height: auto;
}

figure {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

figcaption {
  font-size: var(--font-size-small);
  color: var(--c-text-muted);
}

audio {
  width: 100%;
}
/* ### /BLOCK: base-media ### */


/* ### BLOCK: base-forms ### */
label {
  display: block;
  font-size: var(--font-size-small);
  font-weight: var(--weight-medium);
  color: var(--c-text-secondary);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  cursor: pointer;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="number"],
input[type="search"],
input[type="password"],
input[type="date"],
textarea,
select {
  display: block;
  width: 100%;
  padding: var(--space-3) var(--space-4);
  background: var(--c-bg-inset);
  border: 1px solid var(--c-border-default);
  border-radius: var(--radius-input);
  color: var(--c-text-primary);
  font-size: var(--font-size-body);
  line-height: var(--leading-normal);
  transition:
    border-color var(--dur-fast) var(--ease),
    background var(--dur-fast) var(--ease),
    box-shadow var(--dur-fast) var(--ease);
  appearance: none;
  -webkit-appearance: none;
}

textarea { resize: vertical; min-height: 120px; }

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24'%3E%3Cpath fill='%2371717a' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-3) center;
  padding-right: var(--space-8);
}

input:hover, textarea:hover, select:hover {
  border-color: var(--c-border-strong);
}

fieldset { border: none; }

legend {
  font-size: var(--font-size-h4);
  font-weight: var(--weight-bold);
  color: var(--c-text-primary);
  margin-block-end: var(--space-6);
  letter-spacing: var(--tracking-tight);
}
/* ### /BLOCK: base-forms ### */


/* ### BLOCK: base-focus ### */
:focus-visible {
  outline: 2px solid var(--c-focus);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: none;
  border-color: var(--c-focus);
  /* Farbe aus dem Token ableiten: color-mix haelt den Schatten im Theme,
     statt ihn wie zuvor fest auf Indigo aus der Vorlage zu setzen. */
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-focus) 25%, transparent);
  background: var(--c-bg-elevated);
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--c-focus);
  outline-offset: 3px;
}
/* ### /BLOCK: base-focus ### */


/* ### BLOCK: base-skip-link ### */
.skip-link {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
  z-index: 9999;
  padding: var(--space-3) var(--space-5);
  background: var(--c-accent);
  color: var(--c-text-on-accent);
  font-weight: var(--weight-semibold);
  font-size: var(--font-size-small);
  border-radius: var(--radius-btn);
  text-decoration: none;
  transform: translateY(-200%);
  transition: transform var(--dur-fast) var(--ease);
}

.skip-link:focus-visible {
  transform: translateY(0);
}
/* ### /BLOCK: base-skip-link ### */

/* ### BLOCK: base-utilities ### */

/* Screenreader only */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* Container */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.container--narrow {
  max-width: var(--container-narrow);
}

/* Section */
.section {
  padding-block: var(--space-section);
}

/* Section Header */
.section-header {
  margin-block-end: var(--space-12);
}

.section-header h2 {
  margin-block-start: var(--space-3);
}

/* Eyebrow */
.section-eyebrow {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  /* Indigo als TEXT: helleres accent-text für ≥4.5:1 auf dunklem Grund */
  color: var(--c-accent-text);
  max-width: none;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  min-height: 44px;
  min-width: 44px;
  border: 1px solid transparent;
  border-radius: var(--radius-btn);
  font-size: var(--font-size-body);
  font-weight: var(--weight-semibold);
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transition:
    background var(--dur-fast) var(--ease),
    color var(--dur-fast) var(--ease),
    border-color var(--dur-fast) var(--ease),
    box-shadow var(--dur-fast) var(--ease),
    transform var(--dur-fast) var(--ease);
}

.btn:active { transform: scale(0.97); }

.btn--primary {
  background: var(--c-accent);
  color: var(--c-text-on-accent);
  border-color: var(--c-accent);
}

.btn--primary:hover {
  background: var(--c-accent-hover);
  border-color: var(--c-accent-hover);
  box-shadow: 0 0 20px color-mix(in srgb, var(--c-accent) 35%, transparent);
}

.btn--ghost {
  background: transparent;
  color: var(--c-text-secondary);
  border-color: var(--c-border-default);
}

.btn--ghost:hover {
  background: var(--c-bg-elevated);
  color: var(--c-text-primary);
  border-color: var(--c-border-strong);
}

.btn:disabled, .btn[aria-disabled="true"] {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

/* Nav-CTA Button */
.btn-nav {
  background: var(--c-accent);
  /* !important entfernt (28.07.-Nachfolge): Es war eine Kruecke dagegen,
     dass .primary-nav__link spaeter geladen wird - und hat den Text auf
     Akzentfarbe festgenagelt, auch wenn die Flaeche laengst eine andere
     war. Ersetzt durch saubere Spezifitaet in components.css
     (.primary-nav__link.btn-nav). NICHT wieder einbauen. */
  color: var(--c-text-on-accent);
  padding: var(--space-2) var(--space-5);
  border-radius: var(--radius-btn);
  text-decoration: none;
  font-weight: var(--weight-semibold);
  font-size: var(--font-size-small);
  transition: background var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}

.btn-nav:hover {
  background: var(--c-accent-hover);
  /* War hart kodiertes Indigo aus der alten Vorlage und folgte
     dem Modus nicht. color-mix haelt den Schein an den Akzent
     gebunden und deutlich dezenter. */
  box-shadow: 0 0 14px color-mix(in srgb, var(--c-accent) 35%, transparent);
}

/* Form Utilities */
/* Hinweis: Labels werden in base-forms gestylt (label-Element-Selektor) */
.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-block-end: var(--space-5);
}

.form-error {
  font-size: var(--font-size-small);
  color: var(--c-error);
  font-weight: var(--weight-medium);
}

.form-error[hidden] { display: none; }

.form-feedback {
  margin-block-start: var(--space-4);
  padding: var(--space-4);
  border-radius: var(--radius-card);
  background: var(--c-success-bg);
  color: var(--c-success);
  font-weight: var(--weight-medium);
  border: 1px solid rgb(74 222 128 / 0.2);
}

.form-feedback[hidden] { display: none; }

/* Fehlerfall: gleiche Form, andere Farbe. Wird von js/kontakt.js gesetzt. */
.form-feedback--error {
  background: var(--c-error-bg, rgb(248 113 113 / 0.12));
  color: var(--c-error);
  border-color: rgb(248 113 113 / 0.25);
}

/* Card */
.card {
  background: var(--c-bg-surface);
  border: 1px solid var(--c-border-subtle);
  border-radius: var(--radius-card);
  padding: var(--space-6);
  transition: border-color var(--dur-normal) var(--ease), box-shadow var(--dur-normal) var(--ease);
}

.card:hover {
  border-color: var(--c-border-default);
  box-shadow: var(--shadow-md);
}
/* ### /BLOCK: base-utilities ### */

/* ### BLOCK: base-page-transition ### */
/*
  Dezentes Fade-In beim Seitenload (Multi-Page v2).
  Rein CSS, kein JS. Läuft einmalig beim Laden jeder Seite.
  reduced-motion: Animation entfällt, Inhalt sofort voll sichtbar.
*/
@media (prefers-reduced-motion: no-preference) {
  /* Nur opacity animieren (Lesson 8). translateY(8px) vergroessert
     waehrend der Animation die scrollbare Flaeche - auf der Startseite,
     die exakt bildschirmhoch ist, blitzte dadurch 400ms lang eine
     Scrollleiste auf. Verschiebungen kosten hier mehr als sie bringen. */
  @keyframes page-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
  }

  main {
    animation: page-fade-in var(--dur-slow) var(--ease-out) both;
  }
}
/* ### /BLOCK: base-page-transition ### */

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

/* ### BLOCK: base-print ### */
/*
  Druckansicht: helles Layout, nur Inhalt.
  Blendet Navigation, Footer-Deko, Buttons und Hintergründe aus.
  Besonders für Impressum/Datenschutz relevant.
*/
@media print {
  /* Grundfarben umkehren: schwarz auf weiß spart Toner + lesbar */
  html, body {
    background: #fff !important;
    color: #000 !important;
  }

  /* Alle Texte auf dunkle, lesbare Farbe zwingen */
  h1, h2, h3, h4, h5, h6, p, li, td, th, strong, span, a, small, legend, label {
    color: #000 !important;
  }

  /* Nicht druckbare/störende Elemente ausblenden */
  .site-header,
  .skip-link,
  .back-to-top,
  .lightbox,
  .nav-toggle,
  .primary-nav,
  video, audio,
  .btn {
    display: none !important;
  }

  /* Dekorative Flächen/Verläufe entfernen */
  /* hero, about, data-section und media-audio entfernt (Runde 6) */
  .page-head,
  .form-section {
    background: none !important;
    border: none !important;
  }

  /* Abschnitte kompakter, keine riesigen Abstände auf Papier */
  .section {
    padding-block: 1.5rem !important;
  }

  /* Links: URL sichtbar machen, damit sie auf Papier nachvollziehbar sind */
  main a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 0.85em;
    color: #555 !important;
  }

  /* Seitenumbrüche nicht mitten in Überschriften */
  h1, h2, h3 { break-after: avoid; }

  /* Karten/Tabellen mit dezentem Rahmen statt Farbfläche */
  .card {
    background: none !important;
    border: 1px solid #ccc !important;
  }
}
/* ### /BLOCK: base-print ### */