:root {
  --text: #eef3ff;
  --muted: rgba(238, 243, 255, 0.72);
  --glass: rgba(235, 243, 255, 0.08);
  --border: rgba(235, 243, 255, 0.14);
  --accent: #cfdcff;
  --accent-strong: #8da6df;
}

* { 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(170, 190, 255, 0.14), transparent 28%),
    linear-gradient(180deg, #10172a, #070b14 54%, #030509);
  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: #050912;
  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(3, 6, 12, 0.7), rgba(3, 6, 12, 0.96));
}

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

.moon,
.fog,
.stars {
  position: absolute;
}

.moon {
  top: 10%;
  right: 12%;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(249, 253, 255, 0.95), rgba(181, 201, 245, 0.24));
  box-shadow: 0 0 60px rgba(196, 212, 255, 0.3);
}

.fog {
  inset: auto 0 0 0;
  height: 42vh;
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.12), transparent 60%);
  filter: blur(24px);
  animation: fogMove 11s ease-in-out infinite;
}

.fog-b { animation-delay: 1.6s; opacity: 0.66; }

.stars {
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(255,255,255,0.9) 0 1px, transparent 1.5px),
    radial-gradient(circle, rgba(255,255,255,0.6) 0 1px, transparent 1.5px);
  background-size: 120px 120px, 180px 180px;
  background-position: 0 0, 60px 30px;
  opacity: 0.5;
}

body.intro-complete .fog { transform: translateY(160px); opacity: 0; transition: transform 1.4s ease, opacity 1.4s ease; }
body.intro-complete .intro { opacity: 0; pointer-events: none; transition: opacity 1.2s ease 1s; }

.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; letter-spacing: 0.24em; text-transform: uppercase; font-size: 0.78rem; color: rgba(219, 229, 255, 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(22px); }
.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(1080px, calc(100% - 32px));
  margin: 0 auto;
  padding: 88px 0;
}

.hero {
  min-height: 100vh;
  display: grid;
  align-items: center;
  background:
    linear-gradient(180deg, rgba(5, 8, 14, 0.22), rgba(5, 8, 14, 0.8)),
    url("assets/bg.jpg") center/cover;
}

.hero h2 { font-size: clamp(3rem, 8vw, 6rem); line-height: 1; margin: 12px 0; }
.typed-line { min-height: 58px; color: var(--muted); }
.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 28px 60px 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(220px, 1fr));
}

.memory-card {
  min-height: 280px;
  padding: 24px;
  border-radius: 24px;
  display: flex;
  align-items: end;
  background:
    linear-gradient(180deg, transparent, rgba(5, 9, 17, 0.86)),
    url("assets/bg.jpg") center/cover;
  box-shadow: 0 24px 44px 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: #07101d;
  text-decoration: none;
  background: linear-gradient(135deg, var(--accent), #f5f8ff);
}

.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: #07101d;
  background: linear-gradient(135deg, #d8e1ff, #96abdf);
}

.success-modal {
  display: grid;
  place-items: center;
  background: rgba(2, 4, 10, 0.76);
  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 fogMove {
  0%, 100% { transform: translateX(-2%) scale(1); }
  50% { transform: translateX(2%) scale(1.08); }
}
