:root {
  --wine: #6f173b;
  --wine-dark: #3b0b22;
  --rose: #d85d86;
  --rose-soft: #f7d8e3;
  --cream: #fff8f1;
  --gold: #e5b867;
  --text: #442233;
  --muted: #7e6170;
  --white: #ffffff;
  --shadow: 0 24px 60px rgba(78, 14, 45, .17);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 15%, rgba(216, 93, 134, .13), transparent 22rem),
    radial-gradient(circle at 85% 18%, rgba(229, 184, 103, .14), transparent 24rem),
    linear-gradient(180deg, #fffaf6 0%, #fff4f7 48%, #fff9f1 100%);
  font-family: "Tajawal", sans-serif;
  overflow-x: hidden;
}

button, a { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
.hidden { display: none !important; }

#confettiCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 80;
}

.stars, .floating-hearts {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.stars { z-index: 0; opacity: .7; }
.stars::before, .stars::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(229,184,103,.7) 1px, transparent 1.5px),
    radial-gradient(circle, rgba(216,93,134,.45) 1px, transparent 1.5px);
  background-size: 42px 42px, 68px 68px;
  background-position: 0 0, 20px 14px;
  animation: drift 28s linear infinite;
}
.stars::after { opacity: .35; transform: scale(1.25); animation-duration: 40s; animation-direction: reverse; }

.floating-heart {
  position: absolute;
  bottom: -40px;
  color: rgba(216, 93, 134, .28);
  animation: rise linear forwards;
  filter: drop-shadow(0 8px 10px rgba(111,23,59,.08));
}

