/* =========================================================
   Saroy — palace doors open onto a lantern-lit night courtyard
   ========================================================= */

:root {
  --night: #0b1020;
  --navy: #0e1733;
  --navy-2: #141f44;
  --card: rgba(255, 244, 220, 0.045);
  --ink: #ece2cb;
  --ink-soft: #b9ad94;
  --gold: #d9b26a;
  --gold-hi: #f6e3b0;
  --gold-deep: #a9803f;
  --gold-line: rgba(217, 178, 106, 0.3);
  --wine: #7d1f2c;

  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --caps: "Forum", "Cormorant Garamond", serif;

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

  /* gold that reads as metal: light top, deep bottom */
  --gold-text: linear-gradient(180deg, #fff3d2 0%, #ecc87f 45%, #c3913f 78%, #e6c27a 100%);

  --music-fg: #f1dfb2;
  --music-bg: rgba(14, 23, 51, 0.72);
  --music-line: rgba(217, 178, 106, 0.45);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  background: var(--night);
}

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

body {
  margin: 0;
  background: var(--navy) url("media/velvet.jpg") repeat;
  background-size: 400px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

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;
}

/* ---------- 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(14, 23, 51, 0.72);
  border: 1px solid var(--gold-line);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: opacity 1.2s var(--ease-soft);
}

.lang button {
  position: relative;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 13px;
  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: linear-gradient(180deg, #ecc87f, #b98a3e);
  color: #10172f;
}

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: var(--night);
  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 doorway's gold light fades into the night courtyard (matches dissolveMs) */
body.is-revealing .intro {
  opacity: 0;
  transition: opacity 2.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(28px) saturate(1.1) brightness(0.75);
  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: var(--night) var(--open-poster, url("media/open-poster.jpg")) center / cover no-repeat;
}

/* darken the top so the greeting reads over the tiles */
.intro__shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(6, 10, 24, 0.72) 0%, rgba(6, 10, 24, 0) 26%),
    linear-gradient(to top, rgba(6, 10, 24, 0.7) 0%, rgba(6, 10, 24, 0) 24%);
  transition: opacity 1.2s var(--ease-soft);
}

body.is-opening .intro__shade {
  opacity: 0;
}

/* The line of light between the doors breathes: "this opens" */
.intro__seam {
  position: absolute;
  left: var(--sx, 50%);
  top: var(--sy, 46%);
  width: 26px;
  height: calc(var(--sr, 90px) * 9);
  margin: calc(var(--sr, 90px) * -4.5) 0 0 -13px;
  pointer-events: none;
  background: radial-gradient(ellipse 50% 50% at 50% 50%, rgba(255, 214, 140, 0.75), rgba(255, 190, 90, 0) 70%);
  filter: blur(4px);
  opacity: 0;
  animation: seam 3.4s ease-in-out 1.4s infinite;
  transition: opacity 0.6s var(--ease-soft);
}

@keyframes seam {
  0%,
  100% {
    opacity: 0.15;
    transform: scaleX(0.7);
  }
  50% {
    opacity: 0.95;
    transform: scaleX(1.25);
  }
}

.intro.is-pressed .intro__seam,
body.is-opening .intro__seam {
  animation: none;
  opacity: 0;
}

.intro__to {
  position: absolute;
  left: 0;
  right: 0;
  top: max(calc(env(safe-area-inset-top) + 66px), 9%);
  margin: 0;
  padding: 0 24px;
  text-align: center;
  font-family: var(--caps);
  font-size: clamp(22px, 6.4vw, 30px);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.25;
  background: var(--gold-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.8));
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 1.6s var(--ease) 0.5s, transform 1.8s var(--ease) 0.5s;
}

.intro__hint {
  position: absolute;
  left: 50%;
  bottom: max(calc(env(safe-area-inset-bottom) + 34px), 7%);
  translate: -50% 0;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid rgba(217, 178, 106, 0.45);
  background: rgba(8, 12, 28, 0.62);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  white-space: nowrap;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-hi);
  opacity: 0;
  transition: opacity 1.4s var(--ease-soft) 1.2s;
}

