:root {
  --cream: #faf6ef;
  --cream-deep: #f1e9db;
  --green: #3f5b45;
  --green-deep: #2c4331;
  --blush: #e8b4a8;
  --gold: #c9a24b;
  --ink: #2c2a26;
  --ink-soft: #6b6459;
  --shadow: 0 20px 50px rgba(44, 42, 38, 0.12);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  overflow-x: hidden;
}

h1, h2, .display {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 600;
}

a { color: inherit; }

/* ---------- Floating petals ---------- */
#petals {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.petal {
  position: absolute;
  top: -40px;
  font-size: 20px;
  opacity: 0.6;
  animation: fall linear infinite;
  will-change: transform;
}

@keyframes fall {
  to {
    transform: translateY(110vh) translateX(20px) rotate(360deg);
  }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6rem 1.5rem 4rem;
  background:
    radial-gradient(circle at 20% 20%, rgba(232, 180, 168, 0.25), transparent 55%),
    radial-gradient(circle at 80% 80%, rgba(63, 91, 69, 0.15), transparent 55%),
    var(--cream);
  z-index: 2;
}

.hero .eyebrow {
  letter-spacing: 0.35em;
  text-transform: uppercase;
  font-size: 0.75rem;
  color: var(--green);
  margin-bottom: 1.25rem;
  font-weight: 600;
}

.hero h1 {
  font-size: clamp(2.6rem, 8vw, 5.5rem);
  margin: 0;
  line-height: 1.05;
  color: var(--green-deep);
}

.hero h1 em {
  font-style: italic;
  color: var(--blush);
}

.hero .sub {
  margin-top: 1.5rem;
  max-width: 34rem;
  font-size: 1.15rem;
  color: var(--ink-soft);
  line-height: 1.6;
}

.divider {
  width: 60px;
  height: 3px;
  background: var(--gold);
  border-radius: 3px;
  margin: 2rem 0;
}

.scroll-cue {
  position: absolute;
  bottom: 2.2rem;
  font-size: 0.85rem;
  color: var(--ink-soft);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  animation: bob 2.2s ease-in-out infinite;
}

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

/* ---------- Sections ---------- */
section {
  position: relative;
  z-index: 2;
  padding: 6rem 1.5rem;
  max-width: 900px;
  margin: 0 auto;
}

.section-title {
  text-align: center;
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  color: var(--green-deep);
  margin-bottom: 0.75rem;
}

.section-kicker {
  text-align: center;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  font-size: 0.7rem;
  color: var(--gold);
  font-weight: 700;
  margin-bottom: 1rem;
}

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

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Letter ---------- */
.letter {
  background: #fff;
  border-radius: 28px;
  padding: clamp(2rem, 6vw, 4rem);
  box-shadow: var(--shadow);
  border: 1px solid rgba(63, 91, 69, 0.08);
  position: relative;
}

.letter::before {
  content: "\201C";
  position: absolute;
  top: -0.5rem;
  left: 1.5rem;
  font-family: 'Playfair Display', serif;
  font-size: 7rem;
  color: var(--blush);
  opacity: 0.5;
  line-height: 1;
}

.letter p {
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  line-height: 1.85;
  color: var(--ink);
  margin: 0 0 1.4rem;
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 400;
}

.letter p.highlight {
  color: var(--green-deep);
  font-style: italic;
  font-weight: 600;
}

.signature {
  margin-top: 2.5rem;
  text-align: right;
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 1.3rem;
  color: var(--green);
}

/* ---------- Gallery ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-top: 3rem;
}

.gallery figure {
  margin: 0;
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  box-shadow: var(--shadow);
  cursor: pointer;
  background: linear-gradient(135deg, var(--cream-deep), #fff);
}

.gallery figure:nth-child(even) {
  transform: translateY(1.5rem);
}

.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease;
}

.gallery figure:hover img {
  transform: scale(1.06);
}

.gallery figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 1.4rem 1.1rem 1rem;
  background: linear-gradient(to top, rgba(20, 24, 20, 0.75), transparent);
  color: #fff;
  font-size: 0.95rem;
  font-family: 'Playfair Display', serif;
  font-style: italic;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.gallery figure:hover figcaption {
  opacity: 1;
  transform: translateY(0);
}

.placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  color: var(--green);
  text-align: center;
  padding: 1rem;
}

.placeholder .icon { font-size: 2.2rem; }
.placeholder .label {
  font-size: 0.75rem;
  color: var(--ink-soft);
  line-height: 1.4;
}
.placeholder code {
  background: rgba(63, 91, 69, 0.08);
  padding: 0.1rem 0.4rem;
  border-radius: 6px;
  font-size: 0.7rem;
}

@media (max-width: 900px) {
  .gallery { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 620px) {
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .gallery figure:nth-child(even) { transform: none; }
}

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

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

.lightbox img {
  max-width: min(90vw, 720px);
  max-height: 82vh;
  border-radius: 16px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.5);
}

.lightbox .lightbox-cap {
  position: absolute;
  bottom: 3rem;
  color: #f4ede1;
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 1.1rem;
  text-align: center;
}

.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 2rem;
  color: #fff;
  font-size: 2rem;
  background: none;
  border: none;
  cursor: pointer;
  line-height: 1;
}

/* ---------- Footer / candle ---------- */
.finale {
  text-align: center;
  padding-bottom: 6rem;
}

.candles {
  font-size: 2.4rem;
  margin: 1.5rem 0;
  letter-spacing: 0.4rem;
}

.love-note {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: clamp(1.4rem, 3vw, 2rem);
  color: var(--green-deep);
  max-width: 30rem;
  margin: 0 auto 2rem;
  line-height: 1.5;
}

.duet {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 2.5rem;
}

.duet span {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.3rem, 3vw, 1.7rem);
  color: var(--ink-soft);
}

.duet .reply {
  color: var(--gold);
  font-style: italic;
  font-weight: 600;
  font-size: clamp(1.6rem, 3.6vw, 2.1rem);
}

.heart-btn {
  border: 2px solid var(--green);
  background: transparent;
  color: var(--green-deep);
  padding: 0.9rem 2.2rem;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease, transform 0.2s ease;
}

.heart-btn:hover {
  background: var(--green);
  color: #fff;
  transform: translateY(-2px);
}

footer {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 2rem 1.5rem 3rem;
  color: var(--ink-soft);
  font-size: 0.85rem;
}
