/* Dorf- und Heimatverein Freiberg e.V. — mobile-first, system dark/light */

:root {
  --paper: #f6f1e7;
  --paper-alt: #eee7d8;
  --ink: #2b2620;
  --ink-soft: #5c544a;
  --green: #3d5a3c;
  --green-deep: #2e4530;
  --honey: #c8862e;
  --honey-soft: #e9d9bd;
  --line: #d9cfbc;
  --card: #fffdf8;
  --shadow: 0 2px 6px rgb(43 38 32 / .07), 0 12px 32px rgb(43 38 32 / .09);
  --radius: 14px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #141814;
    --paper-alt: #1a201a;
    --ink: #ece5d8;
    --ink-soft: #b0a996;
    --green: #8fb089;
    --green-deep: #a8c4a2;
    --honey: #e0a44c;
    --honey-soft: #3a3220;
    --line: #2c332b;
    --card: #1d231d;
    --shadow: 0 2px 6px rgb(0 0 0 / .3), 0 12px 32px rgb(0 0 0 / .35);
  }
}

* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: "Atkinson Hyperlegible", system-ui, sans-serif;
  font-size: 1.06rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .brand-text, .tl-year, .fact-num, .card-month {
  font-family: "Fraunces", Georgia, serif;
}
h1 { font-weight: 700; font-size: clamp(2rem, 7.5vw, 3.6rem); line-height: 1.08; letter-spacing: -0.01em; }
h2 { font-weight: 700; font-size: clamp(1.6rem, 5.5vw, 2.4rem); line-height: 1.15; margin-bottom: .9rem; }
h3 { font-weight: 600; font-size: 1.15rem; margin-bottom: .35rem; }

a { color: var(--green-deep); text-decoration-color: var(--honey); text-underline-offset: 3px; }
a:hover { color: var(--honey); }
img { max-width: 100%; height: auto; display: block; }

.wrap { max-width: 68rem; margin-inline: auto; padding-inline: 1.25rem; }

.eyebrow {
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--honey);
  margin-bottom: .6rem;
}
.lead { font-size: 1.16rem; color: var(--ink); max-width: 46rem; }
.note {
  margin-top: 2rem;
  padding: .9rem 1.1rem;
  border-inline-start: 3px solid var(--honey);
  background: var(--paper-alt);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--ink-soft);
  max-width: 46rem;
}