.intro__hint-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 10px 2px rgba(255, 200, 110, 0.7);
}

.intro.is-ready .intro__to {
  opacity: 1;
  transform: none;
}

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

.intro.is-ready .intro__hint-dot {
  animation: twinkle 2.4s ease-in-out 2.6s infinite;
}

.intro.is-ready .intro__hint-dot + span + .intro__hint-dot {
  animation-delay: 3.8s;
}

@keyframes twinkle {
  50% {
    opacity: 0.25;
    transform: scale(0.6);
  }
}

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

/* =========================================================
   Hero — the names light up letter by letter, like lanterns
   ========================================================= */

.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 560px;
  overflow: hidden;
  background: var(--night);
}

.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% 32% at 50% 22%, rgba(6, 10, 26, 0.55), rgba(6, 10, 26, 0) 72%),
    linear-gradient(to bottom, rgba(14, 23, 51, 0) 74%, rgba(14, 23, 51, 0.85) 92%, var(--navy) 100%);
}

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

.hero__kicker {
  margin: 0 0 14px;
  font-family: var(--caps);
  font-size: 14px;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--gold-hi);
  text-shadow: 0 0 14px rgba(0, 0, 0, 0.9);
}

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

.names__one,
.names__two {
  display: block;
  font-family: var(--caps);
  font-size: clamp(44px, 13.5vw, 62px);
  line-height: 1.08;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* each letter is its own small lantern */
.names .ch {
  display: inline-block;
  background: var(--gold-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 22px rgba(255, 196, 104, 0.35);
  opacity: 0;
}

.names .ch--sp {
  width: 0.3em;
}

.hero.is-in .names .ch {
  animation: lantern 1.7s var(--ease) both;
  animation-delay: calc(var(--d, 0) * 1ms);
}

@keyframes lantern {
  0% {
    opacity: 0;
    filter: blur(8px) brightness(2.2);
    transform: translateY(6px) scale(1.06);
  }
  35% {
    opacity: 1;
    filter: blur(1.5px) brightness(1.9);
  }
  100% {
    opacity: 1;
    filter: blur(0) brightness(1);
    transform: none;
  }
}

.names__amp {
  display: block;
  margin: 2px 0 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(26px, 7vw, 32px);
  color: var(--gold);
  text-shadow: 0 0 14px rgba(0, 0, 0, 0.8);
}

.hero__date {
  margin: 18px 0 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  font-family: var(--caps);
  font-size: 20px;
  letter-spacing: 0.22em;
  color: var(--ink);
  text-shadow: 0 0 12px rgba(0, 0, 0, 0.9);
}

.hero__date i {
  width: 4px;
  height: 4px;
  transform: rotate(45deg);
  background: var(--gold);
  box-shadow: 0 0 8px rgba(255, 200, 110, 0.8);
}

.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: 11px 16px 11px 20px;
  border-radius: 999px;
  border: 1px solid rgba(217, 178, 106, 0.55);
  background: rgba(10, 15, 34, 0.72);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 0 24px rgba(217, 178, 106, 0.18), 0 10px 28px -12px rgba(0, 0, 0, 0.8);
  white-space: nowrap;
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-hi);
}

