:root {
  --text: #fff7f0;
  --muted: rgba(255, 247, 240, 0.76);
  --glass: rgba(255, 247, 240, 0.12);
  --border: rgba(255, 255, 255, 0.16);
  --accent: #ffcfb3;
  --accent-strong: #f7a49a;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Poppins", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top, rgba(255, 207, 179, 0.2), transparent 34%),
    linear-gradient(180deg, #453033, #1f1719 44%, #140f11 100%);
  overflow-x: hidden;
}

body.locked { overflow: hidden; }
.loading-screen,
.intro,
.success-modal {
  position: fixed;
  inset: 0;
  z-index: 25;
}

.loading-screen {
  display: grid;
  place-items: center;
  background: #1f1719;
  transition: opacity 0.8s ease;
}

.loading-screen.hidden,
.success-modal.hidden { opacity: 0; pointer-events: none; }

.intro {
  display: grid;
  place-items: center;
  padding: 24px;
  background: linear-gradient(180deg, rgba(25, 16, 18, 0.75), rgba(25, 16, 18, 0.95));
}

.intro-copy {
  position: relative;
  z-index: 2;
  max-width: 640px;
  text-align: center;
}

.petal {
  position: absolute;
  width: 140px;
  height: 100px;
  background: radial-gradient(circle at 30% 30%, rgba(255, 218, 224, 0.95), rgba(227, 123, 145, 0.8));
  border-radius: 65% 35% 60% 40%;
  filter: blur(0.4px);
  animation: petalFloat 9s ease-in-out infinite;
}

.petal-a { top: 10%; left: 12%; }
.petal-b { top: 24%; right: 14%; animation-delay: 1.2s; }
.petal-c { bottom: 12%; left: 40%; animation-delay: 2.4s; }

body.intro-complete .intro { opacity: 0; pointer-events: none; transition: opacity 1s ease 1.1s; }
body.intro-complete .petal { transform: translateY(90vh) rotate(40deg); opacity: 0; }

.intro h1,
.hero h2,
.section-heading h3,
.modal-card h3 {
  font-family: "Playfair Display", serif;
}

.intro h1 { font-size: clamp(2.4rem, 7vw, 4.8rem); margin: 10px 0; }
.eyebrow { margin: 0; text-transform: uppercase; letter-spacing: 0.24em; font-size: 0.76rem; color: rgba(255, 231, 223, 0.74); }
.intro-actions,
.response-options,
.share-actions { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }

.page-shell.hidden { opacity: 0; transform: translateY(24px); }
.page-shell { transition: opacity 1s ease 0.9s, transform 1s ease 0.9s; }
body.intro-complete .page-shell { opacity: 1; transform: none; }

.section {
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
  padding: 88px 0;
}

.hero {
  min-height: 100vh;
  display: grid;
  align-items: center;
  background:
    linear-gradient(180deg, rgba(19, 13, 15, 0.3), rgba(19, 13, 15, 0.75)),
    url("assets/bg.jpg") center/cover;
}

.hero-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
}

.hero h2 { font-size: clamp(3.2rem, 8vw, 6rem); line-height: 0.96; margin: 12px 0 18px; }
.typed-line { min-height: 58px; color: var(--muted); }

.hero-stack {
  position: relative;
  min-height: 420px;
}

.stack-photo {
  position: absolute;
  inset: auto;
  width: min(280px, 70vw);
  height: 340px;
  border: 14px solid #fffaf5;
  background:
    linear-gradient(180deg, transparent, rgba(22, 14, 16, 0.74)),
    url("assets/bg.jpg") center/cover;
  box-shadow: 0 28px 48px rgba(0, 0, 0, 0.24);
}

.stack-photo:nth-child(1) { top: 20px; left: 10px; transform: rotate(-6deg); }
.stack-photo:nth-child(2) { top: 70px; left: 80px; transform: rotate(3deg); }
.stack-photo:nth-child(3) { top: 0; right: 0; transform: rotate(7deg); }

.quote-section { text-align: center; padding-top: 8px; }
.quote {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.7rem, 4vw, 2.9rem);
}

.glass-card {
  background: var(--glass);
  border: 1px solid var(--border);
  backdrop-filter: blur(18px);
  border-radius: 30px;
  padding: 30px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.24);
}

.glass-card p { color: var(--muted); line-height: 1.9; }

.gallery {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.memory-card {
  min-height: 270px;
  padding: 18px;
  border-radius: 24px;
  display: flex;
  align-items: end;
  background:
    linear-gradient(180deg, transparent, rgba(24, 16, 18, 0.84)),
    url("assets/bg.jpg") center/cover;
  box-shadow: 0 20px 42px rgba(0, 0, 0, 0.22);
}

.response-choice,
.share-actions button,
.skip-button,
.cta-button,
.music-toggle {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.response-choice,
.share-actions button,
.skip-button {
  padding: 14px 20px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
}

.cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  color: #2d1717;
  text-decoration: none;
  background: linear-gradient(135deg, var(--accent), #fff0e2);
}

.response-form label { display: block; margin-bottom: 16px; color: var(--muted); }
.response-form input,
.response-form textarea {
  width: 100%;
  margin-top: 8px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--border);
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  font: inherit;
}

.music-toggle {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 10;
  width: 56px;
  height: 56px;
  color: #2b1517;
  background: linear-gradient(135deg, #ffd6c4, #f0a5a0);
}

.success-modal {
  display: grid;
  place-items: center;
  background: rgba(14, 10, 11, 0.72);
  padding: 24px;
  transition: opacity 0.4s ease;
}

.modal-card { max-width: 440px; text-align: center; }

.reveal {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible { opacity: 1; transform: none; }

@keyframes petalFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-14px) rotate(6deg); }
}

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-stack { min-height: 360px; }
}
