/* ==========================================================================
   Esther Langer – Harfenistin
   Design-Tokens aus estherlanger.de (Wix) übernommen, siehe CLAUDE.md
   ========================================================================== */

/* Lokal gehostet statt Google Fonts CDN (kein Cookie-Banner nötig, siehe
   Datenschutzerklärung). Dateien via Google Fonts CSS2-API bezogen, nur
   lateinisches Subset (deckt deutsche Umlaute/ß ab). */
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('assets/fonts/poppins-300.woff2') format('woff2');
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/poppins-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('assets/fonts/poppins-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Raleway';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('assets/fonts/raleway-var.woff2') format('woff2');
}
@font-face {
  font-family: 'Raleway';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/raleway-var.woff2') format('woff2');
}
@font-face {
  font-family: 'Raleway';
  font-style: italic;
  font-weight: 300;
  font-display: swap;
  src: url('assets/fonts/raleway-300italic.woff2') format('woff2');
}

:root {
  --color-text: #581C00;
  --color-accent: #AF3800;
  --color-gold: #9B690E;
  --color-bg: #FFFFFF;
  --color-bg-alt: #FAFAFA;
  --color-btn-bg: #F2EFED;

  --font-heading: 'Poppins', sans-serif;
  --font-body: 'Raleway', sans-serif;

  --max-width: 720px;
  --header-h: 108px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--color-accent);
  text-decoration: none;
}
a:hover, a:focus-visible { text-decoration: underline; }

h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 400;
  color: var(--color-text);
  margin: 0 0 0.6em;
}

.card-title {
  font-size: 2rem;
  font-weight: 300;
  margin: 0 0 0.7em;
}

.project-title,
.quote-block-title {
  font-size: 1.3rem;
  font-weight: 400;
}

p { margin: 0 0 1.2em; }

.align-center { text-align: center; }

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

blockquote {
  font-family: var(--font-body);
  font-style: italic;
  font-weight: 300;
  color: var(--color-text);
  margin: 0 0 1.2em;
  padding: 0;
  border: none;
}

blockquote cite {
  display: block;
  margin-top: 0.4em;
  font-style: normal;
  font-size: 0.9em;
  opacity: 0.8;
}

/* ---------- Layout helpers ---------- */

.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ---------- Header / Nav ---------- */

.site-header {
  position: relative;
  background: var(--color-bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.1rem 3.5rem;
  border-bottom: 1px solid #f0eae6;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  color: var(--color-text);
}

.logo-img { height: 60px; width: auto; }

.logo-text { display: flex; flex-direction: column; line-height: 1.2; }

.logo-name {
  font-family: var(--font-heading);
  font-size: 1.7rem;
  font-weight: 300;
  color: var(--color-accent);
}

.logo-sub {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--color-gold);
  letter-spacing: 0.02em;
}

