@font-face { font-family: 'Cairo'; src: url('./fonts/cairo-300.woff2') format('woff2'); font-weight: 300; font-display: swap; }
@font-face { font-family: 'Cairo'; src: url('./fonts/cairo-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Cairo'; src: url('./fonts/cairo-600.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Cairo'; src: url('./fonts/cairo-800.woff2') format('woff2'); font-weight: 800; font-display: swap; }
@font-face { font-family: 'Aref Ruqaa'; src: url('./fonts/aref-ruqaa-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Aref Ruqaa'; src: url('./fonts/aref-ruqaa-700.woff2') format('woff2'); font-weight: 700; font-display: swap; }

:root {
  --rose: #e0708e;
  --rose-deep: #b4405f;
  --rose-soft: #f7c9d3;
  --blush: #fff1f3;
  --cream: #fffaf6;
  --gold: #c9a26b;
  --ink: #3a262c;
  --ink-2: #7a5f68;
  --font-body: 'Cairo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Aref Ruqaa', 'Cairo', Georgia, serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; min-height: 100%; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(120% 70% at 50% 0%, #fff8f5 0%, rgba(255, 248, 245, 0) 55%),
    linear-gradient(180deg, #fffaf6 0%, #fff3f5 40%, #fde8ec 75%, #fbe1e7 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---------- ambient layers ---------- */

.petals {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.petal {
  position: absolute;
  display: block;
  width: var(--s, 12px);
  height: var(--s, 12px);
  opacity: 0;
  animation: drift var(--dur, 18s) linear var(--delay, 0s) infinite;
}
.petal svg { width: 100%; height: 100%; display: block; }

.aurora {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.aurora span {
  position: absolute;
  display: block;
  width: 78vw;
  height: 78vw;
  max-width: 620px;
  max-height: 620px;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.5;
}
.aurora span:nth-child(1) { top: -6%; inset-inline-start: -18%; background: radial-gradient(circle, #ffd9e2 0%, rgba(255, 217, 226, 0) 70%); animation: float1 26s ease-in-out infinite; }
.aurora span:nth-child(2) { top: 26%; inset-inline-end: -22%; background: radial-gradient(circle, #ffe9cf 0%, rgba(255, 233, 207, 0) 70%); animation: float2 32s ease-in-out infinite; }
.aurora span:nth-child(3) { top: 62%; inset-inline-start: -10%; background: radial-gradient(circle, #f9d6e6 0%, rgba(249, 214, 230, 0) 70%); animation: float1 38s ease-in-out infinite reverse; }

/* ---------- splash ---------- */

.splash {
  position: relative;
  z-index: 5;
  display: grid;
  place-items: center;
  padding: 92px 22px 84px;
  overflow: hidden;
  border-radius: 0 0 46px 46px;
  transition: opacity 900ms ease, max-height 900ms ease, padding 900ms ease, visibility 900ms ease;
  max-height: 1600px;
}

.splash__photo {
  position: absolute;
  inset: -4%;
  background: url('./img/hero.jpg') center 40% / cover no-repeat;
  animation: slowZoom 24s ease-in-out infinite alternate;
}

.splash__veil {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(78% 58% at 50% 38%, rgba(255, 250, 246, 0.52) 0%, rgba(255, 244, 245, 0.84) 58%, rgba(255, 240, 242, 0.96) 100%);
}

.splash__inner {
  position: relative;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  max-width: 520px;
}

.splash__kicker {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--rose-deep);
  opacity: 0;
  animation: riseIn 900ms 200ms ease forwards;
}

.splash__name {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(3.6rem, 18vw, 6.8rem);
  line-height: 1.16;
  background: linear-gradient(120deg, #a83c58 0%, #e0708e 42%, #c9a26b 78%, #a83c58 100%);
  background-size: 240% 240%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 16px 34px rgba(180, 64, 95, 0.22));
  opacity: 0;
  animation: riseIn 1100ms 380ms cubic-bezier(0.2, 0.7, 0.2, 1) forwards, shimmer 11s 2s ease-in-out infinite;
}

.splash__hint {
  margin: 8px 0 20px;
  font-size: 0.92rem;
  color: var(--ink-2);
  opacity: 0;
  animation: riseIn 900ms 700ms ease forwards;
}

.enter {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 0;
  cursor: pointer;
  padding: 17px 38px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 1.05rem;
  color: #fff;
  background: linear-gradient(135deg, #e8789a 0%, #c2556f 55%, #a84463 100%);
  box-shadow: 0 16px 34px rgba(180, 64, 95, 0.34), 0 2px 0 rgba(255, 255, 255, 0.45) inset;
  opacity: 0;
  animation: riseIn 900ms 850ms ease forwards, breathe 3.2s 1.8s ease-in-out infinite;
  transition: transform 220ms ease, box-shadow 220ms ease;
  -webkit-tap-highlight-color: transparent;
}
.enter:hover, .enter:focus-visible { transform: translateY(-2px) scale(1.02); }
.enter:active { transform: scale(0.97); }

.heart-ico { width: 20px; height: 20px; fill: #fff; animation: pulse 1.8s ease-in-out infinite; }

.splash.is-gone {
  opacity: 0;
  visibility: hidden;
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
}

/* ---------- page ---------- */

.page {
  position: relative;
  z-index: 1;
  max-width: 820px;
  margin: 0 auto;
  padding: 0 22px 84px;
  opacity: 0;
  transition: opacity 1000ms 200ms ease;
}
.page.is-on { opacity: 1; }

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
  padding: 74px 0 40px;
}

.hero__glow {
  position: absolute;
  top: 12%;
  width: 76%;
  max-width: 460px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 214, 224, 0.85) 0%, rgba(255, 214, 224, 0) 70%);
  filter: blur(24px);
  animation: breathe 7s ease-in-out infinite;
  pointer-events: none;
}

.kicker {
  position: relative;
  margin: 0;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--rose-deep);
  letter-spacing: 0.08em;
}

.hero__name {
  position: relative;
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(3.2rem, 16vw, 5.8rem);
  font-weight: 700;
  line-height: 1.2;
  background: linear-gradient(120deg, #a83c58 0%, #e0708e 45%, #c9a26b 80%, #a83c58 100%);
  background-size: 240% 240%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 14px 30px rgba(180, 64, 95, 0.18));
  animation: shimmer 11s ease-in-out infinite;
}

.hero__rule {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(74%, 320px);
  margin: 10px 0 4px;
  opacity: 0.9;
}
.hero__rule span {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(201, 162, 107, 0), rgba(201, 162, 107, 0.75), rgba(201, 162, 107, 0));
}
.hero__rule svg { width: 15px; height: 15px; fill: var(--rose); animation: pulse 2.6s ease-in-out infinite; }

.hero__line {
  margin: 6px 0 12px;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 6.4vw, 2rem);
  line-height: 1.7;
  color: var(--rose-deep);
}

.hero__sub {
  margin: 0;
  max-width: 32ch;
  font-size: 1.02rem;
  line-height: 2.05;
  color: var(--ink-2);
}

.music {
  position: relative;
  z-index: 6;
  display: flex;
  width: max-content;
  align-items: center;
  gap: 9px;
  margin: 20px auto 0;
  padding: 11px 18px;
  border: 1px solid rgba(180, 64, 95, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(10px);
  color: var(--rose-deep);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 12px 26px rgba(180, 64, 95, 0.13);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 500ms ease, transform 500ms ease;
  -webkit-tap-highlight-color: transparent;
}
.page.is-on .music { opacity: 1; transform: none; }

.music__bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 14px; }
.music__bars i { display: block; width: 3px; border-radius: 2px; background: var(--rose); height: 5px; }
.music[aria-pressed='true'] .music__bars i { animation: eq 900ms ease-in-out infinite; }
.music__bars i:nth-child(1) { animation-delay: 0ms; }
.music__bars i:nth-child(2) { animation-delay: 160ms; }
.music__bars i:nth-child(3) { animation-delay: 320ms; }
.music__bars i:nth-child(4) { animation-delay: 90ms; }

.scroll-cue {
  margin-top: 30px;
  width: 26px;
  height: 42px;
  border: 1.5px solid rgba(180, 64, 95, 0.3);
  border-radius: 999px;
  display: grid;
  place-items: start center;
  padding-top: 8px;
}
.scroll-cue span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--rose-deep);
  animation: drop 1.9s ease-in-out infinite;
}

/* ---------- sections ---------- */

.section { padding: 52px 0 8px; }

.section__title {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.8rem, 7.4vw, 2.4rem);
  color: var(--ink);
  text-align: center;
}

.section__hint {
  margin: 0 0 20px;
  text-align: center;
  font-size: 0.9rem;
  color: var(--ink-2);
}

/* ---------- photo ---------- */

.photo { padding-top: 34px; }

.polaroid {
  position: relative;
  width: min(84%, 340px);
  margin: 0 auto;
  padding: 13px 13px 56px;
  background: #fffdfc;
  border-radius: 8px;
  box-shadow: 0 26px 50px rgba(120, 70, 80, 0.2), 0 2px 6px rgba(120, 70, 80, 0.08);
  transform: rotate(-2.4deg);
  animation: sway 9s ease-in-out infinite;
  transition: transform 400ms cubic-bezier(0.2, 0.8, 0.3, 1.2), box-shadow 400ms ease;
}
.polaroid:hover, .polaroid:active {
  transform: rotate(0deg) scale(1.03);
  box-shadow: 0 34px 60px rgba(120, 70, 80, 0.26);
}

.polaroid__img {
  aspect-ratio: 4 / 5;
  border-radius: 4px;
  background: url('./img/call.jpg') center 28% / cover no-repeat;
  background-color: #2a1c22;
}

.polaroid__cap {
  position: absolute;
  inset-inline: 0;
  bottom: 14px;
  margin: 0;
  text-align: center;
  font-family: var(--font-display);
  font-size: 1.28rem;
  color: var(--rose-deep);
}

.polaroid__tape {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%) rotate(-3deg);
  width: 96px;
  height: 26px;
  background: linear-gradient(180deg, rgba(233, 200, 190, 0.85), rgba(226, 186, 176, 0.72));
  box-shadow: 0 2px 6px rgba(120, 70, 80, 0.14);
}

/* ---------- marquee ---------- */

.marquee {
  margin: 46px 0 6px;
  padding: 14px 0;
  overflow: hidden;
  background: linear-gradient(90deg, rgba(224, 112, 142, 0.12), rgba(201, 162, 107, 0.16), rgba(224, 112, 142, 0.12));
  border-block: 1px solid rgba(180, 64, 95, 0.14);
  white-space: nowrap;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee__track {
  display: inline-flex;
  align-items: center;
  gap: 22px;
  animation: marquee 26s linear infinite;
  will-change: transform;
}
.marquee__track span {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--rose-deep);
  opacity: 0.85;
}
.marquee__track b { color: var(--gold); font-size: 0.95rem; }

/* ---------- lines ---------- */

.lines {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 34ch;
  margin: 22px auto 0;
  text-align: center;
}

.line {
  margin: 0;
  font-size: 1.08rem;
  line-height: 2.1;
  color: var(--ink-2);
}
.line--strong { color: var(--rose-deep); font-weight: 800; font-size: 1.18rem; }

/* ---------- words ---------- */

.words {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 6px;
}

.word {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 104px;
  padding: 20px 14px;
  border: 1px solid rgba(180, 64, 95, 0.14);
  border-radius: 24px;
  background: linear-gradient(170deg, rgba(255, 255, 255, 0.94) 0%, rgba(255, 246, 248, 0.9) 100%);
  box-shadow: 0 10px 24px rgba(180, 64, 95, 0.07);
  font-family: var(--font-body);
  color: var(--ink);
  cursor: pointer;
  transition: transform 280ms ease, box-shadow 280ms ease, background 280ms ease;
  -webkit-tap-highlight-color: transparent;
}
.word:hover { transform: translateY(-4px); box-shadow: 0 18px 32px rgba(180, 64, 95, 0.14); }

.word::after {
  content: '+';
  position: absolute;
  inset-inline-end: 15px;
  top: 11px;
  font-size: 1.1rem;
  color: rgba(180, 64, 95, 0.45);
  transition: transform 320ms ease, opacity 320ms ease;
}
.word[aria-expanded='true']::after { transform: rotate(45deg); opacity: 0.75; }

.word__label {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--rose-deep);
}

.word__text {
  font-size: 0.87rem;
  line-height: 1.9;
  color: var(--ink-2);
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 440ms ease, opacity 320ms ease;
}

.word[aria-expanded='true'] {
  background: linear-gradient(160deg, #fff7f8 0%, #ffe6ec 100%);
  border-color: rgba(180, 64, 95, 0.32);
}
.word[aria-expanded='true'] .word__text { max-height: 220px; opacity: 1; }

/* ---------- heart zone ---------- */

.heartzone { text-align: center; padding: 64px 0 30px; }

.bigheart {
  position: relative;
  width: 140px;
  height: 140px;
  border: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 28%, #ffdde4 0%, #ef9db2 52%, #cf6c88 100%);
  box-shadow: 0 22px 44px rgba(180, 64, 95, 0.3), 0 0 0 12px rgba(255, 255, 255, 0.45) inset;
  display: grid;
  place-items: center;
  margin-inline: auto;
  cursor: pointer;
  animation: breathe 2.8s ease-in-out infinite;
  transition: transform 200ms ease;
  -webkit-tap-highlight-color: transparent;
}
.bigheart svg { width: 60px; height: 60px; fill: #fff; filter: drop-shadow(0 5px 9px rgba(168, 68, 99, 0.35)); }
.bigheart:active { transform: scale(0.93); }

.bigheart__ring {
  position: absolute;
  inset: -14px;
  border-radius: 50%;
  border: 1px solid rgba(180, 64, 95, 0.22);
  animation: ringPulse 3.2s ease-out infinite;
}

.heartzone__msg {
  margin: 26px 0 0;
  min-height: 32px;
  font-family: var(--font-display);
  font-size: 1.34rem;
  color: var(--rose-deep);
}
.heartzone__msg.is-shown { animation: pop 700ms cubic-bezier(0.2, 0.9, 0.3, 1.4); }

/* ---------- letter ---------- */

.letter {
  position: relative;
  margin: 0 auto;
  max-width: 34rem;
  padding: 36px 28px 44px;
  border-radius: 26px;
  background: linear-gradient(180deg, #fffdfb 0%, #fff6f7 100%);
  box-shadow: 0 26px 54px rgba(120, 70, 80, 0.14), 0 0 0 1px rgba(180, 64, 95, 0.09);
  font-family: var(--font-display);
  font-size: 1.16rem;
  line-height: 2.35;
  color: #4a3238;
}
.letter p { margin: 0 0 14px; }
.letter__to { color: var(--rose-deep); font-weight: 700; }
.letter__sign { margin-top: 24px !important; text-align: end; color: var(--rose-deep); font-weight: 700; line-height: 1.95; }
.letter__sign span { font-size: 1.32rem; }

.letter__seal {
  position: absolute;
  bottom: 16px;
  inset-inline-start: 22px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #d9637f 0%, #a83c58 70%);
  color: #fff5f0;
  font-family: var(--font-display);
  font-size: 1.2rem;
  box-shadow: 0 8px 16px rgba(168, 60, 88, 0.3), 0 0 0 3px rgba(255, 255, 255, 0.6) inset;
  transform: rotate(-8deg);
}

/* ---------- counter ---------- */

.counter-sec { text-align: center; }
.counter {
  font-family: 'Cairo', sans-serif;
  font-weight: 800;
  font-size: clamp(2.6rem, 13vw, 6.5rem);
  font-variant-numeric: tabular-nums;
  margin: 22px auto 10px;
  background: linear-gradient(100deg, var(--gold) 10%, var(--rose) 55%, var(--rose-deep) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 4px 22px rgba(233, 30, 99, 0.28));
  line-height: 1.25;
}
.counter-note {
  color: var(--ink-soft);
  font-size: 1.05rem;
  font-weight: 300;
}

/* ---------- finale ---------- */

.finale {
  height: 120px;
  display: grid;
  place-items: center;
}
.finale svg {
  width: 30px;
  height: 30px;
  fill: var(--rose);
  animation: pulse 2s ease-in-out infinite;
}

/* ---------- burst hearts ---------- */

.burst-heart { animation-name: burstUp; }


/* ---------- reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 900ms cubic-bezier(0.2, 0.7, 0.2, 1), transform 900ms cubic-bezier(0.2, 0.7, 0.2, 1);
  transition-delay: var(--d, 0ms);
}
.reveal.in { opacity: 1; transform: none; }

/* ---------- floating hearts ---------- */

.float-heart {
  position: fixed;
  z-index: 35;
  pointer-events: none;
  width: 22px;
  height: 22px;
  fill: var(--rose);
  animation: flyUp 1600ms ease-out forwards;
}

/* ---------- keyframes ---------- */

@keyframes riseIn {
  from { opacity: 0; transform: translateY(20px); filter: blur(7px); }
  to { opacity: 1; transform: none; filter: blur(0); }
}
@keyframes slowZoom { from { transform: scale(1); } to { transform: scale(1.09); } }
@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.16); } }
@keyframes drop { 0% { transform: translateY(0); opacity: 0; } 40% { opacity: 1; } 100% { transform: translateY(16px); opacity: 0; } }
@keyframes eq { 0%, 100% { height: 4px; } 50% { height: 14px; } }
@keyframes pop { 0% { transform: scale(0.86); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes flyUp { 0% { transform: translate(0, 0) scale(0.6); opacity: 0.95; } 100% { transform: translate(var(--dx, 0), -170px) scale(1.15); opacity: 0; } }
@keyframes burstUp {
  0% { transform: translate(0, 30px) scale(0.4) rotate(0deg); opacity: 0; }
  10% { opacity: 0.95; }
  100% { transform: translate(var(--dx, 0), -115vh) scale(1.1) rotate(220deg); opacity: 0; }
}
@keyframes drift {
  0% { transform: translate3d(0, 14px, 0) rotate(0deg); opacity: 0; }
  12% { opacity: var(--o, 0.5); }
  88% { opacity: var(--o, 0.5); }
  100% { transform: translate3d(var(--dx, 20px), -150px, 0) rotate(170deg); opacity: 0; }
}
@keyframes shimmer { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@keyframes float1 { 0%, 100% { transform: translate3d(0, 0, 0) scale(1); } 50% { transform: translate3d(6%, 5%, 0) scale(1.1); } }
@keyframes float2 { 0%, 100% { transform: translate3d(0, 0, 0) scale(1.05); } 50% { transform: translate3d(-7%, 6%, 0) scale(1); } }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes sway { 0%, 100% { transform: rotate(-2.4deg) translateY(0); } 50% { transform: rotate(-1.2deg) translateY(-8px); } }
@keyframes ringPulse { 0% { transform: scale(0.92); opacity: 0.55; } 70% { transform: scale(1.16); opacity: 0; } 100% { opacity: 0; } }

/* ---------- wider screens ---------- */

@media (min-width: 640px) {
  .page { padding: 0 34px 96px; }
  .words { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .word { min-height: 158px; padding: 24px 18px; }
  .word__label { font-size: 1.75rem; }
  .word__text { font-size: 0.92rem; }
  .letter { padding: 46px 44px 52px; font-size: 1.3rem; }
  .line { font-size: 1.16rem; }
  .marquee__track span { font-size: 1.8rem; }
  .polaroid { width: min(70%, 380px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- twinkling stars ---------- */

.stars {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.stars span {
  position: absolute;
  inset: 0;
}
.stars span:nth-child(1) {
  width: 2px; height: 2px; border-radius: 50%;
  box-shadow: 32.4vw 15.1vh 0 0.9px #fff, 7.2vw 53.6vh 0 0.7px #fff, 5.8vw 50.7vh 0 0.4px #fff, 43.4vw 7.0vh 0 0.5px #fff, 42.5vw 82.7vh 0 0.5px #fff, 22.3vw 62.7vh 0 1.1px #fff, 57.7vw 39.7vh 0 1.1px #fff, 4.7vw 85.8vh 0 0.6px #fff, 14.4vw 11.8vh 0 0.6px #fff, 81.6vw 18.1vh 0 0.8px #fff, 63.9vw 37.2vh 0 0.8px #fff, 6.3vw 6.0vh 0 0.5px #fff, 68.0vw 42.8vh 0 0.6px #fff, 58.6vw 45.3vh 0 0.6px #fff, 79.4vw 69.9vh 0 0.6px #fff, 57.4vw 52.5vh 0 1.0px #fff, 72.9vw 28.8vh 0 1.1px #fff, 11.8vw 41.8vh 0 0.9px #fff, 15.2vw 48.9vh 0 0.4px #fff, 66.8vw 76.5vh 0 0.8px #fff, 87.5vw 31.4vh 0 0.9px #fff, 59.4vw 58.0vh 0 0.7px #fff, 84.0vw 94.5vh 0 0.7px #fff, 66.4vw 6.1vh 0 0.9px #fff, 64.7vw 99.3vh 0 1.0px #fff, 28.5vw 38.6vh 0 0.9px #fff, 2.3vw 46.2vh 0 0.5px #fff, 11.7vw 5.9vh 0 0.9px #fff, 12.9vw 24.8vh 0 0.7px #fff, 87.1vw 8.1vh 0 0.7px #fff, 54.9vw 88.3vh 0 1.0px #fff, 86.4vw 27.8vh 0 0.7px #fff, 35.9vw 88.4vh 0 1.1px #fff, 15.1vw 17.6vh 0 0.6px #fff;
  animation: twinkle 3.6s ease-in-out infinite;
}
.stars span:nth-child(2) {
  width: 3px; height: 3px; border-radius: 50%;
  box-shadow: 23.3vw 48.5vh 0 0.7px #fff, 26.3vw 0.4vh 0 0.6px #fff, 36.9vw 56.6vh 0 0.9px #fff, 69.0vw 51.5vh 0 0.7px #fff, 67.6vw 5.4vh 0 0.8px #fff, 78.0vw 87.5vh 0 0.8px #fff, 39.2vw 39.9vh 0 0.4px #fff, 63.4vw 6.2vh 0 0.3px #fff, 20.9vw 16.2vh 0 0.5px #fff, 5.3vw 0.0vh 0 0.4px #fff, 10.1vw 36.4vh 0 0.3px #fff, 87.4vw 61.4vh 0 0.4px #fff, 25.2vw 34.7vh 0 0.5px #fff, 12.3vw 84.9vh 0 0.9px #fff, 46.6vw 48.4vh 0 0.4px #fff, 10.2vw 34.3vh 0 0.5px #fff, 82.9vw 16.1vh 0 0.3px #fff, 95.1vw 52.8vh 0 0.4px #fff, 54.3vw 2.7vh 0 0.6px #fff, 97.9vw 86.3vh 0 0.7px #fff, 26.1vw 36.7vh 0 0.4px #fff, 77.2vw 53.3vh 0 0.8px #fff;
  animation: twinkle 5.2s 1.1s ease-in-out infinite;
}
.stars span:nth-child(3) {
  width: 2px; height: 2px; border-radius: 50%;
  box-shadow: 33.0vw 22.3vh 0 0.9px #fff, 98.5vw 85.3vh 0 0.9px #fff, 81.8vw 74.0vh 0 0.5px #fff, 51.8vw 35.6vh 0 0.4px #fff, 2.8vw 27.9vh 0 0.6px #fff, 69.3vw 95.7vh 0 0.7px #fff, 93.7vw 98.8vh 0 1.0px #fff, 36.5vw 22.0vh 0 0.5px #fff, 19.7vw 20.4vh 0 0.8px #fff, 90.0vw 84.0vh 0 0.7px #fff, 65.3vw 80.0vh 0 0.5px #fff, 66.1vw 91.0vh 0 0.9px #fff, 75.0vw 47.8vh 0 0.5px #fff, 78.9vw 33.3vh 0 0.9px #fff;
  animation: twinkle 4.4s 2.2s ease-in-out infinite, starDrift 60s linear infinite;
}

/* ---------- petal depth + sparkles ---------- */

.petal--far { filter: blur(1.7px); }

/* ---------- finger trail hearts ---------- */

.trail-heart {
  position: fixed;
  z-index: 60;
  pointer-events: none;
  width: 15px;
  height: 15px;
  fill: var(--rose);
  opacity: 0.85;
  transform: translate(-50%, -50%);
  animation: trailUp 950ms ease-out forwards;
}

/* ---------- counter orbit + pop ---------- */

.counter-orbit {
  position: relative;
  display: inline-block;
  margin: 8px auto 0;
}
.counter-orbit .counter { margin: 22px auto 10px; }
.orbit-heart {
  position: absolute;
  top: 50%; left: 50%;
  width: 18px; height: 18px;
  margin: -9px;
  fill: var(--rose);
  opacity: 0.9;
  filter: drop-shadow(0 2px 6px rgba(233, 30, 99, 0.4));
}
.orbit-heart--1 { animation: orbitSpin 7s linear infinite; }
.orbit-heart--2 { animation: orbitSpin 7s -3.5s linear infinite reverse; width: 13px; height: 13px; fill: var(--gold); }
.counter.pop { animation: counterPop 340ms cubic-bezier(0.2, 0.9, 0.3, 1.3); }

/* ---------- seal stamp ---------- */

.letter.in .letter__seal {
  animation: stampIn 750ms 600ms cubic-bezier(0.2, 0.9, 0.3, 1.35) both;
}

/* ---------- polaroid life ---------- */

.polaroid__img { overflow: hidden; animation: slowZoom 17s ease-in-out infinite alternate; }
.polaroid::before, .polaroid::after {
  content: '';
  position: absolute;
  width: 22px; height: 22px;
  clip-path: polygon(50% 0%, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0% 50%, 38% 38%);
  background: linear-gradient(135deg, #fff6da, #e9c98a);
  filter: drop-shadow(0 0 6px rgba(233, 201, 138, 0.9));
  animation: twinkle 2.8s ease-in-out infinite;
  z-index: 2;
}
.polaroid::before { top: -8px; inset-inline-end: 14px; }
.polaroid::after { bottom: 64px; inset-inline-start: -7px; animation-delay: 1.4s; width: 15px; height: 15px; }

/* ---------- section title underline draw ---------- */

.section__title { position: relative; }
.section__title::after {
  content: '';
  display: block;
  height: 2px;
  width: 70px;
  margin: 10px auto 0;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  transform: scaleX(0);
  transition: transform 1000ms 350ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
.section__title.in::after { transform: scaleX(1); }

@media (max-width: 620px) {
  .orbit-heart--1 { animation-name: orbitSpinSm; }
  .orbit-heart--2 { animation-name: orbitSpinSm; }
}

/* ---------- finale extras ---------- */

.flash {
  position: fixed;
  inset: 0;
  z-index: 55;
  pointer-events: none;
  background: radial-gradient(circle at 50% 82%, rgba(255, 214, 224, 0.95) 0%, rgba(255, 214, 224, 0) 62%);
  animation: flashFade 900ms ease-out forwards;
}
.rain-heart {
  position: fixed;
  top: -34px;
  z-index: 34;
  pointer-events: none;
  fill: var(--rose);
  animation: rainDown 2.7s ease-in forwards;
}

/* ---------- new keyframes ---------- */

@keyframes twinkle { 0%, 100% { opacity: 0.25; } 50% { opacity: 0.95; } }
@keyframes starDrift { from { transform: translateX(0); } to { transform: translateX(3vw); } }
@keyframes trailUp {
  0% { transform: translate(-50%, -50%) scale(0.5); opacity: 0.9; }
  100% { transform: translate(-50%, -190%) scale(1.05) rotate(14deg); opacity: 0; }
}
@keyframes orbitSpin {
  from { transform: rotate(0deg) translateX(118px) rotate(0deg); }
  to { transform: rotate(360deg) translateX(118px) rotate(-360deg); }
}
@keyframes counterPop { 0% { transform: scale(1); } 45% { transform: scale(1.05); } 100% { transform: scale(1); } }
@keyframes stampIn {
  0% { transform: rotate(-8deg) scale(2.6); opacity: 0; }
  62% { transform: rotate(-8deg) scale(0.92); opacity: 1; }
  100% { transform: rotate(-8deg) scale(1); opacity: 1; }
}
@keyframes orbitSpinSm {
  from { transform: rotate(0deg) translateX(96px) rotate(0deg); }
  to { transform: rotate(360deg) translateX(96px) rotate(-360deg); }
}
@keyframes flashFade { from { opacity: 1; } to { opacity: 0; } }
@keyframes rainDown {
  0% { transform: translateY(0) rotate(0deg); opacity: 0; }
  8% { opacity: 0.95; }
  100% { transform: translateY(118vh) rotate(200deg); opacity: 0; }
}

/* ---------- iOS polish ---------- */

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  overscroll-behavior-y: none;
  -webkit-font-smoothing: antialiased;
}
button { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.splash {
  padding-top: calc(92px + env(safe-area-inset-top, 0px));
  padding-inline-start: calc(22px + env(safe-area-inset-left, 0px));
  padding-inline-end: calc(22px + env(safe-area-inset-right, 0px));
}
.finale { padding-bottom: env(safe-area-inset-bottom, 0px); }
@media (max-width: 620px) {
  .petal--far { filter: blur(1px); }
}

/* ---------- playful gate ---------- */

.gate {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
}
.gate__q {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.55rem;
  line-height: 1.7;
  color: #7d3b4e;
  text-shadow: 0 2px 14px rgba(255, 255, 255, 0.75);
}
.gate__q2 {
  display: block;
  font-size: 1.05rem;
  color: var(--rose-deep);
}
.gate__input {
  width: min(78%, 300px);
  padding: 13px 18px;
  border-radius: 999px;
  border: 2px solid rgba(224, 112, 142, 0.45);
  background: rgba(255, 255, 255, 0.85);
  text-align: center;
  font-family: var(--font-body);
  font-size: 1.08rem;
  font-weight: 600;
  color: #6d2f40;
  outline: none;
  transition: border-color 300ms ease, box-shadow 300ms ease;
}
.gate__input:focus {
  border-color: var(--rose);
  box-shadow: 0 0 0 4px rgba(224, 112, 142, 0.18);
}
.gate__msg {
  min-height: 1.5em;
  margin: 0;
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--rose-deep);
  text-shadow: 0 1px 8px rgba(255, 255, 255, 0.8);
}
.gate__hint {
  margin: 0;
  font-size: 0.95rem;
  color: #8a5b46;
  background: rgba(255, 255, 255, 0.68);
  padding: 6px 16px;
  border-radius: 999px;
  animation: pop 500ms ease both;
}
.gate__input.shake { animation: shake 450ms ease; }

/* ---------- splash floating hearts ---------- */

.splash__hearts span {
  position: absolute;
  height: auto;
  fill: rgba(255, 255, 255, 0.9);
  filter: drop-shadow(0 2px 8px rgba(233, 30, 99, 0.35));
  animation: floatHeart 6s ease-in-out infinite;
}

/* ---------- enter button ring ---------- */

.enter { position: relative; }
.enter::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.8);
  pointer-events: none;
  animation: ringPulse 2.2s ease-out infinite;
}

@keyframes floatHeart {
  0%, 100% { transform: translateY(0) rotate(-8deg); }
  50% { transform: translateY(-18px) rotate(10deg); }
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-9px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-6px); }
  80% { transform: translateX(5px); }
}
