/* ═══════════════════════════════════════════
   sections.css — welcome, story, gallery,
   reasons, dreams, surprise, lightbox
   ═══════════════════════════════════════════ */

.experience { position: relative; z-index: 1; }
.experience.is-hidden { display: none; }

.section {
  position: relative;
  padding: var(--section-pad) clamp(1.25rem, 5vw, 3rem);
  max-width: 1080px;
  margin-inline: auto;
}

.section__header { text-align: center; margin-bottom: clamp(2.5rem, 8vw, 4.5rem); }

.section__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2rem, 7vw, 3.2rem);
  letter-spacing: 0.03em;
  background: linear-gradient(120deg, var(--white) 20%, var(--gold-bright) 50%, var(--white) 80%);
  background-size: 200%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 7s linear infinite;
}

.section__subtitle {
  margin-top: 0.7rem;
  color: var(--muted);
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1rem, 3.5vw, 1.2rem);
}

/* ═══════════ 1 · Welcome / Hero ═══════════ */
.section--hero {
  min-height: 100svh;
  max-width: none;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
}

.hero__inner { display: flex; flex-direction: column; align-items: center; gap: 1.4rem; }

.hero__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.5em;
  font-size: 0.78rem;
  color: var(--gold);
}

.hero__name {
  font-family: var(--font-script);
  font-weight: 400;
  font-size: clamp(4rem, 16vw, 8.5rem);
  line-height: 1.1;
  color: var(--white);
  text-shadow:
    0 0 30px rgba(212, 175, 106, 0.45),
    0 0 90px rgba(243, 198, 211, 0.3);
}

.hero__countdown {
  display: flex; gap: clamp(0.8rem, 4vw, 2rem);
  padding: 1rem clamp(1.2rem, 5vw, 2.4rem);
  font-variant-numeric: tabular-nums;
}
.hero__countdown .cd-unit { display: flex; flex-direction: column; align-items: center; min-width: 3ch; }
.hero__countdown .cd-num {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 6vw, 2.4rem);
  color: var(--gold-bright);
  line-height: 1.2;
}
.hero__countdown .cd-label {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  color: var(--muted);
}
.hero__countdown.is-birthday {
  font-family: var(--font-script);
  font-size: clamp(1.8rem, 7vw, 2.8rem);
  color: var(--gold-bright);
  text-shadow: 0 0 30px rgba(212, 175, 106, 0.5);
  animation: birthdayGlow 2.4s ease-in-out infinite alternate;
}
@keyframes birthdayGlow { to { text-shadow: 0 0 55px rgba(243, 198, 211, 0.85); } }

.hero__typewriter {
  min-height: 3.4em;
  max-width: 34ch;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.15rem, 4.5vw, 1.5rem);
  color: var(--muted);
}
.caret {
  display: inline-block;
  width: 1px; height: 1.1em;
  margin-left: 2px;
  vertical-align: text-bottom;
  background: var(--gold);
  animation: caretBlink 1s steps(1) infinite;
}
@keyframes caretBlink { 50% { opacity: 0; } }

.hero__scroll-cue {
  position: absolute;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 22px);
  left: 50%; transform: translateX(-50%);
  width: 24px; height: 40px;
  border: 1px solid var(--glass-border);
  border-radius: 14px;
}
.hero__scroll-cue span {
  position: absolute; left: 50%; top: 8px;
  width: 3px; height: 8px;
  margin-left: -1.5px;
  border-radius: 3px;
  background: var(--gold);
  animation: cueDrop 1.8s ease-in-out infinite;
}
@keyframes cueDrop {
  0% { transform: translateY(0); opacity: 0; }
  30% { opacity: 1; }
  100% { transform: translateY(14px); opacity: 0; }
}

/* ═══════════ 2 · Our Story / Timeline ═══════════ */
.timeline { position: relative; padding-left: 0; }
.timeline::before {
  content: "";
  position: absolute;
  left: 50%; top: 0; bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, transparent, var(--gold) 12%, var(--pink-deep) 88%, transparent);
  opacity: 0.55;
}

.memory {
  position: relative;
  width: calc(50% - 2.4rem);
  margin-bottom: clamp(2.5rem, 7vw, 4rem);
  padding: 1.4rem;
  transition-property: opacity, transform;
}
.memory:nth-child(odd)  { margin-right: auto; }
.memory:nth-child(even) { margin-left: auto; }

