/* =========================
   GLOBAL
========================= */
html, body {
  margin: 0;
  padding: 0;
  font-family: Georgia, serif;
  background: #e6efe7 url("../images/background.jpg") center / cover fixed;
  color: #333;
}

/* =========================
   NAVIGATION
========================= */
.top-nav,
.backlink-wrap {
  display: flex;
  justify-content: center;
  margin: 20px 0;
}

.nav-button {
  padding: 10px 22px;
  background: rgba(255,255,255,0.9);
  border: 2px solid #c9b46a;
  border-radius: 26px;
  color: #333;
  text-decoration: none;
  font-size: 14px;
}

/* =========================
   SEITENTITEL
========================= */
.page-title {
  max-width: 760px;
  margin: 50px auto 30px auto;
  text-align: center;
}

.page-title h1 {
  margin: 0;
  font-size: 42px;
  font-weight: normal;
  color: #c9b46a;
}

.page-title p {
  margin-top: 12px;
  font-size: 16px;
  font-style: italic;
  color: #555;
}

/* =========================
   INTRO-TEXT
========================= */
.intro-text {
  max-width: 760px;
  margin: 40px auto;
  padding: 26px;
  background: rgba(255,255,255,0.95);
  border: 8px solid #c9b46a;
  border-radius: 20px;
  text-align: center;
}

/* =========================
   ZITATE
========================= */
.quote-box {
  text-align: center;
  margin: 30px auto;
}

.quote-text {
  font-size: 19px;
  font-style: italic;
  color: #5b5b5b;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.quote-text.show {
  opacity: 1;
}

/* =========================
   KARTEN – STARTSEITE
========================= */
.cards {
  display: flex;
  gap: 32px;
  justify-content: center;
  flex-wrap: wrap;
  padding: 40px 20px;
}

.card {
  width: 260px;
  background: #faf7f2;
  border-radius: 18px;
  padding: 16px;
  text-align: center;
  position: relative;
  box-shadow: 0 8px 20px rgba(0,0,0,0.18);
  overflow: hidden;
  cursor: pointer;
}

/* =========================
   REGENBOGEN
========================= */
.card::before {
  content: "";
  position: absolute;
  top: 28px;
  left: 50%;
  transform: translateX(-50%) scaleX(-1);
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: conic-gradient(
    red, orange, yellow, green, blue, indigo, violet, red
  );
  clip-path: inset(0 0 50% 0);
  opacity: 0.55;
  z-index: 0;
}

.card::after {
  content: "";
  position: absolute;
  top: 40px;
  left: 50%;
  transform: translateX(-50%) scaleX(-1);
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background: #faf7f2;
  clip-path: inset(0 0 50% 0);
  z-index: 1;
}

.card > * {
  position: relative;
  z-index: 2;
}

.card img {
  width: 100%;
  border-radius: 14px;
  margin-top: 60px;
}

.pet-name h2 {
  margin: 14px 0 6px 0;
  color: #c9b46a;
}

.pet-sub {
  font-size: 13px;
  font-style: italic;
}

/* =========================
   GRABSTEIN – NEUE VERSION (VARIANTE A)
========================= */
.grave {
  margin: 22px 0 38px 0;
  padding: 18px 16px;
  background: linear-gradient(
    to bottom,
    #f1f1f1,
    #dedede
  );
  border-radius: 26px;
  border: 2px solid #bcbcbc;
  font-size: 15px;
  color: #333;
  letter-spacing: 0.5px;
  box-shadow:
    inset 0 2px 4px rgba(255,255,255,0.6),
    inset 0 -2px 6px rgba(0,0,0,0.08);
}

/* =========================
   TIERSEITE
========================= */
#single {
  display: flex;
  justify-content: center;
  padding: 40px 20px;
}

#single .card {
  width: 80%;
  max-width: 420px;
  cursor: default;
}

/* =========================
   KERZE
========================= */
.candle-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin: 8px 0 24px 0;
  cursor: pointer;
}

.candle {
  width: 18px;
  height: 48px;
  background: linear-gradient(#f3e1b6, #e0c48a);
  border-radius: 8px;
  position: relative;
  transition: all 0.6s ease;
}

.candle::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 50%;
  width: 2px;
  height: 6px;
  background: #6b4b2a;
  transform: translateX(-50%);
  border-radius: 1px;
  z-index: 1;
}

