/* ============================================================
   familie.fraidl.net — modernes Design 2026
   ============================================================ */
:root {
  --bg: #f7f4ee;
  --surface: #ffffff;
  --ink: #26221c;
  --ink-soft: #5c554a;
  --green: #33523f;
  --green-deep: #22382c;
  --green-tint: #e6ede8;
  --gold: #b98a44;
  --gold-soft: #f3e8d7;
  --line: #e5dfd3;
  --radius: 18px;
  --shadow: 0 2px 6px rgba(38, 34, 28, .06), 0 12px 32px rgba(38, 34, 28, .08);
  --shadow-lg: 0 6px 18px rgba(38, 34, 28, .10), 0 24px 56px rgba(38, 34, 28, .14);
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--green); text-decoration: none; }
a:hover { color: var(--gold); }

/* Links im Fließtext deutlich hervorheben */
main a:not(.btn):not(.chip):not(.person-card),
.site-footer p a {
  color: var(--green);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
main a:not(.btn):not(.chip):not(.person-card):hover,
.site-footer p a:hover {
  color: var(--gold);
  text-decoration-color: var(--green);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  color: var(--green-deep);
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.3rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.5rem); }

.container { max-width: 1120px; margin: 0 auto; padding: 0 clamp(1rem, 4vw, 2rem); }

.kicker {
  display: inline-block;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: .8rem;
}

/* ---------- Header / Navigation ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 244, 238, .88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .7rem clamp(1rem, 4vw, 2rem);
  max-width: 1240px;
  margin: 0 auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: .7rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--green-deep);
  white-space: nowrap;
}
.brand img {
  width: 42px; height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--gold);
}
.brand span em { color: var(--gold); font-style: normal; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: .45rem .6rem;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  color: var(--green-deep);
}

.nav-menu { display: flex; align-items: center; gap: .2rem; list-style: none; margin: 0; padding: 0; }
.nav-menu > li { position: relative; }
.nav-menu a, .nav-menu .drop-btn {
  display: block;
  padding: .55rem .85rem;
  font-size: .92rem;
  font-weight: 500;
  color: var(--ink);
  background: none;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-family: var(--font-body);
  white-space: nowrap;
}
.nav-menu a:hover, .nav-menu .drop-btn:hover,
.nav-menu a.active { background: var(--green-tint); color: var(--green-deep); }
.drop-btn::after { content: " ▾"; font-size: .7em; color: var(--gold); }

.dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 230px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  padding: .45rem;
  list-style: none;
  margin: 0;
  display: none;
  z-index: 60;
}
.dropdown a { padding: .5rem .75rem; border-radius: 9px; font-size: .9rem; }
li.open > .dropdown { display: block; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(1200px 500px at 85% -10%, var(--green-tint), transparent 60%),
    radial-gradient(900px 420px at -10% 110%, var(--gold-soft), transparent 55%);
  border-bottom: 1px solid var(--line);
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: center;
  padding: clamp(2.5rem, 7vw, 5.5rem) 0;
}
.hero p.lead {
  font-size: clamp(1.02rem, 2vw, 1.18rem);
  color: var(--ink-soft);
  max-width: 34em;
}
.hero-photo {
  position: relative;
  justify-self: center;
}
.hero-photo img {
  width: min(380px, 100%);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  transform: rotate(1.5deg);
  border: 6px solid #fff;
}
.hero-photo figcaption {
  margin-top: .9rem;
  text-align: center;
  font-size: .85rem;
  color: var(--ink-soft);
  font-style: italic;
}

.btn-row { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.6rem; }
.btn {
  display: inline-block;
  padding: .75rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: .95rem;
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn-primary { background: var(--green); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { background: var(--green-deep); color: #fff; transform: translateY(-2px); }
.btn-ghost { border: 1.5px solid var(--green); color: var(--green); }
.btn-ghost:hover { background: var(--green-tint); color: var(--green-deep); }

/* ---------- Sektionen ---------- */
.section { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 640px; margin-bottom: clamp(1.5rem, 4vw, 2.5rem); }
.section-head p { color: var(--ink-soft); }

