/* ==========================================================================
   Heimat- und Kulturverein Rieden — Stylesheet
   Design-Token-System, abgeleitet aus dem ECHTEN Vereinswappen:
   Blau (Rathausfeld/Lilienfeld), Gold (Banner/Lilie), Rot (Zackenfeld),
   dunkles Kontur-Marineblau als Ink-Ton. Rot ist bewusst ein seltener
   Akzent, kein Flächenton — im Wappen selbst ist es auch nur ein Feld
   von vieren.
   Type    – Fraunces (Display) + Karla (Text)
   Signatur– Wappen-Silhouette + "Seit 1996"-Medaillon, wiederkehrend
   ========================================================================== */

:root {
  /* Farbe — aus dem Vereinswappen extrahiert */
  --paper:       #FBFAF6;   /* Silber/Weiss-Feld des Wappens – Basisfläche */
  --paper-deep:  #F1EEE3;   /* dezente zweite Fläche */
  --ink:         #1E2138;   /* Konturschwarz des Wappens (leicht ins Marineblaue) */
  --ink-soft:    #5C5F6E;   /* gedämpfter Text */
  --blue:        #2A46B8;   /* Wappen-Blau (Rathaus-/Lilienfeld), Primärakzent */
  --blue-deep:   #1B2F86;   /* dunkleres Blau – Hover-Zustand */
  --gold:        #D9A62E;   /* aus dem Banner-Gelb abgeleitet, für Web gedämpft */
  --gold-bright: #F0C94A;   /* helleres Gold für kleine Highlights */
  --red:         #B23A2C;   /* Wappen-Rot, SEHR sparsam als Akzent */
  --line:        #E1DCC9;   /* Fugen/Trennlinien */

  /* Typografie */
  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body:    "Karla", "Segoe UI", sans-serif;

  /* Abstände */
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --radius: 2px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

a {
  color: inherit;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

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

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 0.9rem;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  /* Hinweis: bewusst kein backdrop-filter hier — das würde für
     position:fixed-Nachfahren (Mobilmenü) einen neuen containing block
     erzeugen und die Fixierung auf den Viewport durchbrechen. */
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--ink);
}

.brand img {
  height: 46px;
  width: auto;
  object-fit: contain;
}

.brand .brand-text small {
  display: block;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

nav.main-nav ul {
  list-style: none;
  display: flex;
  gap: 1.9rem;
  margin: 0;
  padding: 0;
  align-items: center;
}

nav.main-nav a {
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink);
  position: relative;
  padding: 0.3rem 0;
}

nav.main-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--blue);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

nav.main-nav a:hover::after,
nav.main-nav a:focus-visible::after {
  transform: scaleX(1);
}

.nav-ig {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  background: var(--blue);
  color: var(--paper) !important;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.85rem !important;
  text-decoration: none;
}
.nav-ig:hover { background: var(--blue-deep); }
.nav-ig::after { display: none !important; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--ink);
  margin: 5px 0;
}

/* ---------- Hero ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(120px, 220px) 1fr;
  min-height: 84vh;
  border-bottom: 1px solid var(--line);
}

.hero-plaque {
  background: var(--blue);
  color: var(--paper);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 2.2rem 1.2rem;
  position: relative;
}

.hero-plaque .vertical-label {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-family: var(--font-body);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 0.78rem;
  font-weight: 700;
  margin: 0 auto;
}

.hero-plaque .plaque-title,
.hero-plaque .plaque-address { display: inline; }
.hero-plaque .plaque-address::before { content: " - "; }

.datestone {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin: 0 auto;
  font-family: var(--font-display);
  color: var(--paper);
  line-height: 1.15;
}

.datestone .ds-mark { font-size: 0.95rem; font-weight: 700; letter-spacing: 0.02em; }
.datestone .ds-year { display: block; font-size: 0.62rem; letter-spacing: 0.12em; color: var(--gold); margin-top: 2px; }

.hero-media {
  position: relative;
  overflow: hidden;
  background: var(--paper-deep);
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 420px;
}

.hero-caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  background: linear-gradient(to top, rgba(43, 36, 30, 0.78), rgba(43, 36, 30, 0.52));
  color: var(--paper);
  padding: 2.1rem var(--gutter) 1.7rem;
}

.hero-caption h1 {
  color: var(--paper);
  font-size: clamp(1.9rem, 4vw, 3.1rem);
  max-width: 18ch;
  margin-bottom: 0.4rem;
}

.hero-caption p {
  max-width: 46ch;
  color: #E7E0D0;
  font-size: 1.05rem;
  margin: 0;
}

.photo-credit {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  background: rgba(43, 36, 30, 0.6);
  color: var(--paper);
  font-size: 0.68rem;
  padding: 0.25rem 0.55rem;
  border-radius: 3px;
  text-decoration: none;
}

/* ---------- Sections ---------- */

