@font-face {
  font-family: "Bodoni Moda";
  src: url("../fonts/bodoni-moda-3.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Bodoni Moda";
  src: url("../fonts/bodoni-moda-2.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: Marcellus;
  src: url("../fonts/marcellus-regular.woff2") format("woff2");
  font-display: swap;
}
@font-face {
  font-family: Amiri;
  src: url("../fonts/amiri-regular.woff2") format("woff2");
  font-display: swap;
}

:root {
  --forest: #15392d;
  --evergreen: #0e2b23;
  --dome: #20563c;
  --ivory: #f7efe0;
  --limestone: #eee1c9;
  --gold: #d6b780;
  --brass: #88622f;
  --muted: #526354;
  --line: #a4814e66;
  --display: "Bodoni Moda", Georgia, serif;
  --body: Marcellus, Georgia, serif;
  --viewport-height: 100vh;
}

@supports (height: 100dvh) {
  :root { --viewport-height: 100dvh; }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--ivory); }
html.is-locked, html.is-locked body { height: 100%; overflow: hidden; }
body { margin: 0; color: var(--forest); font: 1rem/1.6 var(--body); }
h1, h2, h3, p { margin: 0; }
button, a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button { color: inherit; cursor: pointer; font: inherit; }
a { color: inherit; text-underline-offset: .3em; }
button:focus-visible, a:focus-visible, canvas:focus-visible { outline: 2px solid currentColor; outline-offset: 5px; }
[hidden] { display: none !important; }
img { display: block; max-width: 100%; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link {
  position: fixed;
  top: 10px;
  inset-inline-start: 10px;
  z-index: 10;
  padding: 12px 18px;
  background: var(--evergreen);
  color: var(--ivory);
  transform: translateY(-155%);
}
.skip-link:focus { transform: none; }
.eyebrow { font-size: .8125rem; letter-spacing: .12em; text-transform: uppercase; }
.arabic { font-family: Amiri, "Times New Roman", serif; line-height: 1.65; }

/* The mobile stage fills the screen while the artwork keeps its proportions. */
.hero {
  --stage-height: var(--viewport-height);
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  height: var(--stage-height);
  background: var(--evergreen);
  overflow: hidden;
}
.hero[data-phase="open"] { --stage-height: max(34rem, var(--viewport-height)); }
.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -35px;
  background: linear-gradient(90deg, #09241eea, #24483a8c, #09241eea), url("../images/umbrellas-closed.webp") center 55% / cover;
  filter: blur(20px);
}
.cinema {
  position: relative;
  isolation: isolate;
  width: min(100%, calc(var(--stage-height) * .5625));
  height: 100%;
  overflow: hidden;
  container-type: inline-size;
  box-shadow: 0 0 90px #071b17a6;
}
.cinema-media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cinema-first { z-index: 2; transition: opacity .15s linear; }
.cinema-first.is-hidden { opacity: 0; pointer-events: none; }
.cinema-last { z-index: 1; opacity: 0; transition: opacity .22s linear; }
.cinema-last.is-visible { opacity: 1; }
.hero[data-phase="open"] .cinema { background: var(--limestone); }

.opening-gate {
  position: absolute;
  z-index: 4;
  inset: 0;
  width: 100%;
  padding: 0;
  border: 0;
  background: linear-gradient(180deg, transparent 63%, #102b235e 86%, #102b23c2);
  color: var(--ivory);
  transition: opacity .24s ease;
}
.opening-gate:focus-visible { outline-offset: -9px; }
.hero[data-phase="playing"] .opening-gate { opacity: 0; pointer-events: none; }
.opening-caption {
  position: absolute;
  inset-inline-start: 50%;
  bottom: max(10%, calc(env(safe-area-inset-bottom) + 25px));
  transform: translateX(-50%);
  display: inline-grid;
  place-items: center;
  min-height: 51px;
  min-width: 158px;
  padding: 10px 24px;
  border: 1px solid var(--gold);
  background: #14382ff0;
  box-shadow: 0 0 0 4px #14382f65, 0 4px 22px #102b233d;
  font: italic 1.2rem/1.2 var(--display);
  white-space: nowrap;
}

/* Height fits the full image. This lower section begins past the dome's stone base. */
.hero-copy {
  position: absolute;
  z-index: 3;
  inset: 61.5% 0 0;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: clamp(4px, 1.6cqw, 10px);
  padding: 8px 9% max(12px, env(safe-area-inset-bottom));
  color: var(--evergreen);
  text-align: center;
  background: radial-gradient(ellipse at 50% 70%, #f7eddbdb, #f7eddb55 57%, transparent 77%);
  animation: copy-in .8s .15s ease both;
}
.hero-bismillah { font-size: clamp(1.3rem, 6cqw, 2rem); }
.hero-names {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  column-gap: .19em;
  font: 400 clamp(2.15rem, 11cqw, 4rem)/1.04 var(--display);
  overflow-wrap: anywhere;
}
.hero-names em { color: var(--brass); font-size: .63em; }
.hero-occasion { color: var(--forest); }
.scroll-cue { display: grid; align-items: center; min-height: 44px; font-size: .875rem; }
@keyframes copy-in { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: none; } }

.verse, .formal, .date-section, .event-section, .closing-inner { padding: clamp(4rem, 10vw, 7rem) 1.375rem; }
.verse {
  text-align: center;
  color: var(--ivory);
  background: radial-gradient(ellipse at 50% 0%, var(--dome), var(--forest) 75%);
  border-top: 1px solid var(--gold);
}
.verse-inner { max-width: 38rem; margin-inline: auto; }
.verse-arabic { color: #f2d7a0; font-size: clamp(2rem, 5vw, 3rem); }
.verse-translation { margin-top: .35rem; font: italic clamp(1.55rem, 3vw, 2.45rem)/1.3 var(--display); }
.verse-reference { margin-top: 1.3rem; color: #e4cfaa; }

.formal {
  background: radial-gradient(ellipse at 50% 20%, #fdf7ec, var(--ivory) 76%);
  text-align: center;
}
.formal-inner {
  max-width: 39rem;
  margin-inline: auto;
  padding: clamp(2.7rem, 8vw, 4.3rem) clamp(1.2rem, 5vw, 3.5rem) clamp(2.1rem, 7vw, 4rem);
  outline: 1px solid #a4814e3d;
  outline-offset: -7px;
  border: 1px solid var(--line);
  border-radius: 48% 48% 0 0 / 6rem 6rem 0 0;
}
.ornament { display: flex; justify-content: center; align-items: center; gap: 12px; color: var(--brass); margin-bottom: 1.25rem; }
.ornament::before, .ornament::after { content: ""; width: 28px; height: 1px; background: currentColor; opacity: .62; }
.ornament i { display: block; width: 8px; height: 8px; border: 1px solid currentColor; transform: rotate(45deg); }
.formal .eyebrow { color: var(--brass); }
.formal-intro { max-width: 28rem; margin: 1rem auto 2rem; font-size: clamp(1.15rem, 2.6vw, 1.4rem); text-wrap: balance; }
.formal-name { font: 400 clamp(2.05rem, 6.7vw, 3.75rem)/1.15 var(--display); overflow-wrap: anywhere; }
.relation { margin-top: .65rem; font-size: .875rem; color: var(--muted); }
.parents { font: italic clamp(1.05rem, 2.8vw, 1.4rem)/1.35 var(--display); }
.formal-ampersand { display: block; margin: 1.15rem auto; color: var(--brass); font: italic 2.15rem/1 var(--display); }

.date-section { text-align: center; background: var(--limestone); border-block: 1px solid var(--line); }
.section-heading { max-width: 30rem; margin: 0 auto 2.4rem; }
.section-heading h2, .closing h2 { font: 400 clamp(2.4rem, 7vw, 4.25rem)/1.08 var(--display); text-wrap: balance; }
.section-note { color: var(--muted); margin-top: .9rem; }
.scratch-seals { display: flex; justify-content: center; gap: clamp(.9rem, 4vw, 1.7rem); max-width: 25rem; margin-inline: auto; }
.scratch-item { flex: 0 1 105px; min-width: 0; }
.scratch-seal { position: relative; width: 100%; aspect-ratio: 1; border-radius: 50%; background: var(--forest); box-shadow: 0 0 0 3px var(--limestone), 0 0 0 4px var(--line); }
.scratch-value { position: absolute; inset: 0; display: grid; place-items: center; color: var(--ivory); font: 400 clamp(1.1rem, 5.5vw, 1.8rem)/1 var(--display); }
.scratch-canvas { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; touch-action: none; cursor: crosshair; transition: opacity .5s ease; }
.scratch-seal.is-revealed .scratch-canvas { opacity: 0; pointer-events: none; }
.scratch-label { margin-top: .9rem; color: var(--muted); font-size: .875rem; }
.text-button { min-height: 44px; margin-top: .8rem; padding: 6px 10px; background: transparent; border: 0; text-decoration: underline; text-underline-offset: 5px; }
.countdown-panel { max-width: 29rem; margin: 1.7rem auto 0; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.countdown-heading { font: italic 1.35rem/1.3 var(--display); }
.countdown-units { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 1.1rem; }
.countdown-unit strong { display: block; font: 400 clamp(1.65rem, 6vw, 2.5rem)/1 var(--display); font-variant-numeric: tabular-nums; }
.countdown-unit span { display: block; margin-top: .5rem; color: var(--muted); font-size: .8125rem; }

.event-section { background: var(--ivory); }
.event-section--main { background: var(--evergreen); color: var(--ivory); }
.event-inner { display: grid; grid-template-columns: 1fr 1fr; align-items: center; max-width: 52rem; margin-inline: auto; padding: clamp(1.4rem, 5vw, 3.2rem); border: 1px solid var(--line); }
.event-section--main .event-inner { background: radial-gradient(ellipse at 12% 40%, #21513e, transparent 64%); border-color: #d6b78072; }
.event-section--main .ornament { color: var(--gold); }
.event-heading { text-align: center; }
.event-heading h2 { font: 400 clamp(2.8rem, 8vw, 5rem)/1.1 var(--display); }
.event-date { display: block; margin-top: .7rem; }
.event-date span { display: block; margin-top: .15rem; }
.event-details { min-width: 0; margin-inline-start: 1.55rem; padding-inline-start: 1.75rem; border-inline-start: 1px solid var(--line); }
.event-details h3 { font: 400 1.5rem/1.25 var(--display); }
.venue-address { font-size: .9375rem; margin-top: .2rem; }
.programme { display: grid; gap: .5rem; list-style: none; margin: 1rem 0 1.15rem; padding: 0; }
.programme li { display: grid; grid-template-columns: 4.5rem 1fr; gap: .5rem; font-size: .9375rem; }
.programme li span:first-child { color: var(--brass); }
.event-section--main .programme li span:first-child { color: #edcf9b; }
.button { display: inline-grid; place-items: center; min-height: 44px; padding: 8px 16px; border: 1px solid currentColor; text-decoration: none; font-size: .875rem; }
.event-map:hover { color: var(--ivory); background: var(--forest); }
.event-section--main .event-map:hover { color: var(--forest); background: var(--ivory); }

.closing { text-align: center; background: var(--forest); color: var(--ivory); }
.closing-image { width: 100%; height: clamp(190px, 42vw, 430px); object-fit: cover; object-position: 50% 30%; }
.closing-inner { max-width: 46rem; margin-inline: auto; }
.closing .ornament { color: var(--gold); }
.closing-dua { max-width: 26rem; margin: 1.1rem auto 0; font-size: 1.1rem; text-wrap: balance; }
.closing-signoff { margin-top: 1.5rem; color: #e9d3aa; font: italic 1.25rem/1.45 var(--display); }
.closing-names { margin-top: .35rem; }
.preview-note, .no-script { padding: 1.05rem 1rem; color: var(--muted); background: var(--ivory); text-align: center; font-size: .875rem; }

.motion-ready .reveal { opacity: 0; transform: translateY(14px); transition: opacity .65s ease, transform .65s ease; }
.motion-ready .reveal.is-visible { opacity: 1; transform: none; }

@media (max-width: 48rem) and (orientation: portrait) {
  .cinema { width: 100%; box-shadow: none; }
  .cinema-media { object-position: 50% 36%; }
}

@media (max-width: 620px) {
  .event-inner { display: block; }
  .event-details { max-width: 22rem; margin: 1.15rem auto 0; padding: 1.3rem 0 0; border-inline-start: 0; border-top: 1px solid var(--line); }
  .event-details h3, .venue-address { text-align: center; }
  .event-map { display: grid; width: fit-content; margin-inline: auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cinema-media, .opening-gate, .scratch-canvas, .motion-ready .reveal { transition: none; }
  .motion-ready .reveal { opacity: 1; transform: none; }
  .hero-copy { animation: none; }
}
