:root {
  --paper: #f7f2ec;
  --paper-2: #eee4da;
  --ink: #3d3733;
  --muted: #7a6e66;
  --line: rgba(77, 64, 55, .15);
  --accent: #a67d74;
  --accent-deep: #7f5d56;
  --soft: #d8c2b8;
  --white: #fffdfb;
  --shadow: 0 24px 60px rgba(70, 52, 44, .12);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--paper);
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 8%, rgba(216,194,184,.32), transparent 30rem),
    radial-gradient(circle at 86% 28%, rgba(196,177,163,.24), transparent 34rem),
    var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.75;
  overflow-x: hidden;
}

body.lightbox-open { overflow: hidden; }

h1, h2, blockquote {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
}

h1, h2, p { margin-top: 0; }

h1 {
  margin-bottom: .2rem;
  font-size: clamp(4rem, 11vw, 8.5rem);
  line-height: .95;
  letter-spacing: -.055em;
}

h2 {
  margin-bottom: 1.25rem;
  font-size: clamp(2.25rem, 5vw, 4rem);
  line-height: 1.08;
  letter-spacing: -.025em;
}

p { color: var(--muted); }

a { color: inherit; }

.page-glow {
  position: fixed;
  z-index: -1;
  width: 32rem;
  height: 32rem;
  border-radius: 50%;
  filter: blur(65px);
  opacity: .24;
  pointer-events: none;
}

.page-glow--one {
  top: -14rem;
  left: -12rem;
  background: #d7bcb1;
}

.page-glow--two {
  right: -14rem;
  bottom: 4rem;
  background: #cfc0b2;
}

.hero {
  position: relative;
  min-height: 92vh;
  display: grid;
  place-items: center;
  padding: 5rem 1.5rem;
  text-align: center;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 50% 0;
  width: 1px;
  height: 7rem;
  background: linear-gradient(to bottom, transparent, rgba(104,87,75,.35));
}

.hero__inner {
  width: min(100%, 900px);
}

.hero__mark {
  width: 3.5rem;
  margin: 0 auto 1.4rem;
  opacity: .75;
}

.hero__mark svg {
  display: block;
  width: 100%;
  fill: none;
  stroke: var(--accent-deep);
  stroke-width: 1.35;
}

.eyebrow {
  margin-bottom: .7rem;
  color: var(--accent-deep);
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .23em;
  text-transform: uppercase;
}

.hero__date {
  margin-bottom: 2rem;
  color: var(--accent-deep);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.25rem;
}

.hero__lead {
  width: min(100%, 650px);
  margin: 0 auto 2.4rem;
  font-size: clamp(1.15rem, 2.4vw, 1.45rem);
  line-height: 1.7;
}

.hero__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.3rem;
  padding: .85rem 1.35rem;
  border: 1px solid rgba(127,93,86,.3);
  border-radius: 999px;
  background: rgba(255,253,251,.6);
  color: var(--accent-deep);
  text-decoration: none;
  transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}

.hero__button:hover {
  transform: translateY(-2px);
  background: var(--white);
  box-shadow: 0 10px 26px rgba(87,66,58,.1);
}

.section {
  position: relative;
  padding: clamp(5rem, 10vw, 9rem) 1.5rem;
}

.section__inner {
  width: min(100%, 1160px);
  margin-inline: auto;
}

.section__inner--narrow {
  width: min(100%, 820px);
  text-align: center;
}

.section-heading {
  width: min(100%, 740px);
  margin: 0 auto 3.5rem;
  text-align: center;
}

.section-heading > p:last-child {
  margin-bottom: 0;
  font-size: 1.05rem;
}

.intro {
  background: rgba(255,253,251,.6);
  border-block: 1px solid var(--line);
}

.text-large {
  color: var(--ink);
  font-size: clamp(1.18rem, 2.5vw, 1.45rem);
  line-height: 1.85;
}

.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .8rem;
  margin-bottom: 2rem;
  color: var(--accent);
}

.ornament span {
  width: 4.5rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(166,125,116,.55));
}

.ornament span:last-child {
  background: linear-gradient(90deg, rgba(166,125,116,.55), transparent);
}

.ornament i {
  font-style: normal;
  font-size: .85rem;
}

blockquote {
  margin: 3rem auto 0;
  padding-top: 2.2rem;
  border-top: 1px solid var(--line);
  color: var(--accent-deep);
  font-size: clamp(1.55rem, 3.2vw, 2.15rem);
  line-height: 1.55;
}

.gallery-section {
  overflow: hidden;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1rem;
}