.nav-toggle {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 95;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 6px;
  background: rgba(250, 250, 250, 0.85);
  backdrop-filter: blur(3px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  padding: 0;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-accent);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.main-nav {
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  z-index: 90;
  background: var(--color-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 1rem 0 1.5rem;
  border-bottom: 1px solid #f0eae6;
  transform: translateY(-8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}

.main-nav.is-open {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

.nav-link {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--color-accent);
  padding: 0.5rem 1rem;
}

.nav-link.is-active { font-weight: 500; text-decoration: underline; }

.scroll-top-btn {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: rgba(250, 250, 250, 0.85);
  backdrop-filter: blur(3px);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
}

.scroll-top-btn.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-top-btn-arrow {
  display: block;
  width: 10px;
  height: 10px;
  margin-top: 3px;
  border-right: 2px solid var(--color-accent);
  border-bottom: 2px solid var(--color-accent);
  transform: rotate(-135deg);
}

/* ---------- Content-Sektionen (Bild + Teaser-Karte + Ausklapp-Panel) ---------- */

.content-section {
  border-top: 1px solid #f0eae6;
  scroll-margin-top: 20px;
}
.content-section:first-of-type { border-top: none; }

/* #aktuelles sitzt auf dem Textblock statt auf der Section (überspringt beim Anspringen
   das Hero-Bild), braucht daher sein eigenes scroll-margin-top statt das von
   .content-section zu erben. */
#aktuelles {
  scroll-margin-top: 20px;
}

.hero-image {
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  height: 42vh;
  min-height: 240px;
  max-height: 440px;
  overflow: hidden;
  background: var(--color-bg-alt);
}

.hero-image--tall {
  height: 84vh;
  min-height: 480px;
  max-height: 880px;
}

.hero-image img {
  position: absolute;
  top: -14%;
  left: 0;
  width: 100%;
  height: 128%;
  object-fit: cover;
  object-position: center 30%;
  will-change: transform;
}

.section-card {
  background: var(--color-bg-alt);
  padding: 2.75rem 1.25rem;
  text-align: center;
}

.section-card .card-title { text-align: center; }

.section-card > .section-inner > p {
  max-width: 60ch;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.accordion-content {
  text-align: left;
}
.accordion-content .pull-quote {
  text-align: center;
}

.btn-link {
  display: inline-block;
  background: var(--color-btn-bg);
  color: var(--color-accent);
  border: none;
  font: inherit;
  padding: 0.65rem 1.4rem;
  border-radius: 3px;
  font-size: 0.9rem;
  margin-top: 0.5rem;
  cursor: pointer;
}
.btn-link:hover { text-decoration: none; opacity: 0.85; }

.accordion-btn { margin-top: 1rem; }

.accordion-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

/* Nach Abschluss der Öffnen-Animation weicht das Clipping, sonst würde es
   position:sticky in .project-card-media brechen (sticky braucht eine
   unclipped Ancestor-Kette). Wird von script.js gesetzt/entfernt. */
.accordion-panel.no-clip {
  overflow: visible;
}

.accordion-content {
  padding: 1.5rem 0 0.5rem;
}

.accordion-content img { cursor: pointer; }

/* ---------- Aktuelles ---------- */

.event-card {
  margin-top: 2rem;
  padding: 1.75rem 1.5rem;
  background: var(--color-bg);
  border: 1px solid #f0eae6;
  border-radius: 6px;
  text-align: center;
}

.event-title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: var(--color-text);
  margin-bottom: 1.25rem;
}

.event-subtitle {
  display: block;
  margin-top: 0.35rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--color-gold);
}

.event-details {
  display: grid;
  gap: 0.75rem;
  max-width: 26rem;
  margin: 0 auto 1.5rem;
  text-align: left;
}

.event-detail {
  display: flex;
  gap: 0.75rem;
  margin: 0;
}

.event-detail dt {
  flex: 0 0 5rem;
  font-weight: 500;
  color: var(--color-gold);
}

.event-detail dd {
  margin: 0;
}

/* ---------- Biographie ---------- */

.pull-quote {
  text-align: center;
  font-size: 1.1rem;
  max-width: 55ch;
  margin: 0 auto 2rem;
}

.quote-block {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid #f0eae6;
  text-align: center;
}

.quote-block blockquote {
  max-width: 55ch;
  margin: 0 auto 1.5rem;
}

.mini-gallery {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid #f0eae6;
}

.mini-gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.6rem;
}

.mini-gallery-grid img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 6px;
}

/* ---------- Projekte / Unterricht: inline Bilder ---------- */

.project-card {
  margin-bottom: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid #f0eae6;
}
.project-card:last-child { border-bottom: none; }

.project-image {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 1.5rem;
}

.inline-image {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 1.5rem;
}

.probestunde-cta {
  text-align: center;
  margin-top: 1rem;
}

.probestunde-cta--teaser {
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
}

/* ---------- Medien ---------- */

.medien-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.6rem;
  margin-top: 1rem;
}

.medien-item {
  position: relative;
  display: block;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: 6px;
  overflow: hidden;
}

.medien-item img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 6px;
}

.medien-item .play-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: #fff;
  background: rgba(88, 28, 0, 0.25);
}

/* ---------- Kontakt ---------- */

.kontakt-phone { margin-bottom: 0; }

.kontakt-form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  margin-top: 2.5rem;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.form-field { display: flex; flex-direction: column; gap: 0.4rem; }

.form-field label {
  font-size: 0.85rem;
  color: var(--color-text);
}

.required-mark { color: var(--color-accent); }

.form-hint {
  font-size: 0.8rem;
  color: var(--color-text);
  opacity: 0.7;
  margin: -0.6rem 0 0;
}

.form-field input,
.form-field select,
.form-field textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid #ddd3cd;
  border-radius: 4px;
  background: var(--color-bg-alt);
  color: var(--color-text);
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: 2px solid var(--color-gold);
  outline-offset: 1px;
}

