/* Vishva & Sahil wedding film: full-screen video scenes, the names in the gate, and the welcome
   title block. */

@font-face { font-family: "Italiana"; font-weight: 400; font-display: swap; src: url("../fonts/italiana-latin.woff2") format("woff2"); }
@font-face { font-family: "Mrs Saint Delafield"; font-weight: 400; font-display: swap; src: url("../fonts/mrs-saint-delafield-latin.woff2") format("woff2"); }
@font-face { font-family: "Archivo"; font-weight: 300 600; font-display: swap; src: url("../fonts/archivo-latin.woff2") format("woff2"); }

:root {
  --paper: #E8E3DA;        /* the opening film's paper, sampled from its frames */
  --ivory: #FFF8EE;
  --champagne: #F1DDB0;
  --gold: #D9A55B;
  --gold-deep: #9A6A2A;    /* gold that still reads on ivory and bright sky */
  --ink: #3B2213;          /* umber text on light grounds */
  --ink-soft: #5A4030;
  --umber: 38, 22, 12;     /* scrim tone, sampled from the welcome film's shadows */
  --ease: cubic-bezier(.65, 0, .35, 1);
}

html { background: var(--paper); }
/* No visible scroll bar: the page moves by wheel, touch, keys and the navigation. */
html { scrollbar-width: none; -ms-overflow-style: none; }
html::-webkit-scrollbar, body::-webkit-scrollbar { display: none; width: 0; height: 0; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Archivo", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
/* Until the welcome film has ended, the film is the whole page. */
body.is-locked { overflow: hidden; height: 100%; overscroll-behavior: none; }

#film {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: var(--paper);
  /* Phone browsers' automatic dark mode (Chrome "darken websites", Samsung Internet) repaints CSS
     backgrounds but never video pixels, so the paper around the portrait-framed opening turned
     dark brown while the film stayed light. The films are light paper by design: keep their
     grounds exactly as authored. Scoped to the film; the rest of the site is untouched. */
  color-scheme: only light;
  -webkit-user-select: none;
  user-select: none;
}
/* Darkens the held frame a little as the story scrolls up over it (journey.js sets --leave). */
#film::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: rgb(var(--umber));
  opacity: calc(var(--leave, 0) * .45);
}

/* ---------------------------------------------------------------- scenes --- */

.scene {
  position: absolute;
  inset: 0;
  overflow: hidden;
  opacity: 0;
  background: var(--scene-backdrop, #000);
}

.scene__media {
  position: absolute;
  inset: 0;
}

.scene__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
  pointer-events: none;
}
.scene__video::-webkit-media-controls,
.scene__video::-webkit-media-controls-start-playback-button { display: none !important; -webkit-appearance: none; }

/* Portrait screens, for films composed around a centred subject on a plain ground (the opening
   monogram): instead of cropping the subject, size the film to --portrait-width of the screen,
   centre it, and feather its top and bottom edges into the matching backdrop. */