section {
  padding: 5.5rem 0;
  border-bottom: 1px solid var(--line);
}

section:last-of-type { border-bottom: none; }

.section-head {
  max-width: 62ch;
  margin-bottom: 2.6rem;
}

.section-head h2 {
  font-size: clamp(1.6rem, 3vw, 2.3rem);
}

.section-head p {
  color: var(--ink-soft);
  font-size: 1.05rem;
}

/* Intro-Streifen */
.intro-strip {
  background: var(--paper);
}
.intro-strip .wrap {
  max-width: 780px;
  text-align: center;
}
.intro-strip p {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.4vw, 1.55rem);
  font-weight: 500;
  color: var(--ink);
  line-height: 1.5;
}
.intro-strip p em { color: var(--blue); font-style: italic; }

/* Über uns – Zweck-Liste */
.purpose-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 0;
  border-top: 1px solid var(--line);
}

.purpose-item {
  padding: 1.8rem 1.6rem;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.purpose-item:last-child { border-right: none; }

.purpose-item .p-num {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--gold);
  font-size: 0.95rem;
  display: block;
  margin-bottom: 0.6rem;
}

.purpose-item h3 {
  font-size: 1.05rem;
  margin-bottom: 0.4rem;
}

.purpose-item p {
  color: var(--ink-soft);
  font-size: 0.95rem;
  margin: 0;
}

/* Wappen-Erklärstück */
.wappen-explainer {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  background: var(--paper-deep);
  border: 1px solid var(--line);
  padding: 2rem clamp(1.5rem, 4vw, 3rem);
  margin-top: 3rem;
}
.wappen-explainer-media {
  flex: 0 0 auto;
}
.wappen-explainer-media img {
  height: 150px;
  width: auto;
}
.wappen-explainer-text h3 {
  font-size: 1.3rem;
  margin-bottom: 0.6rem;
}
.wappen-explainer-text p {
  margin: 0;
  color: var(--ink-soft);
  max-width: 56ch;
}
@media (max-width: 640px) {
  .wappen-explainer { flex-direction: column; text-align: center; gap: 1.2rem; }
  .wappen-explainer-text p { max-width: 100%; }
}

/* Zwei-Spalten Bild+Text */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.split.reverse .split-media { order: 2; }
.split.reverse .split-text { order: 1; }

.split-media {
  position: relative;
}
.split-media img {
  width: 100%;
  height: 100%;
  min-height: 320px;
  object-fit: cover;
  border-radius: var(--radius);
}

.split-text .eyebrow { margin-bottom: 0.7rem; }

.split-text h2 { margin-bottom: 1rem; }
.split-text p { color: var(--ink-soft); }

.badge-list {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin: 1.3rem 0 0;
  padding: 0;
  list-style: none;
}
.badge-list li {
  border: 1px solid var(--blue);
  color: var(--blue);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
}

/* Auszeichnungen */
.awards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}
.award-card {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 1.6rem 1.7rem;
}
.award-card .ds-year-lg {
  font-family: var(--font-display);
  font-size: 2.1rem;
  font-weight: 700;
  color: var(--gold);
  display: block;
  margin-bottom: 0.5rem;
}
.award-card p { margin: 0; color: var(--ink-soft); font-size: 0.95rem; }

/* Zeitleiste (Türsturz-Daten)
   Modifier .timeline--ort färbt in Wappen-Rot (Dorfgeschichte),
   die Grundfarbe Blau steht für die Vereinsgeschichte. */
.timeline {
  display: flex;
  overflow-x: auto;
  gap: 0;
  border-top: 3px solid var(--ink);
  border-bottom: 3px solid var(--ink);
  margin-top: 2.5rem;
  scrollbar-width: thin;
}

.timeline--ort {
  border-top-color: var(--red);
  border-bottom-color: var(--red);
}
.timeline--ort .t-year { color: var(--red); }

.timeline-item {
  flex: 1 1 150px;
  min-width: 150px;
  padding: 1.6rem 1.4rem;
  border-right: 1px solid var(--line);
}
.timeline-item:last-child { border-right: none; }

.timeline-item .t-year {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.6rem;
  color: var(--blue);
  display: block;
  margin-bottom: 0.5rem;
}
.timeline-item p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

/* Mitmachen / Links-Kacheln */
.links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.4rem;
  margin-top: 2.4rem;
}

