/* =========================================================
   Gul — a peony bud blooms into a pastel lake garden
   Modern, editorial, airy: hairlines, arches, a lot of white
   ========================================================= */

:root {
  --bg: #fbf6f5;
  --blush: #f7e7e6;
  --blush-2: #f1dcdf;
  --lilac: #cdb8dc;
  --lilac-soft: #ece3f1;
  --sage: #b9c4ae;
  --pearl: #fffdfc;
  --ink: #5b4658;
  --ink-soft: #8a7686;
  --plum: #8d6585;
  --plum-deep: #6f4d68;
  --line: rgba(91, 70, 88, 0.16);
  --line-strong: rgba(91, 70, 88, 0.3);

  --serif: "Cormorant Infant", "Cormorant Garamond", "Times New Roman", serif;
  --sans: "Montserrat", system-ui, sans-serif;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);

  --music-fg: #5b4658;
  --music-bg: rgba(255, 251, 251, 0.78);
  --music-line: rgba(91, 70, 88, 0.2);
}

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

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

/* a whisper of blush and lilac washed over the page */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60% 40% at 0% 20%, rgba(247, 231, 230, 0.9), transparent 70%),
    radial-gradient(60% 40% at 100% 60%, rgba(236, 227, 241, 0.8), transparent 70%),
    radial-gradient(70% 40% at 20% 100%, rgba(241, 220, 223, 0.6), transparent 70%);
}

img,
video {
  display: block;
  max-width: 100%;
}

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

a {
  color: inherit;
}

.label {
  display: block;
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--plum);
}

/* ---------- Language toggle + music button ---------- */

.lang {
  position: fixed;
  top: max(14px, env(safe-area-inset-top));
  right: 14px;
  z-index: 60;
  display: flex;
  padding: 3px;
  border-radius: 999px;
  background: rgba(255, 251, 251, 0.74);
  border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  font-family: var(--sans);
  transition: opacity 1.2s var(--ease-soft);
}

.lang button {
  position: relative;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  transition: background-color 0.4s, color 0.4s;
}

.lang button::after {
  content: "";
  position: absolute;
  inset: -6px -2px;
}

.lang button[aria-pressed="true"] {
  background: var(--plum-deep);
  color: #fff8fb;
}

body.is-intro .music--float {
  opacity: 0;
  pointer-events: none;
}

.music--float {
  transition: opacity 1.2s var(--ease-soft) 0.6s;
}

body.is-opening .lang {
  opacity: 0;
  pointer-events: none;
}

/* =========================================================
   Opening
   ========================================================= */

.intro {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: #eadde6;
  cursor: pointer;
  outline: none;
  opacity: 0;
  transition: opacity 1.2s var(--ease-soft);
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
}

.intro.is-ready {
  opacity: 1;
}

/* the flower's light dissolves into the lake; must match dissolveMs in gul.js */
body.is-revealing .intro {
  opacity: 0;
  transition: opacity 2s var(--ease-soft);
  pointer-events: none;
}

.intro__fill,
.hero__fill,
.closing__fill {
  position: absolute;
  inset: -40px;
  background-size: cover;
  background-position: center;
  filter: blur(30px) saturate(1.05);
  opacity: 0.9;
  display: none;
}

.intro__fill {
  background-image: var(--open-poster, url("media/open-poster.jpg"));
}

.intro__frame,
.hero__frame,
.closing__frame {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.intro__video,
.hero__video,
.closing__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
}

.intro__video {
  background: #eadde6 var(--open-poster, url("media/open-poster.jpg")) center / cover no-repeat;
}

/* soft rings breathing out of the bud */
.intro__pulse {
  position: absolute;
  left: var(--sx, 50%);
  top: var(--sy, 42%);
  width: calc(var(--sr, 120px) * 2);
  height: calc(var(--sr, 120px) * 2);
  margin: calc(var(--sr, 120px) * -1) 0 0 calc(var(--sr, 120px) * -1);
  pointer-events: none;
  transition: opacity 0.6s var(--ease-soft);
}

.intro__pulse i {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 26px rgba(255, 240, 246, 0.7), inset 0 0 24px rgba(255, 240, 246, 0.4);
  opacity: 0;
  animation: pulse 3.6s var(--ease-soft) infinite;
  animation-delay: 1.4s;
}

