/* ============================================================
   STYLE.CSS  (v3 — premium polish)
   Design tokens, clamp-based typography, layout, and all
   component styling. Keyframes → css/animations.css.
   Breakpoints → css/responsive.css.
   ============================================================ */

:root {
  /* palette */
  --night-deep: #0E0A1A;
  --night: #1B1230;
  --night-soft: #241A38;
  --cream: #FFF8F4;
  --blush: #FCE4EC;
  --blush-deep: #F6C9D8;
  --rose: #E893AE;
  --rose-gold: #C98A93;
  --gold: #D9A66C;
  --gold-soft: #F0D9B5;
  --plum: #4A2536;
  --plum-soft: #7A5364;
  --white: #FFFFFF;

  /* spacing */
  --space-xs: clamp(6px, 1vw, 10px);
  --space-sm: clamp(10px, 1.5vw, 16px);
  --space-md: clamp(16px, 2.5vw, 26px);
  --space-lg: clamp(24px, 4vw, 48px);
  --space-xl: clamp(40px, 6vw, 80px);

  /* type scale */
  --text-xs: clamp(11px, 1.2vw, 13px);
  --text-sm: clamp(13px, 1.5vw, 15px);
  --text-base: clamp(15px, 1.8vw, 18px);
  --text-lg: clamp(17px, 2.2vw, 22px);
  --text-xl: clamp(20px, 2.8vw, 28px);
  --text-2xl: clamp(24px, 3.6vw, 34px);
  --text-3xl: clamp(28px, 5vw, 48px);
  --text-hero: clamp(38px, 8vw, 84px);

  --radius: 20px;
  --radius-sm: 12px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
}

/* ---- Reset ---- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Quicksand', sans-serif;
  background: var(--cream);
  color: var(--plum);
  line-height: 1.6;
  font-size: var(--text-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
.serif {
  font-family: 'Cormorant Garamond', serif;
}

.handwriting {
  font-family: 'Caveat', cursive;
}

img,
video {
  max-width: 100%;
  display: block;
}

button {
  font-family: inherit;
}

::selection {
  background: var(--rose);
  color: #fff;
}

/* ============================================================
   SHARED — GLASS CARD
   ============================================================ */
.glass {
  background: rgba(255, 255, 255, 0.58);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(201, 138, 147, 0.18),
    0 2px 8px rgba(201, 138, 147, 0.10);
  transition: box-shadow .3s var(--ease), transform .3s var(--ease);
}

.glass:hover {
  box-shadow: 0 16px 48px rgba(201, 138, 147, 0.28),
    0 4px 12px rgba(201, 138, 147, 0.14);
}

.dark .glass,
.glass-dark {
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  color: var(--cream);
}

/* ============================================================
   SHARED — BUTTON  (premium micro-interactions)
   ============================================================ */
.btn {
  font-family: 'Quicksand', sans-serif;
  font-weight: 600;
  font-size: var(--text-sm);
  padding: clamp(10px, 1.5vw, 14px) clamp(22px, 3vw, 34px);
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, var(--rose), var(--gold));
  color: #fff;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  box-shadow: 0 4px 16px rgba(233, 147, 174, 0.38),
    0 1px 4px rgba(233, 147, 174, 0.20);
  transition:
    transform .28s var(--ease-spring),
    box-shadow .28s var(--ease),
    filter .28s var(--ease);
  white-space: nowrap;
  letter-spacing: 0.02em;
  will-change: transform;
}

/* Shimmer overlay */
.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.28) 50%, transparent 60%);
  transform: translateX(-100%);
  transition: transform .55s ease;
  z-index: 1;
  pointer-events: none;
}

.btn:hover::before {
  transform: translateX(100%);
}

.btn:hover {
  transform: translateY(-4px) scale(1.04);
  box-shadow: 0 12px 36px rgba(233, 147, 174, 0.55),
    0 4px 14px rgba(217, 166, 108, 0.30);
  filter: brightness(1.06);
}

.btn:active {
  transform: translateY(1px) scale(0.97);
  box-shadow: 0 3px 10px rgba(233, 147, 174, 0.35);
  transition-duration: .12s;
}

.btn:focus-visible,
button:focus-visible,
[tabindex]:focus-visible,
input:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

/* ============================================================
   SHARED — EYEBROW / HINTS
   ============================================================ */
.eyebrow {
  font-size: var(--text-xs);
  letter-spacing: 3.5px;
  text-transform: uppercase;
  color: var(--rose-gold);
  margin-bottom: var(--space-sm);
  font-weight: 700;
}

.hint {
  font-size: var(--text-xs);
  color: var(--rose-gold);
  margin-top: 8px;
  opacity: .85;
}

.section-note {
  font-size: var(--text-xs);
  color: var(--rose-gold);
  margin-top: 14px;
  opacity: .85;
}

/* ============================================================
   SECTION SHELL
   ============================================================ */
.section {
  min-height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-xl) var(--space-md);
  position: relative;
  overflow: hidden;
}

.section.alt {
  background: var(--blush);
}

.section.dark {
  background: radial-gradient(ellipse at 50% 20%, var(--night) 0%, var(--night-deep) 70%);
  color: #F2E9F5;
}

.section.dark .eyebrow {
  color: var(--gold);
}

.section.dark .hint,
.section.dark .section-note {
  color: rgba(255, 248, 244, .65);
}

.section>* {
  position: relative;
  z-index: 2;
}

.section h2 {
  font-size: var(--text-3xl);
  margin-bottom: var(--space-md);
}

