/* Template 7 — Blue Pottery Palace (Aarav & Meera)
   White marble, cobalt Jaipur blue pottery and a moonlit courtyard.
   One stylesheet; sections follow index.html in order. */

:root {
  --night: #071A44;        /* the film's sky at its top */
  --navy: #0F2A5C;         /* headings */
  --ink: #23365F;          /* body copy */
  --muted: #5B6B8D;        /* quiet lines */
  --cobalt: #2448A8;       /* accents */
  --sapphire: #3D6FD6;
  --powder: #DCE7F7;
  --mist: #EEF3FB;
  --pearl: #F7F5F2;
  --silver: #AEB8CA;
  --silver-d: #8592AB;
  --paper: #F5F6F9;        /* under the wallpaper until it arrives */

  --script: "Parisienne", "Great Vibes", cursive;
  --caps: "Cinzel", "Times New Roman", serif;
  --serif: "Cormorant Garamond", Georgia, serif;
  --deva: "Tiro Devanagari Hindi", "Noto Serif Devanagari", serif;
}

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

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

html.is-locked,
html.is-locked body { overflow: hidden; }

body {
  margin: 0;
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* The wallpaper arrives once the film is over (is-ready). */
html.is-ready body {
  background-image: url("../../../../media/template-7/paper-lattice.webp");
  background-size: 512px;
}

img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 400; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

:focus-visible { outline: 2px solid var(--sapphire); outline-offset: 3px; }


/* 1. Opening film ======================================================== */

.intro {
  position: relative;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  background: var(--night);
  isolation: isolate;
}

/* Beside the film on wide screens: the same picture, blurred. Each is a
   36 × 64 copy of the first or last frame, blurred and dimmed once and
   inlined here; stretched to the screen it reads as a soft blur. A live
   filter: blur() on a full-screen layer is redrawn with every video frame
   and made the film stutter on laptops and tablets. */
.intro__backdrop { position: absolute; inset: 0; z-index: -1; display: none; }
.intro__bg {
  position: absolute;
  inset: 0;
  background: center / cover no-repeat;
  transition: opacity 1.2s ease;
}
.intro__bg--cover { background-image: url("data:image/webp;base64,UklGRq4CAABXRUJQVlA4WAoAAAAgAAAAIwAAPwAASUNDUMgBAAAAAAHIAAAAAAQwAABtbnRyUkdCIFhZWiAH4AABAAEAAAAAAABhY3NwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAA9tYAAQAAAADTLQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlkZXNjAAAA8AAAACRyWFlaAAABFAAAABRnWFlaAAABKAAAABRiWFlaAAABPAAAABR3dHB0AAABUAAAABRyVFJDAAABZAAAAChnVFJDAAABZAAAAChiVFJDAAABZAAAAChjcHJ0AAABjAAAADxtbHVjAAAAAAAAAAEAAAAMZW5VUwAAAAgAAAAcAHMAUgBHAEJYWVogAAAAAAAAb6IAADj1AAADkFhZWiAAAAAAAABimQAAt4UAABjaWFlaIAAAAAAAACSgAAAPhAAAts9YWVogAAAAAAAA9tYAAQAAAADTLXBhcmEAAAAAAAQAAAACZmYAAPKnAAANWQAAE9AAAApbAAAAAAAAAABtbHVjAAAAAAAAAAEAAAAMZW5VUwAAACAAAAAcAEcAbwBvAGcAbABlACAASQBuAGMALgAgADIAMAAxADZWUDggwAAAANAGAJ0BKiQAQAA+lT6WSCWjoiEwGq6osBKJZ2bvW8uYo8VaNiTNySjgs95qMhYLIxZo1ABYcgf9yhk2OjWIAADJRLzsL6raDSPRcih+FBak5EL5yL5F1ofKxNHrUXLHgyGJMqi7KR7EOf6tTQvpr6delzl3oJzPKtb+KV3or+YV+D8Ujl16NHdLVar3q5J7818HMhGv10VZD1IeoUAkiMd/WwE4Vk0AUb5Kb+fmp/0KR/qOMDjS2DnEyXxYn8pQAA=="); }
.intro__bg--end { opacity: 0; background-image: url("data:image/webp;base64,UklGRuICAABXRUJQVlA4WAoAAAAgAAAAIwAAPwAASUNDUMgBAAAAAAHIAAAAAAQwAABtbnRyUkdCIFhZWiAH4AABAAEAAAAAAABhY3NwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAA9tYAAQAAAADTLQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlkZXNjAAAA8AAAACRyWFlaAAABFAAAABRnWFlaAAABKAAAABRiWFlaAAABPAAAABR3dHB0AAABUAAAABRyVFJDAAABZAAAAChnVFJDAAABZAAAAChiVFJDAAABZAAAAChjcHJ0AAABjAAAADxtbHVjAAAAAAAAAAEAAAAMZW5VUwAAAAgAAAAcAHMAUgBHAEJYWVogAAAAAAAAb6IAADj1AAADkFhZWiAAAAAAAABimQAAt4UAABjaWFlaIAAAAAAAACSgAAAPhAAAts9YWVogAAAAAAAA9tYAAQAAAADTLXBhcmEAAAAAAAQAAAACZmYAAPKnAAANWQAAE9AAAApbAAAAAAAAAABtbHVjAAAAAAAAAAEAAAAMZW5VUwAAACAAAAAcAEcAbwBvAGcAbABlACAASQBuAGMALgAgADIAMAAxADZWUDgg9AAAAFAIAJ0BKiQAQAA+nT6XSD+jIiEtTJPwE4lAE6Zqh/vhJHloi9L5zpV1e97xY8Fd1WlYtMgaQFsPL2g0kK361CyjAaF3JNXljDsfwAD+8NoX9nz/4//yS5WeTqmdcJaldn/5+utzSWThF89UuWFyGlZ5ziIrbfMnE0i/g6tI0eQk9L+GvU++FT4VZq+hGsJZAApKCZ30zaUcWyZJVDMk6V9s+eju8h/j74LO98IFTTJy3II5YjoSTxsIALMMrOSLxD6x0oRux21fKSfGy7Sm60CE1RaZVOT1SBHffJNlp7OLRJItZhORJoJi2+3PrvjgJQUAAAA="); }
.intro.is-ended .intro__bg--end { opacity: 1; }

/* The film box keeps the film's 9:16 shape. On phones it covers the
   screen (a little is cut from the sides); from 3:4 screens it is drawn
   whole with the blurred backdrop beside it. --u is 1% of its width, so
   every word stays in the same place on the painting. */
.film {
  --fw: max(100vw, 56.25vh);
  --fw: max(100vw, 56.25svh);
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--fw);
  aspect-ratio: 9 / 16;
  transform: translate(-50%, -50%);
  --u: calc(var(--fw) / 100);
}

@media (min-aspect-ratio: 3/4) {
  .film { --fw: 56.25vh; --fw: 56.25svh; }
  .intro__backdrop { display: block; }
}

