/* =========================================================
   Gregor Oezelt – Rezitator & Conférencier
   Modern-klassisches Design-System
   ========================================================= */

:root {
  /* Farben */
  --ink:        #211c18;   /* Haupttext */
  --ink-soft:   #5c534b;   /* Sekundärtext */
  --paper:      #faf6ef;   /* Hintergrund (warmes Creme) */
  --paper-2:    #f3ece0;   /* abgesetzte Flächen */
  --card:       #fffdf9;
  --red:        #8c1d18;   /* imperiales Rot */
  --red-dark:   #6e1612;
  --gold:       #b08d4f;   /* Akzent */
  --gold-soft:  #d8c39a;
  --line:       #e3d9c8;   /* feine Linien */
  --shadow:     0 1px 2px rgba(33,28,24,.06), 0 12px 30px rgba(33,28,24,.08);

  --maxw: 1120px;
  --serif-display: "Cormorant Garamond", "Times New Roman", serif;
  --serif-body: "EB Garamond", Georgia, "Times New Roman", serif;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: hidden; }
body {
  margin: 0;
  overflow-x: hidden;
  max-width: 100%;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif-body);
  font-size: 1.125rem;
  line-height: 1.65;
  font-feature-settings: "liga" 1, "kern" 1;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--red); text-decoration: none; transition: color .2s; }
a:hover { color: var(--gold); }

h1, h2, h3, h4 {
  font-family: var(--serif-display);
  font-weight: 600;
  line-height: 1.12;
  color: var(--ink);
  margin: 0 0 .5em;
  letter-spacing: .005em;
}
h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.5rem); }
h3 { font-size: 1.5rem; }
p { margin: 0 0 1em; }

.container {
  width: 100%; max-width: var(--maxw); margin: 0 auto;
  /* durchgehendes horizontales Padding inkl. iPhone-Safe-Area; Desktop bleibt 1.5rem */
  padding-left: max(1.5rem, env(safe-area-inset-left));
  padding-right: max(1.5rem, env(safe-area-inset-right));
}
.muted { color: var(--ink-soft); }
.center { text-align: center; }
.lead { font-size: 1.3rem; color: var(--ink-soft); }

