/* ============================================================
   قالب teddy — أجواء حضانة دافئة: عسلي/كراميل + كريمي + نعناعي/خوخي/وردي
   دباديب لطيفة، أشكال مستديرة، ظلال ناعمة، حركة قفز مرحة
   ============================================================ */

:root {
  --bg:       #fbf2e6;   /* كريمي دافئ */
  --cream:    #fff8ef;
  --honey:    #d99a4e;   /* عسلي */
  --honey-dp: #b97a31;   /* كراميل غامق */
  --honey-sf: #f3dcb8;
  --brown:    #8a5a36;   /* بنّي الدبدوب */
  --mint:     #79cdb6;   /* نعناعي ناعم */
  --peach:    #ffb38a;   /* خوخي */
  --blush:    #ff9cb8;   /* وردي */
  --blush-sf: #ffe0e8;
  --ink:      #5a4128;   /* نص بنّي دافئ */
  --ink-sf:   #9b8268;
  --line:     rgba(217, 154, 78, 0.30);

  --font-display: "Lalezar", system-ui, sans-serif;
  --font-body:    "Tajawal", system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 50% -5%, #fffaf2, transparent 52%),
    radial-gradient(circle at 0% 100%, #ffe9d6, transparent 44%),
    radial-gradient(circle at 100% 92%, #e3f5ee, transparent 42%);
  line-height: 1.85;
  overflow-x: hidden;
}

/* ====================== شاشة الدخول ====================== */
.cover {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 34%, #fff8ef, #ffeeda 68%, #f7dcbf 100%);
  transition: opacity 1s ease, visibility 1s ease;
}
.cover.is-open { opacity: 0; visibility: hidden; pointer-events: none; }

/* طبقة خلفية اختيارية بحوافّ ناعمة متلاشية — تظهر خلف المحتوى فقط عند ضبط صورة */
.bg-photo {
  position: absolute; inset: 0; z-index: 0;
  background-size: cover; background-position: center;
  opacity: 0; transition: opacity 0.9s ease; pointer-events: none;
  -webkit-mask-image: radial-gradient(ellipse 80% 74% at 50% 42%, #000 48%, transparent 100%);
  mask-image: radial-gradient(ellipse 80% 74% at 50% 42%, #000 48%, transparent 100%);
}
.bg-photo.is-shown { opacity: 0.62; }

.cover__hearts { position: absolute; inset: 0; pointer-events: none; }
.cover__hearts span {
  position: absolute; bottom: -24px; opacity: 0;
  animation: heartRise linear infinite;
}
@keyframes heartRise {
  0% { opacity: 0; transform: translateY(0) rotate(-8deg); }
  12% { opacity: 0.9; }
  100% { opacity: 0; transform: translateY(-112vh) rotate(8deg); }
}

.cover__inner { position: relative; z-index: 1; width: min(360px, 88vw); display: flex; flex-direction: column; align-items: center; gap: 6px; }
.cover__teddy { width: min(270px, 66vw); }
.teddySvg { width: 100%; height: auto; display: block; filter: drop-shadow(0 16px 24px rgba(138,90,54,0.26)); }

/* لمسات حيّة على الغلاف: تأرجح لطيف للرأس والذراع والبالون */
.teddyHead { transform-box: fill-box; transform-origin: 126px 110px; animation: headSway 3.4s ease-in-out infinite; }
.teddyArm--r { transform-box: fill-box; transform-origin: 190px 130px; animation: armWave 2.4s ease-in-out infinite; }
.teddyBalloon { transform-box: fill-box; transform-origin: 216px 96px; animation: balloonFloat 3.8s ease-in-out infinite; }
.teddyHeart { transform-box: fill-box; transform-origin: 126px 198px; animation: heartBeat 1.8s ease-in-out infinite; }
.teddyGlow { opacity: 0.6; transform-box: fill-box; transform-origin: center; animation: glowPulse 4s ease-in-out infinite; }
@keyframes headSway { 0%,100% { transform: rotate(-2.5deg); } 50% { transform: rotate(2.5deg); } }
@keyframes armWave { 0%,100% { transform: rotate(-26deg); } 50% { transform: rotate(-44deg); } }
@keyframes balloonFloat { 0%,100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-6px) rotate(3deg); } }
@keyframes heartBeat { 0%,100% { transform: scale(1); } 35% { transform: scale(1.18); } 55% { transform: scale(0.96); } }
@keyframes glowPulse { 0%,100% { opacity: 0.5; transform: scale(0.96); } 50% { opacity: 0.8; transform: scale(1.04); } }

/* قفزة افتتاحية مرحة عند الضغط */
.teddySvg.is-pop { animation: teddyPop 0.9s cubic-bezier(0.22, 1.4, 0.4, 1) both; }
@keyframes teddyPop {
  0%   { transform: scale(1) translateY(0) rotate(0); }
  28%  { transform: scale(1.12, 0.9) translateY(8px) rotate(-2deg); }
  55%  { transform: scale(0.94, 1.12) translateY(-34px) rotate(2deg); }
  78%  { transform: scale(1.05, 0.95) translateY(0) rotate(-1deg); }
  100% { transform: scale(1) translateY(0) rotate(0); }
}

.cover__center { position: relative; z-index: 2; }
.cover__label { color: var(--ink-sf); font-size: 13px; letter-spacing: normal; }
.cover__mono {
  font-family: var(--font-display);
  font-size: clamp(28px, 8.5vw, 46px); padding: 0 10px;
  background: linear-gradient(90deg, var(--honey-dp), var(--peach) 55%, var(--blush));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  line-height: 1.2; margin: 4px 0 16px;
}
.cover__btn {
  font-family: var(--font-body); font-size: 16px; font-weight: 800;
  color: #fff;
  background: linear-gradient(180deg, var(--honey), var(--honey-dp));
  border: none; border-radius: 999px; padding: 13px 32px; cursor: pointer;
  letter-spacing: normal; box-shadow: 0 12px 26px rgba(185,122,49,0.38);
  transition: transform 0.25s ease, filter 0.25s ease;
}
.cover__btn:hover { transform: translateY(-2px); filter: brightness(1.05); }

/* ====================== المحتوى ====================== */
.invite { position: relative; max-width: 680px; margin: 0 auto; padding: 0 20px 72px; }
.floaties { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 1; }
.floaty { position: absolute; bottom: -30px; opacity: 0; animation: floatUpScreen linear forwards; }
@keyframes floatUpScreen {
  0% { opacity: 0; transform: translateY(0) rotate(-6deg); }
  12% { opacity: 0.95; }
  100% { opacity: 0; transform: translateY(-114vh) rotate(8deg); }
}

.section { position: relative; z-index: 2; text-align: center; padding: clamp(46px, 9vw, 82px) clamp(10px, 4vw, 30px); }
.section + .section { border-top: 1px dashed var(--line); }
.section__title {
  font-family: var(--font-display); font-weight: 400; letter-spacing: normal;
  font-size: clamp(27px, 7vw, 40px); color: var(--honey-dp); margin-bottom: 16px;
}
.divider { display: flex; align-items: center; justify-content: center; gap: 12px; max-width: 280px; margin: 22px auto; font-size: 24px; }
.divider span { height: 2px; flex: 1; border-radius: 2px; background: repeating-linear-gradient(90deg, var(--honey) 0 8px, transparent 8px 16px); opacity: 0.55; }

/* الترويسة */
.hero { padding-top: clamp(54px, 13vw, 100px); overflow: hidden; }
.hero__kicker { color: var(--ink-sf); letter-spacing: normal; font-size: 13px; margin-bottom: 6px; }
.celebrant {
  font-family: var(--font-display); font-weight: 400; line-height: 1.15; letter-spacing: normal;
  font-size: clamp(48px, 16vw, 92px);
  background: linear-gradient(92deg, var(--honey-dp), var(--peach) 52%, var(--blush));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  margin: 4px 0 12px; filter: drop-shadow(0 4px 10px rgba(185,122,49,0.20));
}
.agewrap {
  display: inline-flex; align-items: center; gap: 8px;
  background: linear-gradient(180deg, #fff, var(--honey-sf));
  border: 2px solid #fff; border-radius: 999px; padding: 8px 22px;
  box-shadow: 0 10px 24px rgba(185,122,49,0.22); margin: 4px 0 14px;
}
.age__icon { font-size: 22px; }
.age__num { font-family: var(--font-display); font-size: clamp(30px, 8vw, 44px); color: var(--honey-dp); line-height: 1; letter-spacing: normal; }
.age__txt { color: var(--ink-sf); font-weight: 700; font-size: 15px; letter-spacing: normal; }
.hero__greet { font-family: var(--font-display); color: var(--mint); font-size: clamp(20px, 5.5vw, 28px); margin-top: 4px; letter-spacing: normal; }
.hero__date { color: var(--honey-dp); font-weight: 700; font-size: clamp(14px, 4vw, 18px); margin-top: 12px; letter-spacing: normal; }

/* تلميح التمرير للأسفل — واضح لكن رقيق */
.hero__scroll {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  margin-top: clamp(22px, 5vw, 34px);
  color: var(--honey-dp);
  text-shadow: 0 1px 8px rgba(0,0,0,0.28);
}
.hero__scroll-txt {
  font-family: var(--font-body); font-weight: 700;
  font-size: 0.88rem; letter-spacing: normal;
}
.hero__scroll-arrow {
  font-size: 1.2rem; line-height: 1;
  animation: heroScrollBob 1.8s ease-in-out infinite;
}
@keyframes heroScrollBob {
  0%,100% { transform: translateY(0); opacity: 0.85; }
  50%     { transform: translateY(7px); opacity: 1; }
}

/* صورة الطفل في الترويسة — إطار دائري دافئ يناسب أجواء الدباديب */
#heroPhoto {
  display: none;
  width: clamp(120px, 34vw, 180px);
  aspect-ratio: 1 / 1;
  margin: 6px auto 14px;
  padding: 6px;
  border-radius: 50%;
  background: linear-gradient(180deg, #fff, var(--honey-sf));
  border: 3px solid #fff;
  box-shadow: 0 14px 30px rgba(185,122,49,0.30), 0 0 0 4px var(--blush-sf);
}
#heroPhoto.is-shown { display: block; animation: heroPhotoIn 0.8s cubic-bezier(0.22, 1, 0.36, 1) both; }
#heroPhoto img {
  width: 100%; height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
@keyframes heroPhotoIn {
  0%   { opacity: 0; transform: scale(0.86); }
  100% { opacity: 1; transform: scale(1); }
}

/* دباديب صغيرة في الترويسة */
.miniTeddy { position: absolute; top: 18px; width: 46px; height: 49px; opacity: 0.92; animation: teddyBob 4.5s ease-in-out infinite; }
.miniTeddy svg { width: 100%; height: auto; display: block; filter: drop-shadow(0 6px 10px rgba(138,90,54,0.18)); }
.miniTeddy--a { inset-inline-start: 6%; }
.miniTeddy--b { inset-inline-end: 7%; top: 34px; animation-delay: 1.4s; }
@keyframes teddyBob { 0%,100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-12px) rotate(4deg); } }

/* العدّاد */
.when__date { font-family: var(--font-display); font-size: clamp(22px, 5.5vw, 31px); color: var(--ink); letter-spacing: normal; }
.when__time { color: var(--ink-sf); margin-top: 2px; font-size: 15px; }
.countdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(8px, 2vw, 14px); max-width: 430px; margin: 26px auto 0; }
.cd__cell {
  border: 2px solid #fff; border-radius: 18px; padding: 15px 4px;
  background: linear-gradient(180deg, #fff, var(--honey-sf));
  box-shadow: 0 8px 18px rgba(185,122,49,0.16);
}
.cd__num { display: block; font-family: var(--font-display); font-size: clamp(28px, 8vw, 42px); color: var(--honey-dp); font-variant-numeric: tabular-nums; line-height: 1.1; letter-spacing: normal; }
.cd__lbl { display: block; color: var(--ink-sf); font-size: 12px; margin-top: 2px; }
.when__arrived { font-family: var(--font-display); color: var(--honey-dp); font-size: clamp(23px, 6vw, 34px); margin-top: 20px; letter-spacing: normal; }

/* نص الدعوة */
.invitation__text { font-size: clamp(15px, 4vw, 17px); color: var(--ink); line-height: 2.1; max-width: 42ch; margin: 0 auto; }

/* برنامج الحفل */
.timeline { list-style: none; max-width: 360px; margin: 6px auto 0; text-align: start; }
.timeline__item { position: relative; display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: 12px; padding: 12px 18px 12px 0; border-inline-start: 2px dashed var(--line); margin-inline-start: 6px; }
.timeline__dot { position: absolute; inset-inline-start: -8px; top: 17px; width: 12px; height: 12px; border-radius: 50%; background: var(--honey); box-shadow: 0 0 0 3px var(--bg); }
.timeline__time { font-family: var(--font-display); color: var(--honey-dp); font-size: 16px; min-width: 92px; letter-spacing: normal; }
.timeline__title { color: var(--ink); font-size: 15px; }

/* ملاحظات */
.notes__list { list-style: none; max-width: 400px; margin: 4px auto 0; text-align: start; }
.notes__item { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; color: var(--ink); font-size: 15px; line-height: 1.7; }
.notes__mark { font-size: 15px; margin-top: 2px; flex-shrink: 0; }

/* القاعة */
.venue__art { color: var(--honey); width: clamp(150px, 44vw, 200px); margin: 0 auto 14px; }
.venue__art svg { width: 100%; height: auto; display: block; }
.venue__name { font-family: var(--font-display); font-size: clamp(24px, 6.5vw, 34px); color: var(--ink); letter-spacing: normal; }
.venue__addr { color: var(--ink-sf); margin-top: 4px; font-size: 15px; }
.venue__btn {
  display: inline-flex; align-items: center; gap: 9px; margin-top: 22px;
  font-weight: 800; font-size: 15px; color: #fff; letter-spacing: normal;
  background: linear-gradient(180deg, var(--honey), var(--honey-dp));
  border-radius: 999px; padding: 12px 28px; text-decoration: none;
  box-shadow: 0 8px 20px rgba(185,122,49,0.3); transition: transform 0.25s ease, filter 0.25s ease;
}
.venue__btn:hover { transform: translateY(-2px); filter: brightness(1.05); }

/* الخاتمة */
.closing__note { font-family: var(--font-display); font-size: clamp(22px, 6vw, 30px); color: var(--ink); margin-bottom: 8px; letter-spacing: normal; }
.closing__hashtag { color: var(--honey-dp); font-weight: 700; font-size: 15px; letter-spacing: normal; margin-bottom: 18px; }
.contact { margin: 0 auto 18px; padding: 14px 18px; border: 2px solid #fff; border-radius: 18px; max-width: 280px; background: linear-gradient(180deg, #fff, var(--blush-sf)); box-shadow: 0 8px 18px rgba(185,122,49,0.14); }
.contact__label { display: block; color: var(--ink-sf); font-size: 13px; margin-bottom: 4px; }
.contact__link { display: inline-flex; align-items: center; gap: 7px; color: var(--honey-dp); font-weight: 800; font-size: 17px; text-decoration: none; }
.contact__link:hover { text-decoration: underline; }
.contact__link::before { content: "💬"; }
.closing__host { color: var(--ink-sf); font-size: 15px; margin-bottom: 16px; }
.cherry { font-size: 26px; display: inline-block; }

/* حركة الظهور */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.9s ease, transform 0.9s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  *, .reveal { transition: none !important; animation: none !important; }
  .reveal { opacity: 1; transform: none; }
  .teddyGlow { opacity: 0.5; }
  .bg-photo { transition: none !important; }
}