.intro__pulse i + i {
  animation-delay: 3.2s;
}

@keyframes pulse {
  0% {
    transform: scale(0.86);
    opacity: 0;
  }
  20% {
    opacity: 0.9;
  }
  100% {
    transform: scale(1.4);
    opacity: 0;
  }
}

.intro.is-pressed .intro__pulse i:first-child,
body.is-opening .intro__pulse i:first-child {
  animation: press 1.2s var(--ease) forwards;
}

body.is-opening .intro__pulse i + i {
  animation: none;
  opacity: 0;
}

@keyframes press {
  0% {
    transform: scale(0.9);
    opacity: 1;
  }
  100% {
    transform: scale(1.9);
    opacity: 0;
  }
}

.intro__top {
  position: absolute;
  left: 0;
  right: 0;
  top: max(9%, calc(env(safe-area-inset-top) + 62px));
  padding: 0 24px;
  text-align: center;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 1.6s var(--ease) 0.5s, transform 1.8s var(--ease) 0.5s;
}

.intro__kicker {
  margin: 0 0 8px;
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--plum-deep);
  text-shadow: 0 0 16px rgba(255, 250, 252, 0.95);
}

.intro__to {
  margin: 0;
  font-style: italic;
  font-weight: 300;
  font-size: clamp(32px, 9vw, 42px);
  line-height: 1.12;
  color: var(--ink);
  text-shadow: 0 0 22px rgba(255, 250, 252, 0.95), 0 0 6px rgba(255, 250, 252, 0.9);
}

.intro__hint {
  position: absolute;
  left: 0;
  right: 0;
  bottom: max(9%, calc(env(safe-area-inset-bottom) + 40px));
  margin: 0 auto;
  width: max-content;
  max-width: calc(100% - 40px);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px 12px 14px;
  border-radius: 999px;
  background: rgba(255, 251, 252, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 30px -16px rgba(91, 70, 88, 0.5);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--plum-deep);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 1.4s var(--ease-soft) 1.1s, transform 1.6s var(--ease) 1.1s;
}

/* a fingertip ring that keeps tapping */
.intro__tap {
  position: relative;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--plum);
  flex: none;
}

.intro__tap::after {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: var(--plum);
  animation: tap 2.4s var(--ease-soft) infinite;
}

@keyframes tap {
  0%,
  100% {
    transform: scale(0.6);
    opacity: 0.5;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

.intro.is-ready .intro__top,
.intro.is-ready .intro__hint {
  opacity: 1;
  transform: none;
}

body.is-opening .intro .intro__top,
body.is-opening .intro .intro__hint {
  opacity: 0;
  transform: none;
  transition: opacity 0.8s var(--ease-soft);
}

/* =========================================================
   Hero — the lake garden, then the names bloom into focus
   ========================================================= */

.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 560px;
  overflow: hidden;
  background: #efe2ec;
}

.hero__fill {
  background-image: url("media/amb-poster.jpg");
}

.hero__video {
  transform: scale(1.08);
  transition: transform 10s cubic-bezier(0.2, 0.6, 0.2, 1);
  will-change: transform;
}

.hero.is-in .hero__video {
  transform: none;
}

.hero__veil {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 24% at 50% 19%, rgba(255, 249, 252, 0.6), rgba(255, 249, 252, 0) 72%),
    radial-gradient(ellipse 60% 7% at 50% 64%, rgba(255, 249, 252, 0.55), rgba(255, 249, 252, 0) 75%),
    linear-gradient(to bottom, rgba(251, 246, 245, 0) 80%, rgba(251, 246, 245, 0.75) 94%, var(--bg) 100%);
}

.hero__text {
  position: absolute;
  left: 0;
  right: 0;
  top: max(8.5%, calc(env(safe-area-inset-top) + 56px));
  padding: 0 16px;
  text-align: center;
}

.hero__kicker {
  margin: 0 0 4px;
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--plum-deep);
  text-shadow: 0 0 14px rgba(255, 250, 252, 1);
}

.names {
  margin: 0;
  font-weight: 300;
  line-height: 1;
}

