/* ===== Cosmic wedding invitation – out of this world ===== */
:root {
  --void: #0a0612;
  --void-soft: #12101a;
  --twilight: #1a1530;
  --cosmic: #2d2640;
  --mist: #6b5b95;
  --blush: #c9a0b8;
  --starlight: #e8dce8;
  --gold: #e8c547;
  --gold-soft: #f0d97a;
  --white: #fff;
  --font-signature: 'Great Vibes', cursive;
  --font-calligraphy: 'Sacramento', cursive;
  --font-details: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
  --space-xs: 0.35rem;
  --space-sm: 0.6rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2.25rem;
  --space-2xl: 3.5rem;
  --card-radius: 6px;
  --gold-border: 2px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-write: cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--starlight);
  background: var(--void);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  letter-spacing: 0.01em;
}

/* ===== Cosmos background ===== */
.cosmos {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.gradient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  animation: orbFloat 25s var(--ease-out) infinite;
}

.gradient-orb-1 {
  width: min(80vw, 400px);
  height: min(80vw, 400px);
  background: radial-gradient(circle, var(--mist) 0%, transparent 70%);
  top: -10%;
  left: -20%;
  animation-delay: 0s;
}

.gradient-orb-2 {
  width: min(60vw, 320px);
  height: min(60vw, 320px);
  background: radial-gradient(circle, var(--blush) 0%, transparent 70%);
  bottom: -5%;
  right: -15%;
  animation-delay: -8s;
  animation-duration: 30s;
}

.gradient-orb-3 {
  width: min(40vw, 200px);
  height: min(40vw, 200px);
  background: radial-gradient(circle, var(--gold) 0%, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: -15s;
  animation-duration: 20s;
  opacity: 0.25;
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(3%, -5%) scale(1.05); }
  66% { transform: translate(-4%, 3%) scale(0.98); }
}

/* Stars – generated by JS, styled here */
.stars {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(2px 2px at 20px 30px, var(--starlight), transparent),
    radial-gradient(2px 2px at 40px 70px, rgba(255,255,255,0.6), transparent),
    radial-gradient(1.5px 1.5px at 90px 40px, var(--gold-soft), transparent),
    radial-gradient(2px 2px at 130px 80px, var(--starlight), transparent),
    radial-gradient(1.5px 1.5px at 160px 120px, rgba(255,255,255,0.5), transparent);
  background-size: 200px 200px;
  background-repeat: repeat;
  opacity: 0.6;
  animation: starDrift 120s linear infinite;
}

.twinkle-layer {
  position: absolute;
  inset: 0;
  background: transparent;
  animation: twinkle 4s ease-in-out infinite;
}

@keyframes starDrift {
  from { transform: translate(0, 0); }
  to { transform: translate(-200px, -200px); }
}

@keyframes twinkle {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.7; }
}

/* ===== Background details ===== */
.cosmos-pattern {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 50% 50%, rgba(232, 201, 71, 0.04) 0%, transparent 55%),
    linear-gradient(105deg, rgba(232, 201, 71, 0.03) 0%, transparent 50%),
    linear-gradient(195deg, rgba(201, 160, 184, 0.03) 0%, transparent 50%);
  background-size: 100% 100%, 100% 100%, 100% 100%;
  pointer-events: none;
}

.cosmos-pattern::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(
    circle,
    rgba(232, 220, 232, 0.04) 1px,
    transparent 1px
  );
  background-size: 24px 24px;
  pointer-events: none;
}

.cosmos-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 90% 85% at 50% 50%,
    transparent 40%,
    rgba(10, 6, 18, 0.4) 100%
  );
  pointer-events: none;
}

