@font-face {
  font-family: "Mina Miremad";
  src: url("../fonts/Miremad.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Wedding Script";
  /* مسیر جدید با نام ساده شده فونت و فرمت مناسب otf */
  src: url("../fonts/candlescript.otf") format("opentype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  --ivory: #f7f3ec;
  --cream: #eee6dc;
  --paper: #fffdf9;
  --paper-glass: rgba(255, 253, 249, .9);
  --ink: #514943;
  --muted: #81766e;
  --rose: #bd9b98;
  --rose-deep: #92706f;
  --sage: #7a8272;
  --sage-deep: #5e6758;
  --champagne: #b59b75;
  --line: rgba(122, 103, 84, .2);
  --soft-line: rgba(122, 103, 84, .11);
  --shadow: 0 24px 65px rgba(84, 70, 58, .1);
  --fa: Tahoma, "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }
html {
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
  scroll-behavior: smooth;
}
body {
  position: relative;
  width: 100%;
  max-width: 100%;
  margin: 0;
  overflow-x: clip;
  color: var(--ink);
  background: var(--ivory);
  font-family: var(--fa);
  line-height: 1.9;
  -webkit-font-smoothing: antialiased;
}
body.intro-locked { overflow: hidden; }
button, input, textarea, select { max-width: 100%; font: inherit; }
img, video, iframe, svg { max-width: 100%; }
a { color: inherit; }

/* Opening film */
.wedding-intro {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  width: 100%;
  max-width: 100%;
  place-items: center;
  overflow: hidden;
  color: #fff;
  background: #251014;
  cursor: pointer;
  transition: opacity 1.05s ease, visibility 1.05s ease;
}
.intro-backdrop {
  position: absolute;
  inset: -5%;
  background-position: center;
  background-size: cover;
  filter: blur(26px) brightness(.38) saturate(.75);
  transform: scale(1.08);
}
.intro-stage {
  position: relative;
  width: min(100vw, 45svh);
  max-width: 100%;
  height: 100svh;
  max-height: 100vh;
  overflow: hidden;
  background: #4d1821;
  box-shadow: 0 0 90px rgba(0, 0, 0, .42);
}
.intro-video { display: block; width: 100%; height: 100%; object-fit: cover; }
.intro-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(20, 6, 8, .2), transparent 28%, transparent 70%, rgba(20, 6, 8, .42));
}
.intro-hint {
  position: absolute;
  right: 50%;
  bottom: max(5.5%, env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  gap: .65rem;
  width: max-content;
  max-width: calc(100% - 2rem);
  padding: .74rem 1.1rem;
  color: #fffaf2;
  background: rgba(45, 18, 23, .58);
  border: 1px solid rgba(255, 245, 229, .48);
  border-radius: 999px;
  font-size: clamp(.82rem, 3.4vw, .95rem);
  line-height: 1.7;
  transform: translateX(50%);
  backdrop-filter: blur(8px);
  transition: opacity .45s ease, transform .45s ease;
}
.intro-hint i {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  background: #eadbc4;
  border-radius: 50%;
  animation: hintPulse 1.8s infinite;
}
.wedding-intro.playing .intro-hint { opacity: 0; transform: translate(50%, 12px); pointer-events: none; }
.intro-personal {
  position: absolute;
  top: clamp(1.3rem, 4.5svh, 3.1rem);
  left: 50%;
  display: flex;
  width: min(calc(100% - 2.5rem), 390px);
  flex-direction: column;
  align-items: center;
  margin: 0;
  padding: 0;
  color: #fffaf2;
  text-align: center;
  text-shadow: 0 1px 6px rgba(31, 8, 12, .72);
  transform: translateX(-50%);
  transition: opacity .4s ease, transform .4s ease;
  pointer-events: none;
}
.intro-personal span,
.intro-personal strong { display: block; font-family: "Mina Miremad", var(--fa); font-weight: 400; line-height: 1.65; }
.intro-personal span { font-size: clamp(1.2rem, 5vw, 1.6rem); }
.intro-personal strong { color: #ead2a2; font-size: clamp(1.6rem, 6.4vw, 2.25rem); overflow-wrap: anywhere; }
.wedding-intro.playing .intro-personal { opacity: 0; transform: translate(-50%, -10px); }
.wedding-intro.finishing { opacity: 0; pointer-events: none; }
.wedding-intro.done { visibility: hidden; }

/* Shared layout and motion */
#invitation, .site-footer { width: 100%; max-width: 100%; opacity: 0; transition: opacity .85s ease; }
body.entered #invitation,
body.entered .site-footer { opacity: 1; }
#invitation { overflow: clip; background: var(--ivory); }
#invitation > section { width: 100%; max-width: 100%; }
.section-pad { position: relative; padding: clamp(5.2rem, 11vw, 8rem) clamp(1rem, 6vw, 4rem); }
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 1s cubic-bezier(.2, .72, .2, 1), transform 1s cubic-bezier(.2, .72, .2, 1);
  transition-delay: var(--delay, 0ms);
}
.reveal.visible { opacity: 1; transform: none; }
.section-heading { position: relative; z-index: 2; margin: 0 auto 2.5rem; text-align: center; }
.section-heading > p,
.section-kicker { margin: 0 0 .35rem; color: var(--rose-deep); font-size: clamp(.75rem, 2.2vw, .88rem); line-height: 1.9; letter-spacing: .02em; }
.section-heading h2,
.venue-card h2 {
  margin: 0;
  padding: .12em .05em .2em;
  color: var(--ink);
  font-family: "Mina Miremad", var(--fa);
  font-size: clamp(2.45rem, 7vw, 4.15rem);
  font-weight: 400;
  line-height: 1.65;
}

/* Ivory editorial hero */
.hero {
  display: flex;
  min-height: 100svh;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(.8rem, 2.2svh, 1.7rem) 1rem clamp(4.6rem, 8svh, 5.4rem);
  color: var(--ink);
  background:
    radial-gradient(circle at 54% 18%, rgba(255,255,255,.98), transparent 42%),
    linear-gradient(155deg, #fffdfa 0%, #f8f3ec 56%, #eee6dc 100%);
}
.hero-content {
  position: relative;
  z-index: 3;
  width: min(calc(100% - 2rem), 640px);
  margin: clamp(-.45rem, -1vw, -.15rem) auto 0;
  padding: .1rem .4rem .25rem;
  color: var(--ink);
  text-align: center;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: none;
}
.hero-content::before { display: none; }
.hero-kicker { display: none; }
.hero-content h1 {
  margin: 0;
  padding: .14em .02em .08em;
  color: #5c5049;
  font-size: clamp(2.65rem, 10vw, 5.2rem);
  text-shadow: none;
}
.hero-date {
  gap: 0;
  color: #8d7865;
  font-size: clamp(.72rem, 2.5vw, .9rem);
  letter-spacing: .16em;
}
.scroll-cue { z-index: 7; bottom: max(.85rem, env(safe-area-bottom)); color: #665d57; }
.scroll-cue > i { background: rgba(255,253,249,.72); }

/* Invitation text */
.invitation-message {
  z-index: 2;
  min-height: clamp(690px, 106svh, 860px);
  padding-top: clamp(7.2rem, 18vw, 10rem);
  padding-bottom: clamp(7.2rem, 18vw, 10rem);
  overflow: visible;
  background: linear-gradient(180deg, #faf7f2, #fffdfa 50%, #f7f2eb);
}

/* Program */
.program-section {
  padding-block: clamp(5.8rem, 10vw, 8rem);
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, .94), transparent 38%),
    linear-gradient(180deg, #f6f0e9 0%, #fcfaf6 48%, #f2ebe3 100%);
}
.program-paper {
  width: min(100%, 760px);
  padding: clamp(3.6rem, 7vw, 5rem) clamp(2.4rem, 6vw, 4.6rem);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .72), rgba(255, 252, 247, .38)),
    rgba(255, 253, 249, .82);
  border: 1px solid rgba(181, 155, 117, .16);
  border-radius: 38px;
  box-shadow:
    0 30px 80px rgba(84, 70, 58, .065),
    inset 0 0 0 7px rgba(255, 255, 255, .2);
  backdrop-filter: blur(8px);
}
.program-heading { max-width: 480px; margin-bottom: clamp(2.7rem, 6vw, 4rem); }
.program-heading::before { display: block; width: 44px; height: 1px; margin: 0 auto 1.05rem; background: linear-gradient(90deg, transparent, rgba(181, 155, 117, .82), transparent); content: ""; }
.program-heading > p { margin-bottom: .2rem; color: #9a7f79; font-size: clamp(.72rem, 2vw, .84rem); letter-spacing: .035em; }
.program-heading h2 { font-size: clamp(2.55rem, 6.6vw, 3.9rem); line-height: 1.55; }
.program-heading h2::after { display: block; width: 52px; height: 1px; margin: .25rem auto 0; background: linear-gradient(90deg, transparent, rgba(181, 155, 117, .58), transparent); content: ""; transform: scaleX(0); transform-origin: center; }
.program-heading.visible h2::after { animation: programRuleDraw .9s .18s cubic-bezier(.2, .72, .2, 1) both; }
.program-timeline { width: min(100%, 600px); padding: .2rem 1rem; }
.program-section .timeline-track { top: 54px; bottom: 54px; left: calc(1rem + 81px); background: rgba(181, 155, 117, .23); }
.program-section .timeline-track::before,
.program-section .timeline-track::after { position: absolute; left: 50%; width: 5px; height: 5px; background: #fdfaf5; border: 1px solid rgba(181, 155, 117, .48); border-radius: 50%; content: ""; transform: translateX(-50%); }
.program-section .timeline-track::before { top: -2px; }
.program-section .timeline-track::after { bottom: -2px; }
.program-section .timeline-progress { background: linear-gradient(180deg, #cbb28f, #b98f91 72%, #a7aa99); box-shadow: 0 0 10px rgba(185, 143, 145, .14); }
.timeline-runner { position: absolute; top: var(--timeline-y); left: 50%; z-index: 4; display: grid; width: 58px; height: 58px; place-items: center; background: transparent; border: 0; box-shadow: none; transform: translate(-50%, -50%); pointer-events: none; }
.timeline-runner-flower { display: block; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 6px 9px rgba(103, 81, 58, .2)); transform: rotate(var(--timeline-rotation)); transform-origin: 50% 50%; backface-visibility: hidden; will-change: transform; }
.program-item { position: relative; direction: ltr; display: grid; grid-template-columns: 64px 34px minmax(0, 1fr); align-items: center; min-height: 116px; }
.program-item + .program-item::before { position: absolute; top: 0; right: .25rem; left: 104px; height: 1px; background: linear-gradient(90deg, rgba(181, 155, 117, .18), rgba(181, 155, 117, .06), transparent); content: ""; }
.program-section .program-icon { width: 42px; height: 42px; color: #91877d; background: rgba(255, 255, 255, .34); border: 1px solid rgba(181, 155, 117, .18); border-radius: 50%; box-shadow: 0 7px 18px rgba(84, 70, 58, .035); opacity: .66; transition: color .55s ease, background .55s ease, border-color .55s ease, box-shadow .55s ease, opacity .55s ease, transform .55s cubic-bezier(.2, .72, .2, 1); }
.program-section .program-icon svg { width: 22px; height: 22px; }
.program-section .program-marker { position: relative; z-index: 3; display: block; justify-self: center; width: 7px; height: 7px; background: #fffdf9; border: 1px solid rgba(181, 155, 117, .62); border-radius: 50%; box-shadow: 0 0 0 6px rgba(255, 253, 249, .9); transition: background .42s ease, border-color .42s ease, box-shadow .42s ease, transform .42s cubic-bezier(.2, .72, .2, 1); }
.program-section .program-marker::after { position: absolute; inset: -8px; border: 1px solid rgba(185, 143, 145, .5); border-radius: 50%; content: ""; opacity: 0; transform: scale(.45); pointer-events: none; }
.program-section .program-copy { position: relative; direction: rtl; min-width: 0; padding: 1rem .75rem 1rem 1.1rem; text-align: right; opacity: .64; transform: translateX(6px); transition: opacity .6s ease, transform .6s cubic-bezier(.2, .72, .2, 1); }
.program-section .program-copy::before { position: absolute; top: 50%; left: -13px; width: 18px; height: 1px; background: linear-gradient(90deg, rgba(181, 155, 117, .64), rgba(181, 155, 117, .12)); content: ""; transform: scaleX(0); transform-origin: left; transition: transform .55s .08s cubic-bezier(.2, .72, .2, 1); }
.program-section .program-copy time { display: inline-block; color: #9a7775; font-family: Georgia, var(--fa); font-size: .78rem; font-weight: 600; line-height: 1.8; letter-spacing: .06em; }
.program-section .program-copy h3 { margin-top: 0; margin-bottom: .08rem; color: var(--ink); font-family: "Mina Miremad", var(--fa); font-size: clamp(1.5rem, 4vw, 1.9rem); font-weight: 400; line-height: 1.65; }
.program-section .program-copy p { margin: 0; color: #8c8178; font-size: .74rem; line-height: 1.85; }
.program-section .program-item.passed .program-icon { color: #856f69; background: rgba(189, 155, 152, .09); border-color: rgba(189, 155, 152, .22); box-shadow: 0 10px 24px rgba(117, 88, 82, .075); opacity: 1; transform: translateY(-2px) rotate(-5deg); }
.program-section .program-item.passed .program-marker { background: #c1a27b; border-color: #c1a27b; box-shadow: 0 0 0 6px rgba(255, 253, 249, .92), 0 0 12px rgba(185, 143, 145, .2); transform: scale(1.12); }
.program-section .program-item.passed .program-marker::after { animation: programMarkerHalo .9s cubic-bezier(.18, .76, .24, 1) both; }
.program-section .program-item.passed .program-copy { opacity: 1; transform: none; }
.program-section .program-item.passed .program-copy::before { transform: scaleX(1); }

.program-section .program-item.reveal { opacity: 0; filter: blur(5px); transform: translate3d(16px, 10px, 0); transition: opacity .85s cubic-bezier(.2, .72, .2, 1), transform .95s cubic-bezier(.2, .72, .2, 1), filter .85s ease; transition-delay: var(--delay, 0ms); }
.program-section .program-item:nth-of-type(even).reveal { transform: translate3d(-16px, 10px, 0); }
.program-section .program-item.reveal.visible { opacity: 1; filter: none; transform: none; }

/* Venue */
.venue-section { isolation: isolate; overflow: hidden; background: linear-gradient(180deg, #f5efe8, #fbf8f4); }
.venue-card { position: relative; width: min(100%, 680px); margin: auto; padding: clamp(2.4rem, 7vw, 4rem) clamp(1.05rem, 6vw, 3.2rem); text-align: center; background: rgba(255,253,249,.9); border: 1px solid var(--line); border-radius: 28px; box-shadow: var(--shadow); backdrop-filter: blur(8px); }
.venue-card h2 { max-width: 100%; margin-inline: auto; padding: .18em .05em .4em; font-size: clamp(2.2rem, 7vw, 3.9rem); line-height: 1.8; overflow-wrap: anywhere; }
.venue-pin { display: grid; width: 48px; height: 48px; margin: .65rem auto .9rem; place-items: center; color: #fff; background: var(--sage); border: 3px solid #ece2d5; border-radius: 50%; font-size: 1.3rem; box-shadow: 0 0 0 4px rgba(122,130,114,.1); }
.venue-card address { max-width: 470px; margin: 1.2rem auto 1.5rem; color: var(--muted); font-size: .88rem; font-style: normal; line-height: 2; }
.map-preview { position: relative; width: 100%; aspect-ratio: 16/10; overflow: hidden; border: 6px solid #fff; border-radius: 20px; box-shadow: 0 14px 34px rgba(79,64,52,.1); }
.map-preview iframe { display: block; width: 100%; height: 100%; pointer-events: none; border: 0; filter: sepia(.16) saturate(.55); }
.map-click-layer { position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: center; padding: .7rem; color: #fff; text-decoration: none; background: linear-gradient(180deg, transparent 48%, rgba(78,72,65,.58)); }
.map-click-layer span { padding: .44rem .85rem; background: rgba(94,103,88,.88); border: 1px solid rgba(255,255,255,.38); border-radius: 999px; font-size: .73rem; line-height: 1.7; backdrop-filter: blur(6px); }
.neshan-route { display: flex; width: min(100%, 350px); align-items: center; gap: .8rem; margin: 1.2rem auto 0; padding: .72rem 1rem; color: #fff; text-align: right; text-decoration: none; background: linear-gradient(135deg, #808a78, #5d6658); border: 1px solid rgba(255,255,255,.34); border-radius: 999px; box-shadow: 0 10px 24px rgba(77,84,72,.18); transition: transform .25s ease, box-shadow .25s ease; }
.neshan-route:hover { transform: translateY(-2px); box-shadow: 0 14px 28px rgba(77,84,72,.23); }
.neshan-route svg { width: 28px; height: 28px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.45; }
.neshan-route span { display: flex; min-width: 0; flex-direction: column; }
.neshan-route b { font-size: .8rem; line-height: 1.7; }
.neshan-route small { color: rgba(255,255,255,.75); font-size: .66rem; line-height: 1.6; }
.neshan-route i { margin-right: auto; font-style: normal; }

/* Gallery */
.gallery-section { background: #faf7f2; }
.gallery-grid { display: grid; grid-template-columns: repeat(12,1fr); gap: .75rem; width: min(100%,760px); margin: auto; }
.gallery-card { grid-column: span 6; position: relative; aspect-ratio: 4/5; padding: 0; overflow: hidden; background: #ddd4ca; border: 7px solid #fffdf9; border-radius: 22px; box-shadow: 0 15px 34px rgba(73,59,49,.1); cursor: zoom-in; }
.gallery-card:nth-child(3n + 1) { grid-column: span 12; aspect-ratio: 7/5; }
.gallery-card img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.86); transition: transform .7s ease, filter .5s ease; }
.gallery-card:hover img { transform: scale(1.035); filter: saturate(1); }

/* RSVP and guestbook */
.participation { isolation: isolate; background: #f4e9df; }
.participation-forms { position: relative; z-index: 2; display: block; width: min(100%,660px); margin: auto; }
.participation-forms > .wedding-form { width: 100%; margin: 0; }
.participation-forms > .wedding-form + .wedding-form { margin-top: 26px; }
.wedding-form { padding: clamp(1.3rem,4vw,2rem); background: rgba(255,253,249,.92); border: 1px solid var(--line); border-radius: 24px; box-shadow: 0 18px 44px rgba(78,64,53,.08); backdrop-filter: blur(8px); }
.wedding-form h3 { margin: 0 0 1rem; padding: .1em 0 .18em; color: var(--ink); font-family: "Mina Miremad", var(--fa); font-size: 2rem; font-weight: 400; line-height: 1.6; }
.wedding-form label,
.wedding-form legend { display: block; color: #675f59; font-size: .8rem; line-height: 1.8; }
.wedding-form label { margin: .82rem 0; }
.wedding-form input,
.wedding-form textarea { width: 100%; margin-top: .38rem; padding: .68rem .15rem; color: var(--ink); background: transparent; border: 0; border-bottom: 1px solid rgba(122,103,84,.26); border-radius: 0; outline: none; }
.wedding-form textarea { resize: vertical; line-height: 1.9; }
.wedding-form input:focus,
.wedding-form textarea:focus { border-color: var(--sage); }
.wedding-form fieldset { margin: 1rem 0; padding: 0; border: 0; }
.wedding-form .choice { display: inline-flex; align-items: center; gap: .4rem; margin: .65rem 0 0 .6rem; }
.wedding-form .choice input { width: auto; margin: 0; accent-color: var(--sage); }
.wedding-form button { margin-top: .8rem; padding: .72rem 1.4rem; color: #fff; background: var(--sage); border: 1px solid var(--sage); border-radius: 999px; cursor: pointer; transition: background .2s ease, transform .2s ease; }
.wedding-form button:hover { background: var(--sage-deep); transform: translateY(-1px); }
.wedding-form button:disabled { opacity: .55; }
.form-result { min-height: 1.5rem; margin: .7rem 0 0; color: var(--sage-deep); font-size: .76rem; line-height: 1.8; }
.guestbook-wall { position: relative; z-index: 2; width: min(100%,760px); margin: 1.3rem auto 0; padding: 1.35rem 1rem 1rem; background: rgba(255,253,249,.72); border: 1px solid var(--line); border-radius: 24px; box-shadow: 0 16px 40px rgba(78,64,53,.07); backdrop-filter: blur(8px); }
.guestbook-wall > header { display: flex; align-items: center; justify-content: center; gap: .8rem; margin-bottom: 1rem; color: var(--rose); text-align: center; }
.guestbook-wall header p { margin: 0; color: var(--rose-deep); font-size: .7rem; line-height: 1.8; }
.guestbook-wall header h3 { margin: 0; padding: .1em 0 .18em; color: var(--ink); font-family: "Mina Miremad", var(--fa); font-size: 2rem; font-weight: 400; line-height: 1.55; }
.guest-notes { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(240px,calc((100% - .8rem)/2)); gap: .8rem; padding: .2rem .1rem .55rem; overflow-x: auto; scroll-snap-type: inline mandatory; scrollbar-color: rgba(181,155,117,.38) transparent; scrollbar-width: thin; }
.guest-notes blockquote { position: relative; min-height: 130px; margin: 0; padding: 1.15rem; overflow: hidden; color: #655b55; background: rgba(255,253,249,.95); border-right: 2px solid var(--rose); border-radius: 16px; scroll-snap-align: start; }
.guest-notes p { margin: 0 0 .5rem; font-size: .84rem; line-height: 1.9; }
.guest-notes cite { color: var(--sage-deep); font-size: .74rem; font-style: normal; }

/* Footer and controls */
.site-footer { position: relative; padding: 4rem 1rem 8rem; overflow: hidden; color: #756a63; text-align: center; background: #faf7f2; border-top: 1px solid var(--soft-line); }
.site-footer > * { position: relative; z-index: 2; }
.footer-couple { width: min(100%,620px); margin: 0 auto .35rem; font-size: clamp(2.45rem,8vw,3.9rem); }
.footer-stars { color: var(--champagne); font-size: .82rem; }
.footer-logo-link { display: grid; width: 92px; height: 92px; margin: .75rem auto .65rem; place-items: center; background: rgba(255,253,249,.68); border: 1px solid rgba(181,155,117,.32); border-radius: 50%; text-decoration: none; transition: transform .25s ease, box-shadow .25s ease; }
.footer-logo-link img { width: 80px; height: 80px; object-fit: contain; mix-blend-mode: multiply; }
.footer-logo-link:hover { transform: translateY(-2px); box-shadow: 0 11px 28px rgba(77,61,50,.1); }
.footer-instagram { display: inline-block; margin-top: .3rem; padding: .24rem .6rem; color: var(--sage-deep); font-family: Georgia, serif; font-size: .82rem; text-decoration: none; border-bottom: 1px solid rgba(94,103,88,.26); }
.music-toggle { position: fixed; right: max(1rem,env(safe-area-inset-right)); bottom: max(1rem,env(safe-area-inset-bottom)); z-index: 20; display: grid; width: 44px; height: 44px; padding: 0; place-items: center; color: #fff; background: rgba(94,103,88,.9); border: 1px solid rgba(255,255,255,.6); border-radius: 50%; box-shadow: 0 9px 25px rgba(63,68,58,.2); cursor: pointer; backdrop-filter: blur(8px); }
.music-toggle[aria-pressed="true"] { opacity: .58; }
.lightbox { max-width: min(94vw,920px); max-height: 90vh; padding: 0; overflow: visible; background: transparent; border: 0; }
.lightbox::backdrop { background: rgba(40,34,31,.9); backdrop-filter: blur(8px); }
.lightbox img { max-height: 88vh; object-fit: contain; border-radius: 14px; }
.lightbox button { position: absolute; top: -46px; left: 0; display: grid; width: 38px; height: 38px; padding: 0; place-items: center; color: #fff; background: transparent; border: 1px solid rgba(255,255,255,.65); border-radius: 50%; font-size: 1.4rem; cursor: pointer; }

@keyframes hintPulse { 0%,100% { box-shadow: 0 0 0 0 rgba(234,219,196,.42); } 50% { box-shadow: 0 0 0 9px rgba(234,219,196,0); } }
@keyframes scrollDot { 0% { opacity: 0; transform: translate(-50%,0); } 25%,75% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%,12px); } }
@keyframes laceEnterTop { from { opacity: 0; transform: translateY(-55px); } to { opacity: .62; transform: none; } }
@keyframes laceEnterBottom { from { opacity: 0; transform: scaleX(-1) translateY(55px); } to { opacity: .62; transform: scaleX(-1); } }
@keyframes flowerArriveLeft { from { opacity: 0; transform: translate(-40px,-25px) rotate(-18deg) scale(.65); } to { opacity: .72; transform: rotate(-4deg) scale(1); } }
@keyframes flowerArriveRight { from { opacity: 0; transform: translate(40px,25px) rotate(20deg) scale(.65); } to { opacity: .72; transform: rotate(5deg) scale(1); } }
@keyframes floralBreeze { 0%,100% { rotate: -1.2deg; } 50% { rotate: 1.4deg; } }
@keyframes floralBreezeReverse { 0%,100% { rotate: 1.2deg; } 50% { rotate: -1.4deg; } }
@keyframes fairyFloat { 0%,100% { transform: translateY(0) scale(1.01); } 50% { transform: translateY(-5px) scale(1.012); } }
@keyframes sparkFloat { 0%,100% { opacity: .15; transform: translateY(5px) scale(.7); } 50% { opacity: .85; transform: translateY(-12px) scale(1.1); } }
@keyframes sprigSettle { from { opacity: 0; translate: 0 30px; scale: .82; } to { opacity: .76; translate: 0 0; scale: 1; } }
@keyframes ribbonAppear { from { opacity: 0; transform: translateY(-7px) scale(.94); } to { opacity: 1; transform: none; } }
@keyframes newNote { from { opacity: 0; transform: translateY(12px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes programRuleDraw { from { opacity: 0; transform: scaleX(0); } to { opacity: 1; transform: scaleX(1); } }
@keyframes programMarkerHalo { 0% { opacity: 0; transform: scale(.45); } 28% { opacity: .72; } 100% { opacity: 0; transform: scale(1.65); } }

@media (max-width: 720px) {
  .wedding-intro { width: 100%; max-width: 100%; }
  .intro-stage { width: 100%; max-width: 100%; height: 100svh; }
  .program-section { padding: 5.4rem .65rem; }
  .program-paper { padding: 3.35rem 1.05rem 3.55rem; border-radius: 30px; box-shadow: 0 24px 62px rgba(84, 70, 58, .06); }
  .program-paper::before, .program-paper::after { top: 1.7rem; bottom: 1.7rem; width: 70px; opacity: .2; }
  .program-paper::before { right: -48px; }
  .program-paper::after { left: -48px; }
  .program-heading { margin-bottom: 2.55rem; padding-inline: .5rem; }
  .program-timeline { padding-inline: .25rem; }
  .program-section .timeline-track { left: calc(.25rem + 61px); }
  .program-item { grid-template-columns: 48px 26px minmax(0, 1fr); min-height: 112px; }
  .program-item + .program-item::before { left: 80px; }
  .program-section .program-icon { width: 38px; height: 38px; }
  .program-section .program-icon svg { width: 20px; height: 20px; }
  .program-section .program-copy { padding: .95rem .35rem .95rem 1rem; }
  .program-section .program-copy h3 { font-size: clamp(1.4rem, 6.3vw, 1.72rem); }
}

@media (max-width: 380px) {
  .program-paper { padding-inline: .7rem; }
  .program-timeline { padding-inline: .1rem; }
  .program-section .timeline-track { left: calc(.1rem + 59px); }
  .program-item { grid-template-columns: 46px 26px minmax(0, 1fr); }
  .program-item + .program-item::before { left: 77px; }
  .program-section .program-copy { padding-right: .25rem; }
}

@media (max-width: 430px) {
  .gallery-grid { gap: .5rem; }
  .gallery-card { border-width: 4px; }
  .guest-notes { grid-auto-columns: minmax(230px,88%); }
  .footer-couple { font-size: clamp(2.1rem,11.5vw,2.9rem); }
}

@media (max-height: 640px) and (orientation: landscape) {
  .intro-stage { width: 45svh; max-width: 100%; }
  .scroll-cue { bottom: .55rem; }
  .scroll-cue > span { display: none; }
}

@supports not (overflow: clip) {
  html, body, #invitation { overflow-x: hidden; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
  .timeline-runner { transition: none; }
  .timeline-runner-flower { transform: none; }
  .program-heading.visible h2::after, .program-section .program-item.passed .program-marker::after { animation: none; opacity: .35; transform: none; }
  .program-section .program-item.reveal, .program-section .program-item.reveal.visible, .program-section .program-copy, .program-section .program-icon, .program-section .program-marker, .program-section .program-copy::before { filter: none; transform: none; transition: none; }
  .program-section .program-item.reveal, .program-section .program-item.reveal.visible { opacity: 1; }
}

/* =========================================
   ۱. تنظیمات ویدیوی پس‌زمینه سایت اصلی
   ========================================= */
html, body {
    background-color: transparent !important;
    background-image: none !important;
}

#main-bg-video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -9999;
    opacity: 0; 
    visibility: hidden;
    transition: opacity 0.8s ease, visibility 0.8s ease;
    pointer-events: none;
}

#main-bg-video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* هاله تیره روی ویدیو برای خوانایی متن‌ها */
#main-bg-video::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.35); 
}

/* ظاهر شدن ویدیو بعد از کلیک روی پاکت */
body.entered #main-bg-video {
    opacity: 1;
    visibility: visible;
}

/* حذف رنگ پس‌زمینه از تمام بخش‌ها */
#invitation, .hero, .invitation-message, .countdown-section, 
.calendar-section, .program-section, .venue-section, 
.gallery-section, .participation, .site-footer {
    background: transparent !important;
}

/* =========================================
   ۲. تنظیمات کادر عکس دونفره و قاب گل‌دار
   ========================================= */
.hero-content {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    width: 100% !important;
    margin-top: 3rem !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
}

.framed-photo-container {
    position: relative;
    width: clamp(260px, 75vw, 400px); 
    margin: 0 auto 1.5rem !important;
    display: flex;
    justify-content: center;
    align-items: center;
}

.floral-frame-overlay {
    position: relative;
    z-index: 2;
    width: 100%;
    height: auto;
    display: block;
    pointer-events: none;
    filter: drop-shadow(0 15px 30px rgba(0,0,0,0.3));
}

.couple-photo {
    position: absolute;
    z-index: 1;
    top: 15%; 
    left: 14%;
    width: 72%;
    height: 70%;
    object-fit: cover;
    border-radius: 6px;
    background-color: transparent !important;
}

/* تنظیم جایگاه پروانه روی قاب جدید */
.butterfly-companion {
    z-index: 6 !important;
    top: -5% !important;
    right: -8% !important;
    width: clamp(70px, 25%, 120px) !important;
}

/* =========================================
   ۳. سفید کردن و وسط‌چین کردن متن‌های روی ویدیو
   ========================================= */
.hero-kicker, 
.hero-content h1, 
.hero-content h1 span, 
.hero-content h1 b, 
.hero-names-fa, 
.hero-date,
.hero-date span,
.scroll-cue, 
.scroll-cue > span,
.gallery-section .section-heading p,
.gallery-section .section-heading h2,
.participation > .section-heading p,
.participation > .section-heading h2,
.site-footer p,
.site-footer .footer-couple,
.site-footer .footer-couple span,
.site-footer .footer-couple b,
.footer-stars,
.footer-instagram,
.ceremony-time-text,
.ceremony-time-text strong,
.ceremony-message,
.families-name {
    color: #ffffff !important;
    text-shadow: 0 3px 12px rgba(0, 0, 0, 0.8) !important;
    margin-left: auto !important;
    margin-right: auto !important;
    justify-content: center !important;
}

.hero-date i, .dashed-divider { background: #ffffff !important; border-color: #ffffff !important; }
.footer-instagram { border-bottom: 1px solid rgba(255, 255, 255, 0.5) !important; }

/* =========================================
   ۴. شیشه‌ای کردن باکس‌ها و رنگ جیگری کردن متن‌های داخلشان
   ========================================= */
.countdown-card, .calendar-card, .program-paper, 
.venue-card, .wedding-form, .guestbook-wall, .empty-album {
    background: rgba(255, 253, 248, 0.85) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    box-shadow: 0 15px 40px rgba(0,0,0,0.15) !important;
}

.calendar-card {
    border-radius: 28px !important;
    padding-top: 3rem !important;
    margin-top: 1rem !important;
}

.countdown-section .section-heading p,
.countdown-label,
.countdown-separator,
.participation .section-heading p,
.guestbook-wall header p {
    color: var(--wine-soft) !important;
    text-shadow: none !important;
}

.countdown-section .section-heading h2,
.countdown strong,
.countdown-card > time,
.participation .section-heading h2,
.guestbook-wall header h3,
.guestbook-empty {
    color: var(--wine) !important;
    text-shadow: none !important;
}

.countdown-dial {
    background: transparent !important;
    border: 1px solid var(--wine-soft) !important;
    box-shadow: none !important;
}

/* =========================================
   ۵. مخفی کردن المان‌های گرافیکی اضافه قالب قدیمی و جدید
   ========================================= */
.hero-media, .hero-botanical, .hero-lace, .hero-flower, 
.floral-ribbon, .invitation-floral-line, .program-paper::before, 
.program-paper::after, .program-section::after, .venue-section::before, 
.venue-section::after, .gallery-section::after, .participation::before, 
.participation::after, .site-footer::after, .invitation-message::before, 
.invitation-message::after, .hero::after {
    display: none !important;
}



/* =========================================
   ۲. اعمال فونت انگلیسی و چیدمان اسامی
   ========================================= */
.hero-content h1,
.footer-couple {
    direction: ltr !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.2em !important;
    font-family: "Wedding Script", cursive !important;
    font-weight: normal !important;
}

.hero-content h1 span,
.footer-couple span {
    font-family: "Wedding Script", cursive !important;
    font-weight: normal !important;
}

.hero-content h1 b,
.footer-couple b {
    font-family: "Wedding Script", cursive !important;
    font-weight: normal !important;
    font-size: 0.75em !important;
    color: var(--champagne) !important;
    margin: 0 8px !important;
}


/* =========================================
   حل مشکل وسط‌چین نبودن باکس‌های اصلی سایت
   ========================================= */
.countdown-card, 
.calendar-card, 
.program-paper, 
.venue-card, 
.wedding-form, 
.guestbook-wall, 
.empty-album {
    margin-left: auto !important;
    margin-right: auto !important;
    display: block !important;
}


/* =========================================
   اصلاح بخش گالری خالی (حذف مستطیل و وسط‌چین کردن متن سفید روی ویدیو)
   ========================================= */
.empty-album {
    background: transparent !important; /* حذف کامل رنگ پس‌زمینه مستطیل */
    border: none !important; /* حذف کادر */
    box-shadow: none !important;
    backdrop-filter: none !important; /* حذف حالت شیشه‌ای */
    -webkit-backdrop-filter: none !important;
    display: flex !important; /* برگرداندن قابلیت وسط‌چین کردن */
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    width: 100% !important;
}

.empty-album p,
.empty-album span {
    color: #ffffff !important; /* سفید کردن متن و قلب */
    text-shadow: 0 3px 12px rgba(0, 0, 0, 0.8) !important; /* سایه تیره برای خوانایی روی ویدیو */
    margin: 0 auto !important;
}


/* =========================================
   سفید کردن تیتر و متن بخش «همراه ما باشید»
   ========================================= */
.participation .section-heading h2,
.participation .section-heading p.rsvp-notice,
.participation .section-heading p {
    color: #ffffff !important;
    text-shadow: 0 3px 12px rgba(0, 0, 0, 0.9) !important; /* سایه تیره برای خوانایی عالی */
    text-align: center !important;
}

/* =========================================
   اصلاح قطعی قاب دعوت (حذف قاب دوگانه + فیت شدن در موبایل)
   ========================================= */

/* ۱. نابود کردن تمام پس‌زمینه‌ها و کادرهای قدیمی که باعث دوتا شدن قاب شده بودند */
#invitationText .message-card::before,
#invitationText .message-card::after,
article.message-card::before,
article.message-card::after {
    display: none !important;
    background: none !important;
}

/* ۲. تنظیم خود قاب به عنوان تنها پس‌زمینه با قفل ابعاد */
#invitationText .message-card {
    background: url("../img/message-frame.png") center center no-repeat !important;
    background-size: 100% 100% !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    
    width: 92vw !important;
    max-width: 500px !important;
    aspect-ratio: 2 / 3 !important;
    height: auto !important;
    margin: 0 auto !important;
    
    padding: 22% 14% 26% 14% !important;
    box-sizing: border-box !important;
    
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
}

/* --- ۳. ظریف‌سازی و واکنش‌گرا کردن متون برای جا شدن کامل در قاب موبایل --- */
#invitationText .message-monogram {
    width: clamp(45px, 12vw, 65px) !important;
    height: clamp(45px, 12vw, 65px) !important;
    margin: 0 auto 3% !important;
}
#invitationText .message-monogram .monogram-letter { font-size: clamp(0.75rem, 2vw, 1rem) !important; }
#invitationText .message-monogram .monogram-amp { font-size: clamp(0.9rem, 2.5vw, 1.2rem) !important; margin: 0 3px !important; }

#invitationText h2 {
    font-size: clamp(1.2rem, 5.5vw, 2.2rem) !important;
    margin-bottom: 2% !important;
    line-height: 1.4 !important;
}

#invitationText .families-name {
    font-size: clamp(0.9rem, 3.5vw, 1.3rem) !important;
    margin-bottom: 2% !important;
}

#invitationText .ornament {
    margin: 2% 0 4% !important;
    font-size: clamp(0.6rem, 2vw, 0.9rem) !important;
}

#invitationText .invitation-copy {
    font-size: clamp(0.65rem, 2.5vw, 0.95rem) !important;
    line-height: 1.8 !important;
    margin-bottom: 3% !important;
    max-width: 100% !important;
}

#invitationText strong {
    font-size: clamp(0.65rem, 2.2vw, 0.85rem) !important;
}

#invitationText h2,
#invitationText h3,
#invitationText p,
#invitationText strong,
#invitationText .ornament,
#invitationText .monogram-letter {
    color: #5c3a38 !important;
    text-shadow: none !important;
}