.cue__arrow {
  width: 18px;
  height: 18px;
  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 [data-h] {
  opacity: 0;
}

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

.hero.is-in .names__amp {
  animation: glow-in 1.6s var(--ease) var(--amp-d, 1.6s) both;
}

.hero.is-in .hero__date {
  animation: rise 1.8s var(--ease) var(--date-d, 3.2s) both;
}

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

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

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

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

@keyframes glow-in {
  from {
    opacity: 0;
    filter: blur(6px);
  }
  to {
    opacity: 1;
    filter: blur(0);
  }
}

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

.page {
  position: relative;
  overflow-x: hidden;
  overflow-x: clip;
}

/* star dust drifting over the velvet */
.page::before {
  content: "";
  position: absolute;
  inset: 100svh 0 0;
  pointer-events: none;
  background-image:
    radial-gradient(1px 1px at 12% 8%, rgba(255, 236, 190, 0.8), transparent 60%),
    radial-gradient(1px 1px at 78% 14%, rgba(255, 236, 190, 0.6), transparent 60%),
    radial-gradient(1.5px 1.5px at 40% 27%, rgba(255, 220, 160, 0.7), transparent 60%),
    radial-gradient(1px 1px at 90% 41%, rgba(255, 236, 190, 0.7), transparent 60%),
    radial-gradient(1px 1px at 22% 52%, rgba(255, 236, 190, 0.5), transparent 60%),
    radial-gradient(1.5px 1.5px at 64% 63%, rgba(255, 220, 160, 0.6), transparent 60%),
    radial-gradient(1px 1px at 8% 77%, rgba(255, 236, 190, 0.7), transparent 60%),
    radial-gradient(1px 1px at 52% 88%, rgba(255, 236, 190, 0.6), transparent 60%);
  background-size: 100% 900px;
  animation: dust 6s ease-in-out infinite alternate;
}

@keyframes dust {
  from {
    opacity: 0.45;
  }
  to {
    opacity: 1;
  }
}

.section {
  position: relative;
  max-width: 560px;
  margin: 0 auto;
  padding: 80px 26px 70px;
  text-align: center;
}

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

.head {
  margin-bottom: 30px;
}

.title {
  margin: 0;
  font-family: var(--caps);
  font-weight: 400;
  font-size: clamp(32px, 9.4vw, 42px);
  line-height: 1.15;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  background: var(--gold-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.divider {
  width: 230px;
  margin: 10px auto 0;
}

.label {
  display: block;
  font-family: var(--caps);
  font-size: 13px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
}

/* Hanging lanterns: swing like pendulums, glow from within */
.lamp {
  position: absolute;
  top: -2px;
  width: 78px;
  transform-origin: 50% 0;
  pointer-events: none;
  z-index: 0;
  animation: swing 6.5s ease-in-out infinite alternate;
}

.lamp img {
  width: 100%;
}

.lamp::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 64%;
  width: 110px;
  height: 110px;
  margin: -55px 0 0 -55px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 196, 104, 0.32), rgba(255, 196, 104, 0) 68%);
  animation: flicker 3.1s ease-in-out infinite alternate;
}

.lamp--l {
  left: 8px;
}

.lamp--r {
  right: 8px;
  animation-delay: -2.4s;
  animation-duration: 7.2s;
}

.lamp--short {
  width: 62px;
  top: -40px;
}

@keyframes swing {
  from {
    rotate: -3deg;
  }
  to {
    rotate: 3deg;
  }
}

@keyframes flicker {
  0% {
    opacity: 0.65;
  }
  45% {
    opacity: 1;
  }
  60% {
    opacity: 0.8;
  }
  100% {
    opacity: 0.95;
  }
}

/* Long, soft scroll reveals */
[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 1.4s var(--ease), transform 1.6s var(--ease);
}

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

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

.invite {
  padding-top: 96px;
}

.emblem {
  width: 92px;
  margin: 0 auto 18px;
}

