/* ============================================================
   Mahziar & Mahshid — Wedding Invitation
   Ivory & Gold, minimal, mobile-first, bilingual (fa/en)
   ============================================================ */

:root{
  --ivory: #FBF7EE;
  --cream: #F3EADA;
  --gold: #B08D57;
  --gold-deep: #8E6E3E;
  --gold-light: #D9C6A0;
  --charcoal: #2B241B;
  --text: #3A3227;
  --text-muted: #8A7C68;
  --white: #FFFFFF;

  --font-en-heading: 'Playfair Display', serif;
  --font-en-body: 'Poppins', sans-serif;
  --font-en-script: 'Great Vibes', cursive;

  --font-fa-ui: 'Vazirmatn', sans-serif;
  --font-fa-display: 'Noto Nastaliq Urdu', serif;
  --font-fa-serif: 'Noto Naskh Arabic', serif;

  --container: 640px;
  --gap-section: clamp(64px, 12vw, 120px);
  --radius: 4px;
}

*, *::before, *::after{ box-sizing: border-box; }

html{ scroll-behavior: smooth; }

body{
  margin: 0;
  background: var(--ivory);
  color: var(--text);
  font-family: var(--font-fa-ui);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

html[lang="en"] body{ font-family: var(--font-en-body); }

h1, h2, h3{ margin: 0; font-weight: 500; }
p{ margin: 0; }
img{ max-width: 100%; display: block; }
button{ font: inherit; }
a{ color: inherit; text-decoration: none; }

/* Headings: English uses serif display, Persian uses Nastaliq calligraphy */
html[lang="en"] .section__title,
html[lang="en"] .venue__name{
  font-family: var(--font-en-heading);
  font-style: italic;
}
html[lang="fa"] .section__title,
html[lang="fa"] .venue__name{
  font-family: var(--font-fa-display);
  font-weight: 400;
}

.section__eyebrow, .hero__eyebrow{
  letter-spacing: .18em;
}
html[lang="en"] .section__eyebrow,
html[lang="en"] .hero__eyebrow{
  text-transform: uppercase;
  font-size: 12px;
}
html[lang="fa"] .section__eyebrow,
html[lang="fa"] .hero__eyebrow{
  letter-spacing: 0;
  font-size: 15px;
  font-family: var(--font-fa-ui);
}

/* ============ ornamental divider (with shimmer) ============ */
.divider{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 100%;
  max-width: 220px;
  margin: 0 auto;
  color: var(--gold);
}
.divider span{
  flex: 1; height: 1px;
  position: relative;
  background: currentColor;
  opacity: .55;
  overflow: hidden;
}
.divider span::after{
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.9), transparent);
  transform: translateX(-100%);
  animation: shimmer 5s ease-in-out infinite;
}
.divider span:last-child::after{ animation-delay: 1.4s; }
@keyframes shimmer{
  0%, 40%{ transform: translateX(-100%); }
  60%, 100%{ transform: translateX(100%); }
}
.divider i{
  width: 6px; height: 6px;
  border: 1px solid currentColor;
  transform: rotate(45deg);
  flex-shrink: 0;
}
.divider--light{ color: var(--gold-light); }

/* ============================================================
   SPLASH — language chooser
   ============================================================ */
.splash{
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 32px 24px;
  background: var(--ivory);
  text-align: center;
  position: relative;
}
.splash__ornament{ color: var(--gold-light); width: 140px; opacity: 0; animation: fadeIn .9s ease .2s forwards; }
.splash__ornament svg{ width: 100%; height: auto; display: block; }
.draw-line{ stroke-dasharray: 100; stroke-dashoffset: 100; animation: drawLine 1.4s ease .3s forwards; }
@keyframes drawLine{ to{ stroke-dashoffset: 0; } }
@keyframes fadeIn{ to{ opacity: 1; } }