.memory::after {
  content: "";
  position: absolute;
  top: 2rem;
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(212, 175, 106, 0.2), 0 0 18px var(--gold);
}
.memory:nth-child(odd)::after  { right: -2.4rem; transform: translateX(50%); }
.memory:nth-child(even)::after { left: -2.4rem; transform: translateX(-50%); }

.memory__photo {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 14px;
  margin-bottom: 1rem;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.45);
}

.memory__date {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--gold);
}

.memory__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.35rem;
  margin: 0.35rem 0 0.4rem;
}

.memory__desc { color: var(--muted); font-size: 0.95rem; }

@media (max-width: 680px) {
  .timeline::before { left: 14px; }
  .memory,
  .memory:nth-child(odd),
  .memory:nth-child(even) {
    width: auto;
    margin-left: 2.6rem;
    margin-right: 0;
  }
  .memory:nth-child(odd)::after,
  .memory:nth-child(even)::after {
    left: -2.6rem; right: auto;
    transform: translateX(calc(-50% + 14.5px));
  }
}

/* ═══════════ 3 · Gallery / Polaroids ═══════════ */
.polaroids {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: clamp(1.4rem, 4vw, 2.6rem);
  justify-items: center;
}

.polaroid {
  width: min(260px, 100%);
  padding: 12px 12px 52px;
  background: #fdfbf7;
  border-radius: 4px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  transform: rotate(var(--tilt, -2deg));
  transition: transform 0.5s var(--ease-out), box-shadow 0.5s;
  position: relative;
}
.polaroid:nth-child(even) { --tilt: 2.4deg; }
.polaroid:nth-child(3n)   { --tilt: -1.2deg; }
.polaroid:hover, .polaroid:focus-visible {
  transform: rotate(0deg) translateY(-10px) scale(1.04);
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.6), 0 0 40px rgba(212, 175, 106, 0.15);
  z-index: 2;
}

.polaroid__img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: #e8e2d8;
}

.polaroid__caption {
  position: absolute;
  left: 0; right: 0; bottom: 14px;
  text-align: center;
  font-family: var(--font-script);
  font-size: 1.25rem;
  color: #4a4238;
  padding-inline: 10px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ═══════════ 4 · Reasons / Flip card ═══════════ */
.reasons__stage {
  display: flex; flex-direction: column; align-items: center; gap: 1.8rem;
}

.flip-card {
  width: min(400px, 88vw);
  height: 250px;
  perspective: 1200px;
  -webkit-tap-highlight-color: transparent;
}

.flip-card__inner {
  position: relative;
  display: block;
  width: 100%; height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.85s var(--ease-out);
}
.flip-card.is-flipped .flip-card__inner { transform: rotateY(180deg); }

.flip-card__face {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 0.8rem;
  padding: 1.8rem;
  border-radius: 24px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.flip-card__face--front {
  background: linear-gradient(150deg, rgba(212, 175, 106, 0.16), rgba(255, 255, 255, 0.04));
  border: 1px solid rgba(212, 175, 106, 0.4);
  box-shadow: var(--shadow);
}
.flip-card__num {
  font-family: var(--font-script);
  font-size: 3.4rem;
  color: var(--gold-bright);
  text-shadow: 0 0 26px rgba(212, 175, 106, 0.5);
}
.flip-card__prompt {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.35em;
  color: var(--muted);
}

.flip-card__face--back {
  transform: rotateY(180deg);
  background: linear-gradient(150deg, rgba(243, 198, 211, 0.14), rgba(255, 255, 255, 0.04));
  border: 1px solid rgba(243, 198, 211, 0.4);
  box-shadow: var(--shadow);
}
.flip-card__text {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.15rem, 4.5vw, 1.45rem);
  text-align: center;
  line-height: 1.5;
}

.reasons__nav { display: flex; align-items: center; gap: 1.2rem; }
.reasons__counter {
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  letter-spacing: 0.2em;
  font-size: 0.85rem;
}

/* ═══════════ 5 · Dreams ═══════════ */
.dreams__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
  gap: clamp(1.2rem, 3.5vw, 2rem);
}