.film__video,
.film__cover,
.film__end {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.film__cover { transition: opacity .3s ease; }
.intro.is-playing .film__cover { opacity: 0; }

.film__end { opacity: 0; transition: opacity .6s ease; }
.intro.is-still .film__end { opacity: 1; }

/* The button is the whole picture; its words sit in the door medallion,
   whose plain centre is at 49.1% across and 48.4% down the first frame. */
.film__play {
  position: absolute;
  inset: 0;
  z-index: 3;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.seal {
  position: absolute;
  left: 49.1%;
  top: 48.4%;
  width: calc(var(--u) * 29);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  display: grid;
  place-content: center;
  transition: opacity .5s ease, transform .6s ease;
}

.seal__cta {
  font-family: var(--caps);
  font-weight: 700;
  font-size: calc(var(--u) * 2.8);
  line-height: 1.2;
  letter-spacing: .16em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--navy);
  padding-left: .16em;
  text-shadow: 0 0 6px rgba(255, 255, 255, .9), 0 1px 0 rgba(255, 255, 255, .9);
  animation: pulse 2.2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: .8; }
  50% { opacity: 1; }
}

.intro.is-opening .seal { opacity: 0; transform: translate(-50%, -50%) scale(.94); }
.intro.is-opening .film__play { cursor: default; }
.intro.is-ended .film__play { display: none; }

/* Only if the film is slow to start after the tap. */
.film__spinner {
  position: absolute;
  left: 50%;
  top: 49.4%;
  width: calc(var(--u) * 9);
  height: calc(var(--u) * 9);
  margin: calc(var(--u) * -4.5) 0 0 calc(var(--u) * -4.5);
  border: 2px solid rgba(255, 255, 255, .35);
  border-top-color: #fff;
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
}
.intro.is-waiting .film__spinner { opacity: 1; animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* The words in the night sky: centred in the open sky between 7% and 45%
   of the film's height (the pavilion and trees start below that). */
.hero {
  position: absolute;
  left: 8%;
  right: 8%;
  top: 7%;
  height: 38%;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #F3F6FF;
  pointer-events: none;
}

.hero > * {
  opacity: 0;
  transform: translateY(calc(var(--u) * 2));
  transition: opacity 1.1s ease, transform 1.1s ease;
  transition-delay: var(--d, 0s);
}
.intro.is-ended .hero > * { opacity: 1; transform: none; }

.hero__lead {
  font-style: italic;
  font-size: calc(var(--u) * 4.4);
  color: #D6E2FF;
  font-weight: 600;
}

.hero__names {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: calc(var(--u) * 1) 0 calc(var(--u) * .5);
}

/* The names are written in from left to right: the outer span is a window
   sliding in from the left while the name inside slides back by the same
   amount, so the name stands still and is uncovered. Both are transforms,
   which the GPU runs; the clip-path wipe this replaced repainted the big
   glowing script on every frame on most phones. The inner span carries the
   padding (room for the glow and the swashes) so both share one width. */
.hero__name {
  display: block;
  overflow: hidden;
  margin: -.2em 0;
  font-family: var(--script);
  font-size: calc(var(--u) * 15.5);
  line-height: 1.12;
  text-shadow: 0 0 calc(var(--u) * 3) rgba(140, 180, 255, .55), 0 calc(var(--u) * .3) calc(var(--u) * 1) rgba(4, 16, 48, .5);
}
.hero__name,
.hero__name > span {
  transform: translateX(-100%);
  transition: transform 1.5s cubic-bezier(.5, .1, .3, 1) var(--d, 0s);
}
.hero__name > span { display: block; padding: .2em .15em; transform: translateX(100%); }
.intro.is-ended .hero__name,
.intro.is-ended .hero__name > span { transform: none; }

.hero__amp {
  display: block;
  font-family: var(--script);
  font-size: calc(var(--u) * 7);
  line-height: .9;
  color: #BFD3FF;
}

.hero__rule {
  width: calc(var(--u) * 42);
  height: calc(var(--u) * 4.2);
  color: #C9D6EE;
  margin-top: calc(var(--u) * 1.4);
}

.hero__tag {
  font-family: var(--caps);
  letter-spacing: .3em;
  text-transform: uppercase;
  margin-top: calc(var(--u) * 1.6);
  padding-left: .3em;
  color: #E4ECFF;
  font-size: calc(var(--u) * 3);
  font-weight: 600;
}

/* stars twinkling in the sky once the film is over */
.stars { position: absolute; inset: 0 0 55% 0; z-index: 1; pointer-events: none; }
.stars i {
  position: absolute;
  width: calc(var(--u) * .6);
  height: calc(var(--u) * .6);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 calc(var(--u) * 1.2) rgba(200, 220, 255, .9);
  opacity: 0;
}
.intro.is-ended .stars i { animation: twinkle 3.6s ease-in-out infinite; }
.stars i:nth-child(1)  { left: 12%; top: 12%; animation-delay: .4s; }
.stars i:nth-child(2)  { left: 26%; top: 6%;  animation-delay: 1.8s; }
.stars i:nth-child(3)  { left: 40%; top: 15%; animation-delay: 2.6s; transform: scale(.7); }
.stars i:nth-child(4)  { left: 62%; top: 7%;  animation-delay: 1.1s; }
.stars i:nth-child(5)  { left: 73%; top: 22%; animation-delay: 3.2s; transform: scale(.8); }
.stars i:nth-child(6)  { left: 18%; top: 36%; animation-delay: 2.1s; transform: scale(.6); }
.stars i:nth-child(7)  { left: 88%; top: 40%; animation-delay: .9s; transform: scale(.7); }
.stars i:nth-child(8)  { left: 8%;  top: 58%; animation-delay: 2.9s; transform: scale(.6); }
.stars i:nth-child(9)  { left: 92%; top: 64%; animation-delay: 1.5s; transform: scale(.6); }
.stars i:nth-child(10) { left: 54%; top: 3%;  animation-delay: 3.6s; transform: scale(.6); }
.stars i:nth-child(11) { left: 32%; top: 70%; animation-delay: .2s; transform: scale(.5); }
.stars i:nth-child(12) { left: 78%; top: 82%; animation-delay: 2.4s; transform: scale(.5); }

@keyframes twinkle {
  0%, 100% { opacity: 0; }
  40%, 60% { opacity: .9; }
}

.film__skip {
  position: absolute;
  right: 16px;
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 4;
  padding: 9px 16px;
  border: 1px solid rgba(255, 255, 255, .5);
  border-radius: 99px;
  /* a plain tint, not backdrop-filter: blurring what is behind it meant
     re-blurring the playing film on every frame */
  background: rgba(10, 28, 70, .55);
  color: #fff;
  font-family: var(--caps);
  letter-spacing: .2em;
  text-transform: uppercase;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity .5s ease;
  font-size: 12px;
  font-weight: 600;
}
.intro.is-playing .film__skip { opacity: 1; pointer-events: auto; transition-delay: 1s; }
.intro.is-ended .film__skip { opacity: 0; pointer-events: none; transition-delay: 0s; }

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 14px 6px;
  border-radius: 99px;
  background: rgba(247, 245, 242, .9);
  color: var(--navy);
  font-family: var(--caps);
  letter-spacing: .26em;
  text-decoration: none;
  text-transform: uppercase;
  box-shadow: 0 6px 18px rgba(4, 16, 48, .25);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px);
  transition: opacity .8s ease 3.4s, transform .8s ease 3.4s;
  font-size: 11px;
  font-weight: 600;
}
.scroll-cue span { padding-left: .26em; }
.scroll-cue i {
  width: 8px;
  height: 8px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  animation: nudge 1.6s ease-in-out infinite;
}
.intro.is-ended .scroll-cue { opacity: 1; pointer-events: auto; transform: translate(-50%, 0); }

