/* ============================================================
   Erinnerungsseite – ruhig, warm, viel Luft
   ============================================================ */
:root {
  --bg: #f7f3ec;
  --bg-alt: #efe8dc;
  --paper: #fffdf9;
  --ink: #2b2622;
  --ink-soft: #5e564e;
  --muted: #8a8077;
  --line: #e2d9cb;
  --accent: #8b5e3c;
  --accent-dark: #6f4a2e;
  --accent-soft: #e8d9c8;
  --ok: #4f7a4a;
  --err: #a0463b;
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Nunito Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --maxw: 1120px;
  --radius: 6px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.15; margin: 0 0 .5em; letter-spacing: .005em; }
h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); }
h2 { font-size: clamp(1.9rem, 4vw, 2.6rem); }
h3 { font-size: 1.5rem; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.empty { color: var(--muted); font-style: italic; text-align: center; }

.container { width: min(100% - 2.5rem, var(--maxw)); margin: 0 auto; }
.container.narrow { max-width: 720px; }
.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section-alt { background: var(--bg-alt); }
.section-title { text-align: center; }
.section-title::after {
  content: ""; display: block; width: 44px; height: 1px; background: var(--accent); margin: .9rem auto 0;
}
.section-lead { text-align: center; color: var(--ink-soft); max-width: 560px; margin: -0.2rem auto 2.5rem; }
.eyebrow {
  font-family: var(--sans); font-size: .78rem; letter-spacing: .22em; text-transform: uppercase;
  color: var(--accent); font-weight: 600; margin-bottom: 1rem;
}
.lead { font-size: 1.15rem; color: var(--ink-soft); }

/* Header */
.site-header {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.1rem clamp(1.25rem, 4vw, 3rem);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 92%, white);
  position: sticky; top: 0; z-index: 20; backdrop-filter: blur(8px);
}
.brand { font-family: var(--serif); font-size: 1.45rem; font-weight: 500; color: var(--ink); letter-spacing: .01em; }
.brand:hover { text-decoration: none; }
.site-nav { display: flex; gap: 1.4rem; align-items: center; font-size: .92rem; font-weight: 400; }
.site-nav a { color: var(--ink-soft); }
.site-nav a:hover { color: var(--ink); text-decoration: none; }
.nav-cta {
  border: 1px solid var(--accent); color: var(--accent) !important; padding: .4rem .9rem; border-radius: 999px;
}
.nav-cta:hover { background: var(--accent); color: #fff !important; }
@media (max-width: 640px) { .site-nav a:not(.nav-cta) { display: none; } }

/* Hero */
.hero { padding: clamp(3.5rem, 10vw, 7rem) 1.25rem clamp(3rem, 8vw, 5rem); text-align: center; }
.hero-has-image { display: grid; gap: 2.5rem; align-items: center; text-align: left; width: min(100% - 2.5rem, var(--maxw)); margin: 0 auto; }
@media (min-width: 860px) { .hero-has-image { grid-template-columns: 5fr 6fr; } }
.hero-image img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius); box-shadow: 0 30px 60px -30px rgba(43,38,34,.45); }
.hero-text h1 { margin-bottom: .3em; }
.life-span { font-family: var(--serif); font-size: 1.35rem; color: var(--ink-soft); letter-spacing: .04em; }
.hero-quote { margin: 2.2rem auto 0; max-width: 560px; font-family: var(--serif); font-style: italic; font-size: 1.45rem; line-height: 1.4; color: var(--ink-soft); }
.hero-has-image .hero-quote { margin-left: 0; }
.hero-quote p { margin-bottom: .4rem; }
.hero-quote cite { font-style: normal; font-family: var(--sans); font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

.about { padding: 0 0 clamp(3rem, 7vw, 5rem); }
.about p { font-size: 1.15rem; line-height: 1.75; text-align: center; color: var(--ink-soft); }
.about-cta { margin-top: 1.5rem; }

/* Buttons */
.btn {
  display: inline-block; background: var(--accent); color: #fff; padding: .8rem 1.6rem; border-radius: 999px;
  font-family: var(--sans); font-weight: 600; font-size: .95rem; letter-spacing: .02em; border: 1px solid var(--accent); cursor: pointer;
  transition: background .2s, transform .15s;
}
.btn:hover { background: var(--accent-dark); color: #fff; text-decoration: none; transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--accent); }
.btn-ghost:hover { background: var(--accent-soft); color: var(--accent-dark); }
.btn-small { padding: .5rem 1.1rem; font-size: .85rem; }
.btn-large { padding: 1rem 2.2rem; font-size: 1.05rem; }
.btn-danger { background: var(--err); border-color: var(--err); }
.btn-danger:hover { background: #7f362d; }
.btn-ok { background: var(--ok); border-color: var(--ok); }
.btn-ok:hover { background: #3e6139; }

/* Fotowand */
.container.wide { max-width: 1400px; }
.photowall { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); grid-auto-rows: 8px; gap: 10px; }
.photowall-item { display: block; position: relative; border-radius: 4px; overflow: hidden; background: var(--line); grid-row-end: span 30; }
.photowall-item img { height: 100%; object-fit: cover; }
@media (max-width: 600px) { .photowall { grid-template-columns: repeat(2, 1fr); gap: 6px; } }
.photowall-item img { width: 100%; transition: transform .5s ease, filter .3s; }
.photowall-item:hover img { transform: scale(1.03); }
.photowall-item::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(28,24,20,.55), transparent 55%); opacity: 0; transition: opacity .3s; }
.photowall-item:hover::after { opacity: 1; }
.photowall-caption { position: absolute; left: 0; right: 0; bottom: 0; padding: .7rem .9rem; color: #fff; font-size: .85rem; z-index: 1; opacity: 0; transform: translateY(6px); transition: all .3s; }
.photowall-item:hover .photowall-caption { opacity: 1; transform: none; }
.section-cta { text-align: center; margin-top: 2.5rem; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; background: rgba(28,24,20,.94); z-index: 50; display: flex; align-items: center; justify-content: center; flex-direction: column; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: min(94vw, 1400px); max-height: 82vh; object-fit: contain; border-radius: 4px; }
.lightbox-caption { color: #e6ded3; margin: 1rem 1.5rem 0; font-size: .95rem; text-align: center; }
.lightbox button { position: absolute; background: none; border: 0; color: #fff; font-size: 2.6rem; cursor: pointer; opacity: .8; padding: 1rem; line-height: 1; }
.lightbox button:hover { opacity: 1; }
.lightbox-close { top: .6rem; right: 1rem; }
.lightbox-prev { left: .5rem; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: .5rem; top: 50%; transform: translateY(-50%); }

/* Stories */
.stories { display: grid; gap: 1.4rem; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.story { background: var(--paper); padding: 1.8rem 1.9rem; border-radius: var(--radius); border: 1px solid var(--line); position: relative; }
.story::before { content: "“"; position: absolute; top: .4rem; left: 1.1rem; font-family: var(--serif); font-size: 4rem; color: var(--accent-soft); line-height: 1; }
.story h3 { font-size: 1.45rem; margin-bottom: .6rem; position: relative; }
.story-body { color: var(--ink-soft); position: relative; }
.story-body p:last-child { margin-bottom: 0; }
.story-by { margin: 1rem 0 0; font-family: var(--serif); font-style: italic; font-size: 1.05rem; color: var(--accent-dark); }

/* Event page */
.event-block { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 2.2rem 2.2rem 1.6rem; margin-bottom: 1.6rem; }
.event-block h2 { margin-bottom: 1.2rem; }
.event-block .event-facts { padding: 0; border: 0; background: transparent; margin-bottom: 1.5rem; }
.form-heading { text-align: center; margin: 3rem 0 1.5rem; }
.event-hero { padding: clamp(3rem, 8vw, 5.5rem) 0 1rem; text-align: center; }
.event-subtitle { font-family: var(--serif); font-size: 1.5rem; font-style: italic; color: var(--ink-soft); }
.event-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.5rem; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.8rem 2rem; margin: 0 0 2.5rem; }
.event-facts dt { font-size: .75rem; letter-spacing: .2em; text-transform: uppercase; color: var(--accent); font-weight: 600; margin-bottom: .35rem; }
.event-facts dd { margin: 0; font-size: 1.1rem; font-weight: 400; }
.event-text { font-size: 1.1rem; color: var(--ink-soft); }
.event-notes { border-left: 2px solid var(--accent); padding: .3rem 0 .3rem 1.2rem; margin: 1.5rem 0; font-style: italic; }
.event-cta { text-align: center; margin: 2.5rem 0 1.5rem; }
.back { margin-top: 2.5rem; font-size: .95rem; }

/* Forms */
.invite-form { margin-top: 2rem; }
.field { margin-bottom: 1.2rem; }
.field label { display: block; font-size: .85rem; font-weight: 600; letter-spacing: .03em; color: var(--ink-soft); margin-bottom: .4rem; }
input[type="text"], input[type="password"], input[type="date"], input[type="time"], input[type="url"], textarea, select {
  width: 100%; font: inherit; font-weight: 400; color: var(--ink); background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: .7rem .9rem; transition: border-color .2s, box-shadow .2s;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea { resize: vertical; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem 1.6rem 1rem; margin: 0 0 1.5rem; background: var(--paper); }
legend { float: left; width: 100%; padding: 0; margin: 0 0 .9rem; }
legend + * { clear: both; }
.rsvp-title { display: block; font-family: var(--serif); font-size: 1.5rem; font-weight: 500; }
.rsvp-meta { display: block; font-size: .85rem; color: var(--muted); }
.choice-row { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; margin: 1rem 0; }
.choice-label { min-width: 110px; font-size: .85rem; font-weight: 600; color: var(--ink-soft); }
.choice { display: inline-flex; align-items: center; gap: .5rem; cursor: pointer; font-weight: 400; }
.choice input { accent-color: var(--accent); width: 18px; height: 18px; margin: 0; }
.choice span { padding: .45rem .9rem; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); transition: all .15s; }
.choice input:checked + span { background: var(--accent); border-color: var(--accent); color: #fff; }
.file-drop {
  display: block; border: 2px dashed var(--line); border-radius: var(--radius); padding: 1.6rem; text-align: center; cursor: pointer;
  background: var(--bg); transition: border-color .2s, background .2s;
}
.file-drop:hover, .file-drop.drag { border-color: var(--accent); background: var(--accent-soft); }
.file-drop input { display: none; }
.file-drop-text { display: block; font-weight: 600; color: var(--accent); }
.file-drop-list { display: block; margin-top: .5rem; font-size: .85rem; color: var(--muted); }
.story-input { padding: 1rem 0 .4rem; border-top: 1px solid var(--line); }
.story-input:first-child { border-top: 0; padding-top: 0; }
.form-actions { text-align: center; margin-top: 2rem; }
.form-actions .muted { margin-top: 1rem; }
.thanks { text-align: center; padding-top: 3rem; }
.thanks-actions { display: flex; gap: .8rem; justify-content: center; flex-wrap: wrap; margin-top: 2rem; }

/* Flash */
.flash { width: min(100% - 2.5rem, 720px); margin: 1.2rem auto 0; padding: .9rem 1.2rem; border-radius: var(--radius); font-size: .95rem; font-weight: 400; }
.flash-success { background: #e5efe1; color: #2f5a2a; border: 1px solid #c6dcc0; }
.flash-error { background: #f6e3df; color: #7f3028; border: 1px solid #e8c4bd; }
.flash ul { margin: 0; padding-left: 1.2rem; }

/* Footer */
.site-footer { background: var(--ink); color: #cfc5b8; padding: 3.5rem 1.25rem 2.5rem; text-align: center; margin-top: 2rem; }
.footer-name { font-family: var(--serif); font-size: 1.8rem; color: #fff; margin-bottom: .2rem; }
.footer-span { letter-spacing: .06em; color: #a8998a; }
.footer-text { font-style: italic; }
.footer-admin { margin-top: 2rem; font-size: .8rem; }
.footer-admin a { color: #7f7367; }