.dream {
  padding: 2rem 1.6rem;
  text-align: center;
  animation: dreamFloat 6s ease-in-out infinite;
  animation-delay: var(--float-delay, 0s);
}
@keyframes dreamFloat { 50% { transform: translateY(-10px); } }

.dream__icon {
  display: inline-grid; place-items: center;
  width: 64px; height: 64px;
  font-size: 1.9rem;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(212, 175, 106, 0.3), rgba(212, 175, 106, 0.06));
  border: 1px solid rgba(212, 175, 106, 0.35);
  box-shadow: 0 0 26px rgba(212, 175, 106, 0.2);
  margin-bottom: 1.1rem;
  animation: iconBob 3.4s ease-in-out infinite;
  animation-delay: var(--float-delay, 0s);
}
@keyframes iconBob { 50% { transform: translateY(-6px) rotate(4deg); } }

.dream__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.3rem;
  margin-bottom: 0.4rem;
}
.dream__text { color: var(--muted); font-size: 0.92rem; }

/* ═══════════ 6 · Surprise ═══════════ */
.section--surprise {
  min-height: 100svh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding-bottom: calc(var(--section-pad) + 3rem);
}

.surprise__locked { padding: clamp(2.2rem, 7vw, 3.5rem); max-width: 480px; }
.surprise__gift {
  font-size: 3.2rem;
  margin-bottom: 1rem;
  animation: giftWiggle 2.6s ease-in-out infinite;
  filter: drop-shadow(0 0 24px rgba(212, 175, 106, 0.45));
}
@keyframes giftWiggle {
  0%, 100% { transform: rotate(0); }
  8% { transform: rotate(-7deg) scale(1.05); }
  16% { transform: rotate(6deg); }
  24% { transform: rotate(0); }
}
.surprise__locked .btn { margin-top: 1.8rem; }

.surprise__reveal {
  display: flex; flex-direction: column; align-items: center; gap: 1.6rem;
  animation: gateIn 1.2s var(--ease-out) both;
  width: 100%;
}

.surprise__wish {
  font-family: var(--font-script);
  font-size: clamp(2.8rem, 11vw, 5rem);
  background: linear-gradient(120deg, var(--gold-bright), var(--pink), var(--gold-bright));
  background-size: 200%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 4s linear infinite;
}

.surprise__cake-caption {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--muted);
}

/* Surprise video */
.surprise__video-wrap {
  position: relative;
  width: min(340px, 82vw);
  margin: 0 auto;
  animation: videoIn 1.1s var(--ease-out) both;
}
@keyframes videoIn {
  from { opacity: 0; transform: translateY(24px) scale(0.94); }
}

.surprise__video {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 20px;
  background: #0d0d18;
  border: 1px solid rgba(212, 175, 106, 0.45);
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.7),
    0 0 60px rgba(212, 175, 106, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Soft gold halo behind the frame */
.surprise__video-wrap::before {
  content: "";
  position: absolute;
  inset: -18%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 175, 106, 0.28), transparent 65%);
  filter: blur(30px);
  animation: dreamFloat 7s ease-in-out infinite;
}

.surprise__video-caption {
  margin-top: 0.9rem;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--muted);
}