.splash__badge{
  position: relative;
  width: 84px; height: 84px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  opacity: 0;
  transform: scale(.8);
  animation: badgeIn .8s cubic-bezier(.2,.8,.2,1) .1s forwards;
}
@keyframes badgeIn{ to{ opacity: 1; transform: scale(1); } }
.splash__badge-ring{ position: absolute; inset: 0; width: 100%; height: 100%; animation: spinSlow 40s linear infinite; }
@keyframes spinSlow{ to{ transform: rotate(360deg); } }
.splash__badge-letters{
  font-family: var(--font-en-script);
  font-size: 26px;
  color: var(--charcoal);
  position: relative;
  top: 2px;
}

.splash__title{
  font-family: var(--font-en-script);
  font-weight: 400;
  font-size: clamp(40px, 12vw, 68px);
  color: var(--charcoal);
  margin: 0;
  line-height: 1.3;
  opacity: 0;
  transform: translateY(14px);
  animation: riseIn .8s ease .35s forwards;
}
.splash__amp{ color: var(--gold); padding: 0 6px; }
.splash__date-teaser{
  font-family: var(--font-en-body);
  font-size: 12px;
  letter-spacing: .3em;
  color: var(--gold-deep);
  opacity: 0;
  animation: riseIn .8s ease .5s forwards;
}
@keyframes riseIn{ to{ opacity: 1; transform: translateY(0); } }

.splash__sub{
  font-size: 15px;
  color: var(--text-muted);
  line-height: 2;
  font-family: var(--font-fa-ui);
  opacity: 0;
  animation: riseIn .8s ease .65s forwards;
}
.splash__sub-en{
  font-family: var(--font-en-body);
  font-size: 13px;
  letter-spacing: .03em;
}

.splash__buttons{
  display: flex;
  gap: 16px;
  margin-top: 8px;
  flex-wrap: wrap;
  justify-content: center;
  opacity: 0;
  animation: riseIn .8s ease .8s forwards;
}
.lang-btn{
  min-width: 152px;
  padding: 18px 28px;
  background: transparent;
  border: 1px solid var(--gold-light);
  border-radius: var(--radius);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: background .25s ease, border-color .25s ease, transform .2s ease, box-shadow .25s ease;
  color: var(--charcoal);
}
.lang-btn:hover, .lang-btn:focus-visible{
  background: var(--gold);
  border-color: var(--gold);
  color: var(--white);
  transform: translateY(-3px);
  box-shadow: 0 14px 26px -14px rgba(142,110,62,.55);
}
.lang-btn:active{ transform: translateY(-1px) scale(.98); }
.lang-btn__main{ font-size: 18px; font-weight: 500; }
.lang-btn:nth-child(1) .lang-btn__main{ font-family: var(--font-fa-ui); }
.lang-btn:nth-child(2) .lang-btn__main{ font-family: var(--font-en-heading); font-style: italic; }
.lang-btn__sub{ font-size: 11px; opacity: .65; letter-spacing: .05em; }

.splash.is-hidden{
  opacity: 0;
  pointer-events: none;
  transition: opacity .5s ease;
}

/* ============================================================
   SITE
   ============================================================ */
.site{ opacity: 0; animation: siteIn .7s ease forwards; }
@keyframes siteIn{ to{ opacity: 1; } }

.lang-toggle{
  position: fixed;
  top: 18px;
  inset-inline-end: 18px;
  z-index: 40;
  background: rgba(251,247,238,.85);
  backdrop-filter: blur(6px);
  border: 1px solid var(--gold-light);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 12px;
  letter-spacing: .05em;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: transform .3s ease;
}
.lang-toggle:active{ transform: scale(.92); }
.lang-toggle span[data-lang-code]{ opacity: .45; transition: opacity .25s ease, color .25s ease; }
html[lang="en"] .lang-toggle span[data-lang-code="en"],
html[lang="fa"] .lang-toggle span[data-lang-code="fa"]{
  opacity: 1;
  color: var(--gold-deep);
  font-weight: 600;
}
.lang-toggle__divider{ opacity: .35; }