@keyframes nudge {
  0%, 100% { transform: translateY(-2px) rotate(45deg); }
  50% { transform: translateY(2px) rotate(45deg); }
}


/* Music ================================================================== */

.music-toggle {
  position: fixed;
  right: 16px;
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 50;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--silver);
  border-radius: 50%;
  background: rgba(247, 245, 242, .94);
  color: var(--navy);
  box-shadow: 0 6px 18px rgba(15, 42, 92, .2);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: scale(.8);
  transition: opacity .5s ease, transform .5s ease;
}
.music-toggle.is-shown { opacity: 1; pointer-events: auto; transform: none; }
.music-toggle svg { grid-area: 1 / 1; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.music-toggle__slash { opacity: 0; }
.music-toggle.is-muted .music-toggle__slash { opacity: 1; }
.music-toggle__ring {
  grid-area: 1 / 1;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 1px solid var(--sapphire);
  opacity: 0;
}
.music-toggle:not(.is-muted) .music-toggle__ring { animation: ring 2.4s ease-out infinite; }
@keyframes ring {
  from { transform: scale(1); opacity: .6; }
  to { transform: scale(1.6); opacity: 0; }
}


/* Shared ================================================================= */

main { position: relative; }

section { position: relative; }

.head {
  text-align: center;
  padding: 0 16px;
  margin-bottom: 22px;
}
/* Section titles: a short italic line, then the title in bold Cinzel
   capitals, dark enough to read at a glance on the lattice paper. */
.head__kicker {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 600;
  font-size: 19px;
  line-height: 1.3;
  color: var(--cobalt);
}
.head__title {
  font-family: var(--caps);
  font-weight: 700;
  font-size: clamp(26px, 7.4vw, 40px);
  line-height: 1.2;
  letter-spacing: .05em;
  color: var(--navy);
  margin-top: 6px;
  text-wrap: balance;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .8);
}
.head__rule {
  display: block;
  width: 190px;
  height: 19px;
  margin: 8px auto 0;
  color: var(--cobalt);
  opacity: .75;
}

/* fade-up as each block arrives (main.js adds is-in) */
.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 1s ease, transform 1s ease;
}
.js .reveal.is-in { opacity: 1; transform: none; }


/* 2. The invitation ====================================================== */

.invitation {
  padding: 36px 0 40px;
  overflow: hidden;
}

/* --aw is the arch's width; --s turns the picture's pixels (880 wide)
   into the screen's. Its dome (568px), one band of straight sides (149px,
   repeated) and its base (115px) are cut by border-image. */
.arch {
  --aw: min(calc(100vw - 20px), 430px);
  --s: calc(var(--aw) / 880);
  position: relative;
  z-index: 1;
  width: var(--aw);
  margin: 0 auto;
  border-style: solid;
  border-color: transparent;
  border-width: calc(var(--s) * 568) calc(var(--s) * 105) calc(var(--s) * 115);
  border-image: none 568 105 115 fill / 1 round;
  padding: 0 calc(var(--s) * 34) calc(var(--s) * 22);
  text-align: center;
}
html.is-ready .arch { border-image-source: url("../../../../media/template-7/invite-arch.webp"); }

/* the first lines rise into the dome */
.arch > :first-child { margin-top: calc(var(--s) * -168); }

.js .arch > * {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .9s ease, transform .9s ease;
  transition-delay: calc(var(--i, 0) * 140ms);
}
.js .arch.is-in > * { opacity: 1; transform: none; }

/* Tiro Devanagari and Cormorant's italic come in one weight only, so
   those lines are thickened with a hairline of their own colour. */
.invocation {
  font-family: var(--deva);
  font-size: calc(var(--s) * 38);
  color: var(--cobalt);
  line-height: 1.4;
  -webkit-text-stroke: .025em currentColor;
}

.shloka {
  font-family: var(--deva);
  line-height: 1.75;
  color: var(--navy);
  margin-top: calc(var(--s) * 10);
  font-size: calc(var(--s) * 33);
  -webkit-text-stroke: .03em currentColor;
}
.shloka span { display: block; }

.blessing {
  font-style: italic;
  color: var(--cobalt);
  margin-top: calc(var(--s) * 28);
  font-size: calc(var(--s) * 38);
  -webkit-text-stroke: .03em currentColor;
}

.kicker {
  line-height: 1.35;
  color: var(--ink);
  margin-top: calc(var(--s) * 8);
  font-size: calc(var(--s) * 35);
  font-weight: 700;
}

.arch__divider {
  width: 78%;
  height: auto;
  margin: calc(var(--s) * 26) auto;
}

.couple { display: flex; flex-direction: column; align-items: center; }
.person { display: flex; flex-direction: column; align-items: center; }
.person__name {
  font-family: var(--script);
  font-size: calc(var(--s) * 98);
  line-height: 1.1;
  color: var(--navy);
}
.person__parents {
  line-height: 1.35;
  color: var(--ink);
  margin-top: calc(var(--s) * 4);
  font-size: calc(var(--s) * 34);
  font-weight: 700;
}
.couple__and {
  font-family: var(--script);
  font-size: calc(var(--s) * 62);
  line-height: 1;
  color: var(--sapphire);
  margin: calc(var(--s) * 16) 0 calc(var(--s) * 6);
}

.details__date {
  font-family: var(--caps);
  letter-spacing: .06em;
  color: var(--navy);
  font-size: calc(var(--s) * 35);
  font-weight: 700;
}
.details__date sup { font-size: .6em; }
.details__ceremony {
  font-family: var(--script);
  font-size: calc(var(--s) * 64);
  line-height: 1.25;
  color: var(--cobalt);
}
.details__venue {
  font-style: italic;
  color: var(--navy);
  font-size: calc(var(--s) * 38);
  -webkit-text-stroke: .03em currentColor;
}

/* Two blue-pottery jhumars hang in front of the arch's shoulders. */
.jhumar {
  position: absolute;
  top: 0;
  z-index: 2;
  width: calc(min(calc(100vw - 20px), 430px) * .135);
  height: auto;
  transform-origin: 50% 0;
  opacity: 0;
  transition: opacity 1s ease;
  pointer-events: none;
}
.jhumar.is-loaded { opacity: 1; animation: sway 5.5s ease-in-out infinite; }
.jhumar--1 { left: calc(50% - min(calc(100vw - 20px), 430px) * .5); top: calc(-2% - 60px); }
.jhumar--2 { right: calc(50% - min(calc(100vw - 20px), 430px) * .5); top: calc(-6% - 60px); animation-delay: -2.4s !important; }