@media (max-aspect-ratio: 1/1) {
  .scene--framed-portrait .scene__video {
    left: 50%;
    top: 50%;
    width: var(--portrait-width, 100vw);
    height: auto;
    aspect-ratio: var(--video-aspect, 16 / 9);
    transform: translate(-50%, -50%);
    -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 16%, #000 84%, transparent 100%);
    mask-image: linear-gradient(to bottom, transparent 0, #000 16%, #000 84%, transparent 100%);
  }
}

/* ------------------------------------------------------- petals over a film --- */

/* content.js `overlay: "petals"` (experience.js builds it): petals in the monogram's rose, blush,
   leaf and gold drift down across the whole screen, turning as they fall, and small gold glints
   come and go. Transforms and opacity only, so the film beneath keeps playing smoothly. */
.scene__fx { position: absolute; inset: 0; z-index: 2; overflow: hidden; pointer-events: none; }
.fx-petal {
  position: absolute;
  left: var(--x);
  top: 0;
  width: var(--s);
  height: calc(var(--s) * 1.4);
  opacity: 0;
  will-change: transform, opacity;
  animation: fx-fall var(--t) linear var(--d) infinite;
}
/* the petal itself rocks and turns edge-on while its holder carries it down */
.fx-petal i {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 85% 12% 85% 12%;
  background: linear-gradient(140deg, var(--c1), var(--c2));
  box-shadow: 0 3px 6px rgba(120, 60, 50, .16);
  animation: fx-rock calc(var(--t) / 3.4) ease-in-out infinite alternate;
}
@keyframes fx-fall {
  0% { transform: translate3d(0, -12vh, 0) rotate(0turn); opacity: 0; }
  7% { opacity: var(--o); }
  90% { opacity: var(--o); }
  100% { transform: translate3d(var(--dx), 112vh, 0) rotate(var(--r)); opacity: 0; }
}
@keyframes fx-rock {
  from { transform: translateX(-16px) rotateY(0deg) rotate(-20deg); }
  to { transform: translateX(16px) rotateY(62deg) rotate(24deg); }
}
.fx-glint {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--s);
  height: var(--s);
  background: radial-gradient(circle, #FFF4CF 0%, #E9BC62 45%, #C8902F 100%);
  -webkit-clip-path: polygon(50% 0, 59% 41%, 100% 50%, 59% 59%, 50% 100%, 41% 59%, 0 50%, 41% 41%);
  clip-path: polygon(50% 0, 59% 41%, 100% 50%, 59% 59%, 50% 100%, 41% 59%, 0 50%, 41% 41%);
  opacity: 0;
  animation: fx-glint var(--t) ease-in-out var(--d) infinite;
}
@keyframes fx-glint {
  0%, 100% { transform: scale(.2) rotate(0deg); opacity: 0; }
  50% { transform: scale(1) rotate(45deg); opacity: .9; }
}
@media (prefers-reduced-motion: reduce) { .scene__fx { display: none; } }

/* ------------------------------------------------------------ scene text --- */

/* The original welcome title (restored 30-10-2026): a lower-third block over a warm gradient
   that rises from the bottom edge, so the fort and arches in the upper half stay clear. As the
   page scrolls up over the film (journey.js sets --leave) the block drifts up and fades. */
.scene__text {
  position: absolute;
  inset: 0;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  box-sizing: border-box;
  padding: 0 clamp(22px, 6vw, 72px) calc(env(safe-area-inset-bottom, 0px) + clamp(40px, 9vh, 96px));
  text-align: center;
  pointer-events: none;
  text-shadow: 0 1px 2px rgba(var(--umber), .35), 0 2px 24px rgba(var(--umber), .45);
  transform: translateY(calc(var(--leave, 0) * -10vh));
  opacity: calc(1 - var(--leave, 0) * 1.4);
}
.scene__text::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0;
  transition: opacity 1.6s ease;
  background: linear-gradient(to top,
    rgba(var(--umber), .78) 0%,
    rgba(var(--umber), .58) 28%,
    rgba(var(--umber), .3) 50%,
    rgba(var(--umber), .1) 64%,
    rgba(var(--umber), 0) 76%);
}
.scene__text.is-shown::before { opacity: 1; }
.scene__text > * { margin: 0; opacity: 0; }

.t-kicker {
  font: 500 clamp(10px, 1.05vw, 13px)/1.5 "Archivo", system-ui, sans-serif;
  letter-spacing: .36em;
  text-transform: uppercase;
  color: var(--ivory);
  margin-bottom: .9em;
}
.t-title {
  font: 400 clamp(54px, 9.6vw, 128px)/1 "Italiana", Georgia, serif;
  letter-spacing: .03em;
  color: var(--ivory);
}
.t-title > span { display: inline-block; opacity: 0; }
.t-title .t-amp {
  font-family: "Mrs Saint Delafield", cursive;
  font-size: .9em;
  color: var(--champagne);
  padding: 0 .12em;
}
.t-line {
  font: 300 clamp(15px, 1.6vw, 21px)/1.6 "Archivo", system-ui, sans-serif;
  letter-spacing: .02em;
  max-width: 36em;
  text-wrap: balance;
  margin-top: .7em;
  color: var(--ivory);
}
.t-rule {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 1.5em 0 1.1em;
  color: var(--gold);
  font-size: 8px;
  line-height: 1;
}
.t-rule::before, .t-rule::after {
  content: "";
  width: clamp(36px, 6vw, 72px);
  height: 1px;
  background: linear-gradient(to right, rgba(241, 221, 176, 0), var(--champagne));
}
.t-rule::after { transform: scaleX(-1); }
.t-date {
  font: 500 clamp(10px, 1.05vw, 13px)/1.5 "Archivo", system-ui, sans-serif;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--ivory);
}

/* The names in the gate (restored from the earlier approved version): one line of ivory Italiana
   with the champagne script ampersand, at the title's size; experience.js places it on the gate
   (centre point + scale) every frame, then glides it onto the title block. */
