/* ==========================================================================
   Neilay’s Arangetram — Save the Date
   Palette and motifs are taken from the photographs: the maroon of the kurta,
   the ivory and gold of the stole, the carved arches of the temple at dusk.
   ========================================================================== */

@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('../fonts/cormorant-garamond-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 300 700;
  font-display: swap;
  src: url('../fonts/cormorant-garamond-italic-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Jost';
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url('../fonts/jost-latin.woff2') format('woff2');
}

:root {
  --ivory: #f7efe1;
  --ivory-rgb: 247, 239, 225;
  --paper: #efe3cf;
  --ink: #3a2420;
  --muted: #8a7164;
  --maroon: #641623;
  --maroon-rgb: 100, 22, 35;
  --crimson: #8f2233;
  --wine: #3b0b13;
  --night: #24060b;
  --gold: #b08440;
  --gold-rgb: 176, 132, 64;
  --gold-bright: #d9b46c;
  --gold-pale: #ecd9a8;

  --serif: 'Cormorant Garamond', 'Cormorant', 'Hoefler Text', 'Baskerville', 'Times New Roman', serif;
  --sans: 'Jost', 'Avenir Next', 'Futura', 'Century Gothic', system-ui, sans-serif;

  --gutter: clamp(1.5rem, 6vw, 7.5rem);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-io: cubic-bezier(.76, 0, .2, 1);
}

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

/* a whisper of paper grain over everything */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  opacity: .11;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .28  0 0 0 0 .14  0 0 0 0 .08  0 0 0 .55 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

img { display: block; max-width: 100%; }
p, h1, h2, figure { margin: 0; }
em { font-style: italic; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }

/* ── shared pieces ─────────────────────────────────────────────────────── */

.eyebrow {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  font: 500 clamp(.68rem, .8vw, .8rem)/1 var(--sans);
  letter-spacing: .42em;
  text-transform: uppercase;
  color: var(--maroon);
}
.eyebrow .rule {
  display: block;
  width: clamp(2rem, 4vw, 3.6rem);
  height: 1px;
  background: var(--gold);
  transform-origin: 0 50%;
}
.eyebrow--gold { color: var(--gold-bright); justify-content: center; }

.lotus { display: inline-block; width: 2.4rem; color: var(--gold); line-height: 0; }
.lotus svg { display: block; width: 100%; height: auto; overflow: visible; }
.lotus--lg { width: 3.4rem; color: var(--gold-bright); }

.mandala { display: block; width: 100%; height: 100%; overflow: visible; }
.mandala path, .mandala circle { fill: none; stroke: currentColor; stroke-width: var(--sw, .3); }
.mandala .dot { fill: currentColor; stroke: none; }

/* text that rises, a word at a time */
.w { display: inline-block; overflow: hidden; vertical-align: top; padding: .1em .08em .2em; margin: -.1em -.08em -.2em; }
.wi { display: inline-block; }
.js [data-split] .wi {
  transform: translate3d(0, 118%, 0) rotate(5deg);
  transform-origin: 0 100%;
  transition: transform 1.25s var(--ease-out);
  transition-delay: calc(var(--i) * 52ms + var(--d, 0s));
}
.js [data-split].in .wi, .js .door.is-on [data-split] .wi { transform: none; }

.js [data-reveal] {
  opacity: 0;
  transform: translate3d(0, 26px, 0);
  transition: opacity 1.3s ease, transform 1.3s var(--ease-out);
  transition-delay: var(--d, 0s);
}
.js [data-reveal].in { opacity: 1; transform: none; }
.js .eyebrow[data-reveal] .rule { transform: scaleX(0); transition: transform 1.4s var(--ease-out) .2s; }
.js .eyebrow[data-reveal].in .rule { transform: none; }

/* ── curtain ───────────────────────────────────────────────────────────── */

.curtain { display: none; }
.js .curtain { display: block; position: fixed; inset: 0; z-index: 100; }

.curtain__panel {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50.4%;
  background:
    repeating-linear-gradient(90deg,
      rgba(0, 0, 0, .36) 0, rgba(0, 0, 0, 0) 3.4%, rgba(255, 255, 255, .055) 5.2%,
      rgba(0, 0, 0, 0) 7%, rgba(0, 0, 0, .36) 10.5%),
    linear-gradient(180deg, #651523 0%, #4d0f1a 52%, #2d0810 100%);
  transition: transform 2s var(--ease-io) .45s;
  will-change: transform;
}
.curtain__panel--l { left: 0; transform-origin: 0 50%; }
.curtain__panel--r { right: 0; transform-origin: 100% 50%; }
.curtain__panel::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, #f0dba6, #b88a44 45%, #7b5a25);
  opacity: .85;
}
.curtain__panel--l::after { right: 0; }
.curtain__panel--r::after { left: 0; }
.is-open .curtain__panel--l { transform: translateX(-3%) scaleX(0); }
.is-open .curtain__panel--r { transform: translateX(3%) scaleX(0); }
.is-open .curtain { pointer-events: none; }

.curtain__centre {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 1.1rem;
  padding: 2rem;
  text-align: center;
  color: var(--gold-pale);
  transition: opacity .7s ease, transform 1.1s var(--ease-out);
}
.is-open .curtain__centre { opacity: 0; transform: scale(1.08); }

.curtain__emblem { width: clamp(7.5rem, 20vmin, 11rem); height: clamp(7.5rem, 20vmin, 11rem); color: var(--gold-bright); --sw: 1; animation: spin 60s linear infinite; }
.curtain__emblem path, .curtain__emblem circle:not(.dot) {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: draw 1.9s var(--ease-out) forwards;
  animation-delay: calc(var(--l) * 190ms + 150ms);
}
.curtain__emblem .dot { opacity: 0; animation: fade 1s ease forwards 1.1s; }
.curtain__kicker {
  margin-top: .8rem;
  font: 500 .72rem/1 var(--sans);
  letter-spacing: .5em;
  text-indent: .5em;
  text-transform: uppercase;
  color: var(--gold-bright);
  opacity: 0;
  animation: rise 1.2s var(--ease-out) forwards .7s;
}
.curtain__name {
  font: 400 clamp(2rem, 6vw, 3.4rem)/1.1 var(--serif);
  color: var(--ivory);
  opacity: 0;
  animation: rise 1.4s var(--ease-out) forwards .95s;
}
.curtain__name em { color: var(--gold-pale); }
.curtain__enter {
  display: grid;
  justify-items: center;
  gap: 1.15rem;
  margin-top: clamp(1.4rem, 4vh, 2.6rem);
  opacity: 0;
  transform: translate3d(0, 14px, 0);
  pointer-events: none;
  transition: opacity 1.1s ease, transform 1.1s var(--ease-out);
}
.is-ready .curtain__enter { opacity: 1; transform: none; pointer-events: auto; }
.is-open .curtain__enter { pointer-events: none; }
.curtain__quiet {
  padding: .3rem .2rem;
  border: 0;
  border-bottom: 1px solid rgba(236, 217, 168, .35);
  background: none;
  color: rgba(236, 217, 168, .78);
  font: italic 400 1.02rem/1.2 var(--serif);
  cursor: pointer;
  transition: color .3s, border-color .3s;
}
.curtain__quiet:hover { color: var(--ivory); border-color: var(--ivory); }

@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fade { to { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translate3d(0, 18px, 0); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── scroll progress ───────────────────────────────────────────────────── */

.progress { position: fixed; inset: 0 0 auto 0; height: 2px; z-index: 80; pointer-events: none; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-bright)); transform: scaleX(0); transform-origin: 0 50%; }

/* ── bottom controls: auto-scroll and music ────────────────────────────── */

.dock {
  position: fixed;
  z-index: 70;
  left: 50%;
  bottom: max(1rem, calc(env(safe-area-inset-bottom) + .5rem));
  display: flex;
  align-items: stretch;
  height: 2.9rem;
  padding: 0 .35rem;
  border-radius: 999px;
  background: rgba(var(--ivory-rgb), .9);
  box-shadow: 0 0 0 1px rgba(var(--gold-rgb), .5), 0 16px 34px -16px rgba(58, 11, 19, .6);
  -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
  transform: translate3d(-50%, 0, 0);
  transition: opacity .8s ease, transform .9s var(--ease-out);
}
.js .dock { opacity: 0; transform: translate3d(-50%, 160%, 0); pointer-events: none; }
.js.is-open .dock { opacity: 1; transform: translate3d(-50%, 0, 0); pointer-events: auto; transition-delay: 2.4s; }
.js.no-intro .dock { transition-delay: 0s; }

.dock__btn {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  margin: 0;
  padding: 0 .95rem 0 .45rem;
  border: 0;
  background: none;
  color: var(--maroon);
  font: 500 .62rem/1 var(--sans);
  letter-spacing: .3em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 999px;
  overflow: hidden;
  max-width: 12rem;
  transition: color .35s ease, max-width .7s var(--ease-out), padding .7s var(--ease-out), opacity .5s ease;
}
.dock__btn:hover { color: var(--crimson); }
.dock__btn + .dock__btn { position: relative; padding-left: 1rem; }
.dock__btn + .dock__btn::before { content: ''; position: absolute; left: 0; top: 28%; bottom: 28%; width: 1px; background: rgba(var(--gold-rgb), .55); transition: opacity .4s; }
/* once the tour is over its half of the dock folds away */
.dock__btn[hidden] { display: inline-flex; max-width: 0; padding-left: 0; padding-right: 0; opacity: 0; pointer-events: none; }
.dock__btn[hidden] + .dock__btn { padding-left: .85rem; }
.dock__btn[hidden] + .dock__btn::before { opacity: 0; }
.dock__label { min-width: 3.4em; text-align: left; white-space: nowrap; }

/* play / pause, ringed by how far through the tour we are */
.dock__disc { position: relative; flex: none; width: 2.1rem; height: 2.1rem; display: grid; place-items: center; }
.dock__disc svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.dock__disc circle { fill: none; stroke-width: 1.4; }
.dock__disc .track { stroke: rgba(var(--gold-rgb), .32); }
.dock__disc .bar { stroke: var(--gold); stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.dock__icon { position: relative; width: .6rem; height: .7rem; margin-left: .12rem; transition: margin .3s ease; }
.dock__icon::before, .dock__icon::after { content: ''; position: absolute; top: 0; bottom: 0; background: currentColor; }
.dock__icon::before { left: 0; width: 100%; -webkit-clip-path: polygon(0 0, 100% 50%, 100% 50%, 0 100%); clip-path: polygon(0 0, 100% 50%, 100% 50%, 0 100%); transition: clip-path .3s ease, -webkit-clip-path .3s ease; }
.dock__icon::after { right: 0; width: 34%; opacity: 0; transition: opacity .2s ease; }
.is-playing .dock__icon { margin-left: 0; }
.is-playing .dock__icon::before { -webkit-clip-path: polygon(0 0, 34% 0, 34% 100%, 0 100%); clip-path: polygon(0 0, 34% 0, 34% 100%, 0 100%); }
.is-playing .dock__icon::after { opacity: 1; }

/* music: four bars that dance while it plays */
.dock__bars { flex: none; display: flex; align-items: flex-end; gap: 2.5px; width: 1.15rem; height: .95rem; margin-left: .25rem; }
.dock__bars i { flex: 1; height: 100%; background: currentColor; border-radius: 1px; transform: scaleY(.18); transform-origin: 50% 100%; opacity: .55; transition: transform .4s ease, opacity .4s ease; }
.dock__btn--sound.is-on .dock__bars i { opacity: 1; animation: bars 1.1s ease-in-out infinite alternate; }
.dock__btn--sound.is-on .dock__bars i:nth-child(1) { animation-duration: .9s; animation-delay: -.2s; }
.dock__btn--sound.is-on .dock__bars i:nth-child(2) { animation-duration: 1.25s; animation-delay: -.6s; }
.dock__btn--sound.is-on .dock__bars i:nth-child(3) { animation-duration: .75s; animation-delay: -.35s; }
.dock__btn--sound.is-on .dock__bars i:nth-child(4) { animation-duration: 1.05s; animation-delay: -.8s; }
@keyframes bars { from { transform: scaleY(.22); } to { transform: scaleY(1); } }

/* ── hero ──────────────────────────────────────────────────────────────── */

/* The hero is pinned for a stretch of scrolling. In that time the photograph
   zooms toward the temple's doorway and a cusped opening grows out of it; the
   invitation, lying underneath, is seen through the opening. */
.hero {
  --aspect: 1.5;                               /* the photograph's proportions */
  --img-h: calc(100vw / var(--aspect));
  --first: 100vh;                              /* the first screen, as first seen */
  --stage-h: 100vh;                            /* the pinned stage: the tallest the screen gets */
  position: relative;
  z-index: 3;
  height: calc(var(--stage-h) + 135vh);        /* the extra is the length of the zoom */
  pointer-events: none;
  color: var(--maroon);
}
@supports (height: 100svh) { .hero { --first: 100svh; --stage-h: 100lvh; } }
@media (max-aspect-ratio: 1/1) { .hero { --aspect: .8097; } }

.hero__pin { position: sticky; top: 0; height: var(--stage-h); }
.hero__stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: auto;
  /* the sky of the photograph, continued upward */
  background: linear-gradient(180deg, #e2ecf6 0%, #ecf4fa 100%);
  will-change: clip-path;
}
.hero__media {
  --gap: max(0px, calc(var(--stage-h) - var(--img-h)));
  position: absolute;
  left: 0;
  right: 0;
  top: var(--gap);
  height: min(var(--img-h), calc(var(--stage-h) * 1.32));
  transform-origin: 0 0;
  will-change: transform;
  /* where the photo stops short of the top, let it dissolve into the sky */
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 min(calc(var(--gap) * 3), 22%));
          mask-image: linear-gradient(180deg, transparent 0, #000 min(calc(var(--gap) * 3), 22%));
}
.hero__zoom { position: absolute; inset: 0; transform-origin: 42% 62%; }
.hero__zoom picture { display: block; width: 100%; height: 100%; }
.hero__zoom img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 42%; }

/* light spilling from the doorway just before it opens */
.hero__glow {
  position: absolute;
  left: 0;
  top: 0;
  width: 200px;
  height: 200px;
  margin: -100px 0 0 -100px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 251, 240, .98) 0%, rgba(255, 246, 226, .72) 36%, rgba(255, 244, 220, 0) 100%);
  opacity: 0;
  pointer-events: none;
  will-change: transform, opacity;
}
.hero__ui { position: absolute; inset: 0; pointer-events: none; will-change: opacity; }
.hero__ui > * { pointer-events: auto; }
.hero__lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.hero__lines path { fill: none; stroke: var(--gold-bright); stroke-width: 1.3; }
.hero__lines path.thin { stroke-width: .9; }