@keyframes sway {
  0%, 100% { transform: rotate(1.6deg); }
  50% { transform: rotate(-1.6deg); }
}


/* 3. Scratch to reveal =================================================== */

.save-date {
  padding: 28px 16px 44px;
  text-align: center;
}

/* The heart is 100 × 90, template-6's heart in blue. Everything in it is
   sized from its width (--m), so the date keeps its place at any size. */
.medal {
  --m: min(84vw, 360px);
  position: relative;
  width: var(--m);
  aspect-ratio: 100 / 90;
  margin: 10px auto 0;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}
.medal:focus-visible .medal__rim { filter: drop-shadow(0 0 6px rgba(61, 111, 214, .9)); }

.medal__ground,
.medal__face,
.medal__rim {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* pale ground and the heart's shadow, drawn once behind the glitter */
.medal__ground {
  fill: #F6F8FE;
  filter: drop-shadow(0 18px 26px rgba(15, 42, 92, .26));
}

/* The date and the glitter over it, cut to the heart. */
.medal__face {
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 90' preserveAspectRatio='none'%3E%3Cpath d='M50 87C22 67 2 50 2 27 2 12 13 2 26 2c11 0 19 6 24 15C55 8 63 2 74 2c13 0 24 10 24 25 0 23-20 40-48 60Z'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 90' preserveAspectRatio='none'%3E%3Cpath d='M50 87C22 67 2 50 2 27 2 12 13 2 26 2c11 0 19 6 24 15C55 8 63 2 74 2c13 0 24 10 24 25 0 23-20 40-48 60Z'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat;
  background: radial-gradient(ellipse at 50% 38%, #FFFFFF 0%, #EEF3FB 55%, #DCE6F6 100%);
}

/* The date, where the heart is widest: centred at 48% of its height. */
.medal__prize {
  position: absolute;
  top: 48%;
  left: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0;
  transform: translate(-50%, -50%);
  white-space: nowrap;
}
.medal__day {
  padding-left: .3em;
  margin-bottom: calc(var(--m) * .008);
  font: 400 calc(var(--m) * .04)/1.2 var(--caps);
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--cobalt);
}
.medal__num {
  font: 500 calc(var(--m) * .21)/.95 var(--serif);
  color: var(--navy);
  font-variant-numeric: lining-nums;
}
.medal__month {
  margin-top: calc(var(--m) * -.006);
  font: 400 calc(var(--m) * .1)/1.05 var(--script);
  color: var(--sapphire);
}
.medal__year {
  margin-top: calc(var(--m) * .014);
  padding-left: .34em;
  font: 400 calc(var(--m) * .044)/1.2 var(--caps);
  letter-spacing: .34em;
  color: var(--ink);
}

/* The glitter, painted by main.js. touch-action none so a finger scratches
   instead of scrolling the page. */
.medal__glaze {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: grab;
  transition: opacity .9s ease;
}
.medal__glaze:active { cursor: grabbing; }
.medal.is-revealed .medal__glaze { opacity: 0; pointer-events: none; }

/* A double cobalt edge over everything: a solid line, and a dotted one
   just inside it. */
.medal__rim {
  fill: none;
  stroke: var(--cobalt);
  stroke-width: 2.4px;
  pointer-events: none;
  overflow: visible;
}
.medal__rim-inner {
  stroke: #9DB6E8;
  stroke-width: 1px;
  stroke-dasharray: 1 5;
  stroke-linecap: round;
}

/* one heartbeat, twice, once the date is out */
.medal.is-revealed { animation: beat 1.4s ease .2s 2; }
@keyframes beat {
  0%, 100% { transform: scale(1); }
  30% { transform: scale(1.05); }
  60% { transform: scale(.99); }
}

.medal__hand {
  position: absolute;
  left: 42%;
  top: 40%;
  width: 46px;
  height: 46px;
  fill: rgba(255, 255, 255, .92);
  stroke: var(--navy);
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, .3));
  animation: rub 1.8s ease-in-out infinite;
}
/* an SVG is not hidden by the attribute alone */
.medal__hand[hidden] { display: none; }

@keyframes rub {
  0%, 100% { transform: translate(-30%, 0) rotate(-12deg); }
  50% { transform: translate(40%, -12%) rotate(8deg); }
}

.medal__burst { position: absolute; left: 50%; top: 42%; pointer-events: none; }
.medal__burst i {
  position: absolute;
  width: var(--s);
  height: calc(var(--s) * 1.6);
  margin: calc(var(--s) * -.8) 0 0 calc(var(--s) * -.5);
  border-radius: 50% 50% 50% 50% / 70% 70% 30% 30%;
  background: var(--c);
  opacity: 0;
  animation: fling 1.4s cubic-bezier(.2, .7, .3, 1) var(--w) forwards;
}
@keyframes fling {
  0% { opacity: 1; transform: translate(0, 0) rotate(0) scale(.4); }
  70% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) rotate(var(--r)) scale(1); }
}

.save-date__hint {
  margin-top: 22px;
  font-style: italic;
  font-size: 17px;
  transition: opacity .4s ease;
  font-weight: 600;
  color: var(--ink);
}
.save-date__hint.is-changing { opacity: 0; }

.save-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  padding: 13px 26px;
  border-radius: 99px;
  background: linear-gradient(135deg, #1B3A86, var(--navy));
  color: #fff;
  font-family: var(--caps);
  letter-spacing: .2em;
  text-decoration: none;
  text-transform: uppercase;
  box-shadow: 0 10px 24px rgba(15, 42, 92, .28);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity .8s ease .6s, transform .8s ease .6s, visibility 0s linear .6s;
  font-size: 13px;
  font-weight: 600;
}
.save-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.save-date.is-revealed .save-btn { opacity: 1; visibility: visible; transform: none; }


/* 4. The celebrations ==================================================== */

.functions { padding: 28px 0 16px; }

.functions__list {
  position: relative;
  max-width: 880px;
  margin: 0 auto;
  padding: 28px 0 0;
}

/* a line of little cobalt tiles down the middle, drawn by the scroll */
.functions__line {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 60px;
  width: 7px;
  margin-left: -3.5px;
  background:
    linear-gradient(var(--silver), var(--silver)) center / 1px 100% no-repeat,
    repeating-linear-gradient(to bottom, var(--cobalt) 0 7px, transparent 7px 22px);
  transform-origin: 50% 0;
  transform: scaleY(var(--p, 0));
  opacity: .7;
  will-change: transform;   /* rescaled on the compositor, not repainted per scroll frame */
}
/* on phones the cards stack down the middle, so the line is left out */
@media (max-width: 767px) {
  .functions__line { display: none; }
}

