/* ==========================================================================
   Wir sind Theater — Theatergruppe des Heimat- und Verkehrsvereins Elsen e.V.
   Farben aus dem Vereinslogo: Wappenrot, Schwarz, Weiss.
   ========================================================================== */

:root {
  --rot:         #e20816;
  --rot-hell:    #fd0018;
  --rot-dunkel:  #b00512;
  --schwarz:     #121212;
  --grau-text:   #55504e;
  --grau-linie:  #ddd8d6;
  --grau-flaeche:#f6f3f2;
  --weiss:       #ffffff;

  --font-display: "Georgia", "Times New Roman", serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --maxw: 60rem;
  --gutter: 1.25rem;
}

*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, p, ul, ol, li, figure, dl, dd { margin: 0; padding: 0; }
img { max-width: 100%; display: block; height: auto; }

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

body {
  background: var(--weiss);
  color: var(--schwarz);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-text-size-adjust: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

main { flex: 1 0 auto; }

/* --- Sprungmarke für Tastatur- und Screenreader-Nutzung ------------------- */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--schwarz);
  color: var(--weiss);
  padding: .75rem 1.25rem;
  z-index: 200;
  font-weight: 600;
}
.skip-link:focus {
  left: .5rem;
  top: .5rem;
}

/* --- Typografie ----------------------------------------------------------- */

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.15;
  text-wrap: balance;
}

h1 { font-size: clamp(2rem, 5.5vw, 3.25rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.1rem); margin-bottom: 1rem; }
h3 { font-size: 1.2rem; margin-bottom: .4rem; }

p { max-width: 65ch; text-wrap: pretty; }
p + p, p + ul, ul + p { margin-top: 1rem; }

a { color: var(--rot-dunkel); text-underline-offset: 3px; }
a:hover { color: var(--rot); }

/* Durchgehend sichtbarer Fokus — zentral für Tastaturbedienung */
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid var(--rot);
  outline-offset: 2px;
  border-radius: 2px;
}

.lead { font-size: 1.15rem; color: var(--grau-text); }

/* --- Kopfbereich ---------------------------------------------------------- */

.site-header {
  border-bottom: 3px solid var(--schwarz);
  background: var(--weiss);
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: .9rem;
}

/* Logo rechts, Ticket-Link links (laut Spezifikation) */
.ticket-link {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: var(--rot);
  color: var(--weiss);
  font-weight: 700;
  font-size: .95rem;
  text-decoration: none;
  padding: .7rem 1.15rem;
  border: 2px solid var(--rot);
  border-radius: 3px;
  transition: background-color .15s ease;
}
.ticket-link:hover,
.ticket-link:focus {
  background: var(--rot-dunkel);
  border-color: var(--rot-dunkel);
  color: var(--weiss);
}
.ticket-link svg { flex-shrink: 0; }

.logo-link { display: block; flex-shrink: 0; }
.logo-link img { width: 92px; }

/* --- Navigation ----------------------------------------------------------- */

.site-nav {
  border-top: 1px solid var(--grau-linie);
  background: var(--grau-flaeche);
}
.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  gap: 0 1.75rem;
}
.site-nav a {
  display: block;
  padding: .75rem 0;
  color: var(--schwarz);
  text-decoration: none;
  font-weight: 600;
  font-size: .97rem;
  border-bottom: 4px solid transparent;
  margin-bottom: -1px;
}
.site-nav a:hover { color: var(--rot); }
.site-nav a[aria-current="page"] {
  border-bottom-color: var(--rot);
  color: var(--rot);
}

/* --- Titelbereich --------------------------------------------------------- */

.hero {
  background: var(--schwarz);
  color: var(--weiss);
  padding-block: clamp(2.5rem, 7vw, 4.5rem);
}
.hero h1 { color: var(--weiss); }
.hero h1 em {
  color: var(--rot-hell);
  font-style: normal;
}
.hero p { color: #d8d2d0; margin-top: 1rem; }
.hero .kicker {
  color: var(--rot-hell);
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .82rem;
  font-weight: 700;
  margin-bottom: .75rem;
}

/* --- Inhaltsabschnitte ---------------------------------------------------- */

section { padding-block: clamp(2.25rem, 6vw, 3.5rem); }
section + section { border-top: 1px solid var(--grau-linie); }

.stage-note {
  border-left: 5px solid var(--rot);
  background: var(--grau-flaeche);
  padding: 1.15rem 1.35rem;
  margin-top: 1.5rem;
}
.stage-note p { margin: 0; }

/* --- Terminliste ---------------------------------------------------------- */

.termine { list-style: none; display: grid; gap: .85rem; margin-top: 1.5rem; }

.termin {
  display: grid;
  grid-template-columns: 5.5rem 1fr auto;
  gap: 1.25rem;
  align-items: center;
  border: 1px solid var(--grau-linie);
  border-left: 5px solid var(--rot);
  padding: 1rem 1.25rem;
  background: var(--weiss);
}

.termin-datum {
  font-family: var(--font-display);
  line-height: 1.1;
  text-align: center;
}
.termin-datum .tag {
  display: block;
  font-size: 1.9rem;
  font-weight: 700;
}
.termin-datum .monat {
  display: block;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--grau-text);
}