.names__one,
.names__two {
  display: block;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(60px, 18.5vw, 84px);
  line-height: 0.98;
  letter-spacing: -0.01em;
  color: #4d3a4a;
  text-shadow: 0 0 26px rgba(255, 249, 252, 0.95), 0 0 8px rgba(255, 249, 252, 0.7);
}

.names__amp {
  display: block;
  margin: -6px 0 -10px;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(30px, 8.5vw, 38px);
  line-height: 1;
  color: var(--plum);
  text-shadow: 0 0 14px rgba(255, 250, 252, 1);
}

.hero__date {
  position: absolute;
  left: 0;
  right: 0;
  top: 64%;
  margin: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.32em;
  color: #4d3a4a;
  text-shadow: 0 0 14px rgba(255, 250, 252, 1), 0 0 4px rgba(255, 250, 252, 1);
}

.hero__date i {
  width: 18px;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}

.cue {
  position: absolute;
  left: 50%;
  bottom: max(26px, calc(env(safe-area-inset-bottom) + 14px));
  translate: -50% 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px 12px 20px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.95);
  background: rgba(255, 251, 252, 0.84);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 12px 30px -14px rgba(91, 70, 88, 0.55);
  white-space: nowrap;
  text-decoration: none;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--plum-deep);
}

.cue__arrow {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  animation: nudge 2.2s ease-in-out infinite;
}