.fn {
  position: relative;
  z-index: 1;
  width: min(92vw, 380px);
  margin: 0 auto 56px;
}
.fn:last-child { margin-bottom: 24px; }

/* A white-marble card with a thin cobalt line and a silver one inside it,
   a cobalt lotus resting on its top edge. */
.fn__card {
  position: relative;
  padding: 30px 14px 22px;
  border: 1px solid rgba(36, 72, 168, .32);
  border-radius: 26px;
  background:
    radial-gradient(120% 40% at 50% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%),
    linear-gradient(180deg, #fff 0%, var(--pearl) 100%);
  box-shadow: 0 26px 50px -28px rgba(15, 42, 92, .45), 0 2px 6px rgba(15, 42, 92, .05);
  text-align: center;
}
.fn__card::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid var(--silver);
  border-radius: 20px;
  opacity: .65;
  pointer-events: none;
}

.fn__crest {
  position: absolute;
  top: -19px;
  left: 50%;
  width: 54px;
  height: 38px;
  margin-left: -27px;
  padding: 6px 9px 4px;
  border: 1px solid rgba(36, 72, 168, .32);
  border-radius: 99px;
  background: #fff;
  color: var(--cobalt);
}
.fn__crest svg { display: block; width: 100%; height: 100%; }

.fn__name {
  font-family: var(--script);
  font-size: 44px;
  line-height: 1.15;
  color: var(--navy);
}
.fn__sub {
  font-family: var(--caps);
  font-size: 11.5px;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--cobalt);
}
.fn__rule {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 6px auto 0;
}
.fn__rule::before,
.fn__rule::after { content: ""; width: 34px; height: 1px; background: var(--silver); }
.fn__rule i { width: 7px; height: 7px; transform: rotate(45deg); background: var(--accent); box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--silver); }

/* The film in a jharokha window: a 4:5 arch held in a cobalt line with a
   white mat and a silver ring round it. The portrait film is cropped to
   it, a little below centre, where the people are. */
.fn__film {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  margin: 16px 0 18px;
  padding: 5px;
  border: 1.5px solid var(--cobalt);
  border-radius: 50% 50% 18px 18px / 34% 34% 18px 18px;
  background: #fff;
  box-shadow: 0 0 0 4px #fff, 0 0 0 5px var(--silver), 0 22px 36px -20px rgba(15, 42, 92, .55);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.fn__film::before {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 50% 50% 13px 13px / 34% 34% 13px 13px;
  background:
    radial-gradient(80% 55% at 50% 35%, color-mix(in srgb, var(--accent) 45%, transparent), transparent 75%),
    linear-gradient(170deg, var(--mist), var(--powder));
}
.fn__video {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 62%;
  border-radius: 50% 50% 13px 13px / 34% 34% 13px 13px;
  background: transparent;
  opacity: 0;
  transition: opacity .6s ease;
  /* its own layer, so a playing film is not repainted with every scroll */
  transform: translateZ(0);
  backface-visibility: hidden;
}
.fn__film.is-ready .fn__video { opacity: 1; }

/* A play mark until the film runs, and whenever it is paused. */
.fn__film::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 56px;
  height: 56px;
  margin: -28px 0 0 -28px;
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: 50%;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 6.5v11l9-5.5z' fill='%232448A8'/%3E%3C/svg%3E") 55% 50% / 24px no-repeat,
    rgba(255, 255, 255, .82);
  box-shadow: 0 6px 18px rgba(15, 42, 92, .25);
  pointer-events: none;
  transition: opacity .4s ease, transform .4s ease;
}
.fn__film.is-playing:not(.is-paused)::after { opacity: 0; transform: scale(.85); }

/* no film: a cobalt lotus in the window instead */
.fn__film--still { cursor: default; }
.fn__film--still::after { display: none; }
.fn__lotus {
  position: absolute;
  left: 24%;
  top: 34%;
  width: 52%;
  color: var(--cobalt);
  filter: drop-shadow(0 6px 10px rgba(36, 72, 168, .25));
  animation: float 6s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

/* When and Where side by side on a pale blue panel, split by a silver line. */
.fn__info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid rgba(36, 72, 168, .16);
  border-radius: 16px;
  background: var(--mist);
}
/* Cormorant has a small x-height, so these sizes are larger than they look
   in the stylesheet; anything under ~18px reads as fine print on a phone. */
.fn__col { min-width: 0; padding: 16px 8px 18px; }
.fn__col + .fn__col { border-left: 1px solid var(--silver); }