.invite__greet {
  margin: 0 0 18px;
  font-family: var(--caps);
  font-size: clamp(26px, 7.4vw, 32px);
  letter-spacing: 0.08em;
  line-height: 1.25;
  background: var(--gold-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.parents {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin: 28px 0 30px;
}

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

.parents__names {
  display: block;
  margin-top: 8px;
  font-size: 19px;
  font-weight: 500;
  line-height: 1.35;
}

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

.invite__quote::before,
.invite__quote::after {
  content: "✦";
  margin: 0 12px;
  font-size: 11px;
  vertical-align: middle;
  font-style: normal;
  color: var(--gold);
}

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

.bigdate {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 14px;
}

.bigdate__side {
  padding: 10px 0;
  border-top: 1px solid var(--gold-line);
  border-bottom: 1px solid var(--gold-line);
  font-family: var(--caps);
  font-size: 14px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.bigdate__day {
  font-family: var(--caps);
  font-size: 96px;
  line-height: 0.95;
  background: var(--gold-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 18px rgba(255, 196, 104, 0.25));
}

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

.cal {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  row-gap: 6px;
  max-width: 340px;
  margin: 0 auto 40px;
  padding: 18px 14px 14px;
  border-radius: 20px;
  border: 1px solid var(--gold-line);
  background: var(--card);
  font-size: 18px;
}

.cal__wd {
  padding-bottom: 8px;
  font-family: var(--caps);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
}

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

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

/* the day is a little lantern of light */
.cal__d.is-day::before {
  content: "";
  position: absolute;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #fff1c8, #e7bd6c 55%, #b5853a);
  box-shadow: 0 0 22px 4px rgba(255, 196, 104, 0.45);
  animation: daylamp 3.2s ease-in-out infinite alternate;
}

@keyframes daylamp {
  from {
    box-shadow: 0 0 14px 2px rgba(255, 196, 104, 0.3);
  }
  to {
    box-shadow: 0 0 26px 6px rgba(255, 196, 104, 0.55);
  }
}

.cal__d span {
  position: relative;
  z-index: 1;
}

.cd {
  margin: 0 auto 30px;
}

.cd__label {
  margin: 0 0 14px;
  font-family: var(--caps);
  font-size: 15px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
}

.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(--gold-line);
}

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

.cd__num {
  font-family: var(--caps);
  font-size: 40px;
  line-height: 1.15;
  color: var(--gold-hi);
  font-variant-numeric: tabular-nums lining-nums;
}

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

.cd__past {
  display: none;
  margin: 0;
  font-size: 24px;
}

.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: 50px;
  padding: 0 24px;
  border-radius: 999px;
  border: 1px solid rgba(217, 178, 106, 0.55);
  background: rgba(217, 178, 106, 0.06);
  color: var(--gold-hi);
  font-family: var(--caps);
  font-size: 15px;
  letter-spacing: 0.14em;
  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(180deg, #f3d792, #d4a85a 55%, #a87b36);
  color: #141a33;
  box-shadow: 0 0 26px rgba(217, 178, 106, 0.25), 0 10px 22px -12px rgba(0, 0, 0, 0.8);
}

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

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

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

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

.program {
  padding-top: 110px;
}

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

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

.tl::before {
  content: "";
  position: absolute;
  left: 85px;
  top: 44px;
  bottom: 2px;
  width: 1px;
  background: linear-gradient(var(--gold-line), rgba(217, 178, 106, 0.08));
}

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

.tl__time {
  padding-top: 8px;
  font-family: var(--caps);
  font-size: 21px;
  color: var(--gold);
  font-variant-numeric: lining-nums;
}

.tl__ico {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(217, 178, 106, 0.5);
  background: radial-gradient(circle at 50% 40%, rgba(217, 178, 106, 0.18), rgba(14, 23, 51, 0.9));
  color: var(--gold-hi);
  box-shadow: 0 0 16px rgba(217, 178, 106, 0.15);
}

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

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

.tl__title {
  font-size: 21px;
  font-weight: 600;
  line-height: 1.25;
}

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

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

.venue__art {
  width: min(100%, 420px);
  margin: -4px auto 14px;
}

.venue__name {
  margin: 0;
  font-family: var(--caps);
  font-weight: 400;
  font-size: 28px;
  letter-spacing: 0.06em;
  line-height: 1.2;
  color: var(--gold-hi);
}

.venue__hall {
  margin: 6px 0 14px;
  font-family: var(--caps);
  font-size: 13px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold);
}

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

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

.mapcard {
  position: relative;
  padding: 6px;
  border-radius: 24px;
  border: 1px solid rgba(217, 178, 106, 0.45);
  background: rgba(217, 178, 106, 0.05);
  box-shadow: 0 0 40px rgba(217, 178, 106, 0.08), 0 20px 40px -26px rgba(0, 0, 0, 0.9);
}

.map {
  position: relative;
  height: 280px;
  border-radius: 18px;
  overflow: hidden;
  background: #121a38;
}

.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;
}

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