/* ============================================================
   AMBIENT CANVAS
   ============================================================ */
#ambient-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* ============================================================
   MAIN SITE lock / unlock
   ============================================================ */
#main-site {
  opacity: 0;
  pointer-events: none;
  transition: opacity 1.6s var(--ease);
}

#main-site.unlocked {
  opacity: 1;
  pointer-events: auto;
}

body.locked {
  overflow: hidden;
  height: 100vh;
}

/* ============================================================
   PREMIUM FLOATING MUSIC PLAYER (bottom-right)
   ============================================================ */
.premium-player {
  position: fixed;
  bottom: clamp(14px, 2vh, 22px);
  right: clamp(14px, 2vw, 22px);
  z-index: 900;
  width: clamp(200px, 30vw, 280px);
  border-radius: 18px;
  background: rgba(14, 10, 26, 0.72);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border: 1px solid rgba(217, 166, 108, 0.28);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.40),
    0 0 40px rgba(217, 166, 108, 0.10);
  padding: clamp(10px, 1.5vw, 14px);
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition:
    opacity .6s ease,
    transform .6s var(--ease, cubic-bezier(.22, 1, .36, 1)),
    box-shadow .3s ease;
  animation: playerFloat 5s ease-in-out infinite;
}

.premium-player.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.premium-player:hover {
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.50),
    0 0 60px rgba(217, 166, 108, 0.18);
}

@keyframes playerFloat {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-4px);
  }
}

/* Row layout */
.pp-row {
  display: flex;
  align-items: center;
  gap: clamp(6px, 1vw, 10px);
}

/* Buttons */
.pp-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: clamp(16px, 2.5vw, 22px);
  color: var(--cream, #FFF8F4);
  transition: transform .22s var(--ease-spring, cubic-bezier(.34, 1.56, .64, 1)),
    filter .22s ease;
  flex-shrink: 0;
  line-height: 1;
  padding: 2px;
}

.pp-btn:hover {
  transform: scale(1.2);
  filter: drop-shadow(0 0 6px rgba(217, 166, 108, 0.5));
}

.pp-btn:active {
  transform: scale(0.92);
  transition-duration: .1s;
}

/* Toggle play/pause — slightly larger */
.pp-toggle {
  font-size: clamp(18px, 3vw, 26px);
}

/* Info (icon + title) */
.pp-info {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  overflow: hidden;
}

.pp-icon {
  font-size: 14px;
  flex-shrink: 0;
  transition: transform .3s ease;
}

/* Animated bounce when playing */
.premium-player.playing .pp-icon {
  animation: ppIconBounce 1s ease-in-out infinite;
}

@keyframes ppIconBounce {

  0%,
  100% {
    transform: translateY(0) scale(1);
  }

  50% {
    transform: translateY(-2px) scale(1.15);
  }
}

.pp-title {
  font-family: 'Quicksand', sans-serif;
  font-size: clamp(10px, 1.3vw, 12px);
  color: rgba(255, 248, 244, 0.65);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Volume slider */
.pp-volume {
  width: clamp(40px, 6vw, 56px);
  accent-color: var(--gold, #D9A66C);
  cursor: pointer;
  height: 3px;
}

/* Progress bar */
.pp-progress {
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.10);
  border-radius: 2px;
  margin-top: 8px;
  cursor: pointer;
  overflow: hidden;
  position: relative;
}

.pp-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--rose, #E893AE), var(--gold, #D9A66C));
  border-radius: 2px;
  transition: width .15s linear;
}

/* Mobile: ultra compact */
@media (max-width: 600px) {
  .premium-player {
    width: clamp(160px, 50vw, 220px);
    padding: 8px 10px;
    border-radius: 14px;
  }

  .pp-volume {
    display: none;
  }

  .pp-title {
    font-size: 10px;
  }
}

@media (max-width: 360px) {
  .premium-player {
    width: clamp(140px, 55vw, 180px);
  }

  .pp-title {
    display: none;
  }
}

/* ============================================================
   SCENE 0a — CINEMATIC OPENING
   ============================================================ */
#scene-opening {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: radial-gradient(ellipse at 50% 25%, #241638 0%, var(--night-deep) 75%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--cream);
  text-align: center;
  padding: var(--space-md);
  transition: opacity 1.3s ease, visibility 1.3s ease;
}

#scene-opening.hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

#opening-stars,
#opening-fireflies {
  position: absolute;
  inset: 0;
}

.moonlight {
  position: absolute;
  top: -10%;
  left: 50%;
  transform: translateX(-50%);
  width: clamp(260px, 60vw, 520px);
  height: clamp(260px, 60vw, 520px);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(240, 217, 181, 0.16), transparent 70%);
}

.opening-text {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: var(--text-xl);
  max-width: 600px;
  opacity: 0;
  transition: opacity 1.5s ease;
  position: relative;
  z-index: 2;
  margin-bottom: var(--space-lg);
  text-shadow: 0 2px 20px rgba(240, 217, 181, 0.2);
}

.opening-text.show {
  opacity: 1;
}

.opening-heart {
  font-size: clamp(44px, 8vw, 60px);
  cursor: pointer;
  opacity: 0;
  transition: opacity 1s ease, transform .3s var(--ease-spring);
  position: relative;
  z-index: 2;
  filter: drop-shadow(0 0 24px rgba(233, 147, 174, 0.5));
}

.opening-heart.show {
  opacity: 1;
}

.opening-heart:hover {
  transform: scale(1.12);
  filter: drop-shadow(0 0 36px rgba(233, 147, 174, 0.75));
}

