/* =========================================================================
   Die Flomis · Familienseite
   Heraldisch · Hell — Pergament + Petrol + Gold
   Statisches CSS, keine Frameworks. Mobile-first.
   ========================================================================= */

/* --- Tokens ------------------------------------------------------------- */
:root {
  /* Palette */
  --bg:           #f4ede0;   /* Pergament */
  --bg-soft:      #ede4d3;   /* leicht dunkler */
  --ink:          #0e3a44;   /* Petrol — Haupt-Lesefarbe */
  --ink-soft:     #0e3a44cc;
  --ink-mute:     #0e3a4499;

  --gold-display: #a07332;   /* Display-Gold (nur große Headlines + Ornamente) */
  --gold-text:    #7a5722;   /* Klein-Gold (Labels, Kapitelnummern) — AA */
  --gold-line:    #a0733266; /* Gold als Linie */

  --rule:         #0e3a4422;

  /* Type */
  --display: 'Cinzel', 'Trajan Pro', Georgia, serif;
  --serif:   'EB Garamond', 'Garamond', Georgia, serif;
  --mono:    ui-monospace, 'SFMono-Regular', Menlo, monospace;

  /* Spacing scale */
  --s-1: 4px;  --s-2: 8px;   --s-3: 12px;  --s-4: 16px;
  --s-5: 24px; --s-6: 32px;  --s-7: 48px;  --s-8: 64px;  --s-9: 96px;

  /* Layout */
  --measure: 64ch;
  --container: 1100px;
}

/* --- Reset --------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 500;
  color: var(--ink);
  margin: 0;
  text-wrap: balance;
}

p { margin: 0 0 1em; text-wrap: pretty; }

/* --- Layout shell -------------------------------------------------------- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--s-5);
}

/* --- Header / nav -------------------------------------------------------- */
.site-header {
  padding: var(--s-5) 0 var(--s-4);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-5);
  flex-wrap: wrap;
}
.brand {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  text-decoration: none;
  color: var(--ink);
}
.brand__crest { width: 38px; height: 38px; flex-shrink: 0; }
.brand__name {
  font-family: var(--display);
  font-size: 18px;
  letter-spacing: 4px;
  text-transform: uppercase;
}
.nav { display: flex; gap: var(--s-5); list-style: none; padding: 0; margin: 0; }
.nav a {
  font-family: var(--display);
  font-size: 12px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  padding: 6px 0;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.nav a:hover,
.nav a[aria-current="page"] {
  border-bottom-color: var(--gold-display);
  color: var(--ink);
}

/* Header rule */
.header-rule {
  height: 1px;
  background: var(--gold-line);
  margin: 0 var(--s-5);
}

/* --- Hero ---------------------------------------------------------------- */
.hero {
  text-align: center;
  padding: var(--s-8) var(--s-4) var(--s-7);
}
.hero__crest { width: 120px; height: auto; margin: 0 auto var(--s-4); display: block; }
.hero__eyebrow {
  font-family: var(--display);
  font-size: 13px;
  letter-spacing: 6px;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: var(--s-3);
}
.hero__title {
  font-family: var(--display);
  font-size: clamp(40px, 8vw, 88px);
  letter-spacing: clamp(2px, 0.6vw, 8px);
  font-weight: 600;
  color: var(--gold-display);
  line-height: 1;
  margin: 0;
}
.hero__sub {
  margin-top: var(--s-5);
  font-style: italic;
  font-size: 20px;
  color: var(--ink-soft);
  max-width: 50ch;
  margin-left: auto;
  margin-right: auto;
}

/* --- Ornaments ----------------------------------------------------------- */
.fleuron, .diamond-rule {
  display: block;
  margin: var(--s-5) auto;
  color: var(--gold-display);
}
.fleuron { width: 180px; height: auto; }
.diamond-rule { width: 240px; height: auto; }

.section-divider {
  display: block;
  width: 100%;
  max-width: 320px;
  margin: var(--s-7) auto;
  color: var(--gold-display);
}

/* --- Section heading ----------------------------------------------------- */
.section-head {
  text-align: center;
  margin: var(--s-7) 0 var(--s-5);
}
.section-head__chapter {
  font-family: var(--display);
  font-size: 12px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--gold-text);
  margin-bottom: var(--s-2);
}
.section-head__title {
  font-family: var(--display);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 500;
  letter-spacing: 2px;
  color: var(--ink);
}
.section-head__crest {
  width: 56px; height: auto;
  margin: 0 auto var(--s-3);
  display: block;
  color: var(--gold-display);
}

/* --- Page title (subpages) ---------------------------------------------- */
.page-title {
  text-align: center;
  padding: var(--s-7) var(--s-4) var(--s-5);
}
.page-title__crest { width: 70px; margin: 0 auto var(--s-3); color: var(--gold-display); }
.page-title__chapter {
  font-family: var(--display);
  font-size: 13px;
  letter-spacing: 5px;
  text-transform: uppercase;
  color: var(--gold-text);
}
.page-title__h1 {
  font-family: var(--display);
  font-size: clamp(36px, 6vw, 60px);
  font-weight: 600;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--gold-display);
  margin-top: var(--s-2);
  line-height: 1;
}

