:root {
  --bg: #fff8f7;
  --surface: rgba(255, 250, 250, 0.72);
  --surface-strong: rgba(255, 247, 248, 0.9);
  --text: #4f2434;
  --text-soft: #765061;
  --accent: #9f365e;
  --accent-strong: #7e1f47;
  --accent-light: #f6d3de;
  --gold: #cc9d52;
  --border: rgba(175, 92, 123, 0.16);
  --shadow: 0 24px 70px rgba(120, 45, 71, 0.14);
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
  --container: min(100% - 28px, 720px);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.9), transparent 38%),
    linear-gradient(180deg, #fff6f4 0%, #fffaf7 42%, #fff4f8 100%);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    linear-gradient(120deg, rgba(204, 157, 82, 0.06), transparent 25%),
    radial-gradient(circle at 85% 20%, rgba(215, 140, 172, 0.16), transparent 24%),
    radial-gradient(circle at 12% 75%, rgba(172, 121, 168, 0.12), transparent 18%);
  pointer-events: none;
  z-index: -3;
}

.page-glow {
  position: fixed;
  width: 14rem;
  height: 14rem;
  border-radius: 50%;
  filter: blur(18px);
  opacity: 0.34;
  z-index: -2;
  pointer-events: none;
}

.glow-one {
  top: -2rem;
  left: -4rem;
  background: rgba(245, 188, 206, 0.9);
}

.glow-two {
  right: -3rem;
  bottom: 18%;
  background: rgba(208, 178, 229, 0.55);
}

.ornament {
  position: fixed;
  width: 9rem;
  height: 9rem;
  opacity: 0.28;
  pointer-events: none;
  z-index: -1;
}

.ornament::before,
.ornament::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(204, 157, 82, 0.3);
  border-radius: 48% 52% 46% 54% / 57% 44% 56% 43%;
  transform: rotate(10deg);
}

.ornament::after {
  inset: 0.9rem;
  transform: rotate(-14deg);
}

.ornament-top {
  top: 1rem;
  right: 0.6rem;
}

.ornament-bottom {
  bottom: 4rem;
  left: 0.4rem;
}

.particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 4;
}

.site-shell {
  width: var(--container);
  margin: 0 auto;
  padding: 20px 0 56px;
}

.panel {
  position: relative;
  margin-bottom: 18px;
  padding: 24px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  overflow: hidden;
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.42), transparent 36%, rgba(255, 231, 239, 0.34));
  pointer-events: none;
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.hero {
  min-height: calc(100vh - 40px);
  display: grid;
  align-content: center;
  gap: 14px;
  text-align: center;
}

.hero-photo-frame {
  position: relative;
  width: min(72vw, 288px);
  aspect-ratio: 4 / 5;
  margin: 4px auto 10px;
  padding: 8px;
  border-radius: 34px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(253, 229, 237, 0.82));
  border: 1px solid rgba(204, 157, 82, 0.28);
  box-shadow:
    0 22px 44px rgba(134, 55, 83, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
  overflow: hidden;
}

.hero-photo-halo {
  position: absolute;
  inset: auto;
  width: 72%;
  height: 72%;
  left: 14%;
  top: 14%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(247, 214, 224, 0.9), rgba(247, 214, 224, 0));
  filter: blur(18px);
  opacity: 0.9;
  pointer-events: none;
}

.hero-photo {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: 28px;
  box-shadow: 0 10px 24px rgba(116, 46, 70, 0.12);
}