.memory-card {
  position: relative;
  grid-column: span 4;
  aspect-ratio: 4 / 5;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 1.5rem;
  background: #e9dfd6;
  box-shadow: 0 14px 34px rgba(72,54,46,.09);
  cursor: pointer;
  appearance: none;
}

.memory-card--wide {
  grid-column: span 8;
  aspect-ratio: 8 / 5;
}

.memory-card img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform .5s ease, filter .4s ease;
}

.memory-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(45,36,32,.45), transparent 48%);
  pointer-events: none;
}

.memory-card span {
  position: absolute;
  z-index: 2;
  left: 1.2rem;
  bottom: 1rem;
  color: white;
  font-size: .9rem;
  letter-spacing: .08em;
}

.memory-card:hover img {
  transform: scale(1.025);
  filter: saturate(.86);
}

.words-section {
  background:
    linear-gradient(rgba(247,242,236,.9), rgba(247,242,236,.9)),
    radial-gradient(circle at center, #d8c2b8 0, transparent 50%);
}

.words-card {
  margin-top: 2.5rem;
  padding: clamp(2rem, 5vw, 4rem);
  border: 1px solid var(--line);
  border-radius: 1.6rem;
  background: rgba(255,253,251,.75);
  box-shadow: var(--shadow);
}

.words-card p {
  font-size: 1.07rem;
}

.words-card .signature {
  margin-top: 2rem;
  margin-bottom: 0;
  color: var(--accent-deep);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
  font-style: italic;
}

.video-section {
  background: rgba(255,253,251,.48);
  border-block: 1px solid var(--line);
}

.video-placeholder,
.memorial-video {
  width: min(100%, 960px);
  margin: 0 auto;
  border-radius: 1.5rem;
  box-shadow: var(--shadow);
}

.video-placeholder {
  min-height: clamp(19rem, 51vw, 34rem);
  display: grid;
  place-items: center;
  align-content: center;
  padding: 2rem;
  border: 1px dashed rgba(127,93,86,.3);
  background:
    linear-gradient(rgba(68,55,49,.42), rgba(68,55,49,.42)),
    radial-gradient(circle at 25% 25%, #cdb7ad, transparent 45%),
    #8a766e;
  text-align: center;
}

.video-placeholder__icon {
  width: 5rem;
  margin-bottom: 1.1rem;
  opacity: .9;
}

.video-placeholder__icon svg {
  width: 100%;
  fill: none;
  stroke: white;
  stroke-width: 1.4;
}

.video-placeholder__title {
  margin-bottom: .3rem;
  color: white;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.7rem, 4vw, 2.5rem);
}

.video-placeholder__text {
  margin-bottom: 0;
  color: rgba(255,255,255,.83);
}

.memorial-video {
  display: block;
  background: #111;
}

.candle-section {
  text-align: center;
}

.candle {
  position: relative;
  width: 4.2rem;
  height: 8.2rem;
  margin: 0 auto 2rem;
}

.candle__body {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 3.2rem;
  height: 5rem;
  transform: translateX(-50%);
  border-radius: .8rem .8rem .35rem .35rem;
  background: linear-gradient(90deg, #eee2d7, #fffaf5 50%, #eadbd0);
  box-shadow: 0 14px 30px rgba(107,79,66,.13);
}

.candle__wick {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 2.4rem;
  width: 2px;
  height: 1rem;
  transform: translateX(-50%);
  background: #6a5147;
}

.candle__flame {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: .3rem;
  width: 1.55rem;
  height: 2.4rem;
  transform: translateX(-50%) rotate(4deg);
  transform-origin: 50% 100%;
  border-radius: 70% 30% 68% 32% / 73% 46% 54% 27%;
  background: radial-gradient(circle at 50% 75%, #fff7da 0 20%, #ddb180 48%, #b77854 76%);
  box-shadow: 0 0 1.4rem rgba(190,137,91,.38);
  animation: flame 2.8s ease-in-out infinite;
}

@keyframes flame {
  0%, 100% { transform: translateX(-50%) rotate(3deg) scale(1); }
  35% { transform: translateX(-50%) rotate(-4deg) scale(.96, 1.05); }
  70% { transform: translateX(-50%) rotate(6deg) scale(1.04, .98); }
}

.footer {
  padding: 4.2rem 1.5rem;
  border-top: 1px solid var(--line);
  background: #eae0d7;
  text-align: center;
}

.footer__inner {
  width: min(100%, 720px);
  margin: 0 auto;
}

.footer__heart {
  margin-bottom: .9rem;
  color: var(--accent-deep);
  font-size: 1rem;
}

.footer p {
  margin-bottom: .4rem;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.25rem;
}

.footer .footer__small {
  color: var(--muted);
  font-family: inherit;
  font-size: .88rem;
}

.footer a {
  display: inline-block;
  margin-top: 1.2rem;
  color: var(--accent-deep);
  font-size: .9rem;
  text-underline-offset: .2rem;
}

.lightbox {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background: rgba(30,24,21,.92);
  opacity: 0;
  visibility: hidden;
  transition: opacity .22s ease, visibility .22s ease;
}

.lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.lightbox__figure {
  width: min(92vw, 1050px);
  margin: 0;
  text-align: center;
}

.lightbox__figure img {
  max-width: 100%;
  max-height: 78vh;
  border-radius: 1rem;
  box-shadow: 0 30px 80px rgba(0,0,0,.28);
}

.lightbox__figure figcaption {
  margin-top: 1rem;
  color: rgba(255,255,255,.82);
}

.lightbox__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 3rem;
  height: 3rem;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 50%;
  background: rgba(255,255,255,.06);
  color: white;
  font-size: 1.9rem;
  line-height: 1;
  cursor: pointer;
}

@media (max-width: 820px) {
  .hero {
    min-height: 86vh;
  }

  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }

  .memory-card,
  .memory-card--wide {
    grid-column: span 1;
    aspect-ratio: 4 / 5;
  }
}

@media (max-width: 560px) {
  body { line-height: 1.68; }

  .section {
    padding-inline: 1rem;
  }

  .hero {
    padding-inline: 1rem;
  }

  .hero::after { height: 4rem; }

  .hero__lead { font-size: 1.07rem; }

  .gallery {
    gap: .75rem;
  }

  .memory-card {
    border-radius: 1rem;
  }

  .memory-card span {
    left: .85rem;
    bottom: .75rem;
    font-size: .78rem;
  }

  .words-card {
    border-radius: 1.1rem;
  }

  .video-placeholder {
    border-radius: 1.1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}


/* Video */
.video-placeholder--quiet {
  min-height: clamp(18rem, 48vw, 32rem);
}
.video-actions {
  display: flex;
  justify-content: center;
  margin-top: 1.35rem;
}
.download-button,
.submit-button,
.family-logout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.15rem;
  padding: .8rem 1.25rem;
  border: 0;
  border-radius: 999px;
  background: var(--accent-deep);
  color: #fff;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease;
}
.download-button:hover,
.submit-button:hover,
.family-logout:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(87,66,58,.16);
}

