/* =========================================================
   Musikschule Cuxhaven — gemeinsame Stile
   Warm / klassisch: Klinker, Holz, Messing
   Schrift: Fraunces (Display) + Mulish (Text)
   ========================================================= */

:root {
  /* Farben */
  --paper:      #F6EFE4;  /* warmes Creme-Papier */
  --paper-2:    #EFE4D2;  /* etwas tieferes Karten-Creme */
  --ink:        #2A211B;  /* warmes Tintenschwarz */
  --ink-soft:   #5A4D42;  /* gedämpfter Fließtext */
  --brick:      #A6432B;  /* Klinker-Rot — Leitfarbe */
  --brick-deep: #7E3320;  /* dunkler Klinker (Hover) */
  --wood:       #8A5A3B;  /* Holzbraun */
  --brass:      #C8893B;  /* Messing-Akzent */
  --line:       #DDCDB6;  /* warme Trennlinie */

  /* Typo-Skala (responsiv) */
  --fs-hero:  clamp(2.6rem, 1.6rem + 4.4vw, 5rem);
  --fs-h2:    clamp(1.7rem, 1.2rem + 1.8vw, 2.6rem);
  --fs-h3:    clamp(1.15rem, 1rem + 0.5vw, 1.4rem);
  --fs-lead:  clamp(1.1rem, 1rem + 0.5vw, 1.35rem);
  --fs-body:  1.05rem;
  --fs-small: 0.92rem;

  /* Layout */
  --maxw: 1140px;
  --gap:  clamp(1.5rem, 1rem + 2vw, 3rem);
  --radius: 14px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Mulish", system-ui, -apple-system, sans-serif;
  font-size: var(--fs-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: "Fraunces", Georgia, serif;
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 0.4em;
}

p { margin: 0 0 1em; }

a { color: var(--brick); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--brick-deep); }

img { max-width: 100%; display: block; }

.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: clamp(1.1rem, 0.5rem + 2vw, 2.5rem); }

/* ---------- Notenzeilen-Trenner (Signatur) ---------- */
.staff {
  height: 22px;
  margin: clamp(2.2rem, 1rem + 4vw, 4rem) 0;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0, transparent 4px,
    var(--line) 4px, var(--line) 5px
  );
  background-size: 100% 25px;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.9;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-weight: 700;
  text-decoration: none;
  padding: 0.8em 1.5em;
  border-radius: 999px;
  transition: background-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}
.btn-primary { background: var(--brick); color: var(--paper); }
.btn-primary:hover { background: var(--brick-deep); color: var(--paper); transform: translateY(-1px); }
.btn-ghost { color: var(--brick); border: 1.5px solid var(--brick); }
.btn-ghost:hover { background: var(--brick); color: var(--paper); }

/* ---------- Kopfzeile ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.45rem;
}
.brand {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--ink);
  text-decoration: none;
  line-height: 1.1;
}
.brand small {
  display: block;
  font-family: "Mulish", sans-serif;
  font-weight: 600;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brick);
}
.nav { display: flex; gap: 1.4rem; flex-wrap: wrap; }
.nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 600;
  font-size: var(--fs-small);
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--brick); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 85% -10%, rgba(200,137,59,0.18), transparent 55%),
    radial-gradient(110% 80% at 0% 110%, rgba(166,67,43,0.16), transparent 50%),
    var(--paper);
  border-bottom: 1px solid var(--line);
}
.hero .wrap { padding-block: clamp(3rem, 2rem + 6vw, 6.5rem); }
.eyebrow {
  font-weight: 700;
  font-size: var(--fs-small);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brick);
  margin: 0 0 1rem;
}
.hero h1 {
  font-size: var(--fs-hero);
  font-weight: 600;
  max-width: 16ch;
}
.hero h1 em { font-style: italic; color: var(--brick); }
.hero .lead {
  font-size: var(--fs-lead);
  color: var(--ink-soft);
  max-width: 52ch;
  margin-top: 0.6rem;
}
.hero-actions { display: flex; gap: 0.9rem; flex-wrap: wrap; margin-top: 1.8rem; }
.hero-meta {
  margin-top: 2rem;
  font-size: var(--fs-small);
  color: var(--ink-soft);
}
.hero-meta strong { color: var(--ink); }

/* ---------- Abschnitte ---------- */
section { padding-block: clamp(2.5rem, 1.5rem + 4vw, 4.5rem); }
.section-head { max-width: 60ch; margin-bottom: clamp(1.5rem, 1rem + 2vw, 2.5rem); }
.section-head h2 { font-size: var(--fs-h2); }
.section-head p { color: var(--ink-soft); font-size: var(--fs-lead); }