@keyframes nudge {
  0%,
  100% {
    transform: translateY(-1px);
  }
  50% {
    transform: translateY(3px);
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

/* Hero entrance — slow and staggered, nothing until the bloom has dissolved */
.hero [data-h] {
  opacity: 0;
}

.hero.is-in .hero__kicker {
  animation: spread 2.2s var(--ease) 0.4s both;
}

.hero.is-in .names__one {
  animation: bloom 2.6s var(--ease) 0.7s both;
}

.hero.is-in .names__amp {
  animation: fade 1.6s var(--ease-soft) 1.7s both;
}

.hero.is-in .names__two {
  animation: bloom 2.6s var(--ease) 1.9s both;
}

.hero.is-in .hero__date {
  animation: spread 2.2s var(--ease) 3.1s both;
}

.hero.is-in .cue {
  animation:
    fade 1.6s var(--ease-soft) 4s both,
    float 3s ease-in-out 5.6s infinite;
}

/* The names open like petals: out of focus and loose, then settle sharp */
@keyframes bloom {
  0% {
    opacity: 0;
    filter: blur(16px);
    letter-spacing: 0.32em;
    transform: scale(1.04);
  }
  45% {
    opacity: 1;
  }
  100% {
    opacity: 1;
    filter: blur(0);
    letter-spacing: -0.01em;
    transform: none;
  }
}

@keyframes spread {
  from {
    opacity: 0;
    letter-spacing: 0.6em;
  }
  to {
    opacity: 1;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* =========================================================
   Petals drifting over the page
   ========================================================= */

.petals {
  position: fixed;
  inset: 0;
  z-index: 30;
  pointer-events: none;
  overflow: hidden;
  opacity: 0;
  transition: opacity 3s var(--ease-soft);
}

body.is-open .petals {
  opacity: 1;
}

.petals i {
  position: absolute;
  top: -40px;
  left: var(--x);
  width: var(--s, 14px);
  height: calc(var(--s, 14px) * 0.78);
  border-radius: 80% 10% 80% 10%;
  background: linear-gradient(135deg, #fbe4e8, #eebfcb 70%, #e3a9ba);
  box-shadow: inset -1px -1px 2px rgba(180, 110, 135, 0.25);
  opacity: 0.85;
  animation: drift var(--d, 18s) linear var(--delay, 0s) infinite;
}

.petals i:nth-child(1) { --x: 8%; --s: 13px; --d: 19s; --delay: -2s; --sway: 60px; }
.petals i:nth-child(2) { --x: 26%; --s: 10px; --d: 23s; --delay: -11s; --sway: -50px; }
.petals i:nth-child(3) { --x: 44%; --s: 15px; --d: 21s; --delay: -6s; --sway: 70px; }
.petals i:nth-child(4) { --x: 62%; --s: 11px; --d: 25s; --delay: -16s; --sway: -60px; }
.petals i:nth-child(5) { --x: 78%; --s: 14px; --d: 20s; --delay: -9s; --sway: 40px; }
.petals i:nth-child(6) { --x: 90%; --s: 9px; --d: 27s; --delay: -20s; --sway: -70px; }
.petals i:nth-child(7) { --x: 52%; --s: 12px; --d: 24s; --delay: -4s; --sway: 50px; }

@keyframes drift {
  0% {
    transform: translate3d(0, 0, 0) rotate(0deg);
  }
  50% {
    transform: translate3d(var(--sway, 50px), 55vh, 0) rotate(200deg);
  }
  100% {
    transform: translate3d(0, 112vh, 0) rotate(400deg);
  }
}

/* =========================================================
   Sections
   ========================================================= */

.page {
  position: relative;
  overflow-x: hidden; /* the corner flowers hang off the edges */
  overflow-x: clip;
  counter-reset: section;
}

.section {
  position: relative;
  max-width: 560px;
  margin: 0 auto;
  padding: 84px 28px 72px;
  text-align: center;
}

.head {
  margin-bottom: 34px;
}

.head__num {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.3em;
  color: var(--plum);
}

/* Counted, so an order without (say) toʻyona still reads 01, 02, 03… */
.head__num b {
  font-weight: inherit;
}

.head__num b::before {
  counter-increment: section;
  content: counter(section, decimal-leading-zero);
}

.head__num::before,
.head__num::after {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--line-strong);
}

.title {
  margin: 10px 0 0;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(46px, 13.5vw, 60px);
  line-height: 1.02;
  letter-spacing: -0.01em;
  color: var(--ink);
}

/* Watercolor peony + wisteria sprays in the corners */
.flora {
  position: absolute;
  top: -10px;
  width: min(46vw, 230px);
  pointer-events: none;
  transform-origin: 0 0;
  animation: sway 12s ease-in-out infinite alternate;
  z-index: 0;
}

.flora--tl {
  left: -30px;
}

.flora--tr {
  right: -30px;
  transform-origin: 100% 0;
  scale: -1 1;
}

@keyframes sway {
  from {
    rotate: -1.4deg;
  }
  to {
    rotate: 1.6deg;
  }
}

.section > *:not(.flora) {
  position: relative;
  z-index: 1;
}

/* Scroll reveals: long and soft, with a hint of focus pull */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  filter: blur(4px);
  transition: opacity 1.4s var(--ease), transform 1.6s var(--ease), filter 1.4s var(--ease);
}

[data-reveal].is-in {
  opacity: 1;
  transform: none;
  filter: none;
}

/* ---------- Arch windows: the signature frame of this style ---------- */

.arch {
  position: relative;
  margin: 0 auto;
  border-radius: 999px 999px 18px 18px;
  overflow: hidden;
  isolation: isolate;
}

/* a hairline arch drawn just outside the window */
.arch::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid rgba(255, 255, 255, 0.7);
  pointer-events: none;
}

.arch--scene {
  width: min(64%, 250px);
  aspect-ratio: 3 / 4.3;
  margin-bottom: 36px;
  box-shadow: 0 0 0 8px var(--bg), 0 0 0 9px var(--line-strong), 0 30px 50px -30px rgba(91, 70, 88, 0.5);
}

.arch--scene img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 34%;
  transform: scale(1.12);
  transition: transform 6s var(--ease);
}

.arch--scene.is-in img {
  transform: scale(1);
}

/* ---------- Invitation ---------- */

.invite {
  padding-top: 110px;
}

.invite__greet {
  margin: 0 0 14px;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(32px, 9.5vw, 40px);
  line-height: 1.15;
  color: var(--plum-deep);
}

.invite__text {
  margin: 0 auto 34px;
  max-width: 30ch;
  font-size: 21px;
  line-height: 1.6;
}

.parents {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
  gap: 16px;
  margin: 0 0 34px;
}

/* One family invites: a single centred column */
.parents.parents--one {
  grid-template-columns: minmax(0, 300px);
  justify-content: center;
}

.parents__rule {
  width: 1px;
  height: 100%;
  min-height: 70px;
  background: var(--line-strong);
}

.parents__names {
  display: block;
  margin-top: 10px;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.3;
}

.invite__quote {
  margin: 0;
  font-style: italic;
  font-weight: 300;
  font-size: 26px;
  color: var(--ink-soft);
}

/* ---------- Date ---------- */

.bigdate {
  display: grid;
  justify-items: center;
  margin-bottom: 38px;
}

.bigdate__month {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: var(--plum);
}

.bigdate__day {
  font-weight: 300;
  font-size: 150px;
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: var(--ink);
  background: linear-gradient(180deg, #6f4d68, #b48aa8);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.bigdate__meta {
  padding-top: 12px;
  border-top: 1px solid var(--line-strong);
  font-style: italic;
  font-size: 20px;
  color: var(--ink-soft);
}

.cal {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  row-gap: 6px;
  max-width: 340px;
  margin: 0 auto 44px;
  padding: 20px 12px 14px;
  border-radius: 22px;
  background: rgba(255, 253, 252, 0.6);
  border: 1px solid var(--line);
  font-size: 19px;
}

.cal__wd {
  padding-bottom: 8px;
  font-family: var(--sans);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--plum);
}

.cal__d {
  position: relative;
  display: grid;
  place-items: center;
  height: 38px;
  color: var(--ink);
}

.cal__d.is-day {
  color: #fff;
  font-weight: 600;
}

/* the day: a plum bead in a blush halo */
.cal__d.is-day::before {
  content: "";
  position: absolute;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #b48aa8, var(--plum-deep));
  box-shadow: 0 0 0 4px #f6dfe7, 0 0 0 5px rgba(141, 101, 133, 0.35), 0 8px 16px -6px rgba(111, 77, 104, 0.6);
  animation: halo 3.6s ease-in-out infinite;
}

@keyframes halo {
  50% {
    box-shadow: 0 0 0 7px #f6dfe7, 0 0 0 8px rgba(141, 101, 133, 0.2), 0 8px 16px -6px rgba(111, 77, 104, 0.6);
  }
}

.cal__d span {
  position: relative;
  z-index: 1;
  font-size: 16px;
}

.cd {
  margin: 0 auto 32px;
}

.cd .label {
  margin-bottom: 14px;
}

.cd__row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  max-width: 380px;
  margin: 0 auto;
}