/* Akzent-Überschrift mit Schwung */
.kicker {
  font-family: var(--serif-body);
  text-transform: uppercase;
  letter-spacing: .28em;
  font-size: .8rem;
  color: var(--gold);
  font-weight: 600;
  margin: 0 0 .8rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--serif-body);
  font-size: 1rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: .75rem 1.6rem;
  border: 1px solid var(--red);
  border-radius: 2px;
  background: var(--red);
  color: #fff;
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
}
.btn:hover { background: var(--red-dark); border-color: var(--red-dark); color: #fff; }
.btn--ghost { background: transparent; color: var(--red); }
.btn--ghost:hover { background: var(--red); color: #fff; }

/* Button-Reihe: gleichmäßiger Abstand, sauberer Umbruch */
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
.btn-row .btn { margin: 0; }
@media (max-width: 460px) { .btn-row .btn { flex: 1 1 100%; text-align: center; } }

/* ---------- Header / Navigation ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250,246,239,.92);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 76px;
}
.brand { display: flex; flex-direction: column; line-height: 1; }
.brand a { color: var(--ink); }
.brand .brand-name {
  font-family: var(--serif-display);
  font-weight: 700;
  font-size: 1.7rem;
  letter-spacing: .02em;
}
.brand .brand-sub {
  font-size: .72rem; text-transform: uppercase; letter-spacing: .26em;
  color: var(--gold); margin-top: .25rem;
}
.nav-links { display: flex; align-items: center; gap: 1.35rem; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  color: var(--ink-soft);
  font-size: 1.02rem;
  letter-spacing: .04em;
  padding: .3rem 0;
  border-bottom: 2px solid transparent;
}
.nav-links a:hover, .nav-links a.active { color: var(--red); border-bottom-color: var(--gold); }
.nav-toggle {
  display: none; background: none; border: 0; cursor: pointer;
  padding: .5rem; color: var(--ink);
}
.nav-toggle svg { width: 28px; height: 28px; }

@media (max-width: 880px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 76px; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: .5rem 1.5rem 1rem;
    max-height: 0; overflow: hidden;
    transition: max-height .3s ease;
  }
  .nav-links.open { max-height: 480px; }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; width: 100%; padding: .7rem 0; border-bottom: 1px solid var(--line); }
}

/* ---------- Hero ---------- */
.hero {
  background:
    linear-gradient(rgba(33,28,24,.55), rgba(33,28,24,.35)),
    var(--paper-2);
  background-size: cover; background-position: center;
}
.hero-inner {
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 3rem; align-items: center;
  /* nur vertikales Padding – seitliches Padding kommt von .container */
  padding-top: 4.5rem; padding-bottom: 4.5rem;
}
.hero-portrait img {
  border-radius: 4px;
  box-shadow: var(--shadow);
  border: 6px solid #fff;
}
.hero--photo .hero-text { color: #fff; }
.hero--photo .hero-text h1, .hero--photo .hero-text .lead { color: #fff; }
.hero--photo .kicker { color: var(--gold-soft); }
@media (max-width: 820px) {
  .hero-inner { grid-template-columns: 1fr; gap: 2rem; padding-top: 3rem; padding-bottom: 3rem; }
  .hero-portrait { order: -1; max-width: 320px; }
}

/* ---------- Sektionen ---------- */
section { padding: 3.5rem 0; }
.section-tight { padding: 2rem 0; }
.section-alt { background: var(--paper-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 760px; margin: 0 auto 2.5rem; text-align: center; }
.divider {
  width: 60px; height: 2px; background: var(--gold); margin: 1.2rem auto; border: 0;
}
.divider--left { margin-left: 0; }

/* ---------- Karten / Grids ---------- */
.grid { display: grid; gap: 1.75rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 820px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card-body { padding: 1.5rem 1.6rem; }
.card h3 { margin-bottom: .3rem; }

/* Programm-Karte mit Bild (Alt – nicht mehr verwendet) */
.prog-card { display: flex; flex-direction: column; }
.prog-card .prog-img {
  background: var(--paper-2);
  aspect-ratio: 3 / 4;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.prog-card .prog-img img { width: 100%; height: 100%; object-fit: cover; }

/* Programm-Karten – reine Textdarstellung mit Hover-Highlight */
.programs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
@media (max-width: 760px) { .programs { grid-template-columns: 1fr; } }

.program-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1.9rem 2rem;
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease, background .25s ease;
}
.program-card::before {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--gold-soft);
  transition: background .25s ease, width .25s ease;
}
.program-card:hover {
  transform: translateY(-4px);
  background: #fffefb;
  border-color: var(--gold);
  box-shadow: 0 2px 4px rgba(33,28,24,.08), 0 18px 42px rgba(33,28,24,.15);
}
.program-card:hover::before { background: var(--red); width: 5px; }
.program-card .p-cat {
  text-transform: uppercase; letter-spacing: .22em; font-size: .72rem;
  font-weight: 600; color: var(--gold); margin: 0 0 .55rem;
}
.program-card h3 { font-size: 1.7rem; margin: 0 0 .45rem; color: var(--ink); transition: color .25s ease; }
.program-card:hover h3 { color: var(--red); }
.program-card .p-cast { color: var(--ink-soft); font-size: 1.02rem; font-style: italic; margin: 0 0 .6rem; }
.program-card .p-desc { margin: 0; color: var(--ink); }

/* ---------- Veranstaltungen ---------- */
.event-list { display: grid; gap: 1.5rem; }
.event {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 1.6rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--red);
  border-radius: 4px;
  box-shadow: var(--shadow);
  padding: 1.5rem 1.7rem;
  align-items: start;
}
.event--past { border-left-color: var(--gold-soft); opacity: .92; }
.event-date {
  text-align: center;
  border-right: 1px solid var(--line);
  padding-right: 1rem;
}
.event-date .d-day { font-family: var(--serif-display); font-size: 2.7rem; font-weight: 700; line-height: 1; color: var(--red); }
.event-date .d-month { text-transform: uppercase; letter-spacing: .18em; font-size: .82rem; color: var(--ink-soft); margin-top: .25rem; }
.event-date .d-year { font-size: .95rem; color: var(--ink-soft); }
.event-date .d-time { margin-top: .5rem; font-size: .9rem; color: var(--gold); }
.event-body h3 { margin: 0 0 .25rem; }
.event-body .event-sub { color: var(--ink-soft); margin: 0 0 .7rem; }
.event-meta { display: grid; gap: .25rem; font-size: 1rem; }
.event-meta .row { display: grid; grid-template-columns: 110px 1fr; gap: .5rem; }
.event-meta .lbl { color: var(--gold); text-transform: uppercase; letter-spacing: .1em; font-size: .76rem; padding-top: .28rem; }
@media (max-width: 620px) {
  .event { grid-template-columns: 1fr; }
  .event-date { display: flex; gap: .6rem; align-items: baseline; justify-content: flex-start;
                border-right: 0; border-bottom: 1px solid var(--line); padding: 0 0 .7rem; text-align: left; }
  .event-date .d-day { font-size: 1.9rem; }
  .event-meta .row { grid-template-columns: 92px 1fr; }
}

.events-empty {
  text-align: center; padding: 3rem 1rem; color: var(--ink-soft);
  background: var(--card); border: 1px dashed var(--line); border-radius: 4px;
}

/* Untermenü/Tabs für Archiv */
.toggle-bar { display: flex; gap: .5rem; justify-content: center; margin-bottom: 2rem; flex-wrap: wrap; }
.toggle-bar button {
  font-family: var(--serif-body); font-size: .95rem; letter-spacing: .1em; text-transform: uppercase;
  background: transparent; border: 1px solid var(--line); color: var(--ink-soft);
  padding: .5rem 1.2rem; border-radius: 2px; cursor: pointer; transition: all .2s;
}
.toggle-bar button.active { background: var(--red); color: #fff; border-color: var(--red); }

/* ---------- Steckbrief (Biographie) ---------- */
.facts { columns: 2; column-gap: 3rem; }
.facts dl { margin: 0; break-inside: avoid; }
.fact { break-inside: avoid; padding: .6rem 0; border-bottom: 1px solid var(--line); }
.fact dt { font-family: var(--serif-display); font-weight: 600; font-size: 1.15rem; color: var(--red); }
.fact dd { margin: 0; color: var(--ink-soft); }
@media (max-width: 720px) { .facts { columns: 1; } }

/* ---------- Lesungen ---------- */
.reading-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 1.25rem; }
@media (max-width: 720px){ .reading-grid { grid-template-columns: 1fr; } }
.reading {
  background: var(--card); border: 1px solid var(--line); border-radius: 4px;
  padding: 1.25rem 1.4rem; box-shadow: var(--shadow);
}
.reading .author { font-family: var(--serif-display); font-size: 1.45rem; font-weight: 600; color: var(--red); }
.reading .work { color: var(--ink-soft); font-style: italic; }

/* ---------- Galerie ---------- */
.gallery { columns: 3; column-gap: 1rem; }
.gallery img {
  width: 100%; margin-bottom: 1rem; border-radius: 3px; border: 5px solid #fff;
  box-shadow: var(--shadow); break-inside: avoid; cursor: zoom-in; transition: transform .25s;
}
.gallery img:hover { transform: scale(1.015); }
@media (max-width: 820px){ .gallery { columns: 2; } }
@media (max-width: 520px){ .gallery { columns: 1; } }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 100; display: none;
  background: rgba(20,16,13,.92); align-items: center; justify-content: center; padding: 2rem;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 88vh; border: 6px solid #fff; border-radius: 3px; }
.lightbox-close { position: absolute; top: 1.2rem; right: 1.6rem; color: #fff; font-size: 2.4rem; cursor: pointer; line-height: 1; }

/* ---------- Kontakt ---------- */
.contact-card {
  max-width: 540px; margin: 0 auto; text-align: center;
  background: var(--card); border: 1px solid var(--line); border-radius: 4px;
  box-shadow: var(--shadow); padding: 2.5rem;
}
.contact-card .logo-mark { width: 110px; margin: 0 auto 1.2rem; }

/* ---------- Prose ---------- */
.prose { max-width: 760px; }
.prose p { font-size: 1.18rem; }
.prose .float-img { float: right; width: 280px; margin: 0 0 1.5rem 2rem; border-radius: 4px; box-shadow: var(--shadow); border: 5px solid #fff; }
@media (max-width: 620px){ .prose .float-img { float: none; width: 100%; margin: 0 0 1.5rem; } }

/* ---------- Formular (Admin) ---------- */
.form-grid { display: grid; gap: 1.1rem; }
.field { display: grid; gap: .35rem; }
.field label { font-size: .82rem; text-transform: uppercase; letter-spacing: .12em; color: var(--gold); font-weight: 600; }
.field input, .field textarea, .field select {
  font-family: var(--serif-body); font-size: 1.05rem;
  padding: .7rem .85rem; border: 1px solid var(--line); border-radius: 3px;
  background: #fff; color: var(--ink);
}
.field input:focus, .field textarea:focus { outline: 2px solid var(--gold-soft); border-color: var(--gold); }
.field textarea { min-height: 90px; resize: vertical; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 620px){ .field-row { grid-template-columns: 1fr; } }
.notice { padding: .9rem 1.1rem; border-radius: 3px; font-size: 1rem; }
.notice--ok { background: #edf6ec; border: 1px solid #bcdcb7; color: #2f6f2a; }
.notice--err { background: #fbecea; border: 1px solid #e6bdb8; color: var(--red-dark); }
.admin-event-row {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: .9rem 1.1rem; border: 1px solid var(--line); border-radius: 3px; background: var(--card); margin-bottom: .6rem;
}
.admin-event-row .meta { font-size: .95rem; color: var(--ink-soft); }
.btn-del { background: transparent; border: 1px solid var(--red); color: var(--red); padding: .4rem .9rem; border-radius: 2px; cursor: pointer; font-family: var(--serif-body); letter-spacing: .08em; }
.btn-del:hover { background: var(--red); color: #fff; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink); color: #d9cfc2; margin-top: 3rem;
  padding: 3rem 0 2rem; font-size: 1rem;
}
.site-footer a { color: var(--gold-soft); }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 2rem; }
.footer-grid h4 { color: #fff; font-size: 1.3rem; margin-bottom: .6rem; }
.footer-brand .fname { font-family: var(--serif-display); font-size: 1.6rem; color: #fff; }
.footer-brand .fsub { color: var(--gold-soft); letter-spacing: .2em; text-transform: uppercase; font-size: .72rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 2rem; padding-top: 1.2rem; text-align: center; font-size: .88rem; color: #9c9288; }
@media (max-width: 720px){ .footer-grid { grid-template-columns: 1fr; gap: 1.4rem; } }

/* Utility */
.mt-0 { margin-top: 0; }
/* Skip-Link unsichtbar, ohne horizontalen Überlauf zu erzeugen */
.skip-link {
  position: absolute; top: -60px; left: 1rem; z-index: 200;
  background: #fff; padding: .5rem 1rem; border-radius: 3px;
  transition: top .2s ease;
}
.skip-link:focus { top: .5rem; }

/* ---------- Klaro! Consent – Akzentfarbe an das Seiten-Rot anpassen ---------- */
.klaro {
  --green1: #8c1d18;   /* Akzent / Buttons (statt Grün) */
  --green2: #6e1612;   /* dunkler/hover */
  --green3: #ffffff;   /* Text auf dem Akzent */
}
.klaro .cookie-modal a, .klaro .context-notice a, .klaro .cookie-notice a { color: var(--red); }