.names {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 2;
  isolation: isolate;
  font: 400 clamp(54px, 9.6vw, 128px)/1 "Italiana", Georgia, serif;
  letter-spacing: .03em;
  color: var(--ivory);
  text-align: center;
  white-space: nowrap;
  text-shadow: 0 1px 2px rgba(var(--umber), .45), 0 2px 26px rgba(var(--umber), .55);
  transform-origin: 50% 50%;
  pointer-events: none;
  will-change: transform;
}
/* A soft warm shade behind the line keeps ivory readable over the bright gateway. */
.names::before {
  content: "";
  position: absolute;
  inset: -120% -26%;
  z-index: -1;
  background: radial-gradient(closest-side, rgba(var(--umber), .36), rgba(var(--umber), .24) 30%, rgba(var(--umber), .1) 58%, rgba(var(--umber), .03) 80%, rgba(var(--umber), 0));
  opacity: 0;
  transition: opacity 2.4s ease;
}
.names.is-in::before { opacity: 1; }
.names.is-landing::before { opacity: 0; transition-duration: .9s; }
.names > span { display: inline-block; opacity: 0; }
.names .t-amp { font-family: "Mrs Saint Delafield", cursive; font-size: .9em; color: var(--champagne); padding: 0 .12em; letter-spacing: 0; }

/* Short, wide screens (landscape phones): tighten so the block stays in the lower half. */
@media (max-height: 520px) and (min-aspect-ratio: 1/1) {
  .t-title { font-size: clamp(40px, 13vh, 72px); }
  .t-rule { margin: .9em 0 .7em; }
  .scene__text { padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 22px); }
}
/* Phones with the navigation bar along the bottom: the block sits above it. */
@media (max-width: 720px) {
  body.has-nav .scene__text { padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 58px + 30px); transition: padding .8s var(--ease); }
}

/* ------------------------------------------------ portrait phones: welcome --- */

/* Client-approved 31-10-2026, mobile-first. A 1280 x 720 film cropped to fill a tall phone shows
   only its centre quarter, magnified about 3.5 times, which looks soft. On portrait screens the
   welcome is instead its own composition: the film fills the upper part of the screen (sharper, as
   it is magnified much less, and from its own lanczos rendition, srcPortrait), its lower edge
   melts into the film's own deep umber, and the title block sits on that ground in ivory and
   champagne, crisp and readable without darkening the picture. (Keep the query in step with
   `portrait` in experience.js.) */
@media (max-aspect-ratio: 4/5) {
  .scene--welcome { background: rgb(var(--umber)) !important; }
  .scene--welcome .scene__media { bottom: auto; height: 64vh; height: 64svh; }
  .scene--welcome .scene__media::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 44%;
    pointer-events: none;
    background: linear-gradient(to bottom,
      rgba(var(--umber), 0) 0%,
      rgba(var(--umber), .18) 26%,
      rgba(var(--umber), .55) 55%,
      rgba(var(--umber), .88) 80%,
      rgb(var(--umber)) 100%);
  }
  .scene--welcome .scene__text {
    padding: 0 20px calc(env(safe-area-inset-bottom, 0px) + clamp(34px, 6.5svh, 64px));
    text-shadow: 0 1px 10px rgba(var(--umber), .5);
  }
  .scene--welcome .scene__text::before { display: none; }
  .scene--welcome .t-kicker { font-size: 11px; letter-spacing: .34em; margin-bottom: 14px; color: var(--champagne); padding-left: .34em; }
  .scene--welcome .t-title { font-size: clamp(44px, 13.2vw, 92px); line-height: 1.04; letter-spacing: .02em; white-space: nowrap; }
  .scene--welcome .t-title .t-amp { padding: 0 .16em; }
  .scene--welcome .t-line { font-size: 15.5px; font-weight: 400; line-height: 1.62; letter-spacing: .01em; max-width: 21em; margin-top: 16px; color: rgba(255, 248, 238, .94); }
  .scene--welcome .t-rule { margin: 20px 0 14px; }
  .scene--welcome .t-rule::before, .scene--welcome .t-rule::after { width: 44px; }
  .scene--welcome .t-date { font-size: 11.5px; font-weight: 600; letter-spacing: .3em; padding-left: .3em; }
}
/* Short portrait phones (e.g. 360 x 640): a little less film, a slightly tighter block. */
@media (max-aspect-ratio: 4/5) and (max-height: 700px) {
  .scene--welcome .scene__media { height: 58vh; height: 58svh; }
  .scene--welcome .t-kicker { margin-bottom: 10px; }
  .scene--welcome .t-title { font-size: clamp(42px, 12.4vw, 60px); }
  .scene--welcome .t-line { font-size: 14.5px; margin-top: 12px; }
  .scene--welcome .t-rule { margin: 14px 0 10px; }
}
/* Tablets in portrait: the same composition, set larger. */
@media (max-aspect-ratio: 4/5) and (min-width: 600px) {
  .scene--welcome .t-kicker { font-size: 13px; }
  .scene--welcome .t-title { font-size: clamp(72px, 12vw, 112px); }
  .scene--welcome .t-line { font-size: 19px; }
  .scene--welcome .t-date { font-size: 13px; }
}