/* ---------- Angebots-Karten ---------- */
.cards {
  display: grid;
  gap: var(--gap);
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}
.card {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem;
}
.card h3 { font-size: var(--fs-h3); color: var(--brick-deep); }
.card p { color: var(--ink-soft); margin-bottom: 0; }
.card .num {
  font-family: "Fraunces", serif;
  font-size: 1.6rem;
  color: var(--brass);
  display: block;
  margin-bottom: 0.4rem;
}

/* ---------- Highlight (Instrumentenkarussell) ---------- */
.highlight {
  background: var(--brick);
  color: var(--paper);
  border-radius: var(--radius);
  padding: clamp(1.8rem, 1rem + 3vw, 3rem);
  display: grid;
  gap: 1.5rem;
  align-items: center;
  grid-template-columns: 1fr;
}
.highlight h2 { color: var(--paper); font-size: var(--fs-h2); }
.highlight p { color: #F3E6D8; margin-bottom: 0; }
.highlight .tag {
  display: inline-block;
  background: rgba(255,255,255,0.16);
  color: var(--paper);
  font-weight: 700;
  font-size: var(--fs-small);
  letter-spacing: 0.06em;
  padding: 0.3em 0.9em;
  border-radius: 999px;
  margin-bottom: 1rem;
}
.highlight .btn-primary { background: var(--paper); color: var(--brick-deep); }
.highlight .btn-primary:hover { background: #fff; color: var(--brick-deep); }
.highlight dl { margin: 1.2rem 0 0; display: grid; gap: 0.5rem; }
.highlight dl div { display: flex; gap: 0.6rem; font-size: var(--fs-small); }
.highlight dt { font-weight: 700; min-width: 7.5rem; color: #F8EFE2; }
.highlight dd { margin: 0; color: #F3E6D8; }
@media (min-width: 760px) {
  .highlight { grid-template-columns: 1.4fr 1fr; }
}

/* ---------- Fächer-Liste ---------- */
.subjects {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.subjects li {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.5em 1.1em;
  font-weight: 600;
  font-size: var(--fs-small);
}

/* ---------- Verein / Trust ---------- */
.trust {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.8rem, 1rem + 3vw, 3rem);
}
.trust h2 { font-size: var(--fs-h3); }
.trust p { color: var(--ink-soft); max-width: 70ch; }

/* ---------- Kontakt-Block ---------- */
.contact-grid {
  display: grid;
  gap: var(--gap);
  grid-template-columns: 1fr;
}
@media (min-width: 720px) {
  .contact-grid { grid-template-columns: 1fr 1fr; }
}
.contact-grid h3 { font-size: var(--fs-h3); color: var(--brick-deep); }
.contact-grid address {
  font-style: normal;
  color: var(--ink-soft);
  line-height: 1.9;
}
.contact-grid address a { font-weight: 600; }

/* ---------- Fußzeile ---------- */
.site-footer {
  background: var(--ink);
  color: #D9CDBE;
  padding-block: clamp(2.2rem, 1.5rem + 3vw, 3.5rem);
}
.site-footer a { color: var(--brass); text-decoration: none; }
.site-footer a:hover { color: #E7B978; text-decoration: underline; }
.footer-grid {
  display: grid;
  gap: var(--gap);
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
}
.site-footer h4 {
  font-family: "Mulish", sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brass);
  margin: 0 0 0.8rem;
}
.site-footer .brand-foot {
  font-family: "Fraunces", serif;
  font-size: 1.3rem;
  color: var(--paper);
  margin-bottom: 0.4rem;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; line-height: 2; }
.footer-legal {
  margin-top: 2rem;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(255,255,255,0.12);
  font-size: var(--fs-small);
  color: #A99B8B;
}

/* ---------- Zugänglichkeit ---------- */
:focus-visible {
  outline: 3px solid var(--brass);
  outline-offset: 2px;
  border-radius: 4px;
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto; transition: none !important; }
}

/* =========================================================
   Stile für Unterseiten (Fächer, Lehrkräfte, Preise, Kontakt)
   ========================================================= */

/* ---------- Kompakter Seitenkopf ---------- */
.page-hero {
  background:
    radial-gradient(110% 90% at 90% -20%, rgba(200,137,59,0.14), transparent 55%),
    var(--paper);
  border-bottom: 1px solid var(--line);
}
.page-hero .wrap { padding-block: clamp(2.2rem, 1.5rem + 3vw, 3.8rem); }
.page-hero h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.2rem); max-width: 18ch; }
.page-hero .lead { font-size: var(--fs-lead); color: var(--ink-soft); max-width: 56ch; margin-bottom: 0; }

/* ---------- Fächer-Gruppen ---------- */
.subject-group { margin-bottom: clamp(2rem, 1.5rem + 2vw, 3rem); }
.subject-group > h2 { font-size: var(--fs-h3); color: var(--brick-deep); margin-bottom: 1.1rem; }

/* ---------- Lehrkräfte ---------- */
.member { background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; }
.member h3 { font-size: var(--fs-h3); margin-bottom: 0.2rem; }
.member .role { color: var(--brick-deep); font-weight: 700; font-size: var(--fs-small); margin: 0 0 0.6rem; }
.member .fn { color: var(--ink-soft); font-size: var(--fs-small); margin: 0 0 0.6rem; font-style: italic; }
.member .meta { color: var(--ink-soft); font-size: var(--fs-small); margin: 0; }
.todo { color: var(--brass); font-style: italic; }

/* ---------- Preistabelle ---------- */
.price-group { margin-bottom: clamp(2rem, 1.5rem + 2vw, 3rem); }
.price-group > h2 { font-size: var(--fs-h3); color: var(--brick-deep); margin-bottom: 0.8rem; }
.price-list { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--paper-2); }
.price-row {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1.2rem;
  padding: 0.95rem 1.3rem; border-bottom: 1px solid var(--line);
}
.price-row:last-child { border-bottom: none; }
.price-row .label { font-weight: 600; }
.price-row .label small { display: block; font-weight: 400; color: var(--ink-soft); font-size: var(--fs-small); }
.price-row .amount { font-family: "Fraunces", serif; font-weight: 600; color: var(--brick-deep); white-space: nowrap; font-size: 1.15rem; }