/* --- Prose --------------------------------------------------------------- */
.prose {
  max-width: var(--measure);
  margin: 0 auto;
  font-size: 19px;
}
.prose p { margin: 0 0 1.1em; }
.prose p:first-of-type::first-letter {
  font-family: var(--display);
  font-size: 3.4em;
  float: left;
  line-height: 0.9;
  margin: 0.05em 0.08em 0 0;
  color: var(--gold-display);
  font-weight: 600;
}
.prose figure {
  margin: var(--s-6) 0;
  text-align: center;
}
.prose figure img {
  margin: 0 auto;
  border: 1px solid var(--gold-line);
  padding: 6px;
  background: var(--bg);
}
.prose figcaption {
  font-style: italic;
  font-size: 15px;
  color: var(--ink-mute);
  margin-top: var(--s-2);
}

/* --- Couple block (home + about) ---------------------------------------- */
.couple {
  margin: var(--s-7) auto;
  text-align: center;
  max-width: 560px;
}
.couple__photo {
  width: 100%;
  max-width: 520px;
  border: 1px solid var(--gold-line);
  padding: 8px;
  background: var(--bg);
  margin: 0 auto;
}
.couple__caption {
  font-family: var(--display);
  font-style: italic;
  font-size: 15px;
  letter-spacing: 1px;
  color: var(--gold-text);
  margin-top: var(--s-3);
}

/* --- Member grid --------------------------------------------------------- */
.members {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--s-6) var(--s-5);
  margin: var(--s-6) 0 var(--s-7);
}

.member {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.member__frame {
  position: relative;
  display: inline-block;
  padding: 6px;
  border: 1px solid var(--gold-line);
  background: var(--bg);
}
.member__frame::before,
.member__frame::after {
  content: "";
  position: absolute;
  width: 14px; height: 14px;
  border: 1px solid var(--gold-display);
}
.member__frame::before { top: -4px; left: -4px; border-right: none; border-bottom: none; }
.member__frame::after  { bottom: -4px; right: -4px; border-left: none;  border-top: none;    }
.member__photo {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  display: block;
}
.member__role {
  font-family: var(--display);
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold-text);
  margin-top: var(--s-4);
}
.member__name {
  font-family: var(--display);
  font-size: 22px;
  letter-spacing: 2px;
  font-weight: 500;
  color: var(--ink);
  margin-top: 4px;
}
.member__meta {
  font-style: italic;
  font-size: 14px;
  color: var(--ink-mute);
  margin-top: 2px;
}
.member__bio {
  font-size: 15px;
  color: var(--ink-soft);
  margin-top: var(--s-3);
  line-height: 1.5;
  max-width: 26ch;
}

/* In memoriam */
.member--memoriam .member__photo { filter: grayscale(0.85) brightness(0.95); }
.member--memoriam .member__frame { border-style: dashed; }
.member--memoriam .member__role { color: var(--ink-mute); letter-spacing: 4px; }

/* --- Members section group ---------------------------------------------- */
.members-group { margin: var(--s-7) 0; }
.members-group__title {
  text-align: center;
  font-family: var(--display);
  font-size: 14px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--gold-text);
  margin: var(--s-5) 0 var(--s-3);
}

/* --- Contact ------------------------------------------------------------- */
.contact {
  text-align: center;
  padding: var(--s-7) var(--s-4);
}
.contact__intro {
  font-family: var(--display);
  font-style: italic;
  font-size: 22px;
  color: var(--ink-soft);
  max-width: 30ch;
  margin: 0 auto var(--s-5);
}
.contact__email {
  display: inline-block;
  font-family: var(--serif);
  font-size: clamp(17px, 4.2vw, 22px);
  letter-spacing: 1px;
  color: var(--ink);
  text-decoration: none;
  padding: var(--s-4) var(--s-6);
  border-top: 1px solid var(--gold-display);
  border-bottom: 1px solid var(--gold-display);
  position: relative;
  white-space: nowrap;
  max-width: 100%;
  transition: color 0.2s ease;
}
.contact__email::before,
.contact__email::after {
  content: "❦";
  color: var(--gold-display);
  font-size: 14px;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--serif);
}
.contact__email::before { left: 8px; }
.contact__email::after  { right: 8px; }
.contact__email:hover { color: var(--gold-display); }
.contact__note {
  margin-top: var(--s-5);
  font-style: italic;
  color: var(--ink-mute);
  font-size: 15px;
}

/* --- Footer -------------------------------------------------------------- */
.site-footer {
  margin-top: var(--s-9);
  padding: var(--s-6) 0 var(--s-7);
  text-align: center;
  border-top: 1px solid var(--gold-line);
  color: var(--ink-mute);
  font-size: 14px;
}
.site-footer__crest { width: 28px; margin: 0 auto var(--s-3); display: block; color: var(--gold-display); }
.site-footer__motto {
  font-family: var(--display);
  font-style: italic;
  font-size: 14px;
  letter-spacing: 2px;
  color: var(--gold-text);
}

/* --- Utility ------------------------------------------------------------- */
.gold       { color: var(--gold-display); }
.gold-text  { color: var(--gold-text); }
.center     { text-align: center; }
.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;
}

/* --- Responsive tweaks --------------------------------------------------- */
@media (max-width: 640px) {
  body { font-size: 18px; }
  .site-header__inner { flex-direction: column; align-items: center; gap: var(--s-3); }
  .nav { gap: var(--s-4); flex-wrap: wrap; justify-content: center; }
  .hero { padding: var(--s-6) var(--s-3) var(--s-5); }
  .hero__crest { width: 90px; }
  .members { grid-template-columns: repeat(2, 1fr); gap: var(--s-5) var(--s-3); }
  .member__name { font-size: 18px; letter-spacing: 1.5px; }
}

/* --- Print -------------------------------------------------------------- */
@media print {
  body { background: white; color: black; }
  .nav, .site-footer { display: none; }
}
