/* =========================================================
   Farbkonzept nach der Tischdeko:
   warmes Elfenbein (Läufer, Kerzen) · Olivgrün (Servietten) · Efeugrün · Messing/Gold
   Schrift: EB Garamond (SIL Open Font License), selbst gehostet – keine Verbindung zu Google.
   ========================================================= */
@font-face {
    font-family: "EB Garamond";
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url("../fonts/eb-garamond-latin.woff2") format("woff2");
}
@font-face {
    font-family: "EB Garamond";
    font-style: italic;
    font-weight: 400 800;
    font-display: swap;
    src: url("../fonts/eb-garamond-latin-italic.woff2") format("woff2");
}

:root {
    /* Efeugrün – wie die Ranken auf dem Tisch */
    --ivy-900: #24361f;
    --ivy-700: #34502c;   /* Links */
    --ivy-500: #56743f;   /* Blätter, Akzente */
    --ivy-300: #9fb27f;   /* helle Blätter */
    --ivy-100: #eceee0;   /* zarte grünliche Flächen (Hinweise, Hover) */
    --ivy-50:  #f6f5ec;

    /* Olivgrün – wie die Servietten: Schrift, Navigation, Buttons */
    --olive-900: #2e3527;
    --olive-700: #4a5638;
    --taupe: #8c8471;     /* gedämpfte Schrift */
    --linen: #e3d9c5;     /* Linien, Rahmen von Eingabefeldern */

    /* Messing/Gold – wie Kerzenständer und Töpfe */
    --gold-700: #8e6b2e;
    --gold-500: #b89254;
    --gold-300: #dcc391;

    /* Elfenbein – wie Tischläufer und Kerzen */
    --white: #fffdf8;     /* Schrift auf dunklen Buttons */
    --paper: #fffcf6;     /* Karten, Formulare */
    --cream: #faf6ee;     /* Seitenhintergrund */

    --text: #3c3b31;
    --muted: var(--taupe);
    --border: #ece3d2;

    --accent: var(--ivy-700);
    --bg: var(--cream);

    /* Eine einheitliche Schrift für alles */
    --font-serif: "EB Garamond", Garamond, "Palatino Linotype", Georgia, serif;
    --font-sans: var(--font-serif);

    --radius: .6rem;
    --header-h: 3.75rem;

    /* Trenner unter Überschriften: Linie – Efeublatt – Linie */
    --divider: url("../img/divider.svg?v=rose-vorn"); /* Messinglinie – Efeu – weiße Rose – Efeu – Messinglinie. Bei Änderungen an der SVG das ?v= anpassen, sonst zeigen Browser die alte Version aus dem Cache. */
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; background: var(--bg); } /* Hintergrund auch auf html, damit mix-blend-mode mit dem body-Hintergrund verrechnen kann */

body {
    margin: 0;
    font-family: var(--font-sans);
    color: var(--text);
    background: var(--bg);
    font-size: 1.15rem; /* Garamond wirkt kleiner als Systemschriften */
    line-height: 1.6;
    padding-top: var(--header-h); /* Platz für die fixierte Leiste */
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .brand { font-family: var(--font-serif); font-weight: 400; color: var(--olive-900); }

a { color: var(--accent); }

/* ---------- Fixierte Navigationsleiste ---------- */
.site-header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 100;
    background: rgba(250, 246, 238, .94);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
}