.hero__bar {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(1.1rem, 2.2vw, 1.9rem) var(--gutter);
}
.monogram {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 3.05rem;
  border: 1px solid rgba(var(--maroon-rgb), .55);
  border-radius: 999px 999px 0 0;
  text-decoration: none;
  transition: background .5s, color .5s;
}
.monogram span { font: italic 500 1.45rem/1 var(--serif); padding-top: .32rem; }
.monogram:hover { background: var(--maroon); color: var(--ivory); }

.hero__jump {
  display: inline-flex;
  align-items: center;
  gap: .9rem;
  font: 500 .7rem/1 var(--sans);
  letter-spacing: .36em;
  text-transform: uppercase;
  text-decoration: none;
}
.hero__jump i { display: block; width: 2.4rem; height: 1px; background: currentColor; }

.hero__content {
  position: absolute;
  z-index: 2;
  left: var(--gutter);
  top: clamp(5.6rem, 7.4vw, 10.5rem);
  max-width: 62vw;
  transform-origin: 0 40%;
  will-change: transform, opacity;
}
.hero__title {
  margin: clamp(.7rem, 1.2vw, 1.3rem) 0 0;
  font: 400 clamp(3.3rem, 7vw, 10.5rem)/.95 var(--serif);
  letter-spacing: -.014em;
}
.hero__line { display: block; overflow: hidden; padding: .08em .16em .2em .06em; margin: -.08em -.16em -.2em -.06em; }
.hero__line > span { display: block; }
.hero__date {
  display: flex;
  align-items: center;
  gap: clamp(.7rem, 1vw, 1.1rem);
  margin-top: clamp(1.1rem, 1.7vw, 1.9rem);
  font: 500 clamp(.66rem, .8vw, .84rem)/1 var(--sans);
  letter-spacing: .38em;
  text-transform: uppercase;
}
.hero__date i { flex: none; width: 5px; height: 5px; background: var(--gold); transform: rotate(45deg); }