.hero-badge,
.eyebrow,
.step-label {
  width: fit-content;
  max-width: 100%;
  padding: 8px 12px;
  border: 1px solid rgba(204, 157, 82, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-badge {
  margin: 0 auto;
}

.hero-intro,
.hero-text,
.section-heading h2,
.story-step p,
.letter-content p,
.final-message {
  position: relative;
  z-index: 1;
}

.hero h1,
.section-heading h2 {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  line-height: 0.96;
  letter-spacing: -0.03em;
}

.hero h1 {
  font-size: clamp(3rem, 12vw, 5.2rem);
  color: #6f2342;
  text-wrap: balance;
}

.hero-intro,
.hero-text,
.section-heading h2,
.story-step p,
.card-hint,
.card-message,
.letter-content p,
.translation,
.final-line,
.final-signature {
  color: var(--text-soft);
}

.hero-intro,
.hero-text {
  margin: 0 auto;
  max-width: 30rem;
  line-height: 1.75;
  font-size: 0.98rem;
}

.arabic-line {
  display: grid;
  gap: 6px;
  justify-items: center;
  margin: 6px 0 2px;
}

.arabic-text {
  font-family: "Noto Naskh Arabic", serif;
  font-size: 1.5rem;
  color: var(--accent-strong);
}

.translation {
  font-size: 0.9rem;
}

.primary-button,
.secondary-button,
.reveal-card {
  border: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  width: 100%;
  padding: 0 18px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.98rem;
  font-weight: 700;
  transition: transform 0.28s ease, box-shadow 0.28s ease, background 0.28s ease;
}

.primary-button {
  margin-top: 8px;
  color: #fff9fb;
  background: linear-gradient(135deg, #7e1f47 0%, #ad446d 55%, #d590a6 100%);
  box-shadow: 0 18px 38px rgba(136, 43, 78, 0.3);
}

.secondary-button {
  color: var(--accent-strong);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(159, 54, 94, 0.16);
}

.pulse-button {
  animation: pulse 2.8s ease-in-out infinite;
}

.primary-button:active,
.secondary-button:active,
.reveal-card:active {
  transform: scale(0.98);
}

.section-heading {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.section-heading h2 {
  font-size: clamp(2rem, 8vw, 3rem);
  line-height: 1.04;
  color: #66253f;
}

.story-step {
  display: none;
  gap: 14px;
  padding: 16px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.52);
  border: 1px solid rgba(175, 92, 123, 0.1);
}

.story-step.is-active {
  display: grid;
  animation: cardRise 0.75s ease both;
}

.story-step p,
.card-message,
.letter-content p,
.final-line {
  font-size: 0.98rem;
  line-height: 1.78;
}

.reveal-grid {
  display: grid;
  gap: 12px;
}

.reveal-card {
  position: relative;
  display: grid;
  gap: 10px;
  width: 100%;
  padding: 18px;
  text-align: left;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.76), rgba(255, 246, 248, 0.9));
  border: 1px solid rgba(175, 92, 123, 0.14);
  border-radius: var(--radius-md);
  box-shadow: 0 16px 40px rgba(139, 76, 102, 0.08);
  transition: transform 0.32s ease, box-shadow 0.32s ease, border-color 0.32s ease;
}

.reveal-card.is-open {
  border-color: rgba(204, 157, 82, 0.42);
  box-shadow: 0 20px 46px rgba(139, 76, 102, 0.12);
}

.card-title {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.85rem;
  color: #6f2342;
}

.card-hint {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.card-message {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease, opacity 0.45s ease, transform 0.45s ease;
  opacity: 0;
  transform: translateY(8px);
}

.reveal-card.is-open .card-message {
  max-height: 220px;
  opacity: 1;
  transform: translateY(0);
}

.letter-box {
  display: grid;
  gap: 14px;
}

.letter-content {
  display: grid;
  gap: 12px;
  max-height: 0;
  overflow: hidden;
  padding: 0 2px;
  transition: max-height 0.8s ease, opacity 0.6s ease, transform 0.6s ease;
  opacity: 0;
  transform: translateY(12px);
}

.letter-box.is-open .letter-content {
  opacity: 1;
  transform: translateY(0);
}

.letter-content p {
  margin: 0;
}

.ending-panel {
  text-align: center;
}

.final-button {
  margin-top: 4px;
}

.final-message {
  display: grid;
  gap: 14px;
  margin-top: 18px;
  padding: 18px;
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.74), rgba(255, 245, 247, 0.94));
  border: 1px solid rgba(204, 157, 82, 0.2);
  opacity: 0;
  transform: translateY(18px);
  pointer-events: none;
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.final-message.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.final-line,
.final-signature {
  margin: 0;
}

.final-line {
  opacity: 0;
  transform: translateY(12px);
}

.final-message.is-visible .final-line {
  animation: lineReveal 0.65s ease forwards;
}

.final-message.is-visible .final-line:nth-child(1) {
  animation-delay: 0.08s;
}

.final-message.is-visible .final-line:nth-child(2) {
  animation-delay: 0.3s;
}

.final-message.is-visible .final-line:nth-child(3) {
  animation-delay: 0.52s;
}

.final-signature {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.5rem;
  color: #7a294c;
  opacity: 0;
  transform: translateY(12px);
}

.final-message.is-visible .final-signature {
  animation: lineReveal 0.65s ease forwards;
  animation-delay: 0.82s;
}

.heart-particle {
  position: absolute;
  width: 16px;
  height: 16px;
  background: linear-gradient(135deg, rgba(215, 78, 126, 0.95), rgba(255, 208, 222, 0.95));
  transform: rotate(45deg);
  border-radius: 4px;
  opacity: 0;
  animation: floatHeart 1.35s ease-out forwards;
}

.heart-particle::before,
.heart-particle::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  background: inherit;
  border-radius: 50%;
}

.heart-particle::before {
  top: -8px;
  left: 0;
}

.heart-particle::after {
  left: -8px;
  top: 0;
}

@keyframes pulse {
  0%,
  100% {
    transform: translateY(0);
    box-shadow: 0 18px 38px rgba(136, 43, 78, 0.3);
  }
  50% {
    transform: translateY(-2px);
    box-shadow: 0 20px 42px rgba(136, 43, 78, 0.36);
  }
}

@keyframes cardRise {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes lineReveal {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes floatHeart {
  0% {
    opacity: 0;
    transform: translate3d(0, 8px, 0) rotate(45deg) scale(0.7);
  }
  15% {
    opacity: 0.9;
  }
  100% {
    opacity: 0;
    transform: translate3d(var(--drift-x), -72px, 0) rotate(45deg) scale(1.15);
  }
}

@media (min-width: 700px) {
  .site-shell {
    padding-top: 28px;
    padding-bottom: 72px;
  }

  .panel {
    padding: 32px 28px;
  }

  .reveal-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .primary-button,
  .secondary-button {
    width: auto;
    min-width: 220px;
  }

  .hero {
    justify-items: center;
  }

  .hero-photo-frame {
    width: min(28vw, 320px);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }

  .reveal,
  .final-message,
  .final-line,
  .final-signature,
  .card-message,
  .letter-content {
    opacity: 1 !important;
    transform: none !important;
  }

  .story-step {
    display: grid;
  }
}