/* ---------- header ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: .75rem;
  padding: .6rem 1rem;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--ink); min-width: 0; }
.brand-mark { width: 2rem; height: 2rem; flex: none; }
.brand-mark rect { fill: var(--green); }
.brand-house { fill: var(--paper); }
.brand-text { font-size: 1.02rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-text strong { font-weight: 700; }

.nav-toggle {
  margin-inline-start: auto;
  display: grid; gap: 5px; padding: .65rem;
  background: none; border: 0; cursor: pointer;
}
.nav-toggle span { width: 22px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .25s, opacity .25s; }
.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav {
  position: absolute; top: 100%; left: 0; right: 0;
  display: none; flex-direction: column; gap: .1rem;
  padding: .6rem 1rem 1rem;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.nav-open .nav { display: flex; }
.nav a { padding: .55rem .4rem; font-weight: 700; text-decoration: none; color: var(--ink); border-radius: 8px; }
.nav a:hover { background: var(--paper-alt); color: var(--green-deep); }
.nav-cta { color: var(--honey); }

@media (min-width: 760px) {
  .topbar { padding: .6rem 1.5rem; }
  .nav-toggle { display: none; }
  .nav {
    position: static; display: flex; flex-direction: row; gap: .2rem;
    margin-inline-start: auto; padding: 0; background: none; border: 0; box-shadow: none;
  }
  .nav a { padding: .45rem .7rem; font-weight: 400; }
  .nav-cta { font-weight: 700; }
}

/* ---------- hero ---------- */
.hero { position: relative; min-height: min(88svh, 46rem); display: grid; align-items: end; isolation: isolate; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero-shade {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgb(20 24 20 / .35) 0%, rgb(20 24 20 / .15) 40%, rgb(20 24 20 / .78) 100%);
}
.hero-inner { width: 100%; max-width: 68rem; margin-inline: auto; padding: 6rem 1.25rem 2.6rem; color: #f4efe4; }
.hero .eyebrow { color: #ffd489; }
.hero-sub { font-size: clamp(1.05rem, 3.5vw, 1.35rem); margin-top: .8rem; line-height: 1.45; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.5rem; }

.btn {
  display: inline-block; padding: .68rem 1.25rem;
  border-radius: 999px; font-weight: 700; text-decoration: none;
  transition: transform .15s, background .2s, color .2s;
}
.btn:active { transform: scale(.97); }
.btn-solid { background: var(--honey); color: #241a08; }
.btn-solid:hover { background: #ffd489; color: #241a08; }
.btn-ghost { border: 2px solid #f4efe4; color: #f4efe4; }
.btn-ghost:hover { background: #f4efe4; color: #2b2620; }

/* ---------- sections ---------- */
.section { padding: 3.6rem 0; }
.section-alt { background: var(--paper-alt); border-block: 1px solid var(--line); }

.cols { display: grid; gap: 2rem; margin-top: 1.4rem; }
@media (min-width: 820px) {
  .cols { grid-template-columns: 3fr 2fr; gap: 3rem; align-items: start; }
  .cols-media { grid-template-columns: 5fr 4fr; align-items: center; }
}
.cols p + p { margin-top: .9rem; }

.fact-list { list-style: none; padding: 0; display: grid; gap: .9rem; }
.fact-list li {
  display: grid; grid-template-columns: 5.2rem 1fr; gap: .9rem; align-items: center;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: .8rem 1rem;
}
.fact-num { font-size: 1.5rem; font-weight: 700; color: var(--green-deep); text-align: center; }

/* cards (Jahreslauf) */
.cards { display: grid; gap: 1rem; margin-top: 1.6rem; }
@media (min-width: 640px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .cards { grid-template-columns: repeat(3, 1fr); } }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.15rem 1.15rem 1.25rem; box-shadow: var(--shadow);
}
.card-month {
  display: inline-block; font-weight: 700; font-size: .85rem;
  color: var(--honey); border: 1px solid currentColor; border-radius: 999px;
  padding: .1rem .65rem; margin-bottom: .7rem; letter-spacing: .06em; text-transform: uppercase;
}
.card p { color: var(--ink-soft); font-size: .98rem; }

/* Konsum */
figure figcaption { font-size: .86rem; color: var(--ink-soft); margin-top: .5rem; }
.cols-media img { border-radius: var(--radius); box-shadow: var(--shadow); }
.hint {
  margin-top: 1.4rem; padding: 1rem 1.2rem;
  background: var(--honey-soft); border-radius: var(--radius);
}
.hint h3 { color: var(--ink); }

/* Dorfgeschichte */
.engravings { display: grid; gap: 1.4rem; margin: 2rem 0 2.6rem; }
@media (min-width: 720px) { .engravings { grid-template-columns: 1fr 1fr; } }
.engravings img { border-radius: 8px; border: 6px solid var(--card); box-shadow: var(--shadow); }

.timeline { list-style: none; padding: 0; margin-top: .6rem; max-width: 46rem; }
.timeline li {
  position: relative; padding: 0 0 1.6rem 1.6rem;
  border-inline-start: 2px solid var(--line);
}
.timeline li:last-child { padding-bottom: .2rem; }
.timeline li::before {
  content: ""; position: absolute; left: -7px; top: .45em;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--honey); border: 2px solid var(--paper-alt);
}
.tl-year { display: block; font-weight: 700; font-size: 1.2rem; color: var(--green-deep); margin-bottom: .15rem; }
.timeline p { color: var(--ink-soft); }
.timeline strong { color: var(--ink); }

/* gallery */
.gallery { display: grid; gap: 1rem; margin-top: 1.6rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.gallery figure { margin: 0; }
.gallery img, .ph {
  border-radius: var(--radius); aspect-ratio: 4 / 3; width: 100%; object-fit: cover;
  box-shadow: var(--shadow);
}
.ph {
  display: grid; place-items: center;
  border: 2px dashed var(--line);
  background:
    repeating-linear-gradient(-45deg, transparent 0 14px, color-mix(in srgb, var(--line) 40%, transparent) 14px 15px),
    var(--paper-alt);
  box-shadow: none;
}
.ph-inner { display: grid; gap: .1rem; justify-items: center; text-align: center; color: var(--ink-soft); padding: 1rem; }
.ph-inner strong { color: var(--ink); font-family: "Fraunces", Georgia, serif; }
.ph-icon { font-size: 1.6rem; opacity: .75; }

/* contact */
.section-contact { background: var(--green-deep); color: var(--paper); }
@media (prefers-color-scheme: dark) { .section-contact { background: #24301f; color: var(--ink); } }
.section-contact .eyebrow { color: #ffd489; }
.contact-grid { display: grid; gap: 1rem; margin-top: 1.6rem; }
@media (min-width: 820px) { .contact-grid { grid-template-columns: repeat(3, 1fr); } }
.contact-card {
  background: rgb(255 255 255 / .07);
  border: 1px solid rgb(255 255 255 / .16);
  border-radius: var(--radius); padding: 1.2rem 1.3rem;
}
.contact-card h3 { color: #ffd489; }
.contact-line { margin-top: .3rem; }
.contact-card a { color: inherit; text-decoration-color: #ffd489; }
.iban { font-variant-numeric: tabular-nums; letter-spacing: .02em; font-weight: 700; }

/* footer */
.footer { padding: 2.2rem 0 2.8rem; background: var(--paper); color: var(--ink-soft); font-size: .92rem; }
.footer-note { margin-top: .4rem; }
.credits { margin-top: 1.2rem; }
.credits summary { cursor: pointer; font-weight: 700; color: var(--ink); }
.credits ul { margin: .6rem 0 0 1.1rem; display: grid; gap: .35rem; }

/* reveal animation */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .45s ease, transform .45s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- WhatsApp-Button ---------- */
.btn-wa {
  display: inline-flex; align-items: center; gap: .5rem;
  margin-top: .9rem;
  background: #22b357; color: #06230f;
}
.btn-wa:hover { background: #35cf6d; color: #06230f; }
.btn-wa svg { width: 1.25rem; height: 1.25rem; fill: currentColor; }

/* ---------- Kontaktformular ---------- */
.contact-form {
  margin-top: 2.2rem;
  background: rgb(255 255 255 / .07);
  border: 1px solid rgb(255 255 255 / .16);
  border-radius: var(--radius);
  padding: 1.4rem 1.3rem 1.5rem;
  max-width: 46rem;
}
.contact-form h3 { color: #ffd489; margin-bottom: .9rem; }
.form-grid { display: grid; gap: 1rem; }
@media (min-width: 640px) { .form-grid { grid-template-columns: 1fr 1fr; } }
.contact-form label { display: block; font-weight: 700; font-size: .95rem; margin-bottom: 1rem; }
.contact-form .opt { font-weight: 400; opacity: .75; }
.contact-form input,
.contact-form textarea {
  display: block; width: 100%; margin-top: .35rem;
  padding: .65rem .8rem;
  font: inherit; color: inherit;
  background: rgb(0 0 0 / .22);
  border: 1px solid rgb(255 255 255 / .25);
  border-radius: 10px;
  resize: vertical;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: 2px solid #ffd489; outline-offset: 1px; border-color: transparent;
}
.contact-form input::placeholder,
.contact-form textarea::placeholder { color: inherit; opacity: .5; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-actions { display: grid; gap: .8rem; }
@media (min-width: 640px) { .form-actions { grid-template-columns: auto 1fr; align-items: center; } }
.form-note { font-size: .88rem; opacity: .85; }
.form-note-error { color: #ffb3a0; opacity: 1; }