.termin-info .wochentag { font-weight: 700; }
.termin-info p { font-size: .93rem; color: var(--grau-text); margin: .15rem 0 0; }

.status {
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: .3rem .6rem;
  border-radius: 3px;
  white-space: nowrap;
}
.status-rest { background: #fff3cd; color: #7a5c00; border: 1px solid #e0c766; }
.status-aus  { background: #f1eeed; color: var(--grau-text); border: 1px solid var(--grau-linie); }

.termin.ist-ausverkauft { border-left-color: var(--grau-linie); }

@media (max-width: 36rem) {
  .termin { grid-template-columns: 1fr; gap: .5rem; text-align: left; }
  .termin-datum { text-align: left; }
  .termin-datum .tag { display: inline; font-size: 1.3rem; }
  .termin-datum .monat { display: inline; font-size: .95rem; letter-spacing: 0; text-transform: none; }
  .status { justify-self: start; }
}

/* --- Infotabelle ---------------------------------------------------------- */

dl.fakten { display: grid; gap: 1rem; margin-top: 1.25rem; }
@media (min-width: 40rem) {
  dl.fakten { grid-template-columns: max-content 1fr; gap: .85rem 2rem; }
}
dl.fakten dt {
  font-weight: 700;
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--grau-text);
}
dl.fakten dd { margin: 0; }

/* --- Schaltflächen -------------------------------------------------------- */

.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }

.btn {
  display: inline-block;
  padding: .8rem 1.5rem;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  border: 2px solid var(--rot);
  background: var(--rot);
  color: var(--weiss);
  border-radius: 3px;
  transition: background-color .15s ease;
}
.btn:hover, .btn:focus { background: var(--rot-dunkel); border-color: var(--rot-dunkel); color: var(--weiss); }

.btn-outline { background: transparent; color: var(--rot-dunkel); }
.btn-outline:hover, .btn-outline:focus { background: var(--rot); color: var(--weiss); }

/* --- Fußbereich ----------------------------------------------------------- */

.site-footer {
  background: var(--schwarz);
  color: #c9c3c1;
  padding-block: 2rem;
  margin-top: 2rem;
  font-size: .93rem;
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  justify-content: space-between;
  align-items: center;
}
.site-footer a { color: var(--weiss); text-decoration: underline; }
.site-footer a:hover { color: var(--rot-hell); }
.footer-links { display: flex; flex-wrap: wrap; gap: 1.25rem; list-style: none; }
.footer-verein { font-size: .88rem; color: #9b9391; }

/* --- Hinweis auf externe Links (barrierefrei kenntlich) ------------------- */

.extern::after {
  content: "";
  display: inline-block;
  width: .65em; height: .65em;
  margin-left: .35em;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M14 3h7v7h-2V6.4l-9.3 9.3-1.4-1.4L17.6 5H14V3zM5 5h5v2H7v10h10v-3h2v5H5V5z'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M14 3h7v7h-2V6.4l-9.3 9.3-1.4-1.4L17.6 5H14V3zM5 5h5v2H7v10h10v-3h2v5H5V5z'/%3E%3C/svg%3E") no-repeat center / contain;
}
.ticket-link.extern::after { display: none; }

/* --- Nur für Screenreader ------------------------------------------------- */

.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;
}

/* --- Hoher Kontrast / Druck ---------------------------------------------- */

@media (prefers-contrast: more) {
  :root { --grau-text: #332f2e; --grau-linie: #999; }
}

@media print {
  .site-nav, .ticket-link, .btn-row, .site-footer { display: none; }
  .hero { background: none; color: #000; }
  .hero h1, .hero p { color: #000; }
  body { font-size: 11pt; }
  a::after { content: " (" attr(href) ")"; font-size: 9pt; }
}