.cd__cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  border-left: 1px solid var(--line);
}

.cd__cell:first-child {
  border-left: 0;
}

.cd__num {
  font-size: 44px;
  font-weight: 300;
  line-height: 1.1;
  font-variant-numeric: tabular-nums lining-nums;
}

.cd__unit {
  font-family: var(--sans);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.cd__past {
  display: none;
  margin: 0;
  font-size: 26px;
  font-style: italic;
}

.cd.is-past .cd__row {
  display: none;
}

.cd.is-past .cd__past {
  display: block;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 26px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 253, 252, 0.6);
  color: var(--plum-deep);
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  transition: transform 0.5s var(--ease), background-color 0.5s, box-shadow 0.5s;
}

.btn:active {
  transform: scale(0.97);
}

.btn--solid {
  border-color: transparent;
  background: linear-gradient(135deg, #9a7090, var(--plum-deep));
  color: #fff8fb;
  box-shadow: 0 12px 26px -14px rgba(111, 77, 104, 0.8);
}

.btn--wide {
  width: 100%;
}

.btn__ico {
  display: inline-grid;
  width: 17px;
  height: 17px;
}

.btn__ico svg {
  width: 100%;
  height: 100%;
}

/* ---------- Program ---------- */

.program {
  padding-top: 120px;
}

.timeline {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 400px;
  text-align: left;
}

.tl {
  position: relative;
  display: grid;
  grid-template-columns: 62px 44px 1fr;
  align-items: start;
  padding-bottom: 28px;
}

.tl::before {
  content: "";
  position: absolute;
  left: 83px;
  top: 46px;
  bottom: 4px;
  width: 1px;
  background: linear-gradient(var(--line-strong), rgba(91, 70, 88, 0.06));
}

.tl:last-child::before {
  display: none;
}

.tl__time {
  padding-top: 9px;
  font-style: italic;
  font-size: 22px;
  font-weight: 500;
  color: var(--plum-deep);
  font-variant-numeric: lining-nums;
}

.tl__ico {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(145deg, #fff, var(--blush));
  border: 1px solid var(--line);
  color: var(--plum);
  box-shadow: 0 8px 18px -12px rgba(91, 70, 88, 0.5);
}

.tl__ico svg {
  width: 21px;
  height: 21px;
}

.tl__body {
  padding: 7px 0 0 14px;
}

.tl__title {
  font-size: 22px;
  font-weight: 500;
  line-height: 1.22;
}

.tl__note {
  margin-top: 3px;
  font-size: 17px;
  font-style: italic;
  line-height: 1.4;
  color: var(--ink-soft);
}

/* ---------- Venue ---------- */

.arch--venue {
  width: min(78%, 320px);
  aspect-ratio: 3 / 3.7;
  margin-bottom: 26px;
  background: linear-gradient(180deg, #f3e4ee 0%, #f9eef0 60%, #fdf8f7 100%);
  box-shadow: 0 0 0 8px var(--bg), 0 0 0 9px var(--line-strong);
}

.arch--venue img {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 112%;
  max-width: none;
  translate: -50% 0;
}

.venue__name {
  margin: 0;
  font-style: italic;
  font-size: 34px;
  font-weight: 400;
  line-height: 1.15;
}

.venue__hall {
  margin: 6px 0 14px;
}

.venue__addr {
  margin: 0 auto 30px;
  max-width: 32ch;
  font-size: 19px;
}

.venue__mark {
  font-style: italic;
  color: var(--ink-soft);
}

.arch--map {
  width: 100%;
  padding: 6px;
  background: rgba(255, 253, 252, 0.7);
  border: 1px solid var(--line);
  box-shadow: 0 24px 46px -30px rgba(91, 70, 88, 0.5);
  border-radius: 999px 999px 24px 24px / 200px 200px 24px 24px;
}

.arch--map::after {
  display: none;
}

.map {
  position: relative;
  height: 330px;
  border-radius: 999px 999px 18px 18px / 194px 194px 18px 18px;
  overflow: hidden;
  background: #f4e9ee;
}

.map__fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--ink-soft);
}

.map .maplibregl-ctrl-attrib {
  font-family: system-ui, sans-serif;
  font-size: 10px;
}

.map .maplibregl-ctrl-top-right {
  top: 40%;
}

.pin {
  display: grid;
  justify-items: center;
}

.pin svg {
  width: 42px;
  height: 54px;
  filter: drop-shadow(0 8px 8px rgba(91, 70, 88, 0.35));
}

.venue__btns {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 24px;
}

.venue__btns .btn {
  flex: 1 1 200px;
}

/* ---------- Toʻyona ---------- */

.gifts {
  padding-top: 120px;
}

.gifts__note {
  margin: 0 auto 28px;
  max-width: 32ch;
  font-size: 19px;
  color: var(--ink-soft);
}

.cards {
  display: flex;
  gap: 14px;
  margin: 0 -28px;
  padding: 6px 28px 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.cards::-webkit-scrollbar {
  display: none;
}

.gift {
  flex: 0 0 min(86%, 340px);
  scroll-snap-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.ccard {
  position: relative;
  width: 100%;
  aspect-ratio: 1.586;
  padding: 20px 22px;
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: var(--ink);
  text-align: left;
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 22px 40px -24px rgba(91, 70, 88, 0.55);
}

/* pearl: a soft iridescent sheen */
.ccard::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.65) 45%, transparent 60%),
    radial-gradient(circle at 90% 0%, rgba(255, 255, 255, 0.7), transparent 50%);
  pointer-events: none;
}