.fn__label {
  margin-bottom: 8px;
  font-family: var(--caps);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--cobalt);
}
.fn__day { font-weight: 600; font-size: 19px; line-height: 1.25; color: #4A5A7E; }
.fn__date {
  margin-top: 2px;
  font-weight: 700;
  font-size: 22px;
  line-height: 1.15;
  color: var(--navy);
}
.fn__time {
  margin-top: 6px;
  font-weight: 700;
  font-size: 18px;
  line-height: 1.25;
  color: var(--cobalt);
}
.fn__venue {
  font-weight: 700;
  font-size: 22px;
  line-height: 1.15;
  color: var(--navy);
}
.fn__addr { margin-top: 6px; font-weight: 600; font-size: 18px; line-height: 1.25; color: #4A5A7E; }

.fn__dress {
  margin-top: 16px;
  font-style: italic;
  font-size: 20px;
  line-height: 1.35;
  color: var(--ink);
}
.fn__dress span {
  margin-right: 8px;
  font-family: var(--caps);
  font-style: normal;
  font-weight: 700;
  font-size: 12.5px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--cobalt);
}

.fn__map {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 7px;
  margin: 14px auto 0;
  padding: 9px 18px;
  border: 1px solid var(--cobalt);
  border-radius: 99px;
  background: #fff;
  color: var(--cobalt);
  font-family: var(--caps);
  font-weight: 600;
  font-size: 11.5px;
  letter-spacing: .16em;
  text-decoration: none;
  text-transform: uppercase;
  transition: background .3s ease, color .3s ease;
}
.fn__map svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.fn__map:hover { background: var(--cobalt); color: #fff; }

/* From 768px the cards alternate either side of the line. */
@media (min-width: 768px) {
  .functions__list { display: grid; grid-template-columns: 1fr 1fr; column-gap: 90px; padding-top: 30px; }
  .fn { margin: 0 0 70px; }
  .fn:nth-last-child(-n+2) { margin-bottom: 24px; }
  .fn:nth-of-type(odd) { grid-column: 1; justify-self: end; }
  .fn:nth-of-type(even) { grid-column: 2; justify-self: start; margin-top: 200px; }
}


/* 5. Counting down ======================================================= */

.countdown { padding: 28px 12px 44px; text-align: center; }

/* The numbers sit in the four plates' plain centres, measured on the
   1200 × 501 picture: 15.6 / 38.8 / 61.6 / 84.5% across, 59.7% down,
   15.5% wide. */
.plaque {
  position: relative;
  width: min(100%, 660px);
  aspect-ratio: 1200 / 501;
  margin: 0 auto;
  container-type: inline-size;
}
.plaque__art { position: absolute; inset: 0; width: 100%; height: 100%; }

.plaque__plates { list-style: none; margin: 0; padding: 0; }
.plaque__plate {
  position: absolute;
  top: 59.7%;
  width: 15.5%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.plaque__plate:nth-child(1) { left: 15.6%; }
.plaque__plate:nth-child(2) { left: 38.8%; }
.plaque__plate:nth-child(3) { left: 61.6%; }
.plaque__plate:nth-child(4) { left: 84.5%; }

.plaque__num {
  font-family: var(--caps);
  font-weight: 600;
  font-size: 6.4cqw;
  line-height: 1;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
}
.plaque__label {
  font-family: var(--caps);
  text-transform: uppercase;
  color: var(--cobalt);
  margin-top: .8cqw;
  padding-left: .2em;
  font-size: max(8.5px, 1.9cqw);
  font-weight: 700;
  letter-spacing: .08em;
}

.countdown__note {
  margin-top: 18px;
  font-style: italic;
  font-size: 19px;
  font-weight: 600;
  color: var(--ink);
}


/* 6. Our moments ========================================================= */

.gallery { padding: 28px 0 44px; }

.album { text-align: center; }

/* The coverflow strip (as in template-1). The first and last photos can
   reach the middle because the track is padded by half the screen less
   half a photo on each side. main.js scales and fades each photo by its
   distance from the middle. */
.album__track {
  --pw: min(62vw, 300px);
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px calc(50% - var(--pw) / 2) 30px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;   /* no rubber-band of the page or back-swipe */
  touch-action: pan-x pan-y;
  scrollbar-width: none;
}
.album__track::-webkit-scrollbar { display: none; }

.album__item {
  position: relative;
  flex: none;
  width: var(--pw);
  aspect-ratio: 3 / 4;
  padding: 0;
  border: 0;
  border-radius: 22px;
  overflow: hidden;
  background: linear-gradient(160deg, var(--mist), var(--powder));
  box-shadow: 0 26px 50px -20px rgba(15, 42, 92, .5), 0 0 0 1px rgba(36, 72, 168, .35);
  cursor: pointer;
  scroll-snap-align: center;
  /* No transition on transform/opacity: main.js sets them every scroll
     frame, and a transition made each photo trail behind the finger and
     wobble. They follow the scroll exactly instead. */
  will-change: transform, opacity;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  -webkit-tap-highlight-color: transparent;
}
.album__item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .6s ease;
  -webkit-user-drag: none;
  user-select: none;
}
.album__item img.is-loaded { opacity: 1; }

.album__caption {
  margin-top: 2px;
  min-height: 1.6em;
  font-style: italic;
  font-size: 20px;
  font-weight: 600;
  color: var(--navy);
  transition: opacity .25s ease;
}
.album__caption.is-changing { opacity: 0; }

.album__hint {
  margin-top: 4px;
  font-family: var(--caps);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--muted);
}

@media (min-width: 768px) {
  .album__track { --pw: 320px; gap: 24px; }
}

/* full screen */
.viewer {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: rgba(6, 20, 52, .94);
  opacity: 0;
  visibility: hidden;
  transition: opacity .35s ease, visibility 0s linear .35s;
  touch-action: pan-y;
}
.viewer.is-open { opacity: 1; visibility: visible; transition-delay: 0s; }
html.is-viewing body { overflow: hidden; }
.viewer__img {
  max-width: calc(100vw - 24px);
  max-height: calc(100vh - 120px);
  max-height: calc(100svh - 120px);
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
  transition: opacity .3s ease;
}
.viewer__cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: max(22px, env(safe-area-inset-bottom));
  color: #E4ECFF;
  font-style: italic;
  font-size: 19px;
  text-align: center;
  font-weight: 600;
}
.viewer__btn {
  position: absolute;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 50%;
  background: rgba(255, 255, 255, .1);
  color: #fff;
  cursor: pointer;
}
.viewer__btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.viewer__close { top: max(14px, env(safe-area-inset-top)); right: 14px; }
.viewer__prev { left: 10px; top: 50%; margin-top: -22px; }
.viewer__next { right: 10px; top: 50%; margin-top: -22px; }


/* 7. RSVP ================================================================ */

.rsvp { padding: 28px 14px 64px; }

/* The same white-marble card as the celebrations: a thin cobalt line, a
   silver one just inside it, and a cobalt lotus resting on the top edge. */