.opening-heart:active {
  transform: scale(0.96);
  transition-duration: .1s;
}

.opening-hint {
  font-size: var(--text-xs);
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(255, 248, 244, 0.45);
  margin-top: 16px;
  opacity: 0;
  transition: opacity 1s ease;
  animation: breathe 3s ease-in-out infinite;
}

.opening-hint.show {
  opacity: 1;
}

/* ============================================================
   SCENE 0b — MAGICAL DOOR
   ============================================================ */
#scene-door {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: radial-gradient(ellipse at 50% 40%, #2A1B40 0%, var(--night-deep) 75%);
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: var(--cream);
  text-align: center;
  padding: var(--space-md);
  perspective: 1400px;
  transition: opacity 1.1s ease, visibility 1.1s ease;
}

#scene-door.active {
  display: flex;
}

#scene-door.hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

#door-petals {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.petal {
  position: absolute;
  top: -8%;
  font-size: 16px;
  opacity: 0.7;
}

.door-frame {
  position: relative;
  width: clamp(160px, 30vw, 340px);
  height: clamp(240px, 45vw, 480px);
  display: flex;
  z-index: 2;
  cursor: pointer;
  transition: filter .3s ease;
}

.door-frame:hover {
  filter: drop-shadow(0 0 28px rgba(217, 166, 108, 0.45));
}

.door-panel {
  width: 50%;
  height: 100%;
  background: linear-gradient(160deg, #8A4060, #3E1F33);
  border: 2px solid var(--gold);
  box-shadow: inset 0 0 40px rgba(217, 166, 108, 0.20),
    0 0 50px rgba(217, 166, 108, 0.18);
  position: relative;
  transition: box-shadow .3s ease;
}

.door-panel-left {
  border-radius: 12px 0 0 12px;
  border-right: 1px solid rgba(217, 166, 108, 0.4);
}

.door-panel-right {
  border-radius: 0 12px 12px 0;
  border-left: 1px solid rgba(217, 166, 108, 0.4);
}

.door-ornament {
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(217, 166, 108, 0.50);
  border-radius: 8px;
}

.door-handle {
  position: absolute;
  top: 50%;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--gold-soft), var(--gold));
  transform: translateY(-50%);
  box-shadow: 0 0 8px rgba(217, 166, 108, 0.6);
}

.door-panel-left .door-handle {
  right: 14px;
}

.door-panel-right .door-handle {
  left: 14px;
}

.door-light {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff, var(--gold-soft) 40%, transparent 70%);
  opacity: 0;
  z-index: 5;
  pointer-events: none;
}

.door-light.burst {
  opacity: 1;
}

#door-title {
  margin-top: var(--space-md);
  font-size: var(--text-lg);
  font-style: italic;
  text-shadow: 0 2px 16px rgba(217, 166, 108, 0.35);
}

#door-hint {
  font-size: var(--text-xs);
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255, 248, 244, 0.45);
  margin-top: 10px;
}

/* ============================================================
   SCENE 0c — PASSWORD GATE
   ============================================================ */
#scene-password {
  position: fixed;
  inset: 0;
  z-index: 9997;
  background: radial-gradient(ellipse at 50% 30%, #2A1B40 0%, var(--night-deep) 75%);
  display: none;
  align-items: center;
  justify-content: center;
  color: var(--cream);
  text-align: center;
  padding: var(--space-md);
  transition: opacity 1.1s ease, visibility 1.1s ease;
}

#scene-password.active {
  display: flex;
}

#scene-password.hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

#scene-password .glass {
  padding: clamp(28px, 4vw, 44px) clamp(24px, 4vw, 40px);
  max-width: 440px;
  width: 100%;
}

#scene-password h2 {
  font-size: var(--text-xl);
  font-style: italic;
  margin-bottom: var(--space-md);
}

.password-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.password-form input {
  padding: clamp(10px, 1.5vw, 13px) clamp(14px, 2vw, 20px);
  border-radius: 999px;
  border: 1px solid rgba(217, 166, 108, 0.45);
  font-family: 'Quicksand';
  font-size: var(--text-sm);
  min-width: clamp(150px, 30vw, 190px);
  background: rgba(255, 255, 255, 0.08);
  color: var(--cream);
  transition: border-color .25s ease, box-shadow .25s ease;
}

.password-form input:focus {
  outline: none;
  border-color: rgba(217, 166, 108, 0.8);
  box-shadow: 0 0 0 3px rgba(217, 166, 108, 0.18);
}

.password-form input::placeholder {
  color: rgba(255, 248, 244, 0.4);
}

#password-feedback {
  margin-top: 16px;
  font-size: var(--text-sm);
  color: var(--gold-soft);
  min-height: 20px;
}

.unlock-glow {
  position: fixed;
  inset: 0;
  margin: auto;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff, var(--gold-soft) 45%, transparent 70%);
  z-index: 10001;
  pointer-events: none;
  opacity: 0;
}

/* ============================================================
   SECTION 1 — HERO
   ============================================================ */
#hero-balloons {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero-balloon {
  position: absolute;
  font-size: clamp(28px, 5vw, 40px);
  opacity: 0.82;
  filter: drop-shadow(0 4px 12px rgba(233, 147, 174, 0.35));
}

.hero-title {
  font-size: var(--text-hero);
  line-height: 1.05;
  margin-bottom: var(--space-sm);
  text-shadow: 0 2px 32px rgba(201, 138, 147, 0.18);
}

.hero-sub {
  font-size: var(--text-base);
  color: var(--plum-soft);
  max-width: 520px;
  margin: 0 auto var(--space-lg);
  line-height: 1.7;
}