.pin svg {
  width: 40px;
  height: 56px;
  filter: drop-shadow(0 0 10px rgba(255, 196, 104, 0.7));
}

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

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

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

.gifts {
  padding-top: 110px;
}

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

.cards {
  display: flex;
  gap: 14px;
  margin: 0 -26px;
  padding: 6px 26px 18px;
  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: 10px;
}

.gift__owner {
  font-family: var(--caps);
  font-size: 13px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
}

.ccard {
  position: relative;
  width: 100%;
  aspect-ratio: 1.586;
  padding: 20px 22px;
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #f8ecd0;
  text-align: left;
  border: 1px solid rgba(217, 178, 106, 0.45);
  box-shadow: 0 0 30px rgba(217, 178, 106, 0.08), 0 18px 34px -18px rgba(0, 0, 0, 0.9);
}

/* gold girih lattice + a sweep of lantern light */
.ccard::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 88% -10%, rgba(255, 214, 140, 0.32), transparent 55%),
    repeating-linear-gradient(60deg, rgba(217, 178, 106, 0.07) 0 1px, transparent 1px 18px),
    repeating-linear-gradient(-60deg, rgba(217, 178, 106, 0.07) 0 1px, transparent 1px 18px);
  pointer-events: none;
}

.ccard--uzcard {
  background: linear-gradient(135deg, #154a52, #0b2530);
}

.ccard--humo {
  background: linear-gradient(135deg, #2a2357, #141033);
}

.ccard--visa {
  background: linear-gradient(135deg, #6a1a28, #320a12);
}

.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, #f6deaa, #b8914f);
}

.ccard__sys {
  font-family: system-ui, sans-serif;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--gold-hi);
}

.ccard__num {
  font-family: var(--caps);
  font-size: clamp(21px, 6.4vw, 25px);
  letter-spacing: 0.1em;
  font-variant-numeric: tabular-nums lining-nums;
  white-space: nowrap;
}

.ccard__holder {
  font-family: system-ui, sans-serif;
  font-size: 11.5px;
  letter-spacing: 0.12em;
}

.ccard__bank {
  font-size: 14px;
  font-style: italic;
  opacity: 0.85;
}

.copy {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--gold-line);
  background: rgba(217, 178, 106, 0.06);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--gold-hi);
  transition: background-color 0.4s, color 0.4s;
}

.copy.is-copied {
  background: var(--gold);
  color: #141a33;
}

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

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

.cards__dots span.is-on {
  background: var(--gold);
  transform: scale(1.3);
  box-shadow: 0 0 8px rgba(255, 200, 110, 0.8);
}

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

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

.reply {
  position: relative;
  padding: 26px 22px 24px;
  border-radius: 22px;
  border: 1px solid rgba(217, 178, 106, 0.4);
  background: rgba(10, 15, 34, 0.55);
  box-shadow: 0 0 50px rgba(217, 178, 106, 0.06), 0 24px 50px -32px rgba(0, 0, 0, 0.9);
  text-align: left;
}

.form {
  display: grid;
  gap: 20px;
  transition: opacity 0.8s var(--ease-soft), transform 0.9s var(--ease);
}

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

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

.field__label {
  font-family: var(--caps);
  font-size: 13px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
}

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

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

.field ::placeholder {
  color: rgba(185, 173, 148, 0.5);
  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: 48px;
  padding: 0 16px;
  border-radius: 14px;
  border: 1px solid var(--gold-line);
  font-size: 19px;
  transition: background-color 0.4s, border-color 0.4s;
}

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