.rsvp__card {
  position: relative;
  max-width: 420px;
  margin: 24px auto 0;
  padding: 40px 22px 26px;
  border: 1px solid rgba(36, 72, 168, .32);
  border-radius: 26px;
  outline: 1px solid rgba(174, 184, 202, .65);
  outline-offset: -8px;
  background:
    radial-gradient(120% 30% at 50% 0%, rgba(61, 111, 214, .10), transparent 70%),
    linear-gradient(180deg, #fff 0%, var(--pearl) 100%);
  box-shadow: 0 26px 50px -28px rgba(15, 42, 92, .45), 0 2px 6px rgba(15, 42, 92, .05);
}
/* the crest: a white pill on the edge, the lotus inside it */
.rsvp__card::before {
  content: "";
  position: absolute;
  top: -19px;
  left: 50%;
  width: 54px;
  height: 38px;
  margin-left: -27px;
  border: 1px solid rgba(36, 72, 168, .32);
  border-radius: 99px;
  background: #fff;
}
.rsvp__card::after {
  content: "";
  position: absolute;
  top: -13px;
  left: 50%;
  width: 36px;
  height: 27px;
  margin-left: -18px;
  background: var(--cobalt);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 70'%3E%3Cpath d='M50 4c9 9 13 19 13 28S57 50 50 54c-7-4-13-13-13-22S41 13 50 4Z'/%3E%3Cpath opacity='.75' d='M50 54c-13-1-24-8-29-21 11 1 21 8 29 21Zm0 0c13-1 24-8 29-21-11 1-21 8-29 21Z'/%3E%3Cpath opacity='.5' d='M50 56c-17 2-31-3-42-14 15-2 30 3 42 14Zm0 0c17 2 31-3 42-14-15-2-30 3-42 14Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 70'%3E%3Cpath d='M50 4c9 9 13 19 13 28S57 50 50 54c-7-4-13-13-13-22S41 13 50 4Z'/%3E%3Cpath opacity='.75' d='M50 54c-13-1-24-8-29-21 11 1 21 8 29 21Zm0 0c13-1 24-8 29-21-11 1-21 8-29 21Z'/%3E%3Cpath opacity='.5' d='M50 56c-17 2-31-3-42-14 15-2 30 3 42 14Zm0 0c17 2 31-3 42-14-15-2-30 3-42 14Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.rsvp__intro {
  text-align: center;
  font-style: italic;
  font-size: 19px;
  line-height: 1.35;
  color: var(--ink);
  margin: 0 8px 6px;
}
/* a short silver rule with a cobalt diamond under the intro */
.rsvp__intro::after {
  content: "";
  display: block;
  width: 96px;
  height: 9px;
  margin: 12px auto 20px;
  background:
    linear-gradient(var(--silver), var(--silver)) left center / 38px 1px no-repeat,
    linear-gradient(var(--silver), var(--silver)) right center / 38px 1px no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M5 0l5 5-5 5-5-5z' fill='%232448A8'/%3E%3C/svg%3E") center / 8px no-repeat;
}

.rsvp__form [hidden],
.rsvp__field[hidden] { display: none; }

.rsvp__field { border: 0; margin: 0 0 18px; padding: 0; min-width: 0; }
.rsvp__label {
  display: block;
  margin-bottom: 8px;
  padding: 0 0 0 4px;
  font-family: var(--caps);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--navy);
}
.rsvp__label span { text-transform: none; letter-spacing: 0; font-family: var(--serif); font-weight: 400; font-style: italic; font-size: 15px; color: var(--muted); }

.rsvp__input {
  display: block;
  width: 100%;
  padding: 13px 16px;
  border: 1px solid #C9D3E6;
  border-radius: 14px;
  background: #fff;
  color: var(--navy);
  font: inherit;
  font-size: 17px;
  box-shadow: inset 0 1px 2px rgba(15, 42, 92, .05);
  transition: border-color .25s ease, box-shadow .25s ease;
}
.rsvp__input::placeholder { color: #8E9AB4; }
.rsvp__input:focus { outline: none; border-color: var(--sapphire); box-shadow: 0 0 0 3px rgba(61, 111, 214, .18); }
textarea.rsvp__input { resize: vertical; min-height: 96px; line-height: 1.4; }

/* Coming or not: two choices, each with a little round mark that fills in
   when it is the one picked. */
.rsvp__choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rsvp__choice {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 10px 10px;
  border: 1px solid #C9D3E6;
  border-radius: 14px;
  background: #fff;
  color: var(--navy);
  font-size: 16.5px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: background .25s ease, color .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.rsvp__choice::before {
  content: "";
  flex: none;
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--silver-d);
  border-radius: 50%;
  background: #fff;
  transition: border-color .25s ease, box-shadow .25s ease;
}
.rsvp__choice[aria-pressed="true"] {
  border-color: var(--cobalt);
  background: var(--cobalt);
  color: #fff;
  box-shadow: 0 8px 18px -8px rgba(36, 72, 168, .6);
}
.rsvp__choice[aria-pressed="true"]::before { border-color: #fff; box-shadow: inset 0 0 0 3px var(--cobalt), inset 0 0 0 8px #fff; }

/* Number of guests: minus, the count, plus, as one pill. */
.rsvp__stepper {
  display: flex;
  align-items: center;
  width: fit-content;
  padding: 5px;
  border: 1px solid #C9D3E6;
  border-radius: 99px;
  background: #fff;
  transition: border-color .25s ease, box-shadow .25s ease;
}
.rsvp__stepper:focus-within { border-color: var(--sapphire); box-shadow: 0 0 0 3px rgba(61, 111, 214, .18); }
.rsvp__step {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: var(--mist);
  color: var(--cobalt);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: background .2s ease, color .2s ease;
}
.rsvp__step:hover { background: var(--cobalt); color: #fff; }
.rsvp__input.rsvp__count {
  width: 70px;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  text-align: center;
  font-family: var(--caps);
  font-weight: 600;
  font-size: 21px;
  color: var(--navy);
  -moz-appearance: textfield;
  appearance: textfield;
}
.rsvp__count::-webkit-inner-spin-button,
.rsvp__count::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

.rsvp__send {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 16px;
  border: 0;
  border-radius: 99px;
  background: linear-gradient(135deg, var(--sapphire), var(--cobalt) 45%, var(--navy));
  color: #fff;
  font-family: var(--caps);
  font-weight: 600;
  font-size: 13.5px;
  letter-spacing: .2em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 12px 26px -10px rgba(15, 42, 92, .55);
  transition: transform .2s ease, box-shadow .2s ease;
}
.rsvp__send:hover { transform: translateY(-1px); box-shadow: 0 16px 30px -10px rgba(15, 42, 92, .6); }
.rsvp__send:disabled { opacity: .7; cursor: wait; transform: none; }

.rsvp__done { text-align: center; padding: 10px 0 6px; outline: none; }
.rsvp__heart { width: 40px; height: 40px; fill: var(--sapphire); margin: 0 auto 10px; display: block; animation: beat 1.4s ease infinite; }
.rsvp__done-title { font-family: var(--script); font-size: 40px; line-height: 1.2; color: var(--navy); }
.rsvp__done-note { margin-top: 8px; font-size: 18px; color: var(--ink); }
.rsvp__again {
  margin-top: 20px;
  padding: 10px 20px;
  border: 1px solid var(--cobalt);
  border-radius: 99px;
  background: none;
  color: var(--cobalt);
  font-family: var(--caps);
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  cursor: pointer;
}


/* 8. Thank you =========================================================== */

/* Top to bottom: the closing words, the footer, then the whole courtyard
   picture, which ends the page. The picture stands on the section's floor
   at its full width and natural height (--ih); the top --tuck of it (pale
   sky only, melting into the wallpaper) runs up behind the footer's last
   lines, and the section's bottom padding makes room for the rest.
   Plain block layout with explicit vw heights, no flex or aspect-ratio:
   iOS Safari collapsed an aspect-ratio flex item here to nothing. */
.thanks {
  --ih: calc(100vw * 1086 / 1920);           /* the wide picture */
  --tuck: .3;                                /* its sky reaches ~40% down */
  padding: 44px 0 calc(var(--ih) * (1 - var(--tuck)));
  overflow: hidden;
}
@media (max-aspect-ratio: 1/1) {
  /* the tall picture, its sky ~45% down; no wider than 640px worth of
     height on upright tablets (it is cropped at the sides there) */
  .thanks { --ih: calc(min(100vw, 640px) * 1910 / 1080); --tuck: .35; }
}

.thanks__scene {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--ih);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 22%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 22%);
}
.thanks__scene picture,
.thanks__art {
  display: block;
  width: 100%;
  height: 100%;
}
.thanks__art { object-fit: cover; object-position: 50% 100%; }

.thanks__words {
  position: relative;
  z-index: 2;
  padding: 0 20px;
  text-align: center;
}
.thanks__title {
  font-family: var(--script);
  font-size: clamp(54px, 15vw, 84px);
  line-height: 1.1;
  color: var(--navy);
}
.thanks__message {
  max-width: 330px;
  margin: 10px auto 0;
  font-size: 18px;
  line-height: 1.45;
  color: var(--ink);
  font-weight: 500;
}
.thanks__sign { display: flex; flex-direction: column; align-items: center; margin-top: 14px; }
.thanks__with { font-style: italic; color: var(--muted); font-weight: 600; font-size: 17px; }
.thanks__names { font-family: var(--script); font-size: 38px; line-height: 1.2; color: var(--navy); }
.thanks__families { color: var(--muted); font-weight: 600; font-size: 16px; }
.thanks__tag {
  margin-top: 10px;
  font-family: var(--caps);
  letter-spacing: .2em;
  color: var(--cobalt);
  font-size: 13px;
  font-weight: 600;
}


/* Falling jasmine and rising lanterns, only while on screen. */
.thanks__petals,
.thanks__lanterns { position: absolute; inset: 0; z-index: 1; pointer-events: none; }

.thanks__petals i {
  position: absolute;
  top: -20px;
  width: 9px;
  height: 13px;
  border-radius: 60% 60% 60% 60% / 80% 80% 25% 25%;
  background: linear-gradient(160deg, #FFFFFF, #E6ECF8);
  box-shadow: 0 1px 2px rgba(15, 42, 92, .18);
  opacity: 0;
  animation: fall 11s linear infinite paused;
}
.thanks.is-in .thanks__petals i { animation-play-state: running; }
.thanks__petals i:nth-child(1)  { left: 6%;  animation-delay: 0s; }
.thanks__petals i:nth-child(2)  { left: 18%; animation-delay: 3.5s; animation-duration: 13s; }
.thanks__petals i:nth-child(3)  { left: 30%; animation-delay: 6.2s; transform: scale(.8); }
.thanks__petals i:nth-child(4)  { left: 42%; animation-delay: 1.4s; animation-duration: 14s; }
.thanks__petals i:nth-child(5)  { left: 55%; animation-delay: 8s; }
.thanks__petals i:nth-child(6)  { left: 66%; animation-delay: 2.6s; animation-duration: 12s; }
.thanks__petals i:nth-child(7)  { left: 78%; animation-delay: 5.1s; }
.thanks__petals i:nth-child(8)  { left: 90%; animation-delay: .8s; animation-duration: 15s; }
.thanks__petals i:nth-child(9)  { left: 12%; animation-delay: 9.3s; animation-duration: 12.5s; }
.thanks__petals i:nth-child(10) { left: 48%; animation-delay: 10.6s; }
.thanks__petals i:nth-child(11) { left: 72%; animation-delay: 7.4s; animation-duration: 13.5s; }
.thanks__petals i:nth-child(12) { left: 95%; animation-delay: 4.3s; }

@keyframes fall {
  0% { opacity: 0; transform: translate(0, 0) rotate(0); }
  8% { opacity: .95; }
  50% { transform: translate(28px, 50vh) rotate(160deg); }
  90% { opacity: .9; }
  100% { opacity: 0; transform: translate(-12px, 100vh) rotate(320deg); }
}

.thanks__lanterns i {
  position: absolute;
  bottom: 30%;
  width: 14px;
  height: 19px;
  border-radius: 40% 40% 30% 30% / 50% 50% 25% 25%;
  background: radial-gradient(circle at 50% 65%, #FFF4C9, #FFC766 45%, #F28C38);
  box-shadow: 0 0 14px 4px rgba(255, 184, 92, .45);
  opacity: 0;
  animation: rise 16s ease-in infinite paused;
}
.thanks.is-in .thanks__lanterns i { animation-play-state: running; }
.thanks__lanterns i:nth-child(1) { left: 14%; animation-delay: 0s; }
.thanks__lanterns i:nth-child(2) { left: 30%; animation-delay: 6s; transform: scale(.75); }
.thanks__lanterns i:nth-child(3) { left: 46%; animation-delay: 11s; transform: scale(.6); }
.thanks__lanterns i:nth-child(4) { left: 62%; animation-delay: 3s; transform: scale(.85); }
.thanks__lanterns i:nth-child(5) { left: 78%; animation-delay: 8.5s; transform: scale(.7); }
.thanks__lanterns i:nth-child(6) { left: 88%; animation-delay: 13s; transform: scale(.55); }
.thanks__lanterns i:nth-child(7) { left: 22%; animation-delay: 15s; transform: scale(.5); }

@keyframes rise {
  0% { opacity: 0; translate: 0 0; }
  10% { opacity: .95; }
  50% { translate: 18px -30vh; }
  85% { opacity: .8; }
  100% { opacity: 0; translate: -10px -62vh; }
}


/* Footer ================================================================= */

/* Inside the thank-you section, under the closing words and over the
   courtyard's sky (see section 8); no picture or panel of its own. */
.foot {
  position: relative;
  z-index: 2;
  text-align: center;
}
.foot__inner { padding: 22px 20px 0; }

.foot__send {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: 1px solid var(--cobalt);
  border-radius: 99px;
  background: rgba(255, 255, 255, .92);
  color: var(--cobalt);
  font-family: var(--caps);
  letter-spacing: .2em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(15, 42, 92, .14);
  font-size: 12px;
  font-weight: 600;
}
.foot__send svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.foot__when {
  margin-top: 18px;
  font-family: var(--caps);
  font-size: 12px;
  letter-spacing: .12em;
  line-height: 1.7;
  color: var(--navy);
  font-weight: 600;
}
.foot__br { display: none; }
@media (max-width: 480px) {
  .foot__when span { display: none; }
  .foot__br { display: inline; }
}
.foot__credit { margin-top: 6px; font-size: 14px; color: var(--muted); font-weight: 600; }
.foot__credit svg { width: 11px; height: 11px; fill: var(--sapphire); vertical-align: -1px; margin: 0 2px; }
.foot__credit a { color: var(--navy); }

/* a lantern carrying a blessing up the screen */
.foot__flight { position: fixed; inset: 0; z-index: 60; pointer-events: none; }
.wish {
  position: absolute;
  left: 50%;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  animation: wish 6s ease-in forwards;
}
.wish__lantern {
  width: 22px;
  height: 30px;
  border-radius: 40% 40% 30% 30% / 50% 50% 25% 25%;
  background: radial-gradient(circle at 50% 65%, #FFF4C9, #FFC766 45%, #F28C38);
  box-shadow: 0 0 22px 7px rgba(255, 184, 92, .5);
}
.wish__text {
  max-width: 220px;
  padding: 6px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .9);
  color: var(--navy);
  font-style: italic;
  font-size: 15px;
  box-shadow: 0 6px 16px rgba(15, 42, 92, .15);
  font-weight: 600;
}
@keyframes wish {
  0% { opacity: 0; transform: translate(-50%, 0); }
  10% { opacity: 1; }
  80% { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(-50% + 30px), -105vh); }
}


/* Off screen ============================================================= */

/* main.js marks a section is-off while it is out of view, so its endless
   loops (stars, scroll cue, jhumars, the scratch hint, the lotus, the RSVP
   heart) stop costing frames on every phone. */
.is-off *,
.is-off *::before,
.is-off *::after { animation-play-state: paused !important; }


/* Reduced motion ========================================================= */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    transition-delay: 0s !important;
    scroll-behavior: auto !important;
  }
  .thanks__petals, .thanks__lanterns, .stars { display: none; }
}