.cake-wrap {
  position: relative;
  width: clamp(160px, 28vw, 220px);
  margin: 0 auto var(--space-sm);
}

.cake {
  font-size: clamp(70px, 14vw, 100px);
  filter: drop-shadow(0 8px 24px rgba(233, 147, 174, 0.25));
}

.candle {
  position: absolute;
  top: -38px;
  font-size: clamp(18px, 3.5vw, 26px);
  cursor: pointer;
  transition: opacity .4s ease, transform .35s var(--ease-spring);
}

.candle:hover {
  transform: scale(1.18) translateY(-3px);
}

.candle.out {
  opacity: 0.3;
  transform: translateY(6px);
}

.flame {
  display: inline-block;
  animation: flicker 0.4s ease-in-out infinite alternate;
}

.candle.out .flame {
  display: none;
}

/* ============================================================
   SECTION 2 — TYPED INTRO
   ============================================================ */
#typed-intro-text {
  font-size: var(--text-2xl);
  font-style: italic;
  max-width: 640px;
  text-shadow: 0 1px 12px rgba(74, 37, 54, 0.08);
}

/* ============================================================
   SECTION 3 — GIFT ROOM
   ============================================================ */
.gift-room-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(clamp(90px, 14vw, 120px), 1fr));
  gap: clamp(12px, 2vw, 20px);
  max-width: 820px;
  margin: 0 auto;
  width: 100%;
}

.gift-item {
  font-size: clamp(44px, 8vw, 64px);
  cursor: pointer;
  padding: clamp(10px, 1.5vw, 16px);
  border-radius: 18px;
  transition: transform .3s var(--ease-spring),
    box-shadow .3s var(--ease),
    background .3s ease;
  user-select: none;
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.55);
}

.gift-item:hover {
  transform: translateY(-8px) scale(1.10) rotate(2deg);
  box-shadow: 0 16px 36px rgba(201, 138, 147, 0.40);
  background: rgba(255, 255, 255, 0.72);
}

.gift-item:active {
  transform: translateY(-2px) scale(1.02);
  transition-duration: .12s;
}

.gift-item.opened {
  opacity: 0.5;
  pointer-events: none;
  filter: grayscale(0.3);
}

/* Modals */
.gift-reveal-modal,
.thankyou-modal {
  position: fixed;
  inset: 0;
  background: rgba(14, 10, 26, 0.76);
  z-index: 2500;
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
}

.gift-reveal-modal.show,
.thankyou-modal.show {
  display: flex;
}

.gift-reveal-inner {
  background: linear-gradient(160deg, #fff 0%, #fffaf8 100%);
  max-width: clamp(280px, 90vw, 440px);
  width: 100%;
  border-radius: 24px;
  padding: clamp(20px, 4vw, 36px);
  text-align: center;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 32px 80px rgba(74, 37, 54, 0.28),
    0 0 0 1px rgba(255, 255, 255, 0.8),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

/* Gift modal image — full image visible, no cropping */
.gift-modal-image-wrap {
  position: relative;
  width: 100%;
  max-height: clamp(180px, 35vh, 280px);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 16px;
  background: #f8f0f4;
  box-shadow: 0 12px 32px rgba(201, 138, 147, 0.30);
  /* Height is driven by the img inside */
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Blurred background fill — hides letterbox bars elegantly */
.gift-modal-image-blur {
  position: absolute;
  inset: -4px;
  /* slightly oversize to hide blur edges */
  background-size: cover;
  background-position: center;
  filter: blur(18px) brightness(0.60) saturate(1.2);
  transform: scale(1.06);
  pointer-events: none;
  z-index: 0;
}

/* Actual image — object-fit:contain so every pixel is visible */
.gift-modal-image {
  position: relative;
  z-index: 1;
  width: 100%;
  max-height: clamp(180px, 35vh, 280px);
  object-fit: contain;
  object-position: center;
  border-radius: 14px;
  display: block;
}

.gift-modal-audio {
  width: 100%;
  margin-bottom: 14px;
  accent-color: var(--rose-gold);
}

#gift-modal-label {
  font-size: var(--text-xs);
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--rose-gold);
  margin-bottom: 10px;
}

#gift-modal-content {
  font-size: var(--text-lg);
  font-style: italic;
  line-height: 1.75;
  color: var(--plum);
}

#gift-modal-icon {
  font-size: clamp(38px, 6vw, 54px);
  margin-bottom: 14px;
  animation: gentleBounce 2s ease-in-out infinite;
}

/* ============================================================
   SECTION 4 — MEMORY CINEMA
   ============================================================ */
.cinema-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.cinema-bg-blobs {
  position: absolute;
  inset: 0;
}

.cinema-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  animation: blobDrift var(--anim-dur, 14s) ease-in-out infinite alternate;
}

.cinema-particles-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* Cinema loading shimmer */
.cinema-frame {
  position: relative;
  width: 100%;
  max-width: clamp(300px, 90vw, 800px);
  height: clamp(220px, 45vw, 480px);
  margin: 0 auto;
  border-radius: 20px;
  overflow: hidden;
  background: #0a0614;
  box-shadow:
    0 32px 80px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 0 60px rgba(201, 138, 147, 0.12);
  transition: box-shadow .4s var(--ease);
}

.cinema-frame:hover {
  box-shadow:
    0 40px 100px rgba(0, 0, 0, 0.65),
    0 0 0 1px rgba(255, 255, 255, 0.12),
    0 0 80px rgba(201, 138, 147, 0.18);
}