/* ------------------------------------------------------------- the taps --- */

/* The whole film answers a tap or click, one stage at a time (experience.js); nothing on screen
   says so (client-approved 31-10-2026). touch-action keeps a quick double tap from zooming. */
#film { touch-action: manipulation; }
#film.is-tappable { cursor: pointer; }
/* The invitation over the opening: a click anywhere opens the page. */
.film-cue {
  position: absolute;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom, 0px) + clamp(18px, 7vh, 72px));
  z-index: 6;
  margin: 0;
  padding: 9px 18px 8px;
  border-radius: 999px;
  background: rgba(250, 244, 234, .86);
  font: 500 11px/1 "Archivo", system-ui, sans-serif;
  letter-spacing: .26em;
  text-transform: uppercase;
  white-space: nowrap;
  color: #991C29;
  transform: translateX(-50%);
  pointer-events: none;
  animation: film-cue-in 1.2s ease 1s both;
}
@keyframes film-cue-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .film-cue { animation: none; } }

/* ------------------------------------------- the welcome: centre and stages --- */

/* Client-approved 31-10-2026 (third round), after the first scene's look (the user's screenshots
   171814, 173707, 174144). Over the film, one stage at a time (experience.js): the Ganesh
   invocation at the top centre; the centre block (kicker, names, date, line, unchanged); cream
   jharokha cards for the groom's family, the bride's family and the location, each leaving before
   the next; #ViSaApproved written out at the bottom centre; then the live countdown in its own
   jharokha card. */

/* The Ganesh invocation only (subset of Noto Serif Gujarati, SIL OFL, just these glyphs; its own
   family name so the first scene's invocations keep their font). */
@font-face { font-family: "VS Ganesh"; font-weight: 500; font-display: swap; src: url("../fonts/noto-serif-gujarati-ganesh.woff2") format("woff2"); }

.scene--welcome .t-date { margin-top: 1em; font-weight: 600; }
.scene--welcome .t-rule { margin: 1.15em 0 .85em; }
.scene--welcome .t-line { margin-top: 0; }

.scene__panels {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  --wp-w: clamp(240px, 21vw, 330px);
  --wp-edge: clamp(18px, 3vw, 56px);
  transform: translateY(calc(var(--leave, 0) * -6vh));
  opacity: calc(1 - var(--leave, 0) * 1.4);
}

/* શ્રી ગણેશાય નમઃ: a slip of cream paper at the top centre, gold hairlines opening out on either
   side of the words, which then sharpen into place. */