/* ---------- Hinweis-Box ---------- */
.note {
  background: var(--paper-2); border-left: 4px solid var(--brass);
  border-radius: 0 var(--radius) var(--radius) 0; padding: 1.2rem 1.4rem;
  color: var(--ink-soft); font-size: var(--fs-small);
}
.note + .note { margin-top: 1rem; }
.note strong { color: var(--ink); }

/* ---------- Kontaktkarten ---------- */
.contact-card { background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.5rem, 1rem + 2vw, 2.2rem); }
.contact-card h3 { font-size: var(--fs-h3); color: var(--brick-deep); }
.contact-card address { font-style: normal; color: var(--ink-soft); line-height: 1.9; }
.contact-card address a { font-weight: 600; }

/* ---------- Lehrkräfte: aufklappbare Profile ---------- */
.members { display: grid; gap: 0.9rem; max-width: 760px; }
details.profile {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
details.profile > summary {
  cursor: pointer;
  list-style: none;
  display: block;            /* NICHT flex – sonst klappt Safari/iOS nicht auf */
  position: relative;
  padding: 1.1rem 3.6rem 1.1rem 1.4rem;
}
details.profile > summary::-webkit-details-marker { display: none; }
details.profile > summary:hover .p-name { color: var(--brick); }
.p-head-text { display: block; }
.p-name { display: block; font-family: "Fraunces", serif; font-weight: 600; font-size: 1.2rem; color: var(--ink); line-height: 1.2; }
.p-subj { display: block; color: var(--brick-deep); font-weight: 700; font-size: var(--fs-small); margin-top: 0.15rem; }
.p-subj .todo { color: var(--brass); font-weight: 600; }
.p-chev {
  position: absolute; right: 1.2rem; top: 50%; transform: translateY(-50%);
  width: 1.6rem; height: 1.6rem;
  border: 1.5px solid var(--brick); border-radius: 50%;
}
.p-chev::before, .p-chev::after {
  content: ""; position: absolute; top: 50%; left: 50%; background: var(--brick);
  transition: transform 0.2s ease;
}
.p-chev::before { width: 0.7rem; height: 1.5px; transform: translate(-50%,-50%); }
.p-chev::after  { width: 1.5px; height: 0.7rem; transform: translate(-50%,-50%); }
details.profile[open] .p-chev::after { transform: translate(-50%,-50%) scaleY(0); }
.p-body {
  padding: 0 1.4rem 1.4rem;
  border-top: 1px solid var(--line);
  margin-top: -1px;
}
.p-body p { color: var(--ink-soft); margin: 1rem 0 0; }
.p-contact {
  margin-top: 1rem; padding-top: 0.9rem; border-top: 1px dashed var(--line);
  font-size: var(--fs-small); color: var(--ink-soft); line-height: 1.8;
}
.p-contact strong { color: var(--ink); }

/* ---------- Logo im Header ---------- */
.brand-logo { display: block; height: 62px; width: auto; }
@media (max-width: 480px) { .brand-logo { height: 48px; } }
/* Logo-Seitenverhältnis sichern (falls Browser width:auto nicht aus viewBox ableitet) */
.brand-logo { aspect-ratio: 1578 / 714; }

/* ---------- Instrumenten-Infoartikel ---------- */
.article { max-width: 72ch; }
.article h2 { font-size: var(--fs-h3); color: var(--brick-deep); margin-top: 2.2rem; }
.article p { color: var(--ink-soft); }
.article ul { color: var(--ink-soft); padding-left: 1.2rem; margin: 0 0 1em; }
.article li { margin-bottom: 0.4rem; }
.breadcrumb { font-size: var(--fs-small); color: var(--ink-soft); margin-bottom: 0.6rem; }
.breadcrumb a { color: var(--brick); font-weight: 600; }
.card .more { display: inline-block; margin-top: 0.7rem; font-weight: 700; font-size: var(--fs-small); text-decoration: none; }
.card .more:hover { text-decoration: underline; }

/* ---------- Logo im Header ---------- */
.brand-logo { display: block; height: 62px; width: auto; }
@media (max-width: 480px) { .brand-logo { height: 48px; } }
/* Logo-Seitenverhältnis sichern (falls Browser width:auto nicht aus viewBox ableitet) */
.brand-logo { aspect-ratio: 1578 / 714; }

/* =========================================================
   Dunkelmodus — umschaltbar via [data-theme="dark"]
   Palette identisch zum Übungs-Design (uebungen.css),
   damit die ganze Seite einheitlich wirkt.
   ========================================================= */
[data-theme="dark"] {
  --paper:      #181310;
  --paper-2:    #231B15;
  --ink:        #F1E8DA;
  --ink-soft:   #B3A491;
  --brick:      #D46B4E;
  --brick-deep: #E68467;
  --wood:       #B98A63;
  --brass:      #D8AB63;
  --line:       #382E27;
}

/* Umschalter im Kopf vertikal zentrieren */
.nav { align-items: center; }

/* Hell/Dunkel-Umschalter (wie im Übungsbereich) */
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; padding: 0;
  border: 1px solid var(--line); border-radius: 999px;
  background: transparent; color: var(--ink-soft);
  cursor: pointer; transition: color .18s, border-color .18s;
}
.theme-toggle:hover { color: var(--brick); border-color: var(--brick); }
.theme-toggle svg { width: 17px; height: 17px; }
.theme-toggle .i-sun { display: none; }
[data-theme="dark"] .theme-toggle .i-sun { display: block; }
[data-theme="dark"] .theme-toggle .i-moon { display: none; }

/* Logo (dunkles SVG) im Dunkelmodus aufhellen, damit es sichtbar bleibt */
[data-theme="dark"] .brand-logo { filter: invert(0.92) sepia(0.15) brightness(1.05); }

/* Fußzeile bleibt in beiden Modi dunkel (einheitlich mit den Übungsseiten) */
.site-footer { background: #241C15; }
[data-theme="dark"] .site-footer { background: #100C09; }
.site-footer .brand-foot { color: #F6EFE4; }

/* Highlight-Block im Dunkelmodus lesbar halten */
[data-theme="dark"] .highlight { background: #7E3320; }
[data-theme="dark"] .highlight h2 { color: #F6EFE4; }
[data-theme="dark"] .highlight .btn-primary { background: #F6EFE4; color: #7E3320; }

/* Sanfter Übergang beim Umschalten */
body, .site-header, .theme-toggle {
  transition: background-color .3s ease, color .3s ease, border-color .3s ease;
}
@media (prefers-reduced-motion: reduce) {
  body, .site-header, .theme-toggle { transition: none; }
}