@media (max-aspect-ratio: 1/1) {
  .hero__content { top: clamp(5.3rem, 12.5vh, 9.5rem); right: var(--gutter); max-width: none; }
  .hero__title { font-size: clamp(3.2rem, 15.6vw, 8rem); }
  .hero__date { letter-spacing: .3em; }
}

/* rotating seal — also the way down */
.hero__seal {
  --size: clamp(6.6rem, 9.4vw, 9.2rem);
  position: absolute;
  z-index: 3;
  right: var(--gutter);
  top: calc(var(--first) - var(--size) - clamp(1.4rem, 3.2vw, 2.8rem));
  width: var(--size);
  height: var(--size);
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(var(--ivory-rgb), .84);
  box-shadow: 0 0 0 1px rgba(var(--gold-rgb), .55), 0 18px 40px -18px rgba(58, 11, 19, .55);
  -webkit-backdrop-filter: blur(8px);
          backdrop-filter: blur(8px);
  color: var(--maroon);
  text-decoration: none;
}
.hero__seal svg.ring { position: absolute; inset: 0; width: 100%; height: 100%; animation: spin 38s linear infinite; }
.hero__seal text { font: 500 11.5px var(--sans); fill: currentColor; }
.hero__seal .arrow { width: 26%; height: auto; overflow: visible; animation: bob 2.6s ease-in-out infinite; }
.hero__seal .arrow path { fill: none; stroke: currentColor; stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; }
@keyframes bob { 0%, 100% { transform: translateY(-9%); } 50% { transform: translateY(12%); } }