.ccard--uzcard {
  background: linear-gradient(135deg, #f0e6f4, #dccbe8 55%, #ead9e6);
}

.ccard--humo {
  background: linear-gradient(135deg, #fbe9ea, #f0cfd6 55%, #f7e2dc);
}

.ccard--visa {
  background: linear-gradient(135deg, #eef1e8, #d5ddcb 55%, #ece9de);
}

.ccard > * {
  position: relative;
}

.ccard__top,
.ccard__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ccard__chip {
  width: 38px;
  height: 28px;
  border-radius: 6px;
  background: linear-gradient(135deg, #f6e7d4, #cfb39a);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

.ccard__sys {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--plum-deep);
}

.ccard__num {
  font-family: var(--sans);
  font-size: clamp(17px, 5.2vw, 20px);
  font-weight: 500;
  letter-spacing: 0.1em;
  font-variant-numeric: tabular-nums lining-nums;
  white-space: nowrap;
  color: #4d3a4a;
}

.ccard__holder {
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
}

.ccard__bank {
  font-size: 15px;
  font-style: italic;
  color: var(--ink-soft);
}

.gift__owner {
  order: -1;
}

.copy {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 253, 252, 0.7);
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--plum-deep);
  transition: background-color 0.4s, color 0.4s;
}

.copy.is-copied {
  background: var(--plum-deep);
  color: #fff8fb;
}

.cards__dots {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.cards__dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--line-strong);
  transition: background-color 0.4s, transform 0.4s;
}

.cards__dots span.is-on {
  background: var(--plum);
  transform: scale(1.3);
}

/* ---------- RSVP ---------- */

.rsvp__by {
  margin: 12px 0 0;
  font-style: italic;
  font-size: 19px;
  color: var(--ink-soft);
}

.reply {
  position: relative;
  padding: 30px 22px 24px;
  border-radius: 999px 999px 24px 24px / 120px 120px 24px 24px;
  border: 1px solid var(--line);
  background: rgba(255, 253, 252, 0.78);
  box-shadow: 0 26px 50px -32px rgba(91, 70, 88, 0.5);
  text-align: left;
}

.form {
  display: grid;
  gap: 22px;
  padding-top: 30px;
  transition: opacity 0.9s var(--ease-soft), filter 0.9s var(--ease-soft);
}

.field {
  display: grid;
  gap: 8px;
}

.field--row {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.field input[type="text"],
.field textarea {
  width: 100%;
  padding: 8px 2px 10px;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  border-radius: 0;
  background: transparent;
  font-size: 21px;
  outline: none;
  resize: none;
  transition: border-color 0.4s;
}

.field input[type="text"]:focus,
.field textarea:focus {
  border-bottom-color: var(--plum);
}

.field ::placeholder {
  color: rgba(138, 118, 134, 0.6);
  font-style: italic;
}

.choice {
  display: grid;
  gap: 8px;
}

.choice label {
  position: relative;
}

.choice input {
  position: absolute;
  opacity: 0;
}

.choice span {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 50px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  font-size: 20px;
  transition: background-color 0.4s, border-color 0.4s;
}

.choice span::before {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid var(--plum);
  transition: background-color 0.4s, box-shadow 0.4s;
}

.choice input:checked + span {
  border-color: var(--plum);
  background: var(--lilac-soft);
}

.choice input:checked + span::before {
  background: var(--plum);
  box-shadow: inset 0 0 0 3px #fff;
}

.choice input:focus-visible + span {
  outline: 2px solid var(--plum);
  outline-offset: 2px;
}

.stepper {
  display: flex;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
}

.stepper button {
  width: 44px;
  height: 44px;
  font-size: 22px;
  color: var(--plum-deep);
}

.stepper input {
  width: 34px;
  border: 0;
  background: transparent;
  text-align: center;
  font-size: 21px;
  font-weight: 600;
  -moz-appearance: textfield;
}

.stepper input::-webkit-inner-spin-button,
.stepper input::-webkit-outer-spin-button {
  -webkit-appearance: none;
}

.sent {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  pointer-events: none;
}

.sent > * {
  opacity: 0;
}

.sent__flower {
  width: 170px;
}

.sent__title {
  margin: 4px 0 6px;
  font-style: italic;
  font-weight: 300;
  font-size: 54px;
  line-height: 1.05;
  color: var(--ink);
}

.sent__text {
  margin: 0;
  max-width: 26ch;
  font-size: 19px;
  color: var(--ink-soft);
}

.reply.is-sent .form {
  opacity: 0;
  filter: blur(6px);
  pointer-events: none;
}

/* a peony blooms on the card */
.reply.is-sent .sent__flower {
  animation: bloomIn 1.8s var(--ease) 0.5s both;
}

.reply.is-sent .sent__title {
  animation: bloom 2s var(--ease) 1.2s both;
}

.reply.is-sent .sent__text {
  animation: rise 1.4s var(--ease) 1.8s both;
}

@keyframes bloomIn {
  0% {
    opacity: 0;
    transform: scale(0.55) rotate(-10deg);
    filter: blur(10px);
  }
  100% {
    opacity: 1;
    transform: none;
    filter: none;
  }
}

.tg {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  min-height: 44px;
  font-size: 19px;
  font-style: italic;
  color: var(--ink-soft);
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 5px;
}

.tg--solo {
  margin-top: 26px;
}

/* =========================================================
   Closing
   ========================================================= */

.closing {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 560px;
  margin-top: 30px;
  overflow: hidden;
}

.closing__fill {
  background-image: url("media/close-poster.jpg");
}

.closing__veil {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(to bottom, var(--bg) 0%, rgba(251, 246, 245, 0.7) 9%, rgba(251, 246, 245, 0) 24%),
    radial-gradient(ellipse 70% 14% at 50% 20%, rgba(255, 249, 252, 0.55), transparent 75%),
    linear-gradient(to top, var(--bg) 0%, rgba(251, 246, 245, 0) 14%);
}

.closing__text {
  position: absolute;
  left: 0;
  right: 0;
  top: 12%;
  padding: 0 20px;
  text-align: center;
}

.closing__wait {
  margin: 0;
  font-style: italic;
  font-weight: 300;
  font-size: clamp(50px, 15vw, 68px);
  line-height: 1.05;
  color: #4d3a4a;
  text-shadow: 0 0 26px rgba(255, 249, 252, 0.95);
}

.closing__names {
  margin: 10px 0 0;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--plum-deep);
  text-shadow: 0 0 14px rgba(255, 249, 252, 1);
  transition-delay: 0.25s;
}

.closing__amp {
  letter-spacing: 0;
}

/* ---------- Footer ---------- */

.footer {
  max-width: 560px;
  margin: 0 auto;
  padding: 24px 28px calc(64px + env(safe-area-inset-bottom));
  text-align: center;
}

.footer__sign {
  margin: 0 0 10px;
  font-style: italic;
  font-size: 20px;
  color: var(--ink-soft);
}

.footer__tag {
  margin: 0;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--plum);
}