/* reveal-on-scroll */
[data-reveal]{
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .8s ease, transform .8s ease;
}
[data-reveal].is-visible{ opacity: 1; transform: translateY(0); }

/* staggered children (countdown units, etc.) */
.countdown__unit{
  opacity: 0;
  transform: translateY(14px) scale(.94);
  transition: opacity .6s ease calc(var(--i) * .12s), transform .6s cubic-bezier(.2,.8,.2,1) calc(var(--i) * .12s);
}
.countdown.is-visible .countdown__unit{ opacity: 1; transform: translateY(0) scale(1); }

/* ============ HERO ============ */
.hero{
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 100px 24px 60px;
  gap: 18px;
  position: relative;
  overflow: hidden;
}

/* floating petals */
.petals{ position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.petal{
  position: absolute;
  top: -40px;
  width: 10px; height: 14px;
  background: radial-gradient(ellipse at 30% 30%, var(--gold-light), transparent 70%);
  border-radius: 100% 0 100% 100%;
  opacity: 0;
  animation: fall linear infinite;
}
.petal--1{ left: 8%;  animation-duration: 18s; animation-delay: 0s;  }
.petal--2{ left: 22%; animation-duration: 23s; animation-delay: 3s;  width: 7px; height: 10px; }
.petal--3{ left: 45%; animation-duration: 20s; animation-delay: 7s;  }
.petal--4{ left: 68%; animation-duration: 25s; animation-delay: 1s; width: 8px; height: 11px; }
.petal--5{ left: 82%; animation-duration: 19s; animation-delay: 5s;  }
.petal--6{ left: 92%; animation-duration: 22s; animation-delay: 9s; width: 6px; height: 9px; }
@keyframes fall{
  0%{ opacity: 0; transform: translate(0,0) rotate(0deg); }
  8%{ opacity: .5; }
  50%{ transform: translate(24px, 50vh) rotate(180deg); }
  92%{ opacity: .4; }
  100%{ opacity: 0; transform: translate(-16px, 105vh) rotate(320deg); }
}

.hero__frame{
  position: relative;
  width: min(78vw, 300px);
  aspect-ratio: 3/4;
  margin-bottom: 8px;
  z-index: 1;
  opacity: 0;
  transform: scale(.94) translateY(10px);
  animation: heroPop 1s cubic-bezier(.2,.8,.2,1) .15s forwards;
}
@keyframes heroPop{ to{ opacity: 1; transform: scale(1) translateY(0); } }
.hero__photo{
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 25%;
  border-radius: 2px;
  box-shadow: 0 30px 60px -20px rgba(43,36,27,.35);
}
.hero__corner{
  position: absolute;
  width: 34px; height: 34px;
  border-color: var(--gold);
  border-style: solid;
  z-index: 2;
}
.hero__corner--tl{ top: -12px; inset-inline-start: -12px; border-width: 1.5px 0 0 1.5px; }
.hero__corner--br{ bottom: -12px; inset-inline-end: -12px; border-width: 0 1.5px 1.5px 0; }

.hero__eyebrow{
  color: var(--gold-deep);
  font-size: 13px;
  z-index: 1;
  opacity: 0;
  transform: translateY(12px);
  animation: heroRise .8s ease .5s forwards;
}
.hero__names{
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  color: var(--charcoal);
  font-size: clamp(38px, 10vw, 64px);
  line-height: 1.25;
  z-index: 1;
  opacity: 0;
  transform: translateY(12px);
  animation: heroRise .8s ease .65s forwards;
  font-family: var(--font-en-script);
}
html[lang="fa"] .hero__names{ font-family: var(--font-fa-display); font-size: clamp(40px, 11vw, 68px); }
.hero__names .amp{ color: var(--gold); padding: 0 4px; }
@keyframes heroRise{ to{ opacity: 1; transform: translateY(0); } }
.hero__tagline{
  color: var(--text-muted);
  font-size: 15px;
  max-width: 320px;
  line-height: 1.9;
  z-index: 1;
  opacity: 0;
  transform: translateY(12px);
  animation: heroRise .8s ease .8s forwards;
}

.hero__scroll{
  position: absolute;
  bottom: 22px;
  color: var(--gold);
  animation: bob 2.4s ease-in-out infinite, heroRise .8s ease .95s forwards;
  opacity: 0;
  z-index: 1;
}
@keyframes bob{ 0%,100%{ transform: translateY(0); } 50%{ transform: translateY(6px); } }

/* ============ STORY / BLESSING ============ */
.story{
  max-width: var(--container);
  margin: 0 auto;
  padding: var(--gap-section) 28px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 22px;
  align-items: center;
}
.story__rings{
  width: 92px;
  height: 92px;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid var(--gold-light);
  box-shadow: 0 18px 34px -18px rgba(43,36,27,.4);
  margin-bottom: 6px;
}
.story__poem{
  margin: 0;
  font-size: clamp(20px, 5vw, 27px);
  line-height: 2.2;
  color: var(--charcoal);
  font-family: var(--font-fa-display);
}
html[lang="en"] .story__poem{
  font-family: var(--font-en-script);
  font-size: clamp(26px, 6vw, 34px);
  line-height: 1.6;
}
.story__attribution{
  font-size: 13px;
  color: var(--gold-deep);
  letter-spacing: .08em;
}
.story__text{
  font-size: clamp(15px, 3.6vw, 17px);
  line-height: 2;
  color: var(--text);
  font-family: var(--font-fa-serif);
  max-width: 460px;
}
html[lang="en"] .story__text{
  font-family: var(--font-en-body);
  font-weight: 300;
  line-height: 1.9;
}

/* ============ EVENT / COUNTDOWN ============ */
.event{
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px var(--gap-section);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
}
.section__eyebrow{ color: var(--gold-deep); font-size: 13px; }
.section__title{ color: var(--charcoal); font-size: clamp(26px, 6vw, 36px); }

.event__date-card{
  width: 100%;
  border: 1px solid var(--gold-light);
  border-radius: var(--radius);
  padding: 34px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: linear-gradient(180deg, rgba(176,141,87,.05), transparent);
}
.event__weekday{ color: var(--gold-deep); font-size: 14px; letter-spacing: .08em; }
.event__gregorian{ font-size: clamp(20px, 5vw, 26px); color: var(--charcoal); font-weight: 500; }
html[lang="en"] .event__gregorian{ font-family: var(--font-en-heading); font-style: italic; }
.event__shamsi{ font-size: 14px; color: var(--text-muted); }
.event__time{
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--gold-deep);
  font-size: 15px;
  padding-top: 14px;
  border-top: 1px solid var(--gold-light);
}