.choice input:checked + span {
  border-color: rgba(217, 178, 106, 0.7);
  background: rgba(217, 178, 106, 0.1);
}

.choice input:checked + span::before {
  background: var(--gold);
  box-shadow: inset 0 0 0 3px var(--navy), 0 0 10px rgba(255, 200, 110, 0.7);
}

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

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

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

.stepper input {
  width: 34px;
  border: 0;
  background: transparent;
  text-align: center;
  font-size: 20px;
  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__emblem {
  width: 120px;
}

.sent__title {
  margin: 14px 0 6px;
  font-family: var(--caps);
  font-size: 40px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.1;
  background: var(--gold-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.reply.is-sent .form {
  opacity: 0;
  transform: scale(0.98);
  pointer-events: none;
}

/* the emblem kindles like a lantern being lit */
.reply.is-sent .sent__emblem {
  animation: kindle 1.8s var(--ease) 0.5s both;
}

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

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

@keyframes kindle {
  0% {
    opacity: 0;
    transform: scale(0.7) rotate(-30deg);
    filter: brightness(3) blur(6px);
  }
  50% {
    opacity: 1;
    filter: brightness(2) blur(1px) drop-shadow(0 0 22px rgba(255, 200, 110, 0.9));
  }
  100% {
    opacity: 1;
    transform: none;
    filter: brightness(1) drop-shadow(0 0 12px rgba(255, 200, 110, 0.5));
  }
}

.tg {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
  min-height: 44px;
  font-size: 18px;
  font-style: italic;
  color: var(--ink-soft);
  text-decoration: underline;
  text-decoration-color: var(--gold-line);
  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:
    radial-gradient(ellipse 85% 22% at 50% 19%, rgba(8, 12, 30, 0.78), rgba(8, 12, 30, 0) 75%),
    linear-gradient(to bottom, var(--navy) 0%, rgba(14, 23, 51, 0.7) 8%, rgba(14, 23, 51, 0) 24%),
    linear-gradient(to top, var(--navy) 0%, rgba(14, 23, 51, 0) 14%);
}

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

.closing__wait {
  margin: 0;
  font-family: var(--caps);
  font-size: clamp(34px, 10.4vw, 48px);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.15;
  background: var(--gold-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 16px rgba(255, 196, 104, 0.35));
}

.closing__names {
  margin: 10px 0 0;
  font-size: 18px;
  font-style: italic;
  letter-spacing: 0.08em;
  color: var(--ink);
  text-shadow: 0 0 12px rgba(0, 0, 0, 0.9);
  transition-delay: 0.25s;
}

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

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

.footer__emblem {
  width: 84px;
  margin: 0 auto 22px;
}

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

.footer__tag {
  margin: 0;
  font-family: var(--caps);
  font-size: 15px;
  letter-spacing: 0.2em;
  color: var(--gold);
}

/* =========================================================
   Wide screens: a tall card in the middle, the scene blurred around it
   ========================================================= */

@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 90px rgba(0, 0, 0, 0.6);
  }

  /* the column sits above the edge fades, which only soften the blurred sides;
     the column keeps its own fades (hero__veil / closing__veil) */
  .hero__frame,
  .closing__frame {
    width: min(100vw, 56.25svh);
    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(14, 23, 51, 0), var(--navy));
  }

  .closing::after {
    top: 0;
    background: linear-gradient(to top, rgba(14, 23, 51, 0), var(--navy));
  }

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

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

  .names__one,
  .names__two {
    font-size: clamp(38px, 11.5vw, 50px);
  }

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

@media (prefers-reduced-motion: reduce) {
  .lamp,
  .lamp::after,
  .page::before,
  .cue,
  .cue__arrow,
  .intro__seam,
  .cal__d.is-day::before {
    animation: none !important;
  }

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

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

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