/* Animated cake */
.cake { position: relative; width: 190px; height: 175px; margin-top: 1rem; }
.cake__plate {
  position: absolute; bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 200px; height: 14px;
  border-radius: 50%;
  background: linear-gradient(180deg, #dcd4c6, #a89e8c);
}
.cake__layer {
  position: absolute; left: 50%;
  transform: translateX(-50%);
  border-radius: 12px;
  box-shadow: inset 0 -8px 14px rgba(0, 0, 0, 0.25), inset 0 4px 8px rgba(255, 255, 255, 0.3);
}
.cake__layer--base {
  bottom: 10px; width: 170px; height: 56px;
  background: linear-gradient(180deg, #f3c6d3, #d998ae);
}
.cake__layer--mid {
  bottom: 62px; width: 132px; height: 48px;
  background: linear-gradient(180deg, #f7ead2, #dcc394);
}
.cake__layer--top {
  bottom: 106px; width: 96px; height: 40px;
  background: linear-gradient(180deg, #f3c6d3, #d998ae);
}
.cake__layer--top::after {
  content: "";
  position: absolute; inset: -4px 0 auto;
  height: 16px;
  background:
    radial-gradient(circle at 12% 100%, #fdfbf7 46%, transparent 50%),
    radial-gradient(circle at 38% 100%, #fdfbf7 46%, transparent 50%),
    radial-gradient(circle at 63% 100%, #fdfbf7 46%, transparent 50%),
    radial-gradient(circle at 88% 100%, #fdfbf7 46%, transparent 50%);
}
.cake__candle {
  position: absolute; bottom: 142px; left: 50%;
  transform: translateX(-50%);
  width: 9px; height: 30px;
  border-radius: 3px;
  background: repeating-linear-gradient(45deg, #f7f4ef 0 5px, var(--pink-deep) 5px 10px);
}
.cake__flame {
  position: absolute; top: -18px; left: 50%;
  transform: translateX(-50%);
  width: 12px; height: 18px;
  border-radius: 50% 50% 45% 55% / 65% 65% 35% 35%;
  background: radial-gradient(circle at 50% 75%, #fff8e0 10%, #ffd166 45%, #ff8f3d 80%);
  box-shadow: 0 0 22px 6px rgba(255, 190, 90, 0.55);
  animation: flameFlicker 0.35s ease-in-out infinite alternate;
  transform-origin: bottom center;
}
@keyframes flameFlicker {
  from { transform: translateX(-50%) scale(1) rotate(-2deg); }
  to   { transform: translateX(-52%) scale(1.12, 0.94) rotate(3deg); }
}

/* Letter */
.letter {
  max-width: 620px;
  width: 100%;
  padding: clamp(1.8rem, 6vw, 3rem);
  text-align: left;
  margin-top: 1rem;
}
.letter__title {
  font-family: var(--font-script);
  font-weight: 400;
  font-size: clamp(1.8rem, 7vw, 2.4rem);
  color: var(--gold-bright);
  margin-bottom: 1.2rem;
  text-align: center;
}
.letter__body {
  font-family: var(--font-display);
  font-size: clamp(1.08rem, 4vw, 1.24rem);
  line-height: 1.8;
}

.letter__block {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}
.letter__block.is-in { opacity: 1; transform: none; }

.letter__body p { margin: 0 0 1.1em; }
.letter__body strong { color: var(--gold-bright); font-weight: 600; }
.letter__body em { color: var(--pink); font-style: italic; }

.letter__heading {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.4rem, 5.5vw, 1.9rem);
  color: var(--gold-bright);
  text-align: center;
  margin: 0.4em 0 1em;
}

.letter__quote {
  margin: 1.4em 0;
  padding: 0.9em 1.3em;
  border-left: 2px solid var(--gold);
  border-radius: 0 12px 12px 0;
  background: rgba(212, 175, 106, 0.08);
  font-style: italic;
  font-size: 1.05em;
  color: var(--gold-bright);
}

/* The letter closes with a signature — give the last line room */
.letter__body .letter__block:last-child p { margin-bottom: 0; }

.surprise__signoff {
  margin-top: 1.6rem;
  font-size: 0.8rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ═══════════ Lightbox ═══════════ */
.lightbox {
  position: fixed; inset: 0; z-index: 80;
  display: flex; align-items: center; justify-content: center;
  padding: clamp(1rem, 5vw, 3rem);
  background: rgba(6, 6, 13, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  opacity: 0;
  transition: opacity 0.45s ease;
}
.lightbox.is-open { opacity: 1; }

.lightbox__figure {
  max-width: min(760px, 100%);
  text-align: center;
  transform: scale(0.92);
  transition: transform 0.45s var(--ease-out);
}
.lightbox.is-open .lightbox__figure { transform: scale(1); }

.lightbox__img {
  max-height: 74vh;
  width: auto; max-width: 100%;
  margin-inline: auto;
  border-radius: 10px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.8), 0 0 60px rgba(212, 175, 106, 0.12);
}

.lightbox__caption {
  margin-top: 1.2rem;
  font-family: var(--font-script);
  font-size: 1.6rem;
  color: var(--gold-bright);
}

.lightbox__close {
  position: absolute;
  top: calc(env(safe-area-inset-top, 0px) + 16px);
  right: 16px;
}