.countdown{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  width: 100%;
  max-width: 420px;
}
.countdown__unit{
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 4px;
  border: 1px solid var(--gold-light);
  border-radius: var(--radius);
}
.countdown__num{
  font-family: var(--font-en-heading);
  font-size: clamp(22px, 6vw, 30px);
  color: var(--gold-deep);
  font-variant-numeric: tabular-nums;
  display: inline-block;
  transition: transform .3s ease;
}
.countdown__num.pulse{ animation: pulseNum .5s ease; }
@keyframes pulseNum{ 0%{ transform: scale(1); } 35%{ transform: scale(1.22); color: var(--gold); } 100%{ transform: scale(1); } }
html[lang="fa"] .countdown__num{ font-family: var(--font-fa-ui); font-weight: 600; }
.countdown__label{ font-size: 10.5px; color: var(--text-muted); letter-spacing: .05em; }
html[lang="en"] .countdown__label{ text-transform: uppercase; }

/* ============ buttons ============ */
.btn{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 999px;
  font-size: 14px;
  cursor: pointer;
  border: 1px solid var(--gold);
  min-height: 46px;
  transition: background .25s ease, color .25s ease, transform .2s ease, box-shadow .25s ease;
}
.btn--ghost{ background: transparent; color: var(--gold-deep); }
.btn--ghost:hover{ background: var(--gold); color: var(--white); box-shadow: 0 14px 26px -14px rgba(142,110,62,.5); }
.btn--solid{ background: var(--gold); color: var(--white); }
.btn--solid:hover{ background: var(--gold-deep); border-color: var(--gold-deep); }
.btn:active{ transform: scale(.96); }