/* ---------- Karten-Raster (Kinder) ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 1.2rem;
}
.person-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease;
  display: flex;
  flex-direction: column;
}
.person-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.person-card .thumb {
  aspect-ratio: 4 / 3.4;
  overflow: hidden;
  background: linear-gradient(140deg, var(--green-tint), var(--gold-soft));
}
.person-card .thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.person-card .thumb.placeholder {
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 2.6rem;
  color: var(--green);
  opacity: .55;
}
.person-card .body { padding: .95rem 1.1rem 1.15rem; }
.person-card h3 { font-size: 1.12rem; margin-bottom: .25rem; }
.person-card .dates { font-size: .84rem; color: var(--ink-soft); margin: 0; }
.person-card:hover h3 { color: var(--gold); }

/* ---------- Stammbaum / Zeitleiste ---------- */
.timeline { position: relative; margin: 0; padding: 0 0 0 1.6rem; list-style: none; }
.timeline::before {
  content: "";
  position: absolute;
  left: .35rem; top: .4rem; bottom: .4rem;
  width: 2px;
  background: linear-gradient(var(--gold), var(--green));
  border-radius: 2px;
}
.timeline li { position: relative; padding: 0 0 1.6rem; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: "";
  position: absolute;
  left: -1.6rem; top: .45rem;
  width: .8rem; height: .8rem;
  border-radius: 50%;
  background: var(--surface);
  border: 3px solid var(--gold);
}
.timeline .t-year { font-size: .8rem; font-weight: 600; letter-spacing: .1em; color: var(--gold); text-transform: uppercase; }
.timeline h3 { margin: .1rem 0 .15rem; font-size: 1.15rem; }
.timeline p { margin: 0; color: var(--ink-soft); font-size: .93rem; }

/* ---------- Aktualisierte Beiträge ---------- */
.update-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.update-list li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: .8rem 1.1rem;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
}
.update-list time { font-size: .82rem; color: var(--ink-soft); white-space: nowrap; }

/* ---------- Personen-Seite ---------- */
.page-head {
  background:
    radial-gradient(900px 320px at 90% -20%, var(--green-tint), transparent 60%),
    radial-gradient(700px 300px at 0% 130%, var(--gold-soft), transparent 55%);
  border-bottom: 1px solid var(--line);
  padding: clamp(2rem, 5vw, 3.5rem) 0;
}
.breadcrumb { font-size: .84rem; color: var(--ink-soft); margin-bottom: .8rem; }
.breadcrumb a { color: var(--ink-soft); }
.breadcrumb a:hover { color: var(--gold); }
.page-head .dates { font-size: 1.05rem; color: var(--ink-soft); margin: 0; }
.page-head .sub { color: var(--gold); font-weight: 600; font-size: .95rem; letter-spacing: .05em; }

.person-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
  padding: clamp(2rem, 5vw, 3.5rem) 0;
}
.portrait img {
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  border: 6px solid #fff;
  width: 100%;
}
.portrait figcaption { margin-top: .7rem; font-size: .85rem; color: var(--ink-soft); font-style: italic; text-align: center; }

.facts {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.2rem, 3vw, 1.8rem);
  box-shadow: var(--shadow);
}
.facts dl { display: grid; grid-template-columns: max-content 1fr; gap: .55rem 1.2rem; margin: 0; }
.facts dt { font-weight: 600; color: var(--green-deep); }
.facts dd { margin: 0; color: var(--ink-soft); }
.facts .note { margin-top: 1rem; padding-top: 1rem; border-top: 1px dashed var(--line); font-size: .92rem; color: var(--ink-soft); }