@media (max-aspect-ratio: 1/1) {
  /* clear of the controls at the foot of a phone screen */
  .hero__seal { --size: clamp(5.6rem, 24vw, 7rem); top: calc(var(--first) - var(--size) - 5.2rem); }
}

/* entrance, once the curtain parts */
.js .hero__zoom { transform: scale(1.2); transition: transform 3.6s var(--ease-out) .35s; }
.js.is-open .hero__zoom { transform: none; }
.js .hero__line > span { transform: translate3d(0, 114%, 0); transition: transform 1.6s var(--ease-out); }
.js .hero__line:nth-child(1) > span { transition-delay: 1.15s; }
.js .hero__line:nth-child(2) > span { transition-delay: 1.3s; }
.js.is-open .hero__line > span { transform: none; }
.js .hero__eyebrow, .js .hero__date, .js .hero__bar, .js .hero__seal {
  opacity: 0;
  transform: translate3d(0, 16px, 0);
  transition: opacity 1.3s ease, transform 1.3s var(--ease-out);
}
.hero__eyebrow { font-size: clamp(.86rem, 1.25vw, 1.2rem); gap: clamp(.9rem, 1.4vw, 1.4rem); }
.js .hero__eyebrow { transition-delay: 1s; }
.js .hero__date { transition-delay: 1.75s; }
.js .hero__bar { transform: translate3d(0, -12px, 0); transition-delay: 1.95s; }
.js .hero__seal { transform: scale(.82); transition-delay: 2.1s; }
.js.is-open .hero__eyebrow, .js.is-open .hero__date, .js.is-open .hero__bar, .js.is-open .hero__seal { opacity: 1; transform: none; }
.js .hero__eyebrow .rule { transform: scaleX(0); transition: transform 1.5s var(--ease-out) 1.2s; }
.js.is-open .hero__eyebrow .rule { transform: none; }

/* ── invitation ────────────────────────────────────────────────────────── */

