/* ===== Design tokens ===== */
:root {
  --bg-black:  #07070a;
  --bg-deep:   #0e0b12;
  --pink:      #ff5c8a;
  --pink-soft: #ff9ab0;
  --gold:      #c9a227;
  --gold-soft: #e3c878;
  --ink:       #f6ecdf;
  --ink-dim:   #d8c6b8;
  --glass:       rgba(255, 255, 255, 0.05);
  --glass-strong:rgba(255, 255, 255, 0.09);
  --glass-line:  rgba(255, 255, 255, 0.14);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Markazi Text", serif;
  background: var(--bg-black);
  overflow-x: hidden;
}

/* ======================================================
   1) شاشة البداية: قلب بينك بيكبر فوق خلفية سودا
   ====================================================== */
.intro {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-black);
  animation: intro-fade 1.4s ease forwards;
  animation-delay: 4s;
}

.intro-heart-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  transform: scale(0.3);
  opacity: 0.75;
  animation: heart-grow 4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.intro-heart {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  line-height: 1;
  color: var(--pink);
  filter: drop-shadow(0 0 18px rgba(255, 92, 138, 0.75));
}

.intro-letter {
  position: absolute;
  top: 30%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: "Aref Ruqaa Ink", serif;
  font-weight: 700;
  font-size: 1.1rem;
  line-height: 1;
  color: var(--bg-black);
}

@keyframes heart-grow {
  0%   { transform: scale(0.25); opacity: 0.6; }
  60%  { transform: scale(9);    opacity: 1; }
  100% { transform: scale(11);   opacity: 0; }
}

@keyframes intro-fade {
  from { opacity: 1; }
  to   { opacity: 0; visibility: hidden; pointer-events: none; }
}

/* ======================================================
   2) خلفية زجاجية متطورة: أورورا هادئة ومتحركة ببطء
   ====================================================== */
.bg-aurora {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: var(--bg-deep);
}

.blob {
  position: absolute;
  width: 55vw;
  height: 55vw;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.45;
  will-change: transform;
}

.blob-1 {
  top: -10%;
  left: -10%;
  background: radial-gradient(circle, var(--pink), transparent 70%);
  animation: drift-1 22s ease-in-out infinite;
}

.blob-2 {
  bottom: -15%;
  right: -10%;
  background: radial-gradient(circle, var(--gold), transparent 70%);
  animation: drift-2 26s ease-in-out infinite;
}

.blob-3 {
  bottom: 20%;
  left: 30%;
  width: 40vw;
  height: 40vw;
  background: radial-gradient(circle, #7a5cff, transparent 70%);
  opacity: 0.3;
  animation: drift-3 30s ease-in-out infinite;
}

@keyframes drift-1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(8vw, 6vh) scale(1.15); }
}
@keyframes drift-2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(-7vw, -5vh) scale(1.1); }
}
@keyframes drift-3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(5vw, -8vh) scale(1.2); }
}

/* ======================================================
   3) محتوى الموقع (بيظهر تدريجيًا بعد القلب)
   ====================================================== */
.site-content {
  position: relative;
  z-index: 1;
  opacity: 0;
  padding: 48px 20px 80px;
  animation: content-reveal 1.4s ease forwards;
  animation-delay: 4s;
}

@keyframes content-reveal {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .intro { display: none; }
  .site-content { opacity: 1; animation: none; transform: none; }
  .blob { animation: none; }
}

/* دخول ناعم بسيط لصفحات تانية من غير شاشة القلب (زي the remaining.html) */
.page-fade {
  position: relative;
  z-index: 1;
  opacity: 0;
  padding: 48px 20px 80px;
  animation: content-reveal 900ms ease forwards;
}

.cta-sub-link {
  color: var(--gold-soft);
  font-size: 1rem;
  text-decoration: none;
  border-bottom: 1px solid var(--glass-line);
  padding-bottom: 2px;
}
.cta-sub-link:hover { color: var(--pink-soft); }