/* ===== Invitation container & card ===== */
.invitation {
  position: relative;
  z-index: 2;
  max-width: 520px;
  margin: 0 auto;
  padding: var(--space-md) var(--space-sm);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.invitation-card {
  width: 100%;
  max-width: 100%;
  padding: var(--space-lg) var(--space-md);
  overflow: visible;
  background: linear-gradient(
    165deg,
    rgba(18, 16, 26, 0.85) 0%,
    rgba(26, 21, 48, 0.75) 50%,
    rgba(18, 16, 26, 0.85) 100%
  );
  border: var(--gold-border) solid transparent;
  border-radius: var(--card-radius);
  box-shadow:
    0 0 0 1px rgba(232, 201, 71, 0.25),
    inset 0 0 0 1px rgba(232, 201, 71, 0.12),
    0 0 40px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(232, 220, 232, 0.06);
  background-clip: padding-box;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.invitation-card::before {
  content: '';
  position: absolute;
  inset: calc(-1 * var(--gold-border));
  border-radius: calc(var(--card-radius) + 2px);
  padding: var(--gold-border);
  background: linear-gradient(
    135deg,
    var(--gold-soft) 0%,
    var(--gold) 25%,
    rgba(232, 201, 71, 0.6) 50%,
    var(--gold) 75%,
    var(--gold-soft) 100%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.card-corner {
  position: absolute;
  width: 20px;
  height: 20px;
  border-color: var(--gold);
  border-style: solid;
  border-width: 0;
  pointer-events: none;
  opacity: 0.85;
}

.card-corner-tl {
  top: 0;
  left: 0;
  border-top-width: 2px;
  border-left-width: 2px;
  border-radius: var(--card-radius) 0 0 0;
}

.card-corner-tr {
  top: 0;
  right: 0;
  border-top-width: 2px;
  border-right-width: 2px;
  border-radius: 0 var(--card-radius) 0 0;
}

.card-corner-bl {
  bottom: 0;
  left: 0;
  border-bottom-width: 2px;
  border-left-width: 2px;
  border-radius: 0 0 0 var(--card-radius);
}

.card-corner-br {
  bottom: 0;
  right: 0;
  border-bottom-width: 2px;
  border-right-width: 2px;
  border-radius: 0 0 var(--card-radius) 0;
}

/* ===== Hero – title stage (confetti image + text in middle) ===== */
.hero-title-stage {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.hero-title-stage.phase-done {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.4s ease;
}

/* Golden confetti bars – zoom in and out for intro duration */
@keyframes confettiZoomTop {
  0% {
    transform: translateY(0) scale(0.94);
    opacity: 1;
  }
  50% {
    transform: translateY(0) scale(1.12);
    opacity: 1;
  }
  100% {
    transform: translateY(0) scale(0.94);
    opacity: 1;
  }
}

@keyframes confettiZoomBottom {
  0% {
    transform: translateY(0) scale(0.94);
    opacity: 1;
  }
  50% {
    transform: translateY(0) scale(1.12);
    opacity: 1;
  }
  100% {
    transform: translateY(0) scale(0.94);
    opacity: 1;
  }
}

.confetti-strip {
  position: absolute;
  left: 0;
  right: 0;
  height: 32vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  mix-blend-mode: lighten;
}

.confetti-strip--top {
  top: 0;
  align-items: flex-end;
  padding-bottom: 2vh;
  transform-origin: 50% 0;
  animation: confettiZoomTop 3s ease-in-out forwards;
}

.confetti-strip--bottom {
  bottom: 0;
  align-items: flex-start;
  padding-top: 2vh;
  transform-origin: 50% 100%;
  animation: confettiZoomBottom 3s ease-in-out forwards;
}

.confetti-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  mix-blend-mode: lighten;
}

.confetti-strip--bottom .confetti-img {
  transform: scaleY(-1);
}

/* Sentence hidden until word phase */
.title-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.15em 0.25em;
  text-align: center;
  position: relative;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.hero-title-stage.word-phase .title-line {
  opacity: 1;
}

.stage-space {
  width: 0.2em;
  display: inline-block;
}

.signature-text--stage {
  font-size: clamp(1.65rem, 9vw, 2.5rem);
  font-weight: 400;
  line-height: 1.1;
  color: var(--starlight);
  text-shadow: 0 0 40px rgba(232, 220, 232, 0.35);
  display: inline-block;
}

.word-font-1 {
  font-family: 'Great Vibes', cursive;
}

.word-font-2 {
  font-family: 'Sacramento', cursive;
}

.word-font-3 {
  font-family: 'Dancing Script', cursive;
}

.signature-text--stage .char {
  opacity: 0;
  transform: translateY(-28px);
  animation: letterFall 0.7s var(--ease-out) forwards;
}

.stage-heart {
  display: inline-block;
  color: #fff;
  font-size: clamp(1.4rem, 7vw, 2.25rem);
  line-height: 1;
  text-shadow: 0 0 24px rgba(255, 255, 255, 0.6);
  opacity: 0;
  transform: translateY(-28px);
  animation: letterFall 0.7s var(--ease-out) forwards;
}

@keyframes letterFall {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== Hero ===== */
.hero {
  text-align: center;
  padding: var(--space-xs) 0 var(--space-sm);
}

.signature-title {
  font-family: var(--font-signature);
  font-size: clamp(3rem, 18vw, 5rem);
  font-weight: 400;
  line-height: 1.1;
  color: var(--starlight);
  text-shadow: 0 0 40px rgba(232, 220, 232, 0.3);
  margin-bottom: var(--space-xs);
  overflow: hidden;
  display: inline-block;
}

/* Handwritten character – each letter revealed like a signature */
.signature-title .char,
.signature-text .char {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.4em) scale(0.96);
  animation: letterReveal 0.5s var(--ease-write) forwards;
}

.signature-title .char {
  animation-duration: 0.6s;
}

.signature-text .char {
  font-family: var(--font-signature);
  font-size: clamp(1.4rem, 5vw, 1.85rem);
  color: var(--gold-soft);
  text-shadow: 0 0 20px rgba(240, 217, 122, 0.25);
}

@keyframes revealUp {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes revealScale {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes letterReveal {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes fadeIn {
  to { opacity: 1; }
}

/* Decorative line that “draws” under the title */
/* ===== Couple names at top (with float animation) ===== */
.couple-names {
  text-align: center;
  padding: var(--space-sm) 0;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.invitation-card.intro-done .couple-names {
  opacity: 1;
  animation: namesFloat 4s ease-in-out infinite;
}

@keyframes namesFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.invitation-card.intro-done .couple-names .hero-names-label {
  animation: revealUp 0.4s var(--ease-out) 0s forwards;
}

.invitation-card.intro-done .couple-names .hero-names {
  animation: revealUp 0.4s var(--ease-out) 0.08s forwards;
}

.invitation-card.intro-done .couple-names .signature-line {
  opacity: 1;
  animation: drawLine 0.8s var(--ease-out) 0.25s forwards;
}

.couple-names .hero-names-label {
  margin-top: 0;
}

.signature-line {
  width: 0;
  height: 2px;
  margin: var(--space-sm) auto 0;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  border-radius: 2px;
  opacity: 0;
}

.hero.phase-reveal .signature-line {
  opacity: 1;
  animation: drawLine 0.8s var(--ease-out) 0.2s forwards;
}

@keyframes drawLine {
  to { width: min(200px, 60vw); }
}

.hero-subtitle {
  font-family: var(--font-body);
  font-size: clamp(1.0625rem, 4vw, 1.25rem);
  font-weight: 400;
  color: var(--starlight);
  letter-spacing: 0.06em;
  margin-top: var(--space-md);
  opacity: 0;
  transform: translateY(12px);
}

.hero.phase-reveal .hero-subtitle {
  animation: revealUp 0.4s var(--ease-out) 0s forwards;
}

.hero-names-label {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--blush);
  margin-top: var(--space-md);
  margin-bottom: var(--space-xs);
  opacity: 0;
  transform: translateY(12px);
}

.hero.phase-reveal .hero-names-label {
  animation: revealUp 0.4s var(--ease-out) 0.05s forwards;
}

.hero-names {
  margin: 0;
  position: relative;
  opacity: 0;
  transform: translateY(12px);
}

.hero.phase-reveal .hero-names {
  animation: revealUp 0.4s var(--ease-out) 0.1s forwards;
}

/* Decorative names: same style as intro phrase (word-font-1, 2, 3) */
.hero-names {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.12em 0.2em;
}

.hero-names-word {
  font-size: clamp(1.85rem, 10vw, 3rem);
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: 0.02em;
  background: linear-gradient(135deg, var(--gold-soft) 0%, var(--gold) 40%, var(--starlight) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  filter: drop-shadow(0 0 18px rgba(240, 217, 122, 0.45))
          drop-shadow(0 2px 6px rgba(0, 0, 0, 0.25));
}

.hero-names-amp {
  font-size: clamp(1.5rem, 8vw, 2.5rem);
  font-weight: 400;
  line-height: 1;
  color: var(--gold-soft);
  text-shadow: 0 0 24px rgba(240, 217, 122, 0.5);
  display: inline-block;
  margin: 0 0.05em;
}

.hero-names .signature-text .char {
  opacity: 0;
  transform: translateY(-28px);
  animation: letterFall 0.7s var(--ease-out) forwards;
  background: linear-gradient(135deg, var(--gold-soft) 0%, var(--gold) 35%, var(--starlight) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 12px rgba(240, 217, 122, 0.4));
}

/* Fancy underline under the names */
.hero-names::after {
  content: '';
  flex-basis: 100%;
  width: 85%;
  height: 3px;
  margin: 0.15em auto 0;
  background: linear-gradient(90deg, transparent, var(--gold), var(--gold-soft), var(--gold), transparent);
  border-radius: 2px;
  opacity: 0.8;
  box-shadow: 0 0 14px rgba(232, 201, 71, 0.55);
}

.signature-text {
  display: inline-block;
}

/* ===== Details – calligraphy / signature style ===== */
.details-calligraphy {
  text-align: center;
  padding: var(--space-xs) 0;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.75s var(--ease-out), transform 0.75s var(--ease-out);
}

.details-calligraphy.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Gold box around event details */
.details-box {
  border: 1px solid rgba(232, 201, 71, 0.55);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(232, 201, 71, 0.06) 0%, rgba(26, 21, 48, 0.4) 50%, rgba(232, 201, 71, 0.04) 100%);
  box-shadow: 0 0 0 1px rgba(232, 201, 71, 0.2) inset, 0 0 24px rgba(232, 201, 71, 0.08);
  padding: var(--space-sm) var(--space-md) var(--space-xs) var(--space-md);
  max-width: 100%;
  animation: detailsFloat 4.5s ease-in-out infinite;
}

@keyframes detailsFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.calligraphy-flourish,
.calligraphy-line {
  opacity: 0;
  transform: translateY(24px);
}

.details-calligraphy.visible .calligraphy-flourish:first-of-type {
  animation: revealUp 0.9s var(--ease-out) 0.1s forwards;
}

.details-calligraphy.visible .calligraphy-line:nth-of-type(1) {
  animation: revealUp 0.9s var(--ease-out) 0.35s forwards;
}

.details-calligraphy.visible .calligraphy-line:nth-of-type(2) {
  animation: revealUp 0.9s var(--ease-out) 0.6s forwards;
}

.details-calligraphy.visible .calligraphy-line:nth-of-type(3) {
  animation: revealUp 0.9s var(--ease-out) 0.85s forwards;
}

.details-calligraphy.visible .calligraphy-line:nth-of-type(4) {
  animation: revealUp 0.9s var(--ease-out) 1.1s forwards;
}

.details-calligraphy.visible .calligraphy-flourish:last-of-type {
  animation: revealUp 0.9s var(--ease-out) 1.35s forwards;
}

/* Countdown to 6 PM Egypt (April 8, 2026) */
.countdown-section {
  text-align: center;
  padding: var(--space-md) 0 0;
  opacity: 0;
  transform: translateY(12px);
}

.details-calligraphy.visible .countdown-section {
  animation: revealUp 0.6s var(--ease-out) 1.5s forwards;
}

.countdown-timer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-sm) var(--space-md);
}

.countdown-unit {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  min-width: 2.5rem;
}

.countdown-num {
  font-family: var(--font-details);
  font-size: clamp(1.5rem, 6vw, 2.25rem);
  font-weight: 600;
  color: var(--gold-soft);
  line-height: 1.2;
  text-shadow: 0 0 16px rgba(240, 217, 122, 0.4);
}

.countdown-label {
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blush);
  margin-top: 2px;
}

.countdown-done {
  font-family: var(--font-details);
  font-size: clamp(1.25rem, 5vw, 1.75rem);
  font-weight: 600;
  color: var(--gold-soft);
  margin: 0;
  text-shadow: 0 0 20px rgba(240, 217, 122, 0.35);
}

.countdown-timer[hidden],
.countdown-done[hidden] {
  display: none;
}

.calligraphy-flourish {
  font-size: 0.85rem;
  letter-spacing: 0.4em;
  color: var(--gold);
  opacity: 0.7;
  margin-bottom: var(--space-sm);
}

.calligraphy-flourish:last-of-type {
  margin-bottom: 0;
  margin-top: var(--space-xs);
}

.calligraphy-line {
  margin-bottom: var(--space-xs);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.calligraphy-line:last-of-type.calligraphy-line--small {
  margin-bottom: 0;
}

/* Tighten space above dress-code line */
.calligraphy-line:nth-of-type(4) {
  margin-bottom: 0;
}

.calligraphy-line--small {
  margin-top: 0;
  margin-bottom: 0;
}

.venue-link {
  display: inline-block;
  text-decoration: none;
  color: inherit;
  transition: filter 0.25s ease, opacity 0.25s ease;
  max-width: 100%;
  text-align: center;
}

.venue-name {
  display: inline-block;
  max-width: 100%;
  font-size: clamp(1.35rem, 5.5vw, 2.1rem);
  white-space: normal;
  word-wrap: break-word;
}

.venue-link .calligraphy-signature {
  max-width: none;
}

.venue-link:hover {
  filter: brightness(1.15) drop-shadow(0 0 20px rgba(240, 217, 122, 0.5));
}

.venue-link:focus {
  outline: 2px solid var(--gold-soft);
  outline-offset: 4px;
  border-radius: 2px;
}

.calligraphy-label {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--blush);
  opacity: 0.95;
}

.calligraphy-signature {
  font-family: var(--font-details);
  font-size: clamp(1.65rem, 6.5vw, 2.35rem);
  font-weight: 600;
  line-height: 1.35;
  background: linear-gradient(135deg, var(--gold-soft) 0%, var(--gold) 38%, var(--starlight) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 16px rgba(240, 217, 122, 0.4))
          drop-shadow(0 1px 3px rgba(0, 0, 0, 0.2));
  display: inline-block;
  max-width: 92%;
  letter-spacing: 0.02em;
}

.calligraphy-signature .char {
  font-family: var(--font-details);
  background: linear-gradient(135deg, var(--gold-soft) 0%, var(--gold) 38%, var(--starlight) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 12px rgba(240, 217, 122, 0.35));
}

.calligraphy-signature--soft {
  font-family: var(--font-details);
  font-size: clamp(1.25rem, 4.8vw, 1.5rem);
  font-weight: 600;
  line-height: 1.25;
  color: var(--gold-soft);
  background: linear-gradient(135deg, var(--gold-soft) 0%, var(--starlight) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 10px rgba(240, 217, 122, 0.35));
}

.calligraphy-signature--soft .char {
  background: linear-gradient(135deg, var(--gold-soft) 0%, var(--starlight) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 10px rgba(240, 217, 122, 0.35));
}

/* ===== Message ===== */
.message {
  text-align: center;
  padding: var(--space-sm) 0;
}

.message blockquote {
  font-family: var(--font-body);
  font-size: clamp(1.0625rem, 3.8vw, 1.25rem);
  font-weight: 400;
  line-height: 1.85;
  color: var(--starlight);
  margin-bottom: var(--space-sm);
  opacity: 0;
  transform: translateY(24px);
}

.message blockquote.visible {
  animation: revealUp 1s var(--ease-out) forwards;
}

.message .signature {
  font-size: 1rem;
  font-weight: 500;
  color: var(--gold-soft);
  opacity: 0;
  transform: translateY(16px);
}

.message .signature.visible {
  animation: revealUp 0.9s var(--ease-out) 0.35s forwards;
}

/* ===== CTA ===== */
.cta {
  text-align: center;
  padding: var(--space-sm) 0 0;
}

.cta-text {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--gold-soft);
  text-shadow: 0 0 20px rgba(240, 217, 122, 0.35);
  margin-bottom: var(--space-md);
  opacity: 0;
  transform: translateY(20px);
}

.cta.visible .cta-text {
  animation: revealUp 0.9s var(--ease-out) 0.1s forwards;
}

.cta-button {
  opacity: 0;
  transform: translateY(14px) scale(0.96);
}

.cta.visible .cta-button {
  animation: revealScale 0.9s var(--ease-spring) 0.4s forwards;
}

.cta-button {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--void);
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  padding: 0.9rem 1.75rem;
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 4px 24px rgba(232, 201, 71, 0.35);
  transition: transform 0.2s var(--ease-out), box-shadow 0.3s ease, filter 0.3s ease;
}

.cta-button:hover {
  transform: scale(1.04);
  box-shadow: 0 8px 32px rgba(232, 201, 71, 0.5);
  filter: brightness(1.1);
}

.cta-button:active {
  transform: scale(0.98);
}

/* ===== Tablet and up ===== */
@media (min-width: 600px) {
  .invitation {
    padding: var(--space-md) var(--space-sm);
  }

  .signature-line {
    animation-duration: 1.5s;
  }
}

@media (min-width: 900px) {
  .invitation {
    max-width: 560px;
    padding: var(--space-lg) var(--space-md);
  }

  .signature-title {
    font-size: 5rem;
  }
}

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .gradient-orb {
    animation: none;
  }

  .stars {
    animation: none;
  }

  .twinkle-layer {
    animation: none;
  }

  .signature-title .char,
  .signature-text .char,
  .signature-text--stage .char,
  .stage-heart {
    opacity: 1;
    transform: none;
  }

  .hero-title-stage {
    transform: translateY(0);
  }

  .signature-line {
    animation: none;
    width: min(200px, 60vw);
  }

  .hero-subtitle,
  .hero-names-label,
  .hero-names {
    opacity: 1;
    transform: none;
  }

  .details-calligraphy,
  .calligraphy-flourish,
  .calligraphy-line,
  .countdown-section,
  .message blockquote,
  .message .signature,
  .cta,
  .cta-text,
  .cta-button {
    opacity: 1;
    transform: none;
  }
}

/* ===== Arabic / RTL – full Arabic typography ===== */
[dir="rtl"] {
  --font-body: 'Tajawal', system-ui, sans-serif;
  --font-signature: 'Amiri', serif;
  --font-calligraphy: 'Amiri', serif;
  --font-details: 'Amiri', serif;
}

[dir="rtl"] body {
  font-family: var(--font-body);
  font-weight: 400;
}

[dir="rtl"] .word-font-1,
[dir="rtl"] .word-font-2,
[dir="rtl"] .word-font-3 {
  font-family: 'Amiri', serif;
}

[dir="rtl"] .hero-names-word,
[dir="rtl"] .hero-names-amp {
  font-family: 'Tajawal', system-ui, sans-serif;
}

[dir="rtl"] .calligraphy-signature,
[dir="rtl"] .calligraphy-signature .char {
  font-family: 'Amiri', serif;
}

[dir="rtl"] .message blockquote,
[dir="rtl"] .message .signature,
[dir="rtl"] .cta-text,
[dir="rtl"] .cta-button {
  font-family: 'Tajawal', system-ui, sans-serif;
}