/* Abschiedsgrüße */
.condolence-section {
  background: rgba(255,253,251,.72);
  border-bottom: 1px solid var(--line);
}
.condolence-layout {
  width: min(100%, 980px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: 1.25rem;
  align-items: stretch;
}
.condolence-intro,
.condolence-form {
  border: 1px solid var(--line);
  border-radius: 1.5rem;
  background: rgba(255,253,251,.88);
  box-shadow: var(--shadow);
}
.condolence-intro {
  padding: clamp(2rem, 4vw, 3rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.condolence-symbol {
  margin-bottom: 1.2rem;
  color: var(--accent-deep);
  font-size: 1.25rem;
}
.condolence-intro h3 {
  margin: 0 0 .8rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.85rem;
  font-weight: 400;
}
.condolence-intro p {
  margin-bottom: 0;
}
.condolence-form {
  padding: clamp(1.4rem, 4vw, 2.5rem);
}
.form-row + .form-row {
  margin-top: 1.15rem;
}
.form-row label,
.family-login-form label {
  display: block;
  margin-bottom: .45rem;
  color: var(--ink);
  font-weight: 700;
}
.form-row label span {
  color: var(--muted);
  font-weight: 400;
}
.label-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}
.label-line > span {
  color: var(--muted);
  font-size: .8rem;
}
.form-row input,
.form-row textarea,
.family-login-form input {
  width: 100%;
  border: 1px solid rgba(91,72,63,.18);
  border-radius: .9rem;
  outline: none;
  background: #fffdfb;
  color: var(--ink);
  font: inherit;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.form-row input,
.family-login-form input {
  min-height: 3.15rem;
  padding: .75rem .9rem;
}
.form-row textarea {
  min-height: 12rem;
  padding: .9rem;
  resize: vertical;
}
.form-row input:focus,
.form-row textarea:focus,
.family-login-form input:focus {
  border-color: rgba(127,93,86,.55);
  box-shadow: 0 0 0 4px rgba(166,125,116,.10);
}
.privacy-note {
  margin: 1rem 0 1.25rem;
  color: var(--muted);
  font-size: .82rem;
  line-height: 1.55;
}
.form-message {
  margin-bottom: 1.2rem;
  padding: .9rem 1rem;
  border-radius: .9rem;
  font-size: .92rem;
}
.form-message--success {
  border: 1px solid rgba(82,126,91,.20);
  background: rgba(104,153,112,.10);
  color: #45654b;
}
.form-message--error {
  border: 1px solid rgba(155,80,80,.18);
  background: rgba(178,94,94,.09);
  color: #7b4a4a;
}
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
}




/* Öffentliche Abschiedsgrüße */
.guestbook-section {
  background: linear-gradient(180deg, rgba(244,238,231,.58), rgba(255,253,251,.76));
  border-bottom: 1px solid var(--line);
}
.guestbook-count {
  width: fit-content;
  margin: -1.5rem auto 2rem;
  padding: .55rem .9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,253,251,.72);
  color: var(--muted);
  font-size: .85rem;
}
.guestbook-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  width: min(100%, 1040px);
  margin: 0 auto;
}
.guestbook-card {
  position: relative;
  min-width: 0;
  padding: clamp(1.4rem, 3.5vw, 2rem);
  border: 1px solid var(--line);
  border-radius: 1.35rem;
  background: rgba(255,253,251,.88);
  box-shadow: 0 14px 34px rgba(70,52,44,.07);
  overflow: hidden;
}
.guestbook-card__quote {
  position: absolute;
  top: .2rem;
  right: 1rem;
  color: rgba(166,125,116,.13);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 6rem;
  line-height: 1;
  pointer-events: none;
}
.guestbook-card__message {
  position: relative;
  z-index: 1;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.8;
  overflow-wrap: anywhere;
}
.guestbook-card__footer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}
.guestbook-card__footer strong,
.guestbook-card__footer span {
  display: block;
}
.guestbook-card__footer strong {
  color: var(--accent-deep);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.05rem;
}
.guestbook-card__footer span,
.guestbook-card__footer time {
  color: var(--muted);
  font-size: .8rem;
}
.guestbook-card__footer time {
  white-space: nowrap;
}
.guestbook-empty,
.guestbook-status {
  width: min(100%, 760px);
  margin: 0 auto;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: rgba(255,253,251,.75);
  color: var(--muted);
  text-align: center;
}