/* رسالة الحب: خط رقعة انسيابي بإحساس رومانسي */
.love-letter {
  font-family: "Aref Ruqaa Ink", serif;
  font-size: 1.5rem;
  line-height: 2.3;
  color: var(--ink);
  text-align: center;
  margin: 0 0 26px;
}
.love-letter:last-child { margin-bottom: 0; }

/* زرار فيه صورة فوق النص */
.cta-image-button {
  flex-direction: column;
  padding: 22px 34px;
}
.cta-image-button img {
  border-radius: 14px;
  margin-bottom: 10px;
  object-fit: cover;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

/* ===== Page frame ===== */
.frame {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* ===== Hero ===== */
.hero { text-align: center; padding-top: 12px; }

.eyebrow {
  margin: 0 0 6px;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  color: var(--gold-soft);
}

.hero-title {
  margin: 0;
  font-family: "Aref Ruqaa Ink", serif;
  font-weight: 700;
  font-size: clamp(2.2rem, 6vw, 3.4rem);
  color: var(--ink);
  text-shadow: 0 2px 24px rgba(255, 92, 138, 0.35);
}

.hero-rule {
  display: block;
  width: 120px;
  height: 2px;
  margin: 18px auto 0;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

/* ===== Glass cards (shared) — نسخة أورورا متطورة ===== */
.card {
  position: relative;
  background: var(--glass);
  border: 1px solid var(--glass-line);
  border-radius: 22px;
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  padding: 28px 26px;
  overflow: hidden;
}

/* بطاقة الفيديو التاني - نفس شكل .card بالظبط */
#didi {
  position: relative;
  background: var(--glass);
  border: 1px solid var(--glass-line);
  border-radius: 22px;
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  padding: 28px 26px;
  overflow: hidden;
}

/* خط دقيق لامع أعلى كل بطاقة زجاجية */
.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
}

/* ===== Poem ===== */
.poem-card dl {
  margin: 0;
  font-family: "Rakkas", serif;
  font-size: 1.35rem;
  line-height: 2.1;
  text-align: center;
  color: var(--pink-soft);
}
.poem-card dt { color: var(--ink); }
.poem-card dd { margin: 0 0 10px; }

/* ===== الصور: صف واحد في نص البطاقة ===== */
.gallery-row {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.gallery-row img {
  height: 190px;
  width: auto;
  max-width: 100%;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid var(--glass-line);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  transition: transform 300ms ease;
}

.gallery-row img:hover { transform: translateY(-6px) scale(1.02); }

/* ===== Videos ===== */
.video-grid {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
}

.video-grid video {
  width: 320px;
  max-width: 100%;
  border-radius: 14px;
  border: 1px solid var(--glass-line);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

/* كلاس جاهز لأي فيديو جديد تضيفيه في أي صفحة - بنفس شكل باقي الفيديوهات بالظبط */
.site-video {
  display: block;
  width: 320px;
  max-width: 100%;
  margin: 0 auto;
  border-radius: 14px;
  border: 1px solid var(--glass-line);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

/* ===== Letter ===== */
.hearts-divider {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 18px;
  color: var(--pink);
  font-size: 1.1rem;
}
.hearts-divider span { animation: pulse 1.8s ease-in-out infinite; }
.hearts-divider span:nth-child(2) { animation-delay: 0.15s; }
.hearts-divider span:nth-child(3) { animation-delay: 0.3s; }
.hearts-divider span:nth-child(4) { animation-delay: 0.45s; }
.hearts-divider span:nth-child(5) { animation-delay: 0.6s; }

.letter {
  margin: 0;
  font-size: 1.25rem;
  line-height: 2.1;
  color: var(--ink-dim);
  text-align: center;
}

/* ===== Audio ===== */
.audio-dock { display: flex; justify-content: center; }
.audio-dock audio {
  width: min(420px, 90%);
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.5));
}

/* ===== CTA ===== */
.cta { display: flex; justify-content: center; }

.cta-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 18px 40px;
  text-decoration: none;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--pink-soft), var(--pink));
  color: var(--bg-black);
  box-shadow: 0 10px 30px rgba(255, 92, 138, 0.4);
  transition: transform 250ms ease, box-shadow 250ms ease;
}
.cta-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 36px rgba(255, 92, 138, 0.5);
}

