:root {
  --bg: #1a1014;
  --bg-alt: #241419;
  --rose: #e8a3a0;
  --rose-deep: #c9787a;
  --gold: #d9b98a;
  --cream: #f6ece2;
  --muted: #c9b3ae;
  --serif: "Cormorant Garamond", serif;
  --script: "Marck Script", cursive;
  --sans: "Inter", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--cream);
  font-family: var(--sans);
  overflow-x: hidden;
}

#app {
  position: relative;
}

body.locked {
  overflow: hidden;
}

/* ---------- entry overlay ---------- */
.entry-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background:
    radial-gradient(ellipse at 50% 20%, rgba(201, 120, 122, 0.28), transparent 60%),
    radial-gradient(ellipse at 50% 100%, rgba(217, 185, 138, 0.12), transparent 55%),
    var(--bg);
  opacity: 1;
  transition: opacity 0.7s ease;
}

.entry-overlay.closed {
  opacity: 0;
  pointer-events: none;
}

.entry-content {
  text-align: center;
  padding: 2rem;
}

.entry-icon {
  font-size: 2.4rem;
  display: block;
  margin-bottom: 1.25rem;
  filter: drop-shadow(0 0 12px rgba(232, 163, 160, 0.4));
}

.entry-title {
  font-family: var(--script);
  font-weight: 400;
  font-size: clamp(2.6rem, 9vw, 4rem);
  color: var(--rose);
  margin: 0 0 2.25rem;
  text-shadow: 0 0 40px rgba(232, 163, 160, 0.35);
}

.entry-btn {
  font-family: var(--sans);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 0.75rem;
  color: var(--cream);
  background: transparent;
  border: 1px solid var(--gold);
  border-radius: 999px;
  padding: 0.9rem 2.2rem;
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease;
}

.entry-btn:hover {
  background: var(--gold);
  color: var(--bg);
}

/* ---------- floating petals background ---------- */
.petals {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.petal {
  position: absolute;
  top: -5vh;
  font-size: 1.1rem;
  opacity: 0.55;
  animation: fall linear infinite;
  filter: drop-shadow(0 0 6px rgba(232, 163, 160, 0.25));
}

@keyframes fall {
  0% {
    transform: translateY(-10vh) translateX(0) rotate(0deg);
  }
  100% {
    transform: translateY(110vh) translateX(var(--drift, 40px)) rotate(360deg);
  }
}

/* ---------- section shell ---------- */
section {
  position: relative;
  z-index: 1;
  padding: 7rem 1.5rem;
  max-width: 900px;
  margin: 0 auto;
}

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

.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- hero ---------- */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem 1.5rem;
  background:
    radial-gradient(ellipse at 50% 20%, rgba(201, 120, 122, 0.28), transparent 60%),
    radial-gradient(ellipse at 50% 100%, rgba(217, 185, 138, 0.12), transparent 55%),
    var(--bg);
}

.hero .eyebrow {
  font-family: var(--sans);
  letter-spacing: 0.35em;
  text-transform: uppercase;
  font-size: 0.7rem;
  color: var(--muted);
  margin-bottom: 1.75rem;
}

.hero h1 {
  font-family: var(--script);
  font-weight: 400;
  font-size: clamp(3.2rem, 12vw, 6.5rem);
  color: var(--rose);
  margin: 0;
  line-height: 1;
  text-shadow: 0 0 40px rgba(232, 163, 160, 0.35);
}

.hero .sub {
  font-family: var(--serif);
  font-size: clamp(1.1rem, 3vw, 1.5rem);
  color: var(--cream);
  margin-top: 1.25rem;
  font-style: italic;
  opacity: 0.9;
}

.hero .scroll-hint {
  margin-top: 4rem;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  animation: bob 2.4s ease-in-out infinite;
}

.scroll-hint .line {
  width: 1px;
  height: 34px;
  background: linear-gradient(var(--rose), transparent);
}

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

/* ---------- headings shared ---------- */
.kicker {
  font-family: var(--sans);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  font-size: 0.7rem;
  color: var(--rose-deep);
  text-align: center;
  display: block;
  margin-bottom: 1rem;
}

h2.title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2rem, 5vw, 3rem);
  text-align: center;
  color: var(--gold);
  margin: 0 0 3rem;
}

/* ---------- letter ---------- */
.letter {
  background: linear-gradient(180deg, var(--bg-alt), var(--bg));
}

