@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;1,400&family=Noto+Naskh+Arabic:wght@400;500;600&display=swap");
:root {
  --ivory: #f4f0e7;
  --paper: #faf8f2;
  --ink: #171513;
  --red: #711f24;
  --soft-red: #a97375;
  --line: rgba(23, 21, 19, 0.22);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--ivory); }
body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: "Noto Naskh Arabic", serif;
  overflow-x: hidden;
}
button, input, select { font: inherit; }
a { color: inherit; text-decoration: none; }

.film-gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #171513;
  cursor: pointer;
  transition: opacity 1.1s ease, visibility 1.1s ease;
}
.film-gate--leave { opacity: 0; visibility: hidden; pointer-events: none; }
.opening-film {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  filter: saturate(.82) contrast(1.03);
  background: #0d0c0b;
}
.film-gate::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.08), transparent 42%, rgba(0,0,0,.33));
  pointer-events: none;
}
.film-instruction {
  position: absolute;
  z-index: 2;
  bottom: max(7vh, 40px);
  left: 50%;
  width: min(88%, 380px);
  padding: 24px 28px 21px;
  transform: translateX(-50%);
  color: #fffaf0;
  text-align: center;
  background: rgba(20, 17, 15, .35);
  border: 1px solid rgba(255,255,255,.46);
  backdrop-filter: blur(10px);
  transition: opacity .5s ease, transform .5s ease;
}
.film-instruction.is-playing { opacity: 0; transform: translate(-50%, 12px); }
.film-instruction p { margin: 11px 0 0; font-size: 14px; letter-spacing: .02em; }
.seal-mark {
  display: block;
  font-family: "Cormorant Garamond", serif;
  font-size: 28px;
  letter-spacing: .14em;
}
.seal-mark i { color: #d7aeb0; font-weight: 400; }
.skip-film {
  position: absolute;
  z-index: 3;
  left: 24px;
  bottom: 24px;
  border: 0;
  border-bottom: 1px solid rgba(255,255,255,.6);
  color: white;
  background: transparent;
  cursor: pointer;
}

.invitation {
  position: relative;
  visibility: hidden;
  min-height: 100vh;
  opacity: 0;
  direction: rtl;
  transition: opacity 1s ease .2s;
}
.invitation--open { visibility: visible; opacity: 1; }
.paper-grain {
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: .32;
  pointer-events: none;
  background:
    radial-gradient(circle at 15% 25%, rgba(109,80,58,.13) 0 1px, transparent 1.5px),
    radial-gradient(circle at 75% 65%, rgba(109,80,58,.08) 0 1px, transparent 1.5px),
    linear-gradient(95deg, transparent 48%, rgba(126,97,70,.05) 50%, transparent 52%);
  background-size: 17px 17px, 23px 23px, 11px 100%;
}
.hero-section {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 34px;
}
.frame-card {
  position: relative;
  width: min(680px, 100%);
  aspect-ratio: 1200 / 1685;
  max-height: 90svh;
  overflow: hidden;
  background: var(--paper);
  box-shadow: 0 24px 80px rgba(45, 30, 23, .13);
}
.frame-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.frame-copy {
  position: absolute;
  inset: 13% 13% 10%;
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}
.kicker, .section-kicker {
  margin: 0 0 22px;
  color: var(--red);
  font-size: clamp(12px, 1.6vw, 15px);
  letter-spacing: .03em;
}
.inviting-line {
  max-width: 380px;
  margin: 0 0 17px;
  font-size: clamp(15px, 2vw, 20px);
  line-height: 2;
}
.frame-copy h1 {
  margin: 6px 0 16px;
  font-family: "Noto Naskh Arabic", serif;
  font-size: clamp(45px, 8vw, 78px);
  font-weight: 400;
  line-height: .86;
  letter-spacing: -.035em;
}
.frame-copy h1 span { display: block; }
.frame-copy h1 em {
  display: block;
  margin: 7px 0;
  color: var(--red);
  font-size: .47em;
  font-weight: 400;
}
.fine-rule { display: flex; align-items: center; width: min(240px, 70%); gap: 10px; }
.fine-rule::before, .fine-rule::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.fine-rule span { color: var(--red); font-size: 8px; }
.event-label { margin: 12px 0 0; font-size: 15px; }
.scroll-cue { position: absolute; bottom: 4%; width: 24px; height: 40px; border: 1px solid rgba(23,21,19,.35); border-radius: 20px; }
.scroll-cue span {
  position: absolute; left: 50%; top: 8px; width: 3px; height: 3px;
  transform: translateX(-50%); border-radius: 50%; background: var(--red);
  animation: scrollDot 1.8s infinite;
}
@keyframes scrollDot { 0% { opacity: 0; transform: translate(-50%,0); } 30% {opacity:1;} 100% {opacity:0; transform:translate(-50%,15px);} }

.details-section {
  width: min(1000px, calc(100% - 48px));
  margin: 0 auto;
  padding: 130px 0 150px;
  text-align: center;
}
.details-section h2, .venue-section h2, .rsvp-card h2 {
  margin: 0;
  font-size: clamp(34px, 5vw, 58px);
  font-weight: 400;
  line-height: 1.3;
}
.details-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 74px;
  border-block: 1px solid var(--line);
}
.details-grid article {
  min-height: 190px;
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  padding: 30px;
}
.details-grid article + article { border-right: 1px solid var(--line); }
.details-grid small { color: var(--red); font-size: 13px; }
.details-grid strong { margin: 15px 0 8px; font-size: 21px; font-weight: 500; }
.details-grid span { color: #6b6560; font-size: 14px; }

.petal-section {
  position: relative;
  min-height: 82svh;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 90px 24px;
  background: #191716;
  color: #f7f2e9;
}
.petal-section::before, .petal-section::after {
  content: ""; position: absolute; width: 180px; height: 1px; top: 50%; background: rgba(255,255,255,.17);
}
.petal-section::before { right: 0; } .petal-section::after { left: 0; }
.quote-card { position: relative; z-index: 2; width: min(680px, 92%); text-align: center; }
.tiny-flower { display: block; margin-bottom: 34px; color: #b96c70; font-size: 25px; }
.quote-card p { margin: 0; font-size: clamp(29px, 5vw, 53px); font-weight: 400; line-height: 1.75; }
.signature { direction: ltr; margin-top: 40px; font: italic 30px "Cormorant Garamond", serif; }
.signature { direction: rtl; font-family: "Noto Naskh Arabic", serif; font-style: normal; }
.signature i { color: #b96c70; }
.petals { position: absolute; inset: -80px 0 0; pointer-events: none; }
.petals i {
  position: absolute;
  top: -10%;
  display: block;
  opacity: 0;
  border-radius: 80% 15% 70% 20%;
  background: linear-gradient(145deg, #8b3036, #c18386 55%, #682126);
  box-shadow: inset -2px -2px 4px rgba(60,10,14,.35);
  animation: petalFall linear infinite;
}
@keyframes petalFall {
  0% { opacity: 0; transform: translate3d(0,-10vh,0) rotate(0); }
  12% { opacity: .8; }
  55% { transform: translate3d(75px,48vh,0) rotate(300deg); }
  100% { opacity: 0; transform: translate3d(-35px,105vh,0) rotate(680deg); }
}

.venue-section {
  width: min(1080px, calc(100% - 48px));
  min-height: 80svh;
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  align-items: center;
  gap: 80px;
  margin: 0 auto;
  padding: 120px 0;
}
.venue-copy { padding-inline-start: 6vw; }
.venue-copy > p:not(.section-kicker) { max-width: 540px; margin: 28px 0 36px; color: #59534e; line-height: 2; }
.outline-button {
  display: inline-block;
  padding: 13px 28px;
  border: 1px solid var(--ink);
  transition: background .25s, color .25s;
}
.outline-button:hover { background: var(--ink); color: var(--paper); }
.venue-monogram {
  width: min(370px, 75vw);
  aspect-ratio: 1;
  display: grid;
  place-content: center;
  justify-self: center;
  border: 1px solid var(--line);
  outline: 1px solid var(--line);
  outline-offset: -18px;
  text-align: center;
  font: 68px "Cormorant Garamond", serif;
}
.venue-monogram span { display: block; line-height: .75; }
.venue-monogram i { display: block; margin: 12px; color: var(--red); font-size: 30px; }

.rsvp-section { padding: 100px 24px 140px; background: #e9e2d6; }
.rsvp-card { width: min(720px, 100%); margin: auto; text-align: center; }
.rsvp-card form { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 52px; text-align: right; }
.rsvp-card label span { display: block; margin-bottom: 8px; color: #514a45; font-size: 13px; }
.rsvp-card input, .rsvp-card select, .rsvp-card textarea {
  width: 100%; height: 55px; padding: 0 17px;
  border: 0; border-bottom: 1px solid var(--ink); outline: none;
  color: var(--ink); background: rgba(255,255,255,.38);
}
.rsvp-card textarea {
  min-height: 120px;
  padding-block: 14px;
  resize: vertical;
}
.rsvp-card .full-field { grid-column: 1 / -1; }
.rsvp-card button {
  grid-column: 1/-1; width: 210px; margin: 20px auto 0; padding: 14px 20px;
  border: 1px solid var(--red); color: white; background: var(--red); cursor: pointer;
  transition: background .25s;
}
.rsvp-card button:hover { background: #511519; }
footer { padding: 100px 24px; text-align: center; background: var(--paper); }
footer p { margin: 0 0 18px; color: var(--red); }
footer h2 { direction: rtl; margin: 0; font: 48px "Noto Naskh Arabic", serif; }
footer h2 i { color: var(--red); font-size: .65em; }
footer span { display: block; margin-top: 18px; color: #77706a; font-size: 13px; letter-spacing: .2em; }

.reveal { opacity: 0; transform: translateY(45px); transition: opacity 1s ease, transform 1s cubic-bezier(.2,.75,.2,1); }
.reveal.visible { opacity: 1; transform: translateY(0); }

.frame-copy > * {
  opacity: 0;
  transform: translateY(24px);
}
.invitation--open .frame-copy > * {
  animation: textReveal .85s cubic-bezier(.2,.75,.2,1) forwards;
}
.invitation--open .frame-copy > :nth-child(1) { animation-delay: .25s; }
.invitation--open .frame-copy > :nth-child(2) { animation-delay: .45s; }
.invitation--open .frame-copy > :nth-child(3) { animation-delay: .7s; }
.invitation--open .frame-copy > :nth-child(4) { animation-delay: 1s; }
.invitation--open .frame-copy > :nth-child(5) { animation-delay: 1.2s; }
.invitation--open .frame-copy > :nth-child(6) { animation-delay: 1.4s; }
@keyframes textReveal {
  from { opacity: 0; transform: translateY(24px); filter: blur(5px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

@media (max-width: 700px) {
  .film-gate { background: #0d0c0b; }
  .opening-film { object-fit: contain; width: 100vw; height: 100svh; }
  .hero-section { padding: 0; }
  .frame-card { width: 100%; min-height: 100svh; max-height: none; aspect-ratio: auto; box-shadow: none; }
  .frame-art { object-fit: cover; }
  .frame-copy { inset: 14% 14% 10%; }
  .frame-copy h1 { font-size: clamp(48px, 17vw, 70px); }
  .inviting-line { font-size: 14px; line-height: 1.9; }
  .details-section { width: calc(100% - 38px); padding: 95px 0; }
  .details-grid { grid-template-columns: 1fr; margin-top: 50px; }
  .details-grid article { min-height: 145px; }
  .details-grid article + article { border-right: 0; border-top: 1px solid var(--line); }
  .petal-section::before, .petal-section::after { width: 45px; }
  .quote-card p { font-size: 28px; }
  .venue-section { width: calc(100% - 40px); grid-template-columns: 1fr; gap: 65px; padding: 100px 0; text-align: center; }
  .venue-copy { padding: 0; }
  .venue-copy > p:not(.section-kicker) { margin-inline: auto; }
  .venue-monogram { grid-row: 1; }
  .rsvp-card form { grid-template-columns: 1fr; }
  .rsvp-card .full-field { grid-column: auto; }
  .rsvp-card button { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