/* Slides */
.cinema-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  transition: opacity 1.2s ease;
}

.cinema-slide.active {
  opacity: 1;
}

.cinema-slide.entering {
  animation: cinemaEnter 1.2s var(--ease) both;
}

.cinema-slide .bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--rose-gold), var(--night));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(60px, 12vw, 90px);
  background-size: cover;
  background-position: center;
  will-change: transform;
}

/* Ken Burns on the blurred background, not the actual photo */
.cinema-slide.active .cinema-bg-blur {
  animation: kenBurnsPremium 12s ease-in-out both;
}

/* Blurred background fill layer — hides letterbox bars */
.cinema-bg-blur {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(22px) brightness(0.55) saturate(1.2);
  transform: scale(1.08);
  /* prevent blur edge artifacts */
  will-change: transform;
}

/* Actual photo — object-fit:contain so full image is visible */
.cinema-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  z-index: 1;
  display: block;
}

.cinema-slide video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Caption — slide in from bottom */
.cinema-caption {
  position: relative;
  z-index: 2;
  color: #fff;
  padding: clamp(20px, 3vw, 32px);
  font-family: 'Cormorant Garamond';
  font-size: var(--text-lg);
  font-style: italic;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.78) 0%, rgba(0, 0, 0, 0.32) 60%, transparent 100%);
  width: 100%;
  text-align: left;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .7s ease .5s, transform .7s var(--ease) .5s;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
}

.cinema-slide.active .cinema-caption {
  opacity: 1;
  transform: translateY(0);
}

/* Cinema nav */
.cinema-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: rgba(14, 10, 26, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  width: clamp(38px, 5vw, 52px);
  height: clamp(38px, 5vw, 52px);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #fff;
  font-size: clamp(22px, 3.5vw, 30px);
  font-weight: 300;
  line-height: 1;
  transition: background .25s ease, transform .25s var(--ease-spring), box-shadow .25s ease;
  user-select: none;
}

.cinema-nav:hover {
  background: rgba(233, 147, 174, 0.30);
  transform: translateY(-50%) scale(1.12);
  box-shadow: 0 0 20px rgba(233, 147, 174, 0.35);
}

.cinema-nav:active {
  transform: translateY(-50%) scale(0.94);
  transition-duration: .1s;
}

.cinema-nav-prev {
  left: clamp(8px, 2vw, 16px);
}

.cinema-nav-next {
  right: clamp(8px, 2vw, 16px);
}

/* Cinema dots */
.cinema-dots {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 18px;
}

.cinema-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.28);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background .35s ease, transform .35s var(--ease-spring), width .35s var(--ease);
}

.cinema-dot:hover {
  background: rgba(255, 255, 255, 0.55);
  transform: scale(1.3);
}

.cinema-dot.active {
  background: var(--gold);
  transform: scale(1.5);
  width: 22px;
  border-radius: 4px;
}

/* ============================================================
   SECTION 4b — SHORT CLIPS
   ============================================================ */
.clips-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.clips-bg-petals {
  position: absolute;
  inset: 0;
}

.clips-particles-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.clips-container {
  position: relative;
  width: 100%;
  max-width: clamp(300px, 90vw, 860px);
  display: flex;
  align-items: center;
  gap: clamp(8px, 2vw, 18px);
  margin: var(--space-sm) auto 0;
}

.clips-track {
  flex: 1;
  position: relative;
  min-height: clamp(200px, 40vw, 480px);
}

.clip-card {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity .7s var(--ease);
}

.clip-card.active {
  opacity: 1;
  pointer-events: auto;
  position: relative;
}

.clip-video-wrap {
  border-radius: clamp(14px, 2vw, 20px);
  overflow: hidden;
  background: var(--night-deep);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.60),
    0 4px 16px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.06);
  aspect-ratio: 16/9;
  width: 100%;
  transition: box-shadow .35s var(--ease), transform .35s var(--ease);
}

.clip-video-wrap:hover {
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.68),
    0 6px 20px rgba(0, 0, 0, 0.40),
    0 0 60px rgba(201, 138, 147, 0.14);
  transform: scale(1.01);
}

.clip-video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #000;
}

.clip-title {
  margin-top: var(--space-xs);
  font-size: var(--text-sm);
  font-style: italic;
  color: var(--gold-soft);
  text-align: center;
  font-family: 'Cormorant Garamond', serif;
}

/* Clips nav */
.clips-nav {
  flex-shrink: 0;
  width: clamp(38px, 5vw, 52px);
  height: clamp(38px, 5vw, 52px);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: clamp(22px, 3.5vw, 30px);
  font-weight: 300;
  color: #fff;
  background: rgba(14, 10, 26, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  transition: background .25s ease, transform .25s var(--ease-spring), box-shadow .25s ease;
  user-select: none;
}

.clips-nav:hover {
  background: rgba(233, 147, 174, 0.30);
  transform: scale(1.12);
  box-shadow: 0 0 20px rgba(233, 147, 174, 0.35);
}

.clips-nav:active {
  transform: scale(0.92);
  transition-duration: .1s;
}

/* Clips dots */
.clips-dots {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: var(--space-sm);
}

.clips-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.28);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background .35s ease, transform .35s var(--ease-spring), width .35s var(--ease);
}

.clips-dot:hover {
  background: rgba(255, 255, 255, 0.55);
  transform: scale(1.3);
}

.clips-dot.active {
  background: var(--gold);
  transform: scale(1.5);
  width: 22px;
  border-radius: 4px;
}