.invite {
  position: relative;
  z-index: 1;
  margin-top: -100vh;                          /* tucked under the hero's last screen */
  margin-top: -100lvh;
  padding: clamp(5.5rem, 15vh, 11rem) var(--gutter) clamp(5rem, 13vh, 9.5rem);
  overflow: clip;
}
.invite__mandala {
  position: absolute;
  left: -27vmin;
  top: 50%;
  width: 78vmin;
  height: 78vmin;
  margin-top: -39vmin;
  color: rgba(var(--gold-rgb), .34);
  --sw: .22;
  pointer-events: none;
  will-change: transform;
}
.invite__grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr);
  align-items: center;
  gap: clamp(2.5rem, 8vw, 8rem);
  max-width: 78rem;
  margin: 0 auto;
  transform-origin: 50% 38%;
}
.display {
  margin-top: clamp(1.4rem, 2.4vw, 2.2rem);
  font: 300 clamp(2.6rem, 5.5vw, 5.4rem)/1.03 var(--serif);
  letter-spacing: -.012em;
  color: var(--maroon);
}
.display em { font-weight: 400; color: var(--crimson); }
.lede {
  max-width: 33rem;
  margin-top: clamp(1.5rem, 2.6vw, 2.4rem);
  font: 400 clamp(1.2rem, 1.55vw, 1.5rem)/1.5 var(--serif);
  color: var(--ink);
}
.gloss {
  position: relative;
  max-width: 31rem;
  margin-top: clamp(2rem, 3.4vw, 3rem);
  padding: 1.35rem 0 1.35rem 1.6rem;
  border-left: 1px solid rgba(var(--gold-rgb), .7);
}
.gloss__term { font: italic 500 1.55rem/1 var(--serif); color: var(--maroon); }
.gloss__term span {
  margin-left: .7rem;
  font: 500 .62rem/1 var(--sans);
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--gold);
  vertical-align: .22em;
}
.gloss__def { margin-top: .7rem; font-size: .95rem; line-height: 1.75; color: var(--muted); }
.gloss__def em { font-family: var(--serif); font-size: 1.14em; color: var(--ink); }

.invite__figure {
  position: relative;
  justify-self: end;
  width: min(100%, 25rem);
  aspect-ratio: 5 / 7;
  margin-bottom: 2.6rem;
}
.arch-photo {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 50% 50% 0 0 / 34% 34% 0 0;      /* until the script draws the real arch */
  background: var(--paper);
}
.arch-photo picture { display: block; position: absolute; inset: -9% 0; }
.arch-photo img { width: 100%; height: 100%; object-fit: cover; will-change: transform; }
.js .arch-photo { border-radius: 0; }
.js [data-reveal-arch] .arch-photo img { transform: scale(1.22); transition: transform 2.4s var(--ease-out); }
.js [data-reveal-arch].in .arch-photo img { transform: none; }

.arch-lines { position: absolute; left: -26px; top: -26px; width: calc(100% + 52px); height: calc(100% + 26px); overflow: visible; pointer-events: none; }
.arch-lines path { fill: none; stroke: var(--gold); stroke-width: 1.1; }
.arch-lines path + path { opacity: .45; }
.js .arch-lines path { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 2.6s var(--ease-out) .35s; }
.js .arch-lines path + path { transition-delay: .65s; }
.js [data-reveal-arch].in .arch-lines path { stroke-dashoffset: 0; }

.invite__figure figcaption {
  position: absolute;
  inset: calc(100% + 1rem) 0 auto 0;
  text-align: center;
  font: italic 400 1.05rem/1.2 var(--serif);
  color: var(--muted);
}

@media (max-width: 860px) {
  .invite__grid { grid-template-columns: 1fr; gap: 4.2rem; }
  .invite__figure { justify-self: center; width: min(76vw, 22rem); }
  .invite__mandala { left: auto; right: -40vmin; top: 22%; }
}

/* ── marquee ───────────────────────────────────────────────────────────── */

.marquee {
  overflow: hidden;
  padding: clamp(1.2rem, 2.4vw, 2rem) 0;
  border-top: 1px solid rgba(var(--maroon-rgb), .12);
  border-bottom: 1px solid rgba(var(--maroon-rgb), .12);
}
.marquee__track { display: flex; align-items: center; width: max-content; white-space: nowrap; will-change: transform; }
.marquee__track span {
  padding: 0 clamp(1.4rem, 3vw, 2.8rem);
  font: italic 300 clamp(2.8rem, 8.2vw, 7.6rem)/1.1 var(--serif);
  color: transparent;
  -webkit-text-stroke: 1px rgba(var(--maroon-rgb), .5);
}
.marquee__track span.is-gold { color: var(--gold); -webkit-text-stroke: 0; font-weight: 400; }
.marquee__track i { flex: none; width: .62rem; height: .62rem; background: var(--gold); transform: rotate(45deg); }

/* ── the passage ───────────────────────────────────────────────────────── */

.passage { position: relative; height: 540vh; background: var(--ivory); }
.passage__stage {
  --door-w: 20rem;
  --door-h: 28rem;
  --door-cy: 50vh;
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100lvh;
  overflow: clip;
}