.wbless {
  position: absolute;
  left: 50%;
  top: calc(env(safe-area-inset-top, 0px) + clamp(14px, 2.6vh, 28px));
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0;
  padding: 7px 18px 6px;
  white-space: nowrap;
  background: rgba(255, 249, 238, .8);
  border: 1px solid rgba(184, 137, 58, .55);
  border-radius: 2px;
  box-shadow: 0 10px 26px -16px rgba(38, 22, 12, .55);
  transform: translateX(-50%);
  opacity: 0;
}
.wbless__text { font: 500 clamp(16px, 1.45vw, 21px)/1.5 "VS Ganesh", "Noto Serif Gujarati", "Nirmala UI", "Shruti", "Gujarati Sangam MN", serif; color: #7A1730; letter-spacing: .02em; }
.wbless__line { display: block; width: clamp(18px, 2.4vw, 34px); height: 1px; background: linear-gradient(to right, rgba(184, 137, 58, 0), #B8893A); }
.wbless__line:last-child { transform: scaleX(-1); }
.wbless.is-in { animation: wb-fade 1.6s ease both; }
.wbless.is-in .wbless__line { animation: wb-line 1.8s cubic-bezier(.16, .84, .3, 1) .3s both; }
.wbless.is-in .wbless__line:last-child { animation-name: wb-line-r; }
.wbless.is-in .wbless__text { animation: wb-text 2s cubic-bezier(.16, .84, .3, 1) .5s both; }
@keyframes wb-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes wb-line { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes wb-line-r { from { transform: scaleX(0); } to { transform: scaleX(-1); } }
@keyframes wb-text { from { opacity: 0; filter: blur(6px); letter-spacing: .14em; } to { opacity: 1; filter: none; letter-spacing: .02em; } }

/* A stage card: cream paper with a soft arch, the double gold line, a chhatri above. */
.wpanel { position: absolute; width: var(--wp-w); }
.wpanel__card, .wcount {
  position: relative;
  box-sizing: border-box;
  text-align: center;
  color: #5A2A1E;
  background: linear-gradient(180deg, rgba(255, 250, 241, .88), rgba(249, 239, 221, .84));
  border: 1px solid rgba(184, 137, 58, .85);
  border-radius: 50% 50% 4px 4px / 44px 44px 4px 4px;
  box-shadow: 0 22px 48px -22px rgba(38, 22, 12, .6);
}
.wpanel__card { width: 100%; padding: 30px 18px 22px; opacity: 0; }
.wpanel__card::after, .wcount::after {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(184, 137, 58, .42);
  border-radius: 50% 50% 2px 2px / 40px 40px 2px 2px;
  pointer-events: none;
}
.wpanel__dome {
  position: absolute;
  left: 50%;
  top: -21px;
  width: 34px;
  height: 22px;
  margin-left: -17px;
  color: #B8893A;
}
.wpanel__dome svg { display: block; width: 100%; height: 100%; overflow: visible; }
.wpanel p, .wcount p { margin: 0; }
.wpanel__label, .wcount__kicker { font: 600 10px/1.4 "Archivo", system-ui, sans-serif; letter-spacing: .3em; padding-left: .3em; text-transform: uppercase; color: #8A5C1F; margin-bottom: 12px !important; }
.wpanel__heading { font: 600 9.5px/1.4 "Archivo", system-ui, sans-serif; letter-spacing: .26em; padding-left: .26em; text-transform: uppercase; color: #9A6A2A; margin: 0 0 6px !important; }
.wpanel__name { font: 400 19px/1.38 "Italiana", Georgia, serif; color: #7A1730; text-wrap: balance; }
.wpanel__name + .wpanel__name { margin-top: 4px !important; }
.wpanel__title { font: 400 30px/1.08 "Italiana", Georgia, serif; color: #7A1730; text-wrap: balance; }
.wpanel__rule { display: block; width: 46px; height: 1px; margin: 14px auto 12px; background: linear-gradient(to right, rgba(184, 137, 58, 0), #B8893A, rgba(184, 137, 58, 0)); }
.wpanel__venue { font: 400 20px/1.25 "Italiana", Georgia, serif; color: #7A1730; text-wrap: balance; }
.wpanel__gem { display: block; margin: 6px 0; font-size: 7px; color: #B8893A; }

/* Entrances (each stage its own), staggered lines that sharpen, and a soft exit. */
.wpanel .wp-line, .wpanel__dome { opacity: 0; }
.wpanel.is-in[data-in="left"] .wpanel__card { animation: wp-left 1.4s cubic-bezier(.16, .84, .3, 1) both; }
.wpanel.is-in[data-in="right"] .wpanel__card { animation: wp-right 1.4s cubic-bezier(.16, .84, .3, 1) both; }
.wpanel.is-in[data-in="rise"] .wpanel__card { animation: wp-rise 1.5s cubic-bezier(.16, .84, .3, 1) both; }
.wpanel.is-in .wpanel__dome { animation: wp-dome 1s cubic-bezier(.16, .84, .3, 1) .45s both; }
.wpanel.is-in .wp-line { animation: wp-line 1.1s cubic-bezier(.16, .84, .3, 1) calc(.5s + var(--i, 0) * .18s) both; }
.wpanel.is-in .wpanel__rule { animation: wp-rule 1.2s cubic-bezier(.16, .84, .3, 1) calc(.5s + var(--i, 0) * .18s) both; }
.wpanel.is-out .wpanel__card { animation: wp-out .9s ease both; }
.wpanel.is-out .wp-line, .wpanel.is-out .wpanel__dome { opacity: 1; }
@keyframes wp-left { from { opacity: 0; transform: translateX(-46px); } to { opacity: 1; transform: none; } }
@keyframes wp-right { from { opacity: 0; transform: translateX(46px); } to { opacity: 1; transform: none; } }
@keyframes wp-rise { from { opacity: 0; transform: translateY(34px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes wp-dome { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes wp-line { from { opacity: 0; transform: translateY(9px); filter: blur(5px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes wp-rule { from { opacity: 0; transform: scaleX(0); } to { opacity: 1; transform: none; } }
@keyframes wp-out { from { opacity: 1; transform: none; filter: none; } to { opacity: 0; transform: translateY(-12px); filter: blur(3px); } }

/* #ViSaApproved, the couple's signature: written out from left to right in a warm rose-gold, the
   gold swash and its diamond drawn beneath. */
.wsign {
  position: absolute;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0;
  opacity: 0;
}
.wsign__text {
  display: block;
  padding: 0 .3em;
  font: 400 clamp(46px, 5.2vw, 84px)/1.15 "Mrs Saint Delafield", cursive;
  background: linear-gradient(100deg, #FFF0D6 0%, #F9CBD6 42%, #F4B3C6 58%, #F1D39A 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 10px rgba(38, 22, 12, .55));
  clip-path: inset(-30% 100% -30% -10%);
}
.wsign__swash { display: block; width: clamp(170px, 15vw, 240px); margin-top: -.2em; }
.wsign__swash svg { display: block; width: 100%; height: auto; overflow: visible; }
.wsign__swash path { stroke: #E2B867; stroke-width: 1.3; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.wsign__swash .wsign__gem { fill: #E2B867; stroke: none; opacity: 0; }
.wsign.is-in { opacity: 1; }
.wsign.is-in .wsign__text { animation: ws-write 2.8s cubic-bezier(.45, .05, .35, 1) .1s both; }
.wsign.is-in .wsign__swash path { animation: ws-draw 1.6s cubic-bezier(.65, 0, .35, 1) 2s both; }
.wsign.is-in .wsign__swash .wsign__gem { animation: ws-gem .8s ease 3.2s both; }
@keyframes ws-write { from { clip-path: inset(-30% 100% -30% -10%); } to { clip-path: inset(-30% -10% -30% -10%); } }
@keyframes ws-draw { to { stroke-dashoffset: 0; } }
@keyframes ws-gem { to { opacity: 1; } }

/* The countdown, in a jharokha card like the first scene's: maroon Italiana numerals, gold labels. */
.wcount {
  position: absolute;
  padding: 26px clamp(18px, 2vw, 28px) 14px;
  opacity: 0;
}
.wcount__kicker { margin-bottom: 8px !important; font-size: 9.5px; }
.wcount__units { display: flex; align-items: flex-start; justify-content: center; gap: clamp(8px, 1vw, 14px); }
.wcount__unit { display: flex; flex-direction: column; align-items: center; min-width: 3.1em; }
.wcount__num { font: 400 clamp(30px, 2.5vw, 38px)/1.05 "Italiana", Georgia, serif; color: #7A1730; font-variant-numeric: tabular-nums; }
.wcount__label { margin-top: 4px; font: 600 8.5px/1.3 "Archivo", system-ui, sans-serif; letter-spacing: .22em; padding-left: .22em; text-transform: uppercase; color: #9A6A2A; }
.wcount__gem { align-self: center; margin-top: -14px; font-size: 6px; color: #B8893A; }
.wcount .wpanel__dome, .wcount__kicker, .wcount__unit, .wcount__gem { opacity: 0; }
.wcount.is-in { animation: wc-in 1.4s cubic-bezier(.16, .84, .3, 1) both; }
.wcount.is-in .wpanel__dome { animation: wp-dome 1s cubic-bezier(.16, .84, .3, 1) .4s both; }
.wcount.is-in .wcount__kicker { animation: wp-line 1.1s cubic-bezier(.16, .84, .3, 1) .5s both; }
.wcount.is-in .wcount__unit { animation: wp-line 1.1s cubic-bezier(.16, .84, .3, 1) calc(.7s + var(--i, 0) * .16s) both; }
.wcount.is-in .wcount__gem { animation: wb-fade 1s ease 1.3s both; }
@keyframes wc-in { from { opacity: 0; transform: translateY(16px) scale(.95); } to { opacity: 1; transform: none; } }

/* Once the signature arrives, a soft warm shade rises from the bottom edge so it reads over the
   bright marble of the held final frame (wide and landscape screens). */
.scene--welcome .scene__text::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0;
  transition: opacity 1.8s ease;
  background: linear-gradient(to top, rgba(var(--umber), .74) 0%, rgba(var(--umber), .5) 22%, rgba(var(--umber), .16) 42%, rgba(var(--umber), 0) 56%);
  pointer-events: none;
}
.scene--welcome .scene__text.is-late::after { opacity: 1; }

/* -- Wide screens: the centre block a little above the middle (room below for the signature and
   the countdown), narrowed so it never reaches the cards at the side edges. */
html:not(.vs-single) .scene--welcome .scene__text {
  --wp-w: clamp(240px, 21vw, 330px);
  --wp-edge: clamp(18px, 3vw, 56px);
  justify-content: center;
  padding: 7vh calc(var(--wp-w) + var(--wp-edge) + 20px) calc(env(safe-area-inset-bottom, 0px) + 25vh);
}
html:not(.vs-single) .scene--welcome .scene__text::before {
  background: radial-gradient(ellipse 46% 44% at 50% 42%, rgba(var(--umber), .62), rgba(var(--umber), .38) 52%, rgba(var(--umber), .12) 82%, rgba(var(--umber), 0));
}
html:not(.vs-single) .scene--welcome .t-title { font-size: clamp(54px, 7.2vw, 112px); white-space: nowrap; }
html:not(.vs-single) .scene--welcome .t-date { font-size: clamp(12px, 1.15vw, 15px); letter-spacing: .34em; padding-left: .34em; }
html:not(.vs-single) .scene--welcome .t-line { max-width: 26em; }
html:not(.vs-single) .wpanel { top: 41%; transform: translateY(-50%); }
html:not(.vs-single) .wpanel[data-side="left"] { left: var(--wp-edge); }
html:not(.vs-single) .wpanel[data-side="right"] { right: var(--wp-edge); }
html:not(.vs-single) .wcount { left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 3.2vh); transform: translateX(-50%); }
html:not(.vs-single) .wcount.is-in { animation-name: wc-in-c; }
@keyframes wc-in-c { from { opacity: 0; transform: translate(-50%, 16px) scale(.95); } to { opacity: 1; transform: translateX(-50%); } }
html:not(.vs-single) .wsign { bottom: calc(env(safe-area-inset-bottom, 0px) + 3.2vh + clamp(100px, 8.6vw, 116px) + 6px); }
@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  html:not(.vs-single) .wpanel__card, html:not(.vs-single) .wcount { background: linear-gradient(180deg, rgba(255, 250, 241, .82), rgba(249, 239, 221, .76)); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
}

/* -- Portrait phones and tablets: the film fills the upper part, the centre block sits on the
   umber below it with the signature under it at the bottom centre; the cards and then the
   countdown take one place over the film, under the invocation. */
@media (max-aspect-ratio: 4/5) {
  .scene--welcome .scene__media { height: 60vh; height: 60svh; }
  .scene--welcome .scene__text { padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 20px + 56px + 30px); }
  .scene--welcome .scene__text::after { display: none; }
  .scene--welcome .wpanel, .scene--welcome .wcount { top: calc(env(safe-area-inset-top, 0px) + 100px); width: min(84vw, 340px); left: 50%; margin-left: calc(min(84vw, 340px) / -2); }
  .scene--welcome .wcount { box-sizing: border-box; padding-left: 12px; padding-right: 12px; }
  .scene--welcome .wcount__units { gap: 6px; }
  .scene--welcome .wcount__unit { min-width: 2.7em; }
  .scene--welcome .wcount__num { font-size: 32px; }
  .scene--welcome .wpanel__card { padding: 28px 14px 20px; background: linear-gradient(180deg, rgba(255, 250, 241, .9), rgba(249, 239, 221, .87)); }
  .scene--welcome .wpanel__name { font-size: 17px; }
  .scene--welcome .wpanel__title { font-size: 29px; }
  .scene--welcome .wsign { bottom: calc(env(safe-area-inset-bottom, 0px) + 16px); }
  .scene--welcome .wsign__text { font-size: 46px; }
  .scene--welcome .wsign__swash { width: 170px; }
  .scene--welcome .wbless__text { font-size: 17px; }
  .scene--welcome .t-date { font-size: 12.5px; color: var(--champagne); }
  .scene--welcome .t-rule { margin: 16px 0 12px; }
}
@media (max-aspect-ratio: 4/5) and (max-height: 700px) {
  .scene--welcome .scene__media { height: 53vh; height: 53svh; }
  .scene--welcome .scene__text { padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 12px + 46px + 22px); }
  .scene--welcome .wpanel, .scene--welcome .wcount { top: calc(env(safe-area-inset-top, 0px) + 92px); }
  .scene--welcome .wpanel__card { padding: 24px 16px 15px; }
  .scene--welcome .wpanel__name { font-size: 16.5px; }
  .scene--welcome .wsign { bottom: calc(env(safe-area-inset-bottom, 0px) + 10px); }
  .scene--welcome .wsign__text { font-size: 38px; }
  .scene--welcome .wsign__swash { width: 140px; }
  .scene--welcome .t-rule { margin: 12px 0 9px; }
}
@media (max-aspect-ratio: 4/5) and (min-width: 600px) {
  .scene--welcome .wpanel, .scene--welcome .wcount { width: 380px; margin-left: -190px; top: 120px; }
  .scene--welcome .wsign__text { font-size: 64px; }
  .scene--welcome .wsign__swash { width: 220px; }
  .scene--welcome .scene__text { padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 28px + 80px + 18px); }
  .scene--welcome .wbless__text { font-size: 20px; }
}

/* -- Landscape but small or short (landscape phones, small windows): the cards and the countdown
   at the side edges, centred in height, beside a narrowed centre; the signature below it. */
@media (min-aspect-ratio: 1001/1000) {
  .vs-single .scene--welcome .scene__text { justify-content: center; padding: 8vh calc(clamp(206px, 26vw, 250px) + 26px) calc(env(safe-area-inset-bottom, 0px) + 18vh); }
  .vs-single .scene--welcome .scene__text::before { background: radial-gradient(ellipse 46% 46% at 50% 44%, rgba(var(--umber), .56), rgba(var(--umber), .3) 55%, rgba(var(--umber), 0)); }
  .vs-single .scene--welcome .t-title { font-size: clamp(36px, min(6.4vw, 11vh), 72px); white-space: nowrap; }
  .vs-single .scene--welcome .t-line { font-size: 14px; }
  .vs-single .scene--welcome .wpanel { top: 48%; width: clamp(206px, 26vw, 250px); transform: translateY(-50%); }
  .vs-single .scene--welcome .wpanel[data-side="left"] { left: 14px; }
  .vs-single .scene--welcome .wpanel[data-side="right"] { right: 14px; }
  .vs-single .scene--welcome .wcount { right: 14px; top: 48%; width: clamp(206px, 26vw, 250px); padding-left: 8px; padding-right: 8px; transform: translateY(-50%); }
  .vs-single .scene--welcome .wcount__units { gap: 3px; }
  .vs-single .scene--welcome .wcount__unit { min-width: 0; flex: 1; }
  .vs-single .scene--welcome .wcount__num { font-size: 25px; }
  .vs-single .scene--welcome .wcount__label { font-size: 7.5px; letter-spacing: .14em; padding-left: .14em; }
  .vs-single .scene--welcome .wcount__kicker { display: none; }
  .vs-single .scene--welcome .wcount.is-in { animation-name: wc-in-r; }
  .vs-single .scene--welcome .wsign { bottom: calc(env(safe-area-inset-bottom, 0px) + 2vh); }
  .vs-single .scene--welcome .wsign__text { font-size: clamp(34px, 9vh, 56px); }
  .vs-single .scene--welcome .wsign__swash { width: 140px; }
}
@keyframes wc-in-r { from { opacity: 0; transform: translate(0, calc(-50% + 16px)) scale(.95); } to { opacity: 1; transform: translateY(-50%); } }
@media (min-aspect-ratio: 1001/1000) and (max-height: 520px) {
  .vs-single .scene--welcome .wpanel__card { padding: 24px 14px 14px; }
  .vs-single .scene--welcome .wpanel__label { margin-bottom: 7px !important; }
  .vs-single .scene--welcome .wpanel__name { font-size: 16px; line-height: 1.26; }
  .vs-single .scene--welcome .wpanel__title { font-size: 23px; }
  .vs-single .scene--welcome .wpanel__rule { margin: 8px auto 7px; }
  .vs-single .scene--welcome .wpanel__venue { font-size: 17px; }
  .vs-single .scene--welcome .wcount { padding: 22px 10px 10px; }
  .vs-single .scene--welcome .wcount__num { font-size: 26px; }
  .vs-single .scene--welcome .wcount__unit { min-width: 2.5em; }
  .vs-single .scene--welcome .wcount__units { gap: 4px; }
  .vs-single .scene--welcome .wbless { padding: 4px 14px 3px; }
  .vs-single .scene--welcome .wbless__text { font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  .wpanel.is-in .wpanel__card, .wpanel.is-in .wp-line, .wpanel.is-in .wpanel__dome, .wbless.is-in, .wbless.is-in *, .wcount.is-in, .wcount.is-in * { animation: wb-fade .4s ease both !important; }
  .wsign.is-in .wsign__text { animation: none; clip-path: none; }
  .wsign.is-in .wsign__swash path { animation: none; stroke-dashoffset: 0; opacity: 1; }
}

/* -------------------------------------------------------------- loading --- */

/* A hairline that only appears if the opening takes a moment to arrive. */
.film-loading {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 96px;
  height: 1px;
  margin-left: -48px;
  overflow: hidden;
  background: rgba(158, 15, 95, .12);
  opacity: 0;
  animation: film-fade-in .6s ease 1.2s forwards;
}
.film-loading::after {
  content: "";
  display: block;
  width: 40%;
  height: 100%;
  background: rgba(158, 15, 95, .5);
  animation: film-sweep 1.4s ease-in-out infinite;
}
.film-loading.is-done { display: none; }

.film-noscript {
  position: fixed;
  inset: auto 0 40% 0;
  margin: 0;
  text-align: center;
  color: #6E5E4E;
  font: 16px/1.5 Georgia, serif;
}

@keyframes film-fade-in { to { opacity: 1; } }
@keyframes film-sweep { from { transform: translateX(-100%); } to { transform: translateX(250%); } }