/* ============================================================
   SECTION 5 — FLOWER GARDEN
   ============================================================ */
#garden-field {
  position: relative;
  width: 100%;
  max-width: clamp(300px, 90vw, 760px);
  height: clamp(260px, 40vw, 400px);
  margin: 0 auto;
  border-radius: 22px;
  background: linear-gradient(180deg, #d4edda 0%, #a8d5b5 50%, #7cb897 100%);
  overflow: hidden;
  cursor: crosshair;
  box-shadow: 0 16px 48px rgba(74, 37, 54, 0.15),
    inset 0 -4px 20px rgba(0, 0, 0, 0.08);
  transition: box-shadow .3s var(--ease);
}

#garden-field:hover {
  box-shadow: 0 20px 60px rgba(74, 37, 54, 0.20),
    inset 0 -4px 20px rgba(0, 0, 0, 0.10);
}

/* TASK 2 FIX: flowers NEVER fade — bloom spring animation runs once,
   then wind-sway takes over via JS. No opacity animation, no removal. */
.flower {
  position: absolute;
  font-size: clamp(20px, 3.5vw, 28px);
  transform: scale(0);
  animation: bloomPremium .6s var(--ease-spring) forwards;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.15));
  cursor: default;
  /* IMPORTANT: no fade-out. transform is held at scale(1) after bloom. */
}

/* When JS adds .swaying, override to windSway. Bloom has already
   run + its transform is "overwritten" by sway, then removed. */
.flower.swaying {
  animation: windSway .85s ease-in-out;
}

.flower-sparkle {
  position: absolute;
  font-size: clamp(10px, 2vw, 14px);
  pointer-events: none;
  animation: sparkleFloat 1.2s var(--ease) forwards;
  z-index: 10;
}

.flower-glow {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 200, 120, 0.6), transparent 70%);
  pointer-events: none;
  animation: glowPulseOut 1s ease forwards;
}

.butterfly {
  position: absolute;
  font-size: clamp(16px, 3vw, 22px);
  animation: flutter 6s ease-in-out infinite;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.15));
}

.bird {
  position: absolute;
  font-size: clamp(16px, 3vw, 20px);
  top: 10%;
  animation: birdGlide 10s linear forwards;
}

#garden-progress {
  font-size: var(--text-xs);
  color: var(--rose-gold);
  margin-top: 14px;
  letter-spacing: 0.5px;
}

/* ============================================================
   SECTION 6 — LETTER
   ============================================================ */
.envelope {
  font-size: clamp(72px, 15vw, 110px);
  cursor: pointer;
  user-select: none;
  transition: transform .35s var(--ease-spring), filter .3s ease;
  filter: drop-shadow(0 8px 24px rgba(74, 37, 54, 0.20));
}

.envelope:hover {
  transform: translateY(-8px) rotate(-3deg);
  filter: drop-shadow(0 16px 36px rgba(74, 37, 54, 0.32));
}

.envelope:active {
  transform: scale(0.95);
  transition-duration: .12s;
}

/* Paper with texture */
.letter-paper {
  position: relative;
  max-width: clamp(500px, 80vw, 1020px);
  margin: var(--space-md) auto 0;
  padding: 0 clamp(20px, 4vw, 36px);
  background:
    repeating-linear-gradient(transparent,
      transparent 27px,
      rgba(201, 138, 147, 0.09) 28px),
    linear-gradient(160deg, #fffef8 0%, #fffdf5 100%);
  border-radius: 4px;
  box-shadow:
    0 24px 64px rgba(74, 37, 54, 0.22),
    0 4px 16px rgba(74, 37, 54, 0.12),
    inset 0 0 0 1px rgba(201, 138, 147, 0.12);
  transform: scale(0.88) rotate(-2deg) translateY(20px);
  font-size: var(--text-xl);
  line-height: 1.9;
  text-align: left;
  color: #4A2536;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: opacity .8s var(--ease), transform .9s var(--ease);
}

.letter-paper.show {
  opacity: 1;
  max-height: none;
  padding: clamp(28px, 4vw, 44px) clamp(24px, 4vw, 40px);
  transform: scale(1) rotate(0deg) translateY(0);
}

/* Red margin line */
.letter-paper::before {
  content: '';
  position: absolute;
  left: clamp(48px, 8vw, 64px);
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(233, 147, 174, 0.28);
  pointer-events: none;
}



/* Popup inners */
.thankyou-modal-inner {
  background: linear-gradient(160deg, #FFFEF9 0%, #FFFDF4 100%);
  max-width: clamp(280px, 90vw, 580px);
  width: 100%;
  border-radius: 24px;
  padding: clamp(28px, 5vw, 48px) clamp(22px, 4vw, 40px);
  text-align: left;
  font-family: 'Cormorant Garamond';
  font-size: var(--text-lg);
  line-height: 1.85;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  box-shadow:
    0 40px 100px rgba(74, 37, 54, 0.30),
    0 0 0 1px rgba(255, 255, 255, 0.85),
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 0 80px rgba(233, 147, 174, 0.12);
}

.thankyou-modal-inner {
  text-align: center;
}

.modal-hearts {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  border-radius: 24px;
}

/* ============================================================
   SECTION 8 — COUNTDOWN
   ============================================================ */
.countdown-grid {
  display: flex;
  gap: clamp(10px, 2vw, 20px);
  justify-content: center;
  flex-wrap: wrap;
}

.cd-unit {
  min-width: clamp(76px, 13vw, 100px);
  padding: clamp(14px, 2.5vw, 22px) clamp(10px, 2vw, 14px);
  text-align: center;
  position: relative;
  overflow: hidden;
  cursor: default;
  transition: transform .3s var(--ease-spring), box-shadow .3s var(--ease);
}

.cd-unit:hover {
  transform: translateY(-4px) scale(1.06);
  box-shadow: 0 16px 40px rgba(201, 138, 147, 0.30),
    0 0 0 1px rgba(255, 255, 255, 0.8);
}

/* Glow aura on hover */
.cd-unit::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at 50% 50%, rgba(233, 147, 174, 0.18), transparent 70%);
  opacity: 0;
  transition: opacity .35s ease;
  pointer-events: none;
}