.passage__intro { position: absolute; inset: 0; pointer-events: none; color: var(--maroon); }
.passage__eyebrow {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(var(--door-cy) - var(--door-h) / 2 - clamp(3.6rem, 9vh, 5.6rem));
  justify-content: center;
  will-change: transform, opacity;
}
.passage__lead {
  position: absolute;
  top: var(--door-cy);
  font: italic 300 clamp(2.5rem, 5.1vw, 5.4rem)/1 var(--serif);
  letter-spacing: -.01em;
  white-space: nowrap;
  will-change: transform, opacity;
}
.passage__lead--a { right: calc(50% + var(--door-w) / 2 + clamp(1.6rem, 3.6vw, 4rem)); transform: translateY(-50%); }
.passage__lead--b { left: calc(50% + var(--door-w) / 2 + clamp(1.6rem, 3.6vw, 4rem)); transform: translateY(-50%); }

.door { position: absolute; inset: 0; overflow: hidden; background: var(--ivory); will-change: clip-path; }
.door__push, .door__media { position: absolute; inset: 0; transform-origin: 0 0; will-change: transform; }
/* The photograph is laid out whole (3:2) and simply overhangs the screen, so a
   small doorway can show more of it than the full-bleed view does. */
.door__photo {
  --bw: max(100%, calc(100vh * 1.5));
  --bh: max(100%, calc(100vw / 1.5));
  position: absolute;
  left: calc((100% - var(--bw)) * var(--px, .5));
  top: calc((100% - var(--bh)) * var(--py, .5));
  width: var(--bw);
  height: var(--bh);
}
@supports (height: 100lvh) { .door__photo { --bw: max(100%, calc(100lvh * 1.5)); } }
.door--bells .door__photo { --px: .62; --py: .5; }
.door--dance .door__photo { --px: .54; --py: .22; }
.door--corridor .door__photo { --px: .3; --py: .3; }
.door__photo picture { display: block; width: 100%; height: 100%; }
.door__photo img { width: 100%; height: 100%; object-fit: cover; }

.door__fog {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.3s ease;
  background: linear-gradient(90deg,
    var(--ivory) 0%, rgba(var(--ivory-rgb), .95) 13%, rgba(var(--ivory-rgb), .72) 26%,
    rgba(var(--ivory-rgb), .3) 39%, rgba(var(--ivory-rgb), 0) 52%);
}
.door.is-on .door__fog { opacity: 1; }
/* in the corridor he stands to the left, so the paper drifts in from the upper right */
.door--corridor .door__fog {
  background: radial-gradient(ellipse 64% 82% at 100% 20%,
    var(--ivory) 0%, rgba(var(--ivory-rgb), .95) 26%, rgba(var(--ivory-rgb), .7) 46%,
    rgba(var(--ivory-rgb), .28) 62%, rgba(var(--ivory-rgb), 0) 76%);
}
.door__dim { position: absolute; inset: 0; pointer-events: none; background: var(--night); opacity: 0; }

.caption {
  position: absolute;
  left: var(--gutter);
  top: 45%;
  width: min(29vw, 26rem);
  transform: translateY(-50%);
  color: var(--maroon);
}
.door--corridor .caption { left: auto; right: var(--gutter); top: 27%; width: min(27vw, 24rem); }
.caption__label { display: flex; align-items: baseline; gap: 1rem; }
.caption__label b { font: italic 500 1.7rem/1 var(--serif); color: var(--gold); }
.caption__label span { font: 500 .72rem/1 var(--sans); letter-spacing: .42em; text-transform: uppercase; }
.caption__text {
  margin-top: clamp(.9rem, 1.6vw, 1.5rem);
  font: 400 clamp(1.5rem, 2.25vw, 2.35rem)/1.2 var(--serif);
  letter-spacing: -.005em;
}
.js .caption__label { opacity: 0; transform: translate3d(0, 14px, 0); transition: opacity .5s ease, transform .5s ease; }
.js .door.is-on .caption__label { opacity: 1; transform: none; transition: opacity 1.1s ease .15s, transform 1.1s var(--ease-out) .15s; }
.js .door [data-split] .wi { --d: .3s; }
.js .door:not(.is-on) [data-split] .wi { transition-duration: .55s; transition-delay: 0s; transition-timing-function: ease-in; }

/* III · the stage */
.door--stage { background: var(--night); color: var(--ivory); }
.stage__glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 62% 58% at 50% 44%, rgba(150, 34, 52, .78) 0%, rgba(100, 22, 35, .42) 42%, rgba(36, 6, 11, 0) 76%);
}
.stage__mandala {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 124vmin;
  height: 124vmin;
  margin: -62vmin 0 0 -62vmin;
  color: rgba(217, 180, 108, .42);
  --sw: .2;
  animation: spin 240s linear infinite;
}
.stage__beam {
  position: absolute;
  left: 50%;
  top: -12%;
  width: 82vmin;
  height: 124%;
  margin-left: -41vmin;
  background: linear-gradient(180deg, rgba(255, 228, 176, .22) 0%, rgba(255, 228, 176, .07) 55%, rgba(255, 228, 176, 0) 88%);
  -webkit-clip-path: polygon(41% 0, 59% 0, 100% 100%, 0 100%);
          clip-path: polygon(41% 0, 59% 0, 100% 100%, 0 100%);
  filter: blur(22px);
  mix-blend-mode: screen;
}
.caption--stage {
  left: 50%;
  top: 50%;
  width: min(88vw, 52rem);
  transform: translate(-50%, -50%);
  text-align: center;
  color: var(--ivory);
}
.caption--stage .caption__label { justify-content: center; color: var(--gold-pale); }
.caption--stage .caption__label b { color: var(--gold-bright); }
.stage__line {
  margin-top: clamp(1.2rem, 2.4vw, 2rem);
  font: 300 clamp(2.5rem, 6.4vw, 6.2rem)/1.02 var(--serif);
  letter-spacing: -.014em;
}
.stage__line em { display: block; font-weight: 400; color: var(--gold-bright); }