.link-card {
  display: block;
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 1.9rem;
  text-decoration: none;
  color: var(--ink);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.link-card:hover {
  border-color: var(--blue);
  transform: translateY(-3px);
}
.link-card .lc-eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 700;
}
.link-card h3 {
  margin: 0.6rem 0 0.5rem;
  font-size: 1.25rem;
}
.link-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
}
.link-card .lc-arrow {
  display: inline-block;
  margin-top: 1rem;
  font-weight: 700;
  color: var(--blue);
}

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

footer.site-footer {
  background: var(--ink);
  color: var(--paper);
  padding: 3.5rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(241,236,222,0.18);
}

footer h4 {
  font-family: var(--font-body);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 1rem;
}

footer address {
  font-style: normal;
  color: #DCD5C4;
  font-size: 0.95rem;
  line-height: 1.7;
}

footer ul {
  list-style: none;
  margin: 0; padding: 0;
}
footer li { margin-bottom: 0.6rem; }
footer a {
  color: #DCD5C4;
  text-decoration: none;
  font-size: 0.95rem;
}
footer a:hover { color: var(--paper); text-decoration: underline; }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 1.6rem;
  font-size: 0.82rem;
  color: #B7AE9B;
}

.footer-bottom .datestone {
  width: 46px; height: 46px;
  border-color: var(--gold);
}
.footer-bottom .datestone .ds-mark { font-size: 0.55rem; }
.footer-bottom .datestone .ds-year { font-size: 0.4rem; }

.footer-legal a { margin-left: 1.2rem; }
.footer-legal a:first-child { margin-left: 0; }

/* ---------- Scroll reveal ----------
   Progressive enhancement: Inhalte sind standardmäßig sichtbar.
   Erst wenn JavaScript läuft, bekommt <body> die Klasse "js-ready" und
   Abschnitte blenden beim Scrollen sanft ein. Ohne JS bleibt alles sichtbar. */
body.js-ready .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
body.js-ready .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Einfache Seiten (Impressum/Datenschutz) ---------- */
.legal-page main {
  padding: 4rem 0 5rem;
}
.legal-page .wrap { max-width: 760px; }
.legal-page h1 { margin-bottom: 1.8rem; }
.legal-page h2 {
  font-size: 1.2rem;
  margin-top: 2.4rem;
}
.legal-page p, .legal-page li { color: var(--ink-soft); }
.legal-page a { color: var(--blue); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 76px 1fr;
    min-height: auto;
  }
  .hero-plaque {
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 0.35rem;
  }
  .hero-plaque .vertical-label {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    margin: 0;
    font-size: 0.576rem;
    letter-spacing: 0.14em;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    line-height: 1.25;
  }
  .hero-plaque .plaque-title,
  .hero-plaque .plaque-address {
    display: block;
  }
  .hero-plaque .plaque-address::before {
    content: none;
  }
  .hero-plaque .plaque-address {
    font-size: 0.92em;
    font-weight: 500;
    letter-spacing: 0.10em;
  }
  .datestone {
    width: auto;
    height: auto;
    border: none;
    border-radius: 0;
    margin: 0;
    background: transparent;
  }
  .datestone img {
    width: 36px;
    height: auto;
    display: block;
  }
  .hero-media {
    min-height: 390px;
  }
  .hero-media::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 48%;
    background: linear-gradient(to top, rgba(18, 20, 30, 0.72) 0%, rgba(18, 20, 30, 0.30) 55%, rgba(18, 20, 30, 0) 100%);
    pointer-events: none;
    z-index: 1;
  }
  .hero-media img {
    min-height: 390px;
  }
  .hero-caption {
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    padding: 0.9rem var(--gutter) 1.1rem;
    border-radius: 0;
    background: transparent;
  }
  .hero-caption h1 {
    font-size: clamp(1.45rem, 6.2vw, 2rem);
    line-height: 1.08;
    max-width: 16ch;
    margin-bottom: 0.25rem;
    text-shadow: 0 2px 8px rgba(0,0,0,0.8);
  }
  .hero-caption p {
    font-size: 0.92rem;
    color: var(--paper);
    text-shadow: 0 1px 5px rgba(0,0,0,0.8);
  }
  .photo-credit {
    top: 0.65rem;
    right: 0.65rem;
    font-size: 0.62rem;
    background: rgba(43, 36, 30, 0.5);
  }
  .split, .split.reverse { grid-template-columns: 1fr; }
  .split-media { order: 1 !important; }
  .split-text { order: 2 !important; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
}

@media (max-width: 880px) {
  nav.main-nav {
    position: fixed;
    inset: 72px 0 0 0;
    background: var(--paper);
    display: none;
    padding: 2rem var(--gutter);
    overflow-y: auto;
  }
  nav.main-nav.open { display: block; }
  nav.main-nav ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
  }
  nav.main-nav a { font-size: 1.2rem; }
  .nav-toggle { display: block; }
  .purpose-item { border-right: none; }
}