/* ============ divider photo (parallax) ============ */
.divider-photo{
  width: 100%;
  height: clamp(140px, 30vw, 240px);
  overflow: hidden;
  position: relative;
}
.divider-photo img{
  width: 100%;
  height: 130%;
  object-fit: cover;
  object-position: center 60%;
  position: relative;
  will-change: transform;
}

/* ============ VENUE ============ */
.venue{
  max-width: var(--container);
  margin: 0 auto;
  padding: var(--gap-section) 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.venue__name{ color: var(--charcoal); font-size: clamp(30px, 7vw, 42px); margin-top: 4px; }
.venue__subtitle{ color: var(--gold-deep); font-size: 13px; letter-spacing: .06em; margin-bottom: 8px; }
.venue__address{
  font-size: 16px;
  line-height: 2;
  color: var(--text);
  max-width: 380px;
  margin-bottom: 8px;
}
.venue__map{
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--gold-light);
  filter: sepia(8%) saturate(85%);
}
.venue__map iframe{
  width: 100%;
  height: 260px;
  border: 0;
  display: block;
}
.venue__nav-label{
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 10px;
  letter-spacing: .03em;
}
.venue__nav-buttons{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.nav-btn{
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 11px 18px;
  border-radius: 999px;
  border: 1px solid var(--gold-light);
  color: var(--charcoal);
  font-size: 13px;
  transition: background .25s ease, color .25s ease, border-color .25s ease, transform .2s ease;
}
.nav-btn:hover{ background: var(--gold); border-color: var(--gold); color: var(--white); transform: translateY(-2px); }
.nav-btn:active{ transform: translateY(0) scale(.96); }

/* ============ GIFT NOTE ============ */
.gift{
  position: relative;
  padding: var(--gap-section) 24px;
  text-align: center;
  overflow: hidden;
  isolation: isolate;
}
.gift__flower{
  position: absolute;
  inset: -10% 0;
  z-index: -1;
}
.gift__flower img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .9;
  will-change: transform;
}
.gift__content{
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 26px;
  align-items: center;
}
.gift__text{
  font-size: clamp(17px, 4vw, 20px);
  line-height: 2;
  color: var(--charcoal);
  font-family: var(--font-fa-serif);
}
html[lang="en"] .gift__text{ font-family: var(--font-en-heading); font-style: italic; }

/* ============ FOOTER ============ */
.footer{
  text-align: center;
  padding: 70px 24px 50px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.footer__monogram{
  font-family: var(--font-en-script);
  font-size: 32px;
  color: var(--gold);
  letter-spacing: .02em;
}
.footer__names{ font-size: 14px; color: var(--text-muted); font-family: var(--font-fa-ui); }
.footer__date{ font-size: 13px; color: var(--text-muted); }
.footer__top{
  margin-top: 10px;
  font-size: 12px;
  color: var(--gold-deep);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity .2s ease;
}
.footer__top:hover{ opacity: .7; }

/* ============================================================
   Responsive — tablet / desktop
   ============================================================ */
@media (min-width: 720px){
  .hero__frame{ width: 320px; }
  .countdown{ max-width: 460px; gap: 14px; }
  .venue__map iframe{ height: 340px; }
}

@media (prefers-reduced-motion: reduce){
  *{ animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .petal{ display: none; }
}