.passage__lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.passage__lines path { fill: none; stroke: var(--gold-bright); stroke-width: 1.3; }
.passage__lines path.thin { stroke-width: .9; }

/* tall screens: the photograph above, its caption on the paper below */
@media (max-aspect-ratio: 11/10) {
  .passage__lead { left: 0; right: 0; text-align: center; font-size: clamp(2.3rem, 10.5vw, 4.6rem); }
  .passage__lead--a { top: calc(var(--door-cy) - var(--door-h) / 2 - 1.5rem); transform: translateY(-100%); }
  .passage__lead--b { top: calc(var(--door-cy) + var(--door-h) / 2 + 1.4rem); transform: none; }
  .passage__eyebrow { top: calc(var(--door-cy) - var(--door-h) / 2 - clamp(6.2rem, 26vw, 9.5rem)); }

  .door__photo { left: 0; top: 0; width: 100%; height: 63vh; height: 63svh; }
  .door__photo::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(var(--ivory-rgb), 0) 70%, rgba(var(--ivory-rgb), .6) 88%, var(--ivory) 100%);
  }
  .door__fog { display: none; }
  .door--bells .door__photo img { object-position: 60% 50%; }
  .door--dance .door__photo img { object-position: 53% 30%; }
  .door--corridor .door__photo img { object-position: 24% 40%; }

  .caption:not(.caption--stage), .door--corridor .caption {
    left: var(--gutter);
    right: var(--gutter);
    top: calc(63vh + .2rem);
    top: calc(63svh + .2rem);
    width: auto;
    transform: none;
  }
  .caption__label b { font-size: 1.45rem; }
  .caption__text { font-size: clamp(1.15rem, min(5.4vw, 3.2vh), 2rem); margin-top: .7rem; }
  .caption--stage { top: 50vh; top: 50svh; }
  .stage__line { font-size: clamp(2.5rem, 11.5vw, 5rem); }
}
@media (max-aspect-ratio: 7/10) {
  .door--bells .door__photo img, .door--dance .door__photo img { object-position: 50% 50%; }
  .door--corridor .door__photo img { object-position: 0% 50%; }
}

/* ── the date ──────────────────────────────────────────────────────────── */