.cta-main { font-family: "Aref Ruqaa Ink", serif; font-size: 1.6rem; font-weight: 700; }
.cta-sub  { font-size: 1rem; }

/* ===== Motion (شارك) ===== */
@keyframes pulse {
  0%, 100% { transform: scale(1);   opacity: 0.85; }
  50%      { transform: scale(1.25); opacity: 1; }
}

/* ===== Responsive ===== */
@media (max-width: 640px) {
  .card { padding: 22px 18px; }
  .gallery-row img { height: 130px; }
  .blob { width: 90vw; height: 90vw; }
}

/* ===== العداد ===== */
.counter-card { padding: 30px 20px; }

.counter-grid {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.counter-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 78px;
  padding: 14px 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-line);
}

.counter-num {
  font-family: "Aref Ruqaa Ink", serif;
  font-weight: 700;
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  color: var(--pink);
  text-shadow: 0 2px 16px rgba(255, 92, 138, 0.4);
  line-height: 1;
}

.counter-label {
  margin-top: 6px;
  font-size: 0.95rem;
  color: var(--ink-dim);
}

/* ===== صندوق الرسايل ===== */
.message-title {
  margin: 0 0 18px;
  font-size: 1.2rem;
  text-align: center;
  color: var(--ink);
}

.message-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.message-form textarea {
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--glass-line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
  font-family: "Aref Ruqaa Ink", serif;
  font-size: 1.3rem;
  resize: vertical;
}

.message-form textarea::placeholder { color: var(--ink-dim); }

.message-form textarea:focus {
  outline: none;
  border-color: var(--pink);
}

.message-status {
  margin: 14px 0 0;
  text-align: center;
  min-height: 1.2em;
  color: var(--gold-soft);
  font-size: 1rem;
}

/* ===== قلب الجزيئات (our-story.html) - يتحكم فيه الجافاسكريبت مش أنيميشن CSS ثابت ===== */
.particle-intro {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--glass-strong);
  backdrop-filter: blur(22px) saturate(150%);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  transition: opacity 1s ease;
  perspective: 900px;
}

.particle-intro canvas {
  display: block;
  width: 100vw;
  height: 100vh;
}

.particle-intro.hide {
  opacity: 0;
  pointer-events: none;
}

/* الصورة اللي بتتحرك جوه القلب مع الأنيميشن - حجمها ثابت (يطابق وحدات شكل القلب)
   وبتتكبر لحجمها النهائي عن طريق transform: scale في الجافاسكريبت عشان تفضل متجاوبة */
/* برواز حوالين الصورة - نفس شكل الزجاج المستخدم في باقي بطاقات الموقع بالظبط */
.heart-photo-frame {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100px;
  height: 100px;
  opacity: 0;
  transform: translate(-50%, -50%);
  transform-origin: center;
  will-change: opacity, transform;
}

/* اللف الطبيعي المستمر - CSS بحت، منفصل عن مراحل الجزيئات تمامًا */
.heart-spin {
  position: absolute;
  inset: 0;
  clip-path: path("M50,88 C50,88 10,60 10,35 C10,20 22,10 35,10 C43,10 50,16 50,25 C50,16 57,10 65,10 C78,10 90,20 90,35 C90,60 50,88 50,88 Z");
  background: var(--glass);
  border: 1px solid var(--glass-line);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transform-style: preserve-3d;
  animation: heart-spin-normal 6s linear infinite;
}

@keyframes heart-spin-normal {
  from { transform: rotateY(0deg); }
  to   { transform: rotateY(360deg); }
}

.heart-photo-img {
  position: absolute;
  inset: 6px;
  width: calc(100% - 12px);
  height: calc(100% - 12px);
  object-fit: cover;
}

.site-content-js {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 1.2s ease, transform 1.2s ease;
}

.site-content-js.show {
  opacity: 1;
  transform: translateY(0);
}