/* =========================================================
   Wide screens: the invitation stays a tall card in the middle
   ========================================================= */

@media (min-aspect-ratio: 3/4) {
  .intro__fill,
  .hero__fill,
  .closing__fill {
    display: block;
  }

  .intro__frame,
  .hero__frame,
  .closing__frame {
    left: 50%;
    right: auto;
    width: min(100vw, 56.25vh);
    transform: translateX(-50%);
    box-shadow: 0 0 80px rgba(91, 70, 88, 0.22);
  }

  .hero__frame,
  .closing__frame {
    width: min(100vw, 56.25svh);
  }

  /* the column keeps its own fades; the blurred sides fade underneath it */
  .hero__frame,
  .closing__frame {
    z-index: 1;
  }

  .hero::after,
  .closing::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    height: 18%;
    pointer-events: none;
  }

  .hero::after {
    bottom: 0;
    background: linear-gradient(to bottom, rgba(251, 246, 245, 0), var(--bg));
  }

  .closing::after {
    top: 0;
    background: linear-gradient(to top, rgba(251, 246, 245, 0), var(--bg));
  }

  .names__one,
  .names__two {
    font-size: min(84px, 9vh);
  }
}

/* Short phones (iPhone SE and similar) */
@media (max-height: 700px) and (max-aspect-ratio: 3/4) {
  .hero__text {
    top: max(7%, calc(env(safe-area-inset-top) + 50px));
  }

  .names__one,
  .names__two {
    font-size: clamp(52px, 16vw, 66px);
  }

  .intro__to {
    font-size: 30px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .flora,
  .cue,
  .cue__arrow,
  .intro__pulse i,
  .intro__tap::after,
  .cal__d.is-day::before {
    animation: none !important;
  }

  .petals {
    display: none;
  }

  .hero.is-in [data-h] {
    animation: fade 1.2s ease both !important;
  }

  .hero__video {
    transform: none;
    transition: none;
  }

  [data-reveal] {
    transform: none;
    filter: none;
  }
}