.chip-row { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .4rem; }
.chip {
  display: inline-block;
  padding: .3rem .8rem;
  border-radius: 999px;
  background: var(--green-tint);
  color: var(--green-deep);
  font-size: .82rem;
  font-weight: 500;
  border: 1px solid transparent;
}
a.chip:hover { border-color: var(--gold); color: var(--gold); background: var(--gold-soft); }
.chip.current { background: var(--green); color: #fff; }

.source-links { margin-top: 1.4rem; }
.source-links a {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-size: .9rem;
  font-weight: 500;
  margin: 0 .9rem .45rem 0;
}
.source-links a::before { content: "↗"; color: var(--gold); }

/* ---------- Galerie ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.2rem;
}
.gallery figure {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: zoom-in;
  transition: transform .18s ease, box-shadow .18s ease;
}
.gallery figure:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.gallery .g-img { aspect-ratio: 4 / 3; overflow: hidden; }
.gallery .g-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.gallery figure:hover .g-img img { transform: scale(1.05); }
.gallery figcaption { padding: .7rem 1rem .85rem; font-size: .88rem; font-weight: 500; color: var(--ink); }

.doc-gallery { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.doc-gallery .g-img { aspect-ratio: auto; max-height: 420px; display: flex; align-items: center; justify-content: center; background: #fdfcf9; }
.doc-gallery .g-img img { object-fit: contain; height: auto; max-height: 420px; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(20, 26, 22, .92);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  cursor: zoom-out;
}
.lightbox.show { display: flex; }
.lightbox img {
  max-width: min(1100px, 92vw);
  max-height: 84vh;
  border-radius: 10px;
  box-shadow: 0 30px 80px rgba(0,0,0,.5);
  object-fit: contain;
}
.lightbox figcaption {
  position: absolute;
  bottom: 1.4rem; left: 0; right: 0;
  text-align: center;
  color: #e8e4da;
  font-size: .95rem;
}
.lightbox .lb-close {
  position: absolute;
  top: 1rem; right: 1.4rem;
  background: none; border: none;
  color: #fff; font-size: 2rem;
  cursor: pointer; line-height: 1;
}

/* ---------- Text-Seiten (Datenschutz etc.) ---------- */
.prose { max-width: 760px; padding: clamp(2rem, 5vw, 3.5rem) 0; }
.prose h2 { font-size: 1.35rem; margin-top: 2rem; }
.prose ul { color: var(--ink-soft); }
.prose p { color: var(--ink-soft); }

/* ---------- CTA-Band ---------- */
.cta-band {
  background: linear-gradient(120deg, var(--green-deep), var(--green));
  color: #edf2ee;
  border-radius: var(--radius);
  padding: clamp(1.8rem, 5vw, 3rem);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  box-shadow: var(--shadow-lg);
}
.cta-band h2 { color: #fff; margin: 0 0 .3rem; }
.cta-band p { margin: 0; opacity: .85; }
.cta-band .btn { background: var(--gold); color: #fff; }
.cta-band .btn:hover { background: #a2763a; transform: translateY(-2px); }

/* ---------- Footer ---------- */
.site-footer {
  margin-top: clamp(2.5rem, 6vw, 4rem);
  background: var(--green-deep);
  color: #cfd8d0;
  padding: clamp(2rem, 5vw, 3rem) 0 1.5rem;
  font-size: .9rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  padding-bottom: 1.8rem;
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.site-footer h4 { color: #fff; font-size: 1.05rem; margin-bottom: .7rem; }
.site-footer a { color: #cfd8d0; }
.site-footer a:hover { color: var(--gold); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }
.footer-bottom { padding-top: 1.2rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; opacity: .75; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero p.lead { margin-inline: auto; }
  .btn-row { justify-content: center; }
  .hero-photo { order: -1; }
  .hero-photo img { width: min(300px, 80%); margin-inline: auto; }
  .person-layout { grid-template-columns: 1fr; }
  .portrait { max-width: 380px; margin-inline: auto; }
}

@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .nav-menu {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
    padding: .6rem 1rem 1rem;
    gap: 0;
    max-height: calc(100vh - 70px);
    overflow-y: auto;
  }
  .nav-menu.show { display: flex; }
  .dropdown {
    position: static;
    box-shadow: none;
    border: none;
    border-left: 2px solid var(--green-tint);
    border-radius: 0;
    margin: .2rem 0 .4rem .9rem;
    min-width: 0;
  }
  .facts dl { grid-template-columns: 1fr; gap: .1rem; }
  .facts dt { margin-top: .6rem; }
}