.cd-unit:hover::after {
  opacity: 1;
}

.cd-num {
  font-size: clamp(28px, 6vw, 42px);
  font-family: 'Cormorant Garamond';
  font-weight: 600;
  line-height: 1;
  will-change: transform, opacity;
  transition: none;
  /* JS handles animation */
  display: block;
}

.cd-num.tick-out {
  animation: cdFlipOut .18s ease-in both;
}

.cd-num.tick-in {
  animation: cdFlipIn .22s var(--ease-spring) both;
}

.cd-label {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--rose-gold);
  margin-top: 6px;
  display: block;
}

.section.dark .cd-label {
  color: var(--gold-soft);
}

/* cd-glow flash on each tick */
@keyframes cdGlow {

  0%,
  100% {
    box-shadow: 0 8px 32px rgba(201, 138, 147, 0.18), 0 2px 8px rgba(201, 138, 147, 0.10);
  }

  50% {
    box-shadow: 0 8px 32px rgba(233, 147, 174, 0.55), 0 0 24px rgba(217, 166, 108, 0.40);
  }
}

.cd-unit.cd-glow {
  animation: cdGlow .45s ease both;
}

/* wind-sway on existing garden flowers */
.flower.wind-sway {
  animation: windSway .85s ease-in-out;
}

/* ============================================================
   SECTION 9 — THANK YOU (PREMIUM REPAIR & IMPROVEMENT)
   ============================================================ */
#thankyou {
  position: relative;
  min-height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(60px, 8vh, 120px) clamp(16px, 4vw, 36px);
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 30%, #FFF0F4 0%, #FFE5EC 100%);
}

/* Continuous floating/moving gradient background */
.thankyou-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(255, 182, 193, 0.15) 0%, rgba(255, 218, 185, 0.15) 50%, rgba(255, 240, 245, 0.15) 100%);
  background-size: 200% 200%;
  animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {

  0%,
  100% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }
}

/* Glassmorphism Card styling */
.thankyou-card {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: clamp(300px, 90vw, 540px);
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 28px;
  padding: clamp(24px, 5vw, 44px);
  box-shadow:
    0 24px 64px rgba(201, 138, 147, 0.22),
    0 8px 24px rgba(201, 138, 147, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: transform 0.4s var(--ease-spring), box-shadow 0.4s var(--ease);
}

.thankyou-card:hover {
  transform: translateY(-4px);
  box-shadow:
    0 32px 80px rgba(201, 138, 147, 0.28),
    0 12px 32px rgba(201, 138, 147, 0.16);
}

/* Spacing and typography within the card */
#thankyou-message {
  margin: var(--space-md) 0;
  width: 100%;
}

#thankyou-message p {
  max-width: 500px;
  margin: 0 auto;
  font-size: clamp(16px, 2.5vw, 19px);
  color: var(--plum);
  line-height: 1.8;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
}

#thankyou-message p+p {
  margin-top: 14px;
}

/* Premium Button Styling with glassmorphism + glow */
#thankyou-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Quicksand', sans-serif;
  font-weight: 700;
  font-size: clamp(14px, 2vw, 16px);
  padding: clamp(12px, 2vw, 16px) clamp(28px, 4vw, 42px);
  border-radius: 999px;
  border: none;
  background: rgba(255, 255, 255, 0.35);
  color: var(--plum);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  z-index: 10;
  box-shadow:
    0 8px 24px rgba(233, 147, 174, 0.18),
    0 2px 8px rgba(233, 147, 174, 0.1);
  transition:
    transform 0.4s var(--ease-spring),
    box-shadow 0.4s var(--ease),
    background-color 0.4s var(--ease);
  will-change: transform;

  /* Glassmorphism for button */
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);

}

#thankyou-btn.in-view {
  /* Floating animation */
  animation: btnFloat 4s ease-in-out infinite;
}

/* Premium animated gradient border (luxury look) */
#thankyou-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 999px;
  padding: 2px;
  /* border thickness */
  background: linear-gradient(135deg, var(--rose), var(--gold), var(--rose-gold), var(--gold));
  background-size: 300% 300%;
  animation: borderGradientShift 4s linear infinite;
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 1;
}

@keyframes borderGradientShift {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

@keyframes btnFloat {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-6px);
  }
}

#thankyou-btn:hover {
  transform: translateY(-8px) scale(1.05) !important;
  /* Slight scale & hover shift */
  background: rgba(255, 255, 255, 0.55);
  box-shadow:
    0 16px 36px rgba(233, 147, 174, 0.36),
    0 0 20px rgba(217, 166, 108, 0.25) !important;
  /* Glow increases */
}

#thankyou-btn:active {
  transform: translateY(-2px) scale(0.97) !important;
  /* Bounce and smooth press */
  box-shadow:
    0 6px 16px rgba(233, 147, 174, 0.25) !important;
  transition-duration: 0.12s;
}