.site-header__inner {
    max-width: 60rem;
    margin: 0 auto;
    padding: 0 1rem;
    min-height: var(--header-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.brand { font-size: 1.4rem; text-decoration: none; letter-spacing: .02em; }

.site-nav { display: flex; gap: .25rem; flex-wrap: wrap; }

.site-nav a {
    padding: .3rem .85rem;
    border-radius: 2rem;
    color: var(--olive-700);
    text-decoration: none;
    font-size: 1.05rem;
    letter-spacing: .03em;
    transition: background .2s, color .2s;
}

.site-nav a:hover { background: var(--ivy-100); color: var(--ivy-900); }
.site-nav a.active { background: var(--olive-900); color: var(--white); }

/* ---------- Seitenaufbau ---------- */
main { max-width: 42rem; margin: 0 auto; padding: 0 1.25rem; }
html, body { overflow-x: clip; } /* Ranken dürfen über den Rand ragen, ohne die Seite zu verbreitern */

.section {
    padding: 4rem 0 3rem;
    scroll-margin-top: var(--header-h); /* Überschrift nicht unter der Leiste verstecken */
    min-height: 60vh;
}

.section > h2 {
    text-align: center;
    font-size: 2.5rem;
    letter-spacing: .02em;
    margin: 0 0 2rem;
}

.section > h2::after { /* Trenner: Messinglinie – Efeu – Rose (Originalbild) – Efeu – Messinglinie */
    content: "";
    display: block;
    width: 200px; height: 52px;
    margin: .4rem auto 0;
    background: var(--divider) center / 200px 52px no-repeat; /* Rose ist in divider.svg eingebettet */
}

.section h3 { font-size: 1.55rem; margin: 2rem 0 .75rem; }

.placeholder { color: var(--muted); font-style: italic; }

/* ---------- Hero mit Foto ---------- */
.hero { padding: 3rem 0 3.5rem; text-align: center; }

.hero__photo-wrap {
    position: relative;
    width: min(24rem, 82vw);
    margin: 0 auto 2.5rem;
}

.hero__photo {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 5;
    border-radius: 50% 50% var(--radius) var(--radius) / 32% 32% var(--radius) var(--radius); /* Bogenform */
    /* Elfenbein-Passepartout + feiner Messingrahmen + warmer Schatten */
    box-shadow: 0 0 0 .5rem var(--paper), 0 0 0 calc(.5rem + 1.5px) var(--gold-500), 0 1.5rem 3rem -1.5rem rgba(74, 56, 26, .4);
    position: relative;
    z-index: 1;
}

/* Foto-Ausschnitt: size = Zoom (100% = volle Breite), position = Verschiebung.
   Höherer x-Wert → Motiv rückt nach links; höherer y-Wert → Motiv rückt nach oben. */
.hero__photo--bild {
    background-repeat: no-repeat;
    background-size: 100% auto;
    background-position: 150% 50%;
}

.hero__photo--placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .75rem;
    background: radial-gradient(ellipse at 50% 40%, var(--paper), #f1e9d8); /* warmes Kerzenlicht */
    color: var(--gold-700);
    font-family: var(--font-serif);
    font-style: italic;
}

.hero__photo--placeholder svg { width: 3.5rem; height: 3.5rem; fill: var(--gold-300); }

/* Efeuranken an den Ecken des Fotos */
.vine { position: absolute; width: 58%; height: auto; z-index: 2; pointer-events: none; overflow: visible; }
.vine--tl { top: -6%; left: -14%; }
.vine--br { bottom: -6%; right: -14%; transform: rotate(180deg); }
.vine__stem { fill: none; stroke: #5d5a36; stroke-width: 1.6; stroke-linecap: round; opacity: .85; }
/* Gemalte Blätter übernehmen ihre Farbe über "color" (siehe Symbol #ivy-leaf im Layout) */
.vine__leaf--a { color: #2f4a2a; }
.vine__leaf--b { color: #4b6a38; }
.vine__leaf--c { color: #7f9a5c; }

.hero__eyebrow {
    margin: 0;
    text-transform: uppercase;
    letter-spacing: .35em;
    font-size: .9rem;
    color: var(--gold-700);
}

.hero h1 { font-size: clamp(2.6rem, 12vw, 4.6rem); line-height: 1.05; margin: .4rem 0 .6rem; }
.hero .amp { font-style: italic; color: var(--gold-500); }
.hero__meta { font-size: 1.35rem; font-style: italic; color: var(--olive-700); margin: 0 0 .5rem; }

/* ---------- Buttons & Formulare ---------- */
button, .button {
    display: inline-block;
    padding: .7rem 1.6rem;
    font: inherit;
    font-weight: 500;
    letter-spacing: .05em;
    background: var(--olive-900);
    color: var(--white);
    border: 0;
    border-radius: 2rem;
    cursor: pointer;
    text-decoration: none;
    transition: background .2s, transform .1s;
}
button:hover, .button:hover { background: var(--ivy-700); }
button:active, .button:active { transform: translateY(1px); }
.hero .button { margin-top: 1rem; }

button.secondary { background: transparent; color: var(--olive-900); border: 1px solid var(--olive-700); }
button.secondary:hover { background: var(--ivy-100); }
button.link, button.link-danger { background: none; padding: 0; border-radius: 0; font-weight: normal; }
button.link { color: var(--ivy-700); }
button.link-danger { color: #a3261f; }

fieldset { margin: 1rem 0; padding: 1rem 1.25rem; border: 1px solid var(--border); border-radius: var(--radius); }
legend { padding: 0 .4rem; color: var(--olive-900); }
label { display: block; margin: .6rem 0; }

input[type=text], input[type=password], input[type=url], input:not([type]), textarea {
    width: 100%;
    padding: .6rem .75rem;
    font: inherit;
    color: var(--text);
    background: var(--paper);
    border: 1px solid var(--linen);
    border-radius: .45rem;
    transition: border-color .2s, box-shadow .2s;
}
input:focus, textarea:focus { outline: none; border-color: var(--ivy-500); box-shadow: 0 0 0 3px var(--ivy-100); }
input[type=radio] { accent-color: var(--ivy-700); }

.notice { padding: .85rem 1rem; background: var(--ivy-100); border-left: 4px solid var(--ivy-500); border-radius: .45rem; color: var(--ivy-900); }
.notice--warn { background: #f8efdc; border-left-color: var(--gold-500); color: #5a4317; }
.error { color: #a3261f; display: block; font-size: .92rem; }
.error:empty { display: none; }

.rsvp-form {
    max-width: 28rem;
    margin: 1.5rem auto 0;
    padding: 1.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--paper);
    box-shadow: 0 1rem 2rem -1.5rem rgba(74, 56, 26, .3);
}
#rsvp > p { text-align: center; }
.choice label { display: inline-flex; gap: .45rem; margin-right: 1.5rem; cursor: pointer; }
/* Lockfeld für Spam-Bots: aus dem sichtbaren Bereich schieben (nicht display:none, das erkennen manche Bots). */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Infos ---------- */
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.info-card { padding: 1.25rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--paper); text-align: center; }
.section .info-card h3 {
    margin: 0 0 .4rem;
    font-size: .85rem;
    text-transform: uppercase;
    letter-spacing: .25em;
    color: var(--gold-700);
}
.info-card p { margin: 0; font-size: 1.2rem; color: var(--olive-900); }

/* Tagesablauf: Leitfaden-Grafik (img/tagesablauf.svg) links, Texte rechts.
   Die SVG ist 14 x 130 Einheiten groß; die 7 Kreise liegen im Abstand von 18,33 Einheiten,
   der erste bei y = 10. Zeilenhöhe und Innenabstand sind daraus berechnet, damit jeder Text
   genau auf Höhe seines Kreises steht – nur --ablauf-breite ändern, der Rest skaliert mit. */
.ablauf {
    --ablauf-breite: 3.75rem;
    --ablauf-einheit: calc(var(--ablauf-breite) / 14);
    display: flex; gap: 1.1rem;
    margin: 0 0 1.5rem;
}
.ablauf__grafik { width: var(--ablauf-breite); height: auto; flex-shrink: 0; align-self: flex-start; }
.ablauf__liste {
    list-style: none; margin: 0;
    padding: calc(var(--ablauf-einheit) * .8333) 0; /* (10 − 18,33 / 2) Einheiten über dem ersten Kreis */
}
.ablauf__liste li {
    height: calc(var(--ablauf-einheit) * 18.3333);
    display: flex; flex-direction: column; justify-content: center;
    line-height: 1.25;
}
.ablauf__zeit {
    font-size: .85rem; text-transform: uppercase; letter-spacing: .2em;
    color: var(--gold-700); font-variant-numeric: tabular-nums lining-nums;
}
.ablauf__punkt { font-size: 1.25rem; color: var(--olive-900); }

.map-link {
    display: inline-flex; align-items: center; gap: .75rem;
    padding: .8rem 1.1rem; border: 1px solid var(--border); border-radius: var(--radius);
    background: var(--paper); color: var(--text); text-decoration: none;
    transition: border-color .2s, background .2s;
}
.map-link:hover { border-color: var(--ivy-500); background: var(--ivy-50); }
.map-link small { color: var(--muted); }
.map-link__icon { width: 2.25rem; height: 2.25rem; flex-shrink: 0; fill: var(--olive-900); }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: .6rem; }
.faq__item { border: 1px solid var(--border); border-radius: var(--radius); background: var(--paper); }
.faq__item[open] { border-color: var(--gold-300); }
.faq__item summary {
    cursor: pointer; padding: .9rem 1.1rem; font-weight: 500; color: var(--olive-900);
    list-style: none; display: flex; justify-content: space-between; gap: 1rem;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after { content: "+"; color: var(--ivy-500); font-size: 1.3rem; line-height: 1; }
.faq__item[open] summary::after { content: "–"; }
.faq__answer { padding: 0 1.1rem 1rem; color: var(--muted); white-space: pre-line; } /* Zeilenumbrüche aus dem Admin bleiben erhalten */

/* ---------- Geschenkeliste ---------- */
#geschenke > p { text-align: center; }
.gift-list { list-style: none; padding: 0; display: grid; gap: 1rem; }
.gift { padding: 1.25rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--paper); }
.section .gift h3 { margin: 0; font-size: 1.25rem; }
.gift p { margin: .5rem 0 0; }
.gift__head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; flex-wrap: wrap; }
.gift--reserved { background: var(--ivy-50); }
.gift--reserved h3, .gift--reserved p { opacity: .55; }
.gift--reserved h3 { text-decoration: line-through; text-decoration-color: var(--ivy-300); }
.badge { font-size: .85rem; padding: .15rem .7rem; border-radius: 1rem; background: var(--olive-700); color: var(--white); letter-spacing: .03em; white-space: nowrap; }
.gift__pick { margin-top: .9rem; }
.gift__pick summary { cursor: pointer; color: var(--ivy-700); font-weight: 600; }
.gift__pick .hint { padding: .6rem .85rem; background: var(--ivy-100); border-radius: .45rem; font-size: .95rem; color: var(--ivy-900); }

/* ---------- Schlussmotiv: weiße Rose ---------- */
.closing { text-align: center; padding: 2rem 0 4rem; }
.closing__rose {
    width: 11rem; max-width: 60vw; height: auto;
    mix-blend-mode: darken; /* weißer Bildhintergrund verschmilzt mit dem Elfenbein – das Bild bleibt unverändert */
}
.closing__text { margin: 1rem 0 .25rem; font-size: 1.5rem; font-style: italic; color: var(--olive-700); }
.closing__names { margin: 0; font-size: 1.1rem; letter-spacing: .25em; text-transform: uppercase; color: var(--gold-700); }
.closing__names .amp { font-style: italic; text-transform: none; }

/* ---------- Footer & Rechtliches ---------- */
.site-footer {
    max-width: 42rem; margin: 0 auto; padding: 2.5rem 1rem 3rem;
    text-align: center; font-size: .9rem; color: var(--muted);
}
.site-footer::before { /* kleiner Efeu-Trenner über dem Footer */
    content: ""; display: block; width: 200px; height: 52px; margin: 0 auto 1rem;
    background: var(--divider) center / 200px 52px no-repeat; /* Rose ist in divider.svg eingebettet */
}
.site-footer a { color: inherit; }

.section.legal { min-height: 0; font-size: .9rem; color: var(--muted); border-top: 1px solid var(--border); }
.section.legal h2 { font-size: 1.4rem; margin-bottom: 1rem; }
.section.legal h2::after { display: none; }
.legal h3 { font-size: 1rem; margin: 1.25rem 0 .25rem; }
.legal p { margin: .25rem 0 .5rem; }
.legal__block { scroll-margin-top: var(--header-h); }
.legal__block + .legal__block { margin-top: 2.5rem; }

/* ---------- Admin ---------- */
/* ---------- Passwortseite für Gäste ---------- */
.gate { max-width: 34rem; margin: 0 auto; padding: 18vh 1rem 3rem; text-align: center; }
.gate .rsvp-form { text-align: left; }
.gate .rsvp-form button { margin-top: 1rem; }

.section.admin { min-height: 0; padding-top: 2rem; }
.admin h1 { font-size: 2rem; }
.admin-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.stats { padding: .8rem 1rem; background: var(--ivy-100); border-radius: .45rem; color: var(--ivy-900); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: .6rem .5rem; border-bottom: 1px solid var(--border); }
th { font-weight: 600; color: var(--ivy-900); }
.admin-nav { display: flex; gap: .25rem; }
.admin-nav a { padding: .4rem .8rem; border-radius: 2rem; color: var(--olive-700); text-decoration: none; }
.admin-nav a.active { background: var(--olive-900); color: var(--white); }
.gift-form { max-width: 30rem; margin-bottom: 2rem; padding: 1.25rem; border: 1px solid var(--border); border-radius: var(--radius); }
.gift-form h2 { margin-top: 0; font-size: 1.2rem; }

/* Admin: Fragenliste */
.faq-admin { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.faq-admin__item {
    display: flex; gap: 1rem; justify-content: space-between; align-items: flex-start;
    padding: .8rem 1rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--paper);
}
.faq-admin__item details { flex: 1; min-width: 0; }
.faq-admin__item summary { cursor: pointer; }
.faq-admin__edit { display: grid; gap: .6rem; margin-top: .8rem; }
.faq-admin__item .actions { display: flex; gap: .75rem; align-items: center; }
.faq-admin__item button:disabled { opacity: .3; cursor: default; }
@media (max-width: 36rem) { .faq-admin__item { flex-direction: column; } }
td.actions { white-space: nowrap; }
td.actions form { display: inline; margin-left: .75rem; }

/* ---------- Handy ---------- */
@media (max-width: 34rem) {
    :root { --header-h: 5.75rem; } /* Leiste bricht auf zwei Zeilen um */
    .site-header__inner { justify-content: center; padding-block: .45rem; gap: .25rem; }
    .site-nav { gap: 0; justify-content: center; }
    .site-nav a { padding: .3rem .5rem; font-size: .88rem; }
    .section { padding-top: 3rem; }
    .section > h2 { font-size: 1.8rem; }
    .vine { width: 52%; }
}