.btn-submit {
  align-self: center;
  background: var(--color-accent);
  color: #fff;
  border: none;
  font-family: var(--font-heading);
  font-size: 1rem;
  padding: 0.75rem 2rem;
  border-radius: 3px;
  cursor: pointer;
  margin-top: 0.5rem;
  /* Abstand zum Footer ~ eigene Button-Höhe (Padding + Zeilenhöhe) */
  margin-bottom: 3.2rem;
}
.btn-submit:hover { opacity: 0.9; }

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-status {
  display: none;
  text-align: center;
  font-size: 0.9rem;
}
.form-status--success,
.form-status--error { display: block; margin-top: 0.75rem; }
.form-status--success { color: var(--color-accent); }
.form-status--error { color: #B3261E; }

/* ---------- Lightbox / Bildergalerie ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}
.lightbox[hidden] { display: none; }

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(88, 28, 0, 0.4);
  backdrop-filter: blur(2px);
}

.lightbox-panel {
  position: relative;
  z-index: 1;
  width: min(900px, 100%);
  max-height: 88vh;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: lightbox-in 0.25s ease;
}

@keyframes lightbox-in {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}

.lightbox-stage {
  width: 100%;
  max-height: 88vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-stage img {
  max-width: 100%;
  max-height: 88vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
  display: block;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.lightbox-video {
  position: relative;
  width: 100%;
  max-width: 800px;
  aspect-ratio: 16 / 9;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.lightbox-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 4px;
}

.lightbox-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 2;
  background: rgba(0, 0, 0, 0.45);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.4rem;
  line-height: 1;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-close:hover { background: rgba(0, 0, 0, 0.65); }

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  background: rgba(255, 255, 255, 0.85);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.1rem;
  color: var(--color-text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-nav:hover { background: #fff; }
.lightbox-nav[hidden] { display: none; }
.lightbox-prev { left: 0.25rem; }
.lightbox-next { right: 0.25rem; }

/* ---------- Rechtsseiten (Impressum/Datenschutz) ---------- */

.legal-section { padding-top: 3rem; padding-bottom: 3rem; }
.legal-section ul { margin: 0 0 1.2em; padding-left: 1.3em; }
.legal-section li { margin-bottom: 0.3em; }

/* ---------- Footer ---------- */

.site-footer {
  text-align: center;
  padding: 2.5rem 1.25rem 3rem;
  border-top: 1px solid #f0eae6;
  background: var(--color-bg-alt);
}

.footer-nav {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1rem;
  font-size: 0.85rem;
}

.copyright {
  font-size: 0.8rem;
  opacity: 0.7;
  margin: 0;
}

/* ==========================================================================
   Tablet / Desktop
   ========================================================================== */

@media (min-width: 768px) {
  .card-title { font-size: 2.5rem; }

  .hero-image { height: 52vh; max-height: 560px; }
  .hero-image--tall { height: 104vh; max-height: 1120px; }

  .section-card { padding: 3.5rem 2rem; }

  .section-inner { padding: 0 2rem; }

  .inline-image { max-height: 380px; }

  /* Projekte-Ausklapp: Bild neben dem Text, alternierend links/rechts,
     Bild bleibt sticky stehen, solange der Textblock länger ist als das Bild */
  .project-card {
    display: flex;
    gap: 2.5rem;
    align-items: flex-start;
  }
  .project-card:nth-child(even) {
    flex-direction: row-reverse;
  }
  .project-card-media {
    position: sticky;
    top: 24px;
    flex: 0 0 260px;
  }
  .project-card-media .project-image {
    aspect-ratio: 3 / 4;
    max-height: none;
    margin-bottom: 0;
  }
  .project-card-text {
    flex: 1;
    min-width: 0;
  }

  .mini-gallery-grid { grid-template-columns: repeat(4, 1fr); }
  .mini-gallery-grid img { height: 160px; }

  .medien-grid { grid-template-columns: repeat(4, 1fr); }
  .medien-item img { height: 160px; }

  .form-row { flex-direction: row; }
  .form-row .form-field { flex: 1; }

  .lightbox-prev { left: -3rem; }
  .lightbox-next { right: -3rem; }
}

@media (min-width: 1024px) {
  :root { --max-width: 820px; }

  .nav-toggle { display: none; }

  .main-nav {
    position: fixed;
    top: calc(var(--header-h) + 2rem);
    left: clamp(1rem, 5vw, 4.5rem);
    right: auto;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: fit-content;
    /* Fläche hinter dem Menü: Abstand rundum = eine Zeilenhöhe */
    padding: 1lh;
    border: none;
    border-radius: 6px;
    background: rgba(250, 250, 250, 0.85);
    backdrop-filter: blur(3px);
    transform: none;
    opacity: 1;
    visibility: visible;
    gap: 0.5rem;
  }

  .nav-link {
    padding: 0.2rem 0;
    font-size: 0.95rem;
  }

  .section-inner { max-width: var(--max-width); }
}