/* Background layers for continuous premium animations */
.stars-layer,
.fireflies-layer,
.hearts-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}


/* ============================================================
   SECTION 10 — FINAL ENDING
   ============================================================ */
#scene-ending {
  position: relative;
}

#ending-sky {
  position: absolute;
  inset: 0;
}

.moon {
  font-size: clamp(44px, 10vw, 72px);
  margin-bottom: 12px;
  filter: drop-shadow(0 0 40px rgba(240, 217, 181, 0.6));
  animation: moonGlow 4s ease-in-out infinite;
}

.ending-heart {
  font-size: clamp(40px, 8vw, 60px);
  margin: 18px 0;
  filter: drop-shadow(0 0 24px rgba(233, 147, 174, 0.5));
}

#ending-flowers {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.ending-flower {
  position: absolute;
  bottom: -6%;
  font-size: clamp(14px, 2.5vw, 22px);
  opacity: 0;
  animation: endingPetalRise var(--duration, 8s) var(--ease) var(--delay, 0s) forwards;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.12));
}

#ending-title {
  font-size: var(--text-2xl);
  margin-bottom: 10px;
  text-shadow: 0 2px 24px rgba(240, 217, 181, 0.25);
}

#ending-sub {
  font-style: italic;
  font-size: var(--text-xl);
  color: var(--gold);
  text-shadow: 0 1px 16px rgba(217, 166, 108, 0.30);
}

/* Ending fireflies */
.ending-firefly {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(240, 217, 181, 0.9);
  box-shadow: 0 0 10px 4px rgba(240, 217, 181, 0.55);
  animation: fireflyDrift var(--dur, 7s) ease-in-out infinite var(--delay, 0s);
}

/* ============================================================
   SECTION 4.5 — SCRATCH CARD
   ============================================================ */

/* Outer wrapper — glass effect matching the site's dark sections */
.scratch-card-wrap {
  position: relative;
  width: min(440px, calc(100vw - 40px));
  border-radius: 20px;
  overflow: hidden;
  box-shadow:
    0 0 0 2px rgba(217, 166, 108, 0.80),
    /* golden border */
    0 0 0 4px rgba(217, 166, 108, 0.20),
    /* outer glow ring */
    0 24px 60px rgba(0, 0, 0, 0.55),
    /* deep shadow */
    0 0 80px rgba(217, 166, 108, 0.22);
  /* ambient gold glow */
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  cursor: crosshair;
  transition: box-shadow .35s var(--ease, cubic-bezier(.22, 1, .36, 1));
}

.scratch-card-wrap:hover {
  box-shadow:
    0 0 0 2px rgba(217, 166, 108, 1.00),
    0 0 0 5px rgba(217, 166, 108, 0.28),
    0 32px 80px rgba(0, 0, 0, 0.60),
    0 0 100px rgba(217, 166, 108, 0.32);
}

/* Canvas sits on top of the reveal content */
#scratch-canvas {
  display: block;
  width: 100%;
  height: auto;
  position: relative;
  z-index: 2;
  border-radius: 18px;
  touch-action: none;
  /* prevent scroll hijack on mobile */
}

/* Hidden reveal content — sits underneath the canvas */
.scratch-reveal {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 3vw, 28px) clamp(14px, 3vw, 26px);
  text-align: center;
  background: linear-gradient(160deg,
      rgba(255, 248, 244, 0.97) 0%,
      rgba(255, 240, 250, 0.97) 50%,
      rgba(255, 248, 240, 0.97) 100%);
  border-radius: 18px;
}

.scratch-reveal-icon {
  font-size: clamp(36px, 8vw, 56px);
  margin-bottom: 12px;
  animation: heartbeat 1.4s ease-in-out infinite;
  filter: drop-shadow(0 4px 12px rgba(233, 147, 174, 0.4));
}

.scratch-reveal-text {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(15px, 2.8vw, 22px);
  font-style: italic;
  line-height: 1.75;
  color: #4A2536;
  max-width: 360px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

/* Floating sparkle stars layer inside the card */
.scratch-stars {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  border-radius: 18px;
  z-index: 0;
}

/* Full reveal state */
.scratch-reveal.revealed .scratch-reveal-icon {
  animation: heartbeat 1.4s ease-in-out infinite,
    gentleBounce 3s ease-in-out infinite;
}

/* sparkleIn keyframe for stars appearing */
@keyframes sparkleIn {
  from {
    opacity: 0;
    transform: scale(0.4);
  }

  to {
    opacity: 0.75;
    transform: scale(1);
  }
}

/* Progress bar — thin stripe below the card */
.scratch-progress-wrap {
  width: min(440px, calc(100vw - 40px));
  height: 4px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 2px;
  margin-top: 10px;
  overflow: hidden;
}

.scratch-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--rose, #E893AE), var(--gold, #D9A66C));
  border-radius: 2px;
  transition: width .15s ease, background .5s ease;
}

/* Scratch-again button — uses existing .btn styles, just positioned */
.scratch-again-btn {
  align-items: center;
  gap: 6px;
}

/* Mobile: slightly smaller card */
@media (max-width: 600px) {
  .scratch-card-wrap {
    border-radius: 14px;
  }

  #scratch-canvas {
    border-radius: 12px;
  }

  .scratch-reveal {
    border-radius: 12px;
    padding: 14px 12px;
  }

  .scratch-stars {
    border-radius: 12px;
  }

  .scratch-reveal-text {
    font-size: 14px;
  }

  .scratch-reveal-icon {
    font-size: clamp(30px, 10vw, 46px);
  }
}