.flame {
  position: absolute;
  top: -18px;
  left: 50%;
  width: 12px;
  height: 20px;
  transform: translateX(-50%) rotate(-4deg);
  background: radial-gradient(
    ellipse at center,
    #fff8d6 0%,
    #ffd88a 35%,
    #ffae42 65%,
    #e07b00 100%
  );
  border-radius: 50% 50% 50% 50% / 65% 65% 35% 35%;
  filter: blur(0.4px);
  animation: flameNatural 2.8s infinite ease-in-out;
  z-index: 2;
}

@keyframes flameNatural {
  0% {
    transform: translateX(-50%) scale(1) rotate(-4deg);
    opacity: 0.85;
  }
  25% {
    transform: translateX(-49%) scale(1.08, 0.95) rotate(2deg);
    opacity: 1;
  }
  55% {
    transform: translateX(-52%) scale(0.95, 1.05) rotate(-2deg);
    opacity: 0.9;
  }
  100% {
    transform: translateX(-50%) scale(1) rotate(-4deg);
    opacity: 0.85;
  }
}

/* Kerzen-Stufen */
.candle.stage-1 { height: 52px; }
.candle.stage-2 { box-shadow: 0 0 12px rgba(255,180,80,0.45); }
.candle.stage-3 {
  box-shadow:
    0 0 18px rgba(255,200,120,0.55),
    0 0 36px rgba(255,200,120,0.25);
}
.candle.stage-4 {
  box-shadow:
    0 0 24px rgba(255,220,150,0.65),
    0 0 48px rgba(255,220,150,0.35);
}

/* =========================
   KONDOLENZBUCH
========================= */
.memory-book {
  margin-top: 32px;
}

.memory-entry {
  background: rgba(255,255,255,0.85);
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 10px;
}

.memory-text {
  font-size: 13px;
  color: #555;
}

.memory-date {
  font-size: 11px;
  color: #777;
  margin-top: 4px;
}

textarea {
  width: 100%;
  margin-top: 16px;
  padding: 12px;
  font-family: inherit;
  border-radius: 12px;
  border: 2px solid #c9b46a;
  resize: vertical;
}

button {
  margin-top: 10px;
  padding: 10px 18px;
  border-radius: 22px;
  border: 2px solid #c9b46a;
  background: white;
  cursor: pointer;
}

/* =========================
   FOOTER
========================= */
.footer {
  display: flex;
  justify-content: center;
  margin: 60px 20px;
}

.footer p {
  padding: 22px 34px;
  border: 2px solid #c9b46a;
  border-radius: 18px;
  background: rgba(255,255,255,0.6);
  font-size: 26px;
  text-align: center;
}

/* =========================
   SCHMETTERLINGE
========================= */
.butterflies {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.butterflies img {
  position: absolute;
  width: 30px;
  opacity: 0.55;
}

.b1 { top:18%; left:-60px; animation: fly1 90s linear infinite, up1 7s ease-in-out infinite; }
.b2 { top:35%; left:-100px; animation: fly2 120s linear infinite, up2 9s ease-in-out infinite; }
.b3 { top:52%; left:-40px; animation: fly3 80s linear infinite, up3 6s ease-in-out infinite; }
.b4 { top:68%; left:-140px; animation: fly4 140s linear infinite, up4 11s ease-in-out infinite; }
.b5 { top:26%; left:-20px; animation: fly5 70s linear infinite, up5 5s ease-in-out infinite; }

@keyframes fly1 { to { transform: translateX(160vw); } }
@keyframes fly2 { to { transform: translateX(190vw); } }
@keyframes fly3 { to { transform: translateX(140vw); } }
@keyframes fly4 { to { transform: translateX(210vw); } }
@keyframes fly5 { to { transform: translateX(130vw); } }

@keyframes up1 { 50% { margin-top:-28px; } }
@keyframes up2 { 50% { margin-top:36px; } }
@keyframes up3 { 50% { margin-top:-42px; } }
@keyframes up4 { 50% { margin-top:24px; } }
@keyframes up5 { 50% { margin-top:-34px; } }

/* =========================
   MOBILE
========================= */
@media (max-width: 768px) {
  .page-title h1 { font-size: 32px; }
  .card { width: 100%; max-width: 340px; }
  .butterflies img { width: 22px; }
}