.intro-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at center, rgba(229,184,103,.18), transparent 28rem),
    linear-gradient(145deg, #3b0b22, #6f173b 55%, #9b365c);
  transition: opacity .8s ease, visibility .8s ease;
}
.intro-screen.closed { opacity: 0; visibility: hidden; }
.intro-glow {
  position: absolute;
  width: 440px;
  height: 440px;
  border-radius: 50%;
  background: rgba(255,255,255,.06);
  filter: blur(16px);
  animation: glow 3s ease-in-out infinite alternate;
}
.intro-card {
  position: relative;
  width: min(560px, 100%);
  padding: 46px 34px 38px;
  text-align: center;
  color: #fff;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 32px;
  background: rgba(255,255,255,.09);
  box-shadow: 0 26px 80px rgba(15,0,8,.35);
  backdrop-filter: blur(16px);
}
.intro-card h1 {
  margin: 16px 0 12px;
  font-family: "Cairo", sans-serif;
  font-size: clamp(2.15rem, 7vw, 4.4rem);
  line-height: 1.25;
}
.intro-card h1 span { color: #ffd9e5; }
.intro-copy { max-width: 440px; margin: 0 auto; color: rgba(255,255,255,.82); line-height: 1.9; }
.signature { font-family: "Cairo", sans-serif; font-weight: 700; font-size: 1.1rem; }
.intro-card small { display: block; margin-top: 16px; color: rgba(255,255,255,.56); }
.eyebrow { margin: 0; color: var(--gold); font-family: "Cairo", sans-serif; font-weight: 700; letter-spacing: .02em; }
.intro-card .eyebrow { color: #ffd999; }

.gift-box { position: relative; width: 100px; height: 92px; margin: 0 auto 8px; animation: giftFloat 2.2s ease-in-out infinite; }
.gift-body, .gift-lid { position: absolute; right: 50%; transform: translateX(50%); border-radius: 8px; background: linear-gradient(145deg, #f58aad, #ce4775); box-shadow: inset 0 -8px 16px rgba(94,14,48,.16); }
.gift-body { bottom: 0; width: 86px; height: 65px; }
.gift-lid { top: 11px; width: 100px; height: 22px; z-index: 2; }
.gift-ribbon-v { position: absolute; z-index: 3; right: 50%; top: 11px; bottom: 0; width: 16px; transform: translateX(50%); background: #f6d087; }
.gift-ribbon-h { position: absolute; z-index: 3; left: 7px; right: 7px; top: 41px; height: 14px; background: #f6d087; }

.primary-btn, .secondary-btn {
  border: 0;
  border-radius: 999px;
  padding: 14px 26px;
  cursor: pointer;
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease;
  font-family: "Cairo", sans-serif;
  font-weight: 800;
  font-size: 1rem;
}
.primary-btn {
  color: #fff;
  background: linear-gradient(135deg, var(--wine), #a33760);
  box-shadow: 0 14px 28px rgba(111,23,59,.24);
}
.intro-card .primary-btn { color: var(--wine-dark); background: linear-gradient(135deg, #fff, #ffe3ec); }
.secondary-btn { color: var(--wine); background: #fff; border: 1px solid rgba(111,23,59,.14); }
.primary-btn:hover, .secondary-btn:hover { transform: translateY(-3px); box-shadow: 0 18px 32px rgba(111,23,59,.26); }
.pulse { animation: pulse 1.8s infinite; }

.music-toggle {
  position: fixed;
  left: 18px;
  top: 18px;
  z-index: 70;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid rgba(111,23,59,.12);
  border-radius: 999px;
  color: var(--wine);
  background: rgba(255,255,255,.82);
  box-shadow: 0 12px 30px rgba(80,16,45,.12);
  backdrop-filter: blur(12px);
  cursor: pointer;
}
.music-toggle.muted { opacity: .6; }

.main-content { position: relative; z-index: 2; opacity: 0; transition: opacity .8s ease; }
.main-content.visible { opacity: 1; }
.section {
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
  padding: 92px 0;
}
.hero {
  width: 100%;
  min-height: 100svh;
  display: grid;
  place-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero-content { position: relative; z-index: 2; width: min(760px, calc(100% - 36px)); }
.hero h2 {
  margin: 14px 0 18px;
  font-family: "Cairo", sans-serif;
  font-size: clamp(2.5rem, 8vw, 5.8rem);
  line-height: 1.2;
  color: var(--wine-dark);
}
.hero h2 span { color: var(--rose); text-shadow: 0 8px 24px rgba(216,93,134,.18); }
.hero p:not(.eyebrow) { max-width: 650px; margin: 0 auto; font-size: clamp(1.05rem, 2.7vw, 1.35rem); line-height: 2; color: var(--muted); }
.hero-badge { display: inline-block; margin-top: 30px; padding: 14px 22px; border: 1px solid rgba(229,184,103,.45); border-radius: 999px; color: var(--wine); background: rgba(255,255,255,.72); box-shadow: var(--shadow); font-family: "Cairo", sans-serif; font-weight: 800; }
.scroll-hint { display: flex; flex-direction: column; align-items: center; gap: 5px; width: max-content; margin: 38px auto 0; color: var(--muted); text-decoration: none; }
.scroll-hint b { font-size: 1.8rem; animation: bounce 1.4s infinite; }
.hero-orbit { position: absolute; border-radius: 50%; border: 1px solid rgba(216,93,134,.15); }
.orbit-one { width: 520px; height: 520px; animation: spin 20s linear infinite; }
.orbit-two { width: 740px; height: 740px; border-style: dashed; animation: spin 32s linear infinite reverse; }
.hero-orbit::before, .hero-orbit::after { content: "♥"; position: absolute; color: rgba(216,93,134,.38); font-size: 24px; }
.hero-orbit::before { top: -14px; left: 50%; }
.hero-orbit::after { bottom: -14px; right: 50%; }

.card-section {
  padding: 76px 30px 82px;
  border-radius: 38px;
  background: rgba(255,255,255,.78);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}
.section-heading { text-align: center; max-width: 680px; margin: 0 auto 40px; }
.section-heading > span { color: var(--rose); font-family: "Cairo", sans-serif; font-weight: 800; }
.section-heading h2 { margin: 8px 0 12px; font-family: "Cairo", sans-serif; font-size: clamp(2rem, 5vw, 3.25rem); color: var(--wine-dark); }
.section-heading p { margin: 0; color: var(--muted); line-height: 1.9; }

.cake-wrap { display: grid; justify-items: center; gap: 28px; }
.cake { position: relative; width: 260px; height: 260px; }
.candles { position: absolute; z-index: 6; top: 10px; left: 50%; transform: translateX(-50%); display: flex; gap: 38px; }
.candle { position: relative; width: 15px; height: 62px; border-radius: 6px 6px 2px 2px; background: repeating-linear-gradient(45deg, #fff 0 8px, #df6c96 8px 16px); box-shadow: 0 6px 12px rgba(111,23,59,.15); }
.flame { position: absolute; left: 50%; top: -28px; width: 17px; height: 28px; transform: translateX(-50%); border-radius: 50% 50% 48% 48%; background: radial-gradient(circle at 50% 65%, #fff6af 0 20%, #ffbb45 38%, #ff7045 72%); filter: drop-shadow(0 0 10px rgba(255,169,53,.8)); animation: flicker .9s ease-in-out infinite alternate; transform-origin: center bottom; }
.candles.blown .flame { animation: blowOut .5s forwards; }
.cake-top { position: absolute; z-index: 5; top: 76px; left: 50%; width: 230px; height: 58px; transform: translateX(-50%); border-radius: 50%; background: linear-gradient(180deg, #fff5f7, #f8cbd9); box-shadow: inset 0 -10px 16px rgba(172,63,99,.12); }
.cake-top span { position: absolute; top: 34px; width: 28px; height: 38px; border-radius: 0 0 16px 16px; background: #f6bdd0; }
.cake-top span:nth-child(1){left:18px}.cake-top span:nth-child(2){left:58px;height:48px}.cake-top span:nth-child(3){left:103px;height:34px}.cake-top span:nth-child(4){left:149px;height:44px}.cake-top span:nth-child(5){left:190px;height:30px}
.cake-layer { position: absolute; left: 50%; transform: translateX(-50%); background: linear-gradient(180deg, #d85d86, #ad315d); box-shadow: inset 0 -14px 24px rgba(88,13,43,.18); }
.layer-one { z-index: 3; top: 101px; width: 230px; height: 78px; }
.layer-two { z-index: 2; top: 170px; width: 258px; height: 64px; border-radius: 0 0 18px 18px; background: linear-gradient(180deg, #f09ab5, #c9527c); }
.cake-plate { position: absolute; z-index: 1; bottom: 12px; left: 50%; width: 290px; height: 34px; transform: translateX(-50%); border-radius: 50%; background: linear-gradient(180deg, #fff, #eecbcf); box-shadow: 0 12px 20px rgba(111,23,59,.13); }
.wish-message { min-height: 34px; margin: -8px 0 0; color: var(--wine); font-family: "Cairo", sans-serif; font-weight: 800; font-size: 1.15rem; text-align: center; }

.name-section { position: relative; max-width: 900px; text-align: center; }
.quote-mark { height: 90px; color: var(--rose-soft); font-family: Georgia, serif; font-size: 9rem; line-height: 1; }
.name-section p { margin: 14px 0; font-size: clamp(1.15rem, 3vw, 1.5rem); line-height: 2; color: var(--muted); }
.name-section strong { color: var(--rose); }
.name-section h2 { margin-top: 26px; font-family: "Cairo", sans-serif; font-size: clamp(2rem, 5.3vw, 3.6rem); line-height: 1.5; color: var(--wine-dark); }
.name-section h2 span { color: var(--rose); }

.gifts-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.gift-card { min-height: 210px; padding: 24px 16px; border: 1px solid rgba(111,23,59,.09); border-radius: 26px; color: var(--text); background: rgba(255,255,255,.82); box-shadow: 0 18px 40px rgba(73,12,39,.09); cursor: pointer; transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease; }
.gift-card:hover { transform: translateY(-10px) rotate(-1deg); box-shadow: 0 28px 48px rgba(73,12,39,.15); border-color: rgba(216,93,134,.35); }
.gift-card .gift-icon { display: block; margin-bottom: 18px; font-size: 3.2rem; transition: transform .25s ease; }
.gift-card:hover .gift-icon { transform: scale(1.12) rotate(6deg); }
.gift-card b, .gift-card small { display: block; }
.gift-card b { font-family: "Cairo", sans-serif; color: var(--wine); }
.gift-card small { margin-top: 8px; color: var(--muted); }
.gift-card.featured { color: #fff; background: linear-gradient(145deg, var(--wine), #a63a63); }
.gift-card.featured b, .gift-card.featured small { color: #fff; }

.question-card { min-height: 390px; padding: 58px 28px; display: grid; align-content: center; justify-items: center; text-align: center; border-radius: 36px; color: #fff; background: radial-gradient(circle at top right, rgba(255,255,255,.13), transparent 18rem), linear-gradient(145deg, #461027, #7b1d45 60%, #a83d65); box-shadow: 0 26px 70px rgba(65,10,35,.22); overflow: hidden; }
.mini-heart { font-size: 2.8rem; color: #ffc7d9; animation: heartbeat 1.4s infinite; }
.question-card h2 { max-width: 720px; margin: 16px 0 30px; font-family: "Cairo", sans-serif; font-size: clamp(1.8rem, 4.8vw, 3.1rem); }
.answers { position: relative; min-height: 72px; width: min(560px, 100%); display: flex; justify-content: center; align-items: center; gap: 14px; }
.question-card .primary-btn { background: #fff; color: var(--wine); }
.question-card .secondary-btn { color: #fff; background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.22); }
.runaway { position: relative; transition: transform .2s ease; }
.answer-message { min-height: 35px; margin: 20px 0 0; color: #ffd5e3; font-family: "Cairo", sans-serif; font-weight: 800; font-size: 1.15rem; }

.letter-section { text-align: center; }
.envelope { position: relative; width: 320px; height: 220px; margin: 10px auto 34px; border: 0; background: transparent; cursor: pointer; perspective: 900px; }
.envelope-back { position: absolute; inset: 34px 0 0; border-radius: 14px; background: #d75c85; box-shadow: 0 22px 40px rgba(111,23,59,.2); }
.envelope-front { position: absolute; z-index: 4; inset: 34px 0 0; overflow: hidden; border-radius: 14px; }
.envelope-front::before, .envelope-front::after { content: ""; position: absolute; width: 230px; height: 230px; top: 15px; background: #f28dad; transform: rotate(45deg); }
.envelope-front::before { right: -108px; }
.envelope-front::after { left: -108px; }
.envelope-flap { position: absolute; z-index: 6; top: 34px; left: 0; width: 0; height: 0; border-left: 160px solid transparent; border-right: 160px solid transparent; border-top: 120px solid #ef86a8; transform-origin: top; transition: transform .7s ease, z-index .15s .2s; filter: drop-shadow(0 8px 8px rgba(93,15,48,.12)); }
.letter-preview { position: absolute; z-index: 3; left: 50%; top: 52px; width: 260px; height: 138px; transform: translateX(-50%); display: grid; place-items: center; color: var(--wine); background: #fffdf8; border-radius: 8px; font-family: "Cairo", sans-serif; font-weight: 800; transition: transform .8s ease .15s; }
.seal { position: absolute; z-index: 7; left: 50%; top: 109px; width: 52px; height: 52px; transform: translateX(-50%); display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--wine); border: 4px solid rgba(255,255,255,.2); font-family: Georgia, serif; font-size: 1.45rem; transition: opacity .25s ease; }
.envelope.open .envelope-flap { z-index: 1; transform: rotateX(180deg); }
.envelope.open .letter-preview { transform: translate(-50%, -74px); }
.envelope.open .seal { opacity: 0; }
.letter-paper { max-width: 740px; margin: 0 auto; padding: 42px 42px 38px; text-align: right; border: 1px solid rgba(111,23,59,.08); border-radius: 20px; background: #fffefb; box-shadow: var(--shadow); transform: translateY(24px) scale(.98); opacity: 0; visibility: hidden; transition: opacity .7s ease, transform .7s ease, visibility .7s ease; }
.letter-paper.visible { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }
.letter-paper h3 { margin-top: 0; font-family: "Cairo", sans-serif; color: var(--wine); font-size: 2rem; }
.letter-paper p { color: #644554; line-height: 2.1; font-size: 1.08rem; }
.letter-signature { margin-top: 26px; color: var(--rose); font-family: "Cairo", sans-serif; font-weight: 800; font-size: 1.45rem; }

.final-section { min-height: 100svh; display: grid; place-items: center; align-content: center; text-align: center; }
.rose { position: relative; height: 140px; margin-bottom: 16px; }
.rose-head { position: relative; z-index: 2; display: block; font-size: 6rem; animation: roseSway 2.8s ease-in-out infinite; transform-origin: bottom center; }
.rose-stem { position: absolute; left: 50%; top: 78px; width: 5px; height: 72px; transform: translateX(-50%); border-radius: 99px; background: #527d4e; }
.final-section > p { margin: 0; color: var(--rose); font-family: "Cairo", sans-serif; font-weight: 800; }
.final-section h2 { margin: 10px 0 26px; font-family: "Cairo", sans-serif; font-size: clamp(2.1rem, 6vw, 4rem); color: var(--wine-dark); }
.final-message { display: grid; gap: 8px; margin-bottom: 30px; }
.final-message span { color: var(--muted); font-size: 1.2rem; }
.final-message b { color: var(--wine); }
.final-message strong { color: var(--rose); font-family: "Cairo", sans-serif; font-size: 2rem; }

.message-modal { width: min(500px, calc(100% - 30px)); padding: 38px 32px 34px; border: 0; border-radius: 28px; text-align: center; color: var(--text); background: #fffaf7; box-shadow: 0 34px 90px rgba(49,5,25,.35); }
.message-modal::backdrop { background: rgba(47,4,23,.64); backdrop-filter: blur(6px); }
.message-modal[open] { animation: modalIn .35s ease both; }
.modal-close { position: absolute; left: 16px; top: 12px; width: 38px; height: 38px; border: 0; border-radius: 50%; color: var(--wine); background: #f8e8ee; cursor: pointer; font-size: 1.5rem; }
.modal-heart { font-size: 3.2rem; color: var(--rose); animation: heartbeat 1.35s infinite; }
.message-modal h2 { margin: 8px 0 12px; color: var(--wine); font-family: "Cairo", sans-serif; }
.message-modal p { margin: 0; color: var(--muted); line-height: 2; font-size: 1.08rem; }

.reveal { opacity: 0; transform: translateY(45px); transition: opacity .8s ease, transform .8s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

@keyframes rise { to { transform: translateY(-115vh) rotate(30deg); opacity: 0; } }
@keyframes drift { to { transform: translate3d(60px, 80px, 0); } }
@keyframes glow { to { transform: scale(1.14); opacity: .7; } }
@keyframes giftFloat { 50% { transform: translateY(-8px) rotate(2deg); } }
@keyframes pulse { 50% { transform: scale(1.04); box-shadow: 0 18px 36px rgba(111,23,59,.3); } }
@keyframes bounce { 50% { transform: translateY(8px); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes flicker { to { transform: translateX(-50%) scale(.88) rotate(4deg); } }
@keyframes blowOut { to { transform: translateX(-50%) translateY(-14px) scale(.1); opacity: 0; } }
@keyframes heartbeat { 20% { transform: scale(1.18); } 40% { transform: scale(1); } 60% { transform: scale(1.12); } }
@keyframes roseSway { 50% { transform: rotate(5deg); } }
@keyframes modalIn { from { opacity: 0; transform: translateY(20px) scale(.96); } }

@media (max-width: 900px) {
  .gifts-grid { grid-template-columns: repeat(2, 1fr); }
  .gift-card.featured { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
  .section { width: min(100% - 22px, 1100px); padding: 70px 0; }
  .intro-card { padding: 38px 22px 30px; border-radius: 26px; }
  .gift-box { transform: scale(.9); margin-bottom: 0; }
  .music-toggle { left: 10px; top: 10px; padding: 9px 12px; }
  .music-toggle #musicLabel { display: none; }
  .hero h2 { font-size: clamp(2.35rem, 13vw, 4rem); }
  .orbit-one { width: 340px; height: 340px; }
  .orbit-two { width: 490px; height: 490px; }
  .card-section { padding: 60px 18px 68px; border-radius: 28px; }
  .cake { transform: scale(.88); margin: -14px 0; }
  .gifts-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .gift-card { min-height: 185px; padding: 20px 10px; }
  .gift-card .gift-icon { font-size: 2.7rem; }
  .question-card { min-height: 440px; padding: 44px 16px; border-radius: 28px; }
  .answers { min-height: 150px; flex-direction: column; }
  .answers button { width: min(280px, 100%); }
  .envelope { transform: scale(.88); margin-top: -8px; margin-bottom: 10px; }
  .letter-paper { padding: 30px 22px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}