/* Smartphone + Tablet Feinschliff */
@media (max-width: 980px) {
  .section {
    padding-block: clamp(4.2rem, 8vw, 6.5rem);
  }

  .condolence-layout {
    grid-template-columns: 1fr;
    width: min(100%, 760px);
  }

  .condolence-intro {
    text-align: center;
  }

  .guestbook-grid {
    width: min(100%, 760px);
    grid-template-columns: 1fr;
  }

  .memorial-video {
    max-height: 70vh;
    object-fit: contain;
  }
}

@media (max-width: 720px) {
  .hero {
    min-height: 82svh;
    padding-top: calc(4rem + env(safe-area-inset-top));
    padding-bottom: 4rem;
  }

  h1 {
    font-size: clamp(3.6rem, 18vw, 6rem);
  }

  h2 {
    font-size: clamp(2rem, 9vw, 3rem);
  }

  .hero__date {
    font-size: 1.05rem;
  }

  .hero__button,
  .download-button,
  .submit-button {
    width: 100%;
    max-width: 28rem;
  }

  .gallery {
    grid-template-columns: 1fr 1fr;
    gap: .7rem;
  }

  .memory-card,
  .memory-card--wide {
    grid-column: span 1;
    aspect-ratio: 4 / 5;
  }

  .condolence-form,
  .condolence-intro {
    border-radius: 1.15rem;
  }

  .guestbook-card {
    border-radius: 1.1rem;
  }

  .guestbook-card__footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .guestbook-card__footer time {
    white-space: normal;
  }

  .video-actions {
    margin-top: 1rem;
  }
}

@media (max-width: 430px) {
  .section {
    padding-inline: .9rem;
  }

  .gallery {
    grid-template-columns: 1fr;
  }

  .memory-card,
  .memory-card--wide {
    aspect-ratio: 4 / 4.8;
  }

  .text-large {
    font-size: 1.08rem;
  }

  blockquote {
    font-size: 1.45rem;
  }

  .words-card,
  .condolence-form,
  .condolence-intro,
  .guestbook-card {
    padding: 1.15rem;
  }

  .form-row textarea {
    min-height: 10rem;
  }

  .label-line {
    align-items: flex-start;
    flex-direction: column;
    gap: .15rem;
  }

  .video-placeholder {
    min-height: 16rem;
  }

  .footer {
    padding-bottom: calc(3.2rem + env(safe-area-inset-bottom));
  }
}