.date {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100vh;
  min-height: 100lvh;
  padding: clamp(4.5rem, 11vh, 8rem) var(--gutter) clamp(6.5rem, 12vh, 8rem);
  background: linear-gradient(180deg, var(--night) 0%, var(--wine) 42%, #300911 100%);
  color: var(--ivory);
  text-align: center;
}
.date__dust { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.date__inner { position: relative; width: 100%; max-width: 64rem; margin: auto; }
.date__inner > .lotus { margin-bottom: 1.5rem; }
/* "Save the Date", the heading of the last page */
.date__inner > .eyebrow {
  font-size: clamp(1.15rem, 2.4vw, 1.9rem);
  letter-spacing: .44em;
  margin-bottom: clamp(.4rem, 1.2vw, 1rem);
}
.date__inner > .eyebrow span { padding-left: .44em; }      /* balances the trailing letter-space so it sits centred */

.lockup {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: clamp(.9rem, 4vw, 3.6rem);
  margin-top: clamp(1.2rem, 3vw, 2.4rem);
}
.lockup__day {
  padding: .06em .05em 0;
  font: 300 clamp(8.5rem, 31vw, 22rem)/.86 var(--serif);
  font-variant-numeric: lining-nums;
  letter-spacing: -.03em;
  background: linear-gradient(176deg, #f6e8c0 8%, #dcb970 44%, #a8762f 92%);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
}
.lockup__side { position: relative; display: block; padding: 1em 0; }
.lockup__side::before, .lockup__side::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(217, 180, 108, .55);
}
.lockup__side::before { top: 0; }
.lockup__side::after { bottom: 0; }
.lockup__side b {
  display: block;
  font: 400 clamp(1.05rem, 2.9vw, 2.2rem)/1 var(--serif);
  font-variant-numeric: lining-nums;
  letter-spacing: .34em;
  text-indent: .34em;
  text-transform: uppercase;
  color: var(--gold-pale);
}
.js .lockup__day { opacity: 0; transform: translate3d(0, 6%, 0) scale(.72); filter: blur(10px); transition: opacity 1.6s ease, transform 2s var(--ease-out), filter 1.6s ease; }
.js .lockup__side b { opacity: 0; transition: opacity 1.4s ease .7s; }
.js .lockup__side::before, .js .lockup__side::after { transform: scaleX(0); transition: transform 1.8s var(--ease-out) .45s; }
.js .lockup__side--l::before, .js .lockup__side--l::after { transform-origin: 100% 50%; }
.js .lockup__side--r::before, .js .lockup__side--r::after { transform-origin: 0 50%; }
.js .lockup.in .lockup__day { opacity: 1; transform: none; filter: none; }
.js .lockup.in .lockup__side b { opacity: 1; }
.js .lockup.in .lockup__side::before, .js .lockup.in .lockup__side::after { transform: none; }

.date__spell {
  margin-top: clamp(1.4rem, 3vw, 2.2rem);
  font: italic 400 clamp(1.15rem, 2vw, 1.55rem)/1.4 var(--serif);
  color: var(--gold-pale);
}

.countdown {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  max-width: 36rem;
  margin: clamp(2.6rem, 6vw, 4.2rem) auto 0;
}
.countdown__cell { padding: .3rem .4rem .5rem; border-left: 1px solid rgba(217, 180, 108, .28); }
.countdown__cell:first-child { border-left: 0; }
.countdown__cell b {
  display: block;
  font: 400 clamp(2.1rem, 6.4vw, 3.5rem)/1.05 var(--serif);
  font-variant-numeric: lining-nums tabular-nums;
  color: var(--ivory);
}
.countdown__cell span {
  display: block;
  margin-top: .55rem;
  font: 500 clamp(.56rem, 1.5vw, .66rem)/1 var(--sans);
  letter-spacing: .32em;
  text-indent: .32em;
  text-transform: uppercase;
  color: var(--gold-bright);
}
.countdown.is-done { display: block; }
.countdown__done { font: italic 400 clamp(1.6rem, 4vw, 2.4rem)/1.2 var(--serif); color: var(--ivory); }

.date__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1.4rem 2.4rem;
  margin-top: clamp(2.6rem, 6vw, 4rem);
}
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 1.15rem 2.5rem;
  border: 1px solid var(--gold-bright);
  outline: 1px solid rgba(217, 180, 108, .32);
  outline-offset: 5px;
  overflow: hidden;
  font: 500 .74rem/1 var(--sans);
  letter-spacing: .34em;
  text-indent: .34em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--gold-pale);
  transition: color .5s ease;
}
.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, #f1e0b2, #d9b46c 55%, #c59c54);
  transform: translate3d(0, 101%, 0);
  transition: transform .65s var(--ease-out);
}
.btn span { position: relative; }
button.btn { background: none; cursor: pointer; }
.btn--lg {
  padding: clamp(1.25rem, 2.2vw, 1.6rem) clamp(2.4rem, 5vw, 4rem);
  font-size: clamp(1rem, 1.7vw, 1.3rem);
  letter-spacing: .4em;
  text-indent: .4em;
  outline-offset: 6px;
}
.btn:hover, .btn:focus-visible { color: var(--night); }
.btn:hover::before, .btn:focus-visible::before { transform: none; }
.link {
  padding-bottom: .45rem;
  border-bottom: 1px solid rgba(217, 180, 108, .5);
  font: 500 .7rem/1 var(--sans);
  letter-spacing: .3em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--gold-pale);
  transition: color .4s, border-color .4s;
}
.link i { font-style: normal; letter-spacing: 0; margin-left: .2em; }
.link:hover { color: var(--ivory); border-color: var(--ivory); }
.link--quiet { font-size: .62rem; border-bottom-color: rgba(217, 180, 108, .3); color: rgba(236, 217, 168, .8); }
.date__foot { position: relative; display: grid; justify-items: center; gap: 1.5rem; margin-top: clamp(3rem, 8vh, 5rem); }
.date__credit { max-width: 40rem; font: 400 .72rem/1.7 var(--sans); letter-spacing: .02em; color: rgba(236, 217, 168, .46); }
.date__credit a { color: rgba(236, 217, 168, .66); text-underline-offset: .2em; }
.date__credit a:hover { color: var(--gold-pale); }
.date__note {
  margin-top: clamp(2.4rem, 5vw, 3.4rem);
  font: 400 .7rem/1.6 var(--sans);
  letter-spacing: .3em;
  text-transform: uppercase;
  color: rgba(236, 217, 168, .68);
}

/* ── without scripts: a plain, readable page ───────────────────────────── */

html:not(.js) .hero, .calm .hero { height: var(--stage-h); pointer-events: auto; }
html:not(.js) .invite, .calm .invite { margin-top: 0; }
html:not(.js) .passage { height: auto; }
html:not(.js) .passage__stage { position: static; height: auto; }
html:not(.js) .passage__intro, html:not(.js) .passage__lines { display: none; }
html:not(.js) .door { position: relative; min-height: 100vh; }

/* ── calmer for those who ask for it ───────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; animation-delay: 0s !important; transition-duration: .001s !important; transition-delay: 0s !important; }
  .curtain__emblem, .stage__mandala, .hero__seal svg.ring, .hero__seal .arrow, .dock__bars i { animation: none !important; }
}
