:root {
  --bg: #09111d;
  --text: #eef5ff;
  --muted: rgba(238, 245, 255, 0.72);
  --glass: rgba(201, 223, 255, 0.09);
  --border: rgba(220, 235, 255, 0.18);
  --accent: #b8d7ff;
  --accent-strong: #7ca8e5;
}

* { 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(141, 178, 232, 0.15), transparent 35%),
    linear-gradient(180deg, #142233, #09111d 56%, #040911);
  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: #07101b;
  transition: opacity 0.7s 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(5, 10, 16, 0.8), rgba(5, 10, 16, 0.98));
}

.frost-layer,
.heart-wipe {
  position: absolute;
  inset: 0;
}

.frost-layer {
  backdrop-filter: blur(18px);
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.16), transparent 20%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(137, 173, 219, 0.12));
}

.heart-wipe {
  background: radial-gradient(circle at center, transparent 0 7%, rgba(255, 255, 255, 0.78) 8%, rgba(255, 255, 255, 0.95) 16%, rgba(255, 255, 255, 0.7) 20%, transparent 22%);
  mix-blend-mode: screen;
  opacity: 0;
  transform: scale(0.3);
  transition: transform 1.2s ease, opacity 0.8s ease;
}

body.intro-complete .heart-wipe { transform: scale(12); opacity: 1; }
body.intro-complete .intro { opacity: 0; pointer-events: none; transition: opacity 1s ease 0.8s; }

.intro-copy,
.hero-card,
.modal-card {
  position: relative;
  z-index: 2;
}

.intro-copy {
  max-width: 650px;
  text-align: center;
}

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

.intro h1 { font-size: clamp(2.4rem, 7vw, 4.9rem); margin: 10px 0; }
.intro-actions,
.share-actions,
.response-options { 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.8s, transform 1s ease 0.8s; }
body.intro-complete .page-shell { opacity: 1; transform: none; }

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

.hero {
  min-height: 100vh;
  display: grid;
  place-items: center;
  position: relative;
  background:
    linear-gradient(180deg, rgba(4, 9, 17, 0.4), rgba(4, 9, 17, 0.78)),
    url("assets/bg.jpg") center/cover;
}

.hero-card,
.glass-panel {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 28px;
  backdrop-filter: blur(16px);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.28);
}

.hero-card {
  width: min(720px, 100%);
  padding: 36px;
}

.hero h2 { font-size: clamp(3rem, 8vw, 6rem); margin: 12px 0; line-height: 1; }
.typed-line { min-height: 56px; color: var(--muted); }
.eyebrow { margin: 0; text-transform: uppercase; letter-spacing: 0.24em; color: rgba(213, 230, 255, 0.76); font-size: 0.78rem; }
.quote-section { text-align: center; padding-top: 12px; }
.quote { margin: 0; font-size: clamp(1.45rem, 3vw, 2.35rem); color: #dcecff; }
.glass-panel { padding: 30px; }
.glass-panel p { color: var(--muted); line-height: 1.9; }

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

.memory-card {
  min-height: 280px;
  padding: 24px;
  border-radius: 24px;
  display: flex;
  align-items: end;
  background:
    linear-gradient(180deg, transparent, rgba(8, 16, 28, 0.82)),
    url("assets/bg.jpg") center/cover;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.response-options { justify-content: flex-start; margin-bottom: 18px; }
.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 {
  padding: 14px 28px;
  color: #07101b;
  text-decoration: none;
  background: linear-gradient(135deg, var(--accent), #f3fbff);
}

.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;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
  border-radius: 18px;
  font: inherit;
}

.form-status { min-height: 24px; }

.music-toggle {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 10;
  width: 56px;
  height: 56px;
  color: var(--bg);
  background: linear-gradient(135deg, #c9e6ff, #91b8e7);
}

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

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

.rain-layer {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(transparent 0%, rgba(255,255,255,0.16) 40%, transparent 80%);
  background-size: 2px 110px;
  opacity: 0.18;
  animation: rainfall 0.9s linear infinite;
}

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

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

@keyframes rainfall {
  from { background-position: 0 0; }
  to { background-position: 0 110px; }
}

.cta-button:hover,
.response-choice:hover,
.share-actions button:hover,
.skip-button:hover,
.music-toggle:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.2);
}

@media (max-width: 768px) {
  .section { padding: 72px 0; }
  .hero-card { padding: 28px; }
}