.letter-body {
  font-family: var(--serif);
  font-size: clamp(1.15rem, 2.4vw, 1.4rem);
  line-height: 2;
  color: var(--cream);
  text-align: left;
}

.letter-body p {
  margin: 0 0 1.6rem;
}

.letter-body .signature {
  font-family: var(--script);
  font-size: 2rem;
  color: var(--rose);
  margin-top: 2.5rem;
  text-align: right;
}

/* ---------- gallery ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.9rem;
}

.gallery-grid figure {
  margin: 0;
  overflow: hidden;
  border-radius: 10px;
  aspect-ratio: 4 / 5;
  cursor: pointer;
  border: 1px solid rgba(217, 185, 138, 0.18);
  position: relative;
}

.gallery-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease, filter 0.6s ease;
  filter: saturate(0.92) brightness(0.94);
}

.gallery-grid figure:hover img {
  transform: scale(1.08);
  filter: saturate(1.05) brightness(1);
}

.gallery-grid figure::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  pointer-events: none;
}

/* lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(10, 6, 8, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.lightbox.open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox img {
  max-width: min(90vw, 720px);
  max-height: 82vh;
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.lightbox .close {
  position: absolute;
  top: 2rem;
  right: 2rem;
  color: var(--cream);
  font-size: 2rem;
  background: none;
  border: none;
  cursor: pointer;
  line-height: 1;
}

.lightbox .caption {
  position: absolute;
  bottom: 3rem;
  color: var(--muted);
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.1rem;
  text-align: center;
  width: 100%;
}

/* ---------- audio ---------- */
.audio-section {
  text-align: center;
  background: radial-gradient(ellipse at 50% 50%, rgba(201, 120, 122, 0.14), transparent 65%);
}

.audio-card {
  max-width: 480px;
  margin: 0 auto;
  border: 1px solid rgba(217, 185, 138, 0.25);
  border-radius: 18px;
  padding: 2.5rem 2rem;
  background: rgba(36, 20, 25, 0.6);
  backdrop-filter: blur(6px);
}

.audio-card p.hint {
  font-family: var(--serif);
  font-style: italic;
  color: var(--muted);
  margin-top: 0.5rem;
  font-size: 1.05rem;
}

.player {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1.75rem;
}

.play-btn {
  width: 56px;
  height: 56px;
  min-width: 56px;
  border-radius: 50%;
  border: 1px solid var(--rose);
  background: transparent;
  color: var(--rose);
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease, color 0.3s ease;
}

.play-btn:hover {
  background: var(--rose);
  color: var(--bg);
}

.track {
  flex: 1;
}

.seek {
  width: 100%;
  appearance: none;
  height: 4px;
  border-radius: 2px;
  background: rgba(246, 236, 226, 0.18);
  cursor: pointer;
  outline: none;
}

.seek::-webkit-slider-thumb {
  appearance: none;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--rose);
  cursor: pointer;
}

.seek::-moz-range-thumb {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--rose);
  border: none;
  cursor: pointer;
}

.time {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 0.4rem;
  font-variant-numeric: tabular-nums;
}

/* ---------- poem ---------- */
.poem-section {
  background: linear-gradient(180deg, var(--bg), var(--bg-alt));
}

.poem-title {
  font-family: var(--script);
  font-size: clamp(2rem, 5vw, 2.8rem);
  color: var(--rose);
  text-align: center;
  margin-bottom: 3.5rem;
}

.stanza {
  font-family: var(--serif);
  font-size: clamp(1.15rem, 2.6vw, 1.45rem);
  line-height: 1.9;
  text-align: center;
  color: var(--cream);
  margin-bottom: 2.6rem;
  font-style: italic;
}

.stanza p {
  margin: 0;
}

/* ---------- closing ---------- */
.closing {
  text-align: center;
  padding-bottom: 10rem;
}

.closing .word {
  font-family: var(--script);
  font-size: clamp(2.4rem, 8vw, 4.2rem);
  color: var(--rose);
  text-shadow: 0 0 40px rgba(232, 163, 160, 0.35);
}

.closing p {
  font-family: var(--serif);
  font-size: 1.2rem;
  color: var(--muted);
  margin-top: 1.5rem;
  font-style: italic;
}

.closing .names {
  margin-top: 3rem;
  font-family: var(--sans);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  font-size: 0.75rem;
  color: var(--gold);
}

@media (max-width: 560px) {
  section {
    padding: 5rem 1.25rem;
  }
}
