/* =========================================================
   Atlas — a gift wrapped in khan-atlas silk opens onto a spring orchard
   ========================================================= */

:root {
  --ivory: #fbf6ee;
  --ivory-2: #f4ece0;
  --card: rgba(255, 253, 249, 0.86);
  --plum: #3d1f35;
  --plum-soft: #6b4a60;
  --magenta: #c2186b;
  --magenta-deep: #8f0f4d;
  --turq: #12898a;
  --saffron: #f0a21a;
  --line: rgba(61, 31, 53, 0.16);

  --display: "Yeseva One", "Times New Roman", serif;
  --serif: "Lora", Georgia, serif;
  --sans: "Manrope", system-ui, sans-serif;

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

  /* a wavy ribbon silhouette, tiled sideways */
  --wave: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 46' preserveAspectRatio='none'%3E%3Cpath d='M0 9C100 1 100 17 200 9S300 1 400 9V37C300 45 300 29 200 37S100 45 0 37Z'/%3E%3C/svg%3E");

  --music-fg: #3d1f35;
  --music-bg: rgba(251, 246, 238, 0.85);
  --music-line: rgba(61, 31, 53, 0.22);
}

*,
*::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(--ivory) url("media/paper.jpg") repeat;
  background-size: 480px;
  color: var(--plum);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.6;
  -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(251, 246, 238, 0.82);
  border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  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: 11.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--plum-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);
  color: var(--ivory);
}

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: #f2ebe0;
  cursor: pointer;
  outline: none;
  opacity: 0;
  transition: opacity 1.1s var(--ease-soft);
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
}

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

/* light and petals fill the frame, then melt into the orchard */
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(28px) saturate(1.05);
  opacity: 0.85;
  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: #f2ebe0 var(--open-poster, url("media/open-poster.jpg")) center / cover no-repeat;
}

/* soft rings breathing out from the bow */
.intro__pulse {
  position: absolute;
  left: var(--sx, 50%);
  top: var(--sy, 47%);
  width: calc(var(--sr, 66px) * 2);
  height: calc(var(--sr, 66px) * 2);
  margin: calc(var(--sr, 66px) * -1) 0 0 calc(var(--sr, 66px) * -1);
  pointer-events: none;
}

.intro__pulse i {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 246, 222, 0.95);
  box-shadow: 0 0 22px rgba(255, 222, 160, 0.6), inset 0 0 16px rgba(255, 222, 160, 0.4);
  opacity: 0;
  animation: pulse 3.2s var(--ease-soft) infinite;
  animation-delay: 1.6s;
}

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

@keyframes pulse {
  0% {
    transform: scale(0.9);
    opacity: 0;
  }
  18% {
    opacity: 0.9;
  }
  100% {
    transform: scale(1.8);
    opacity: 0;
  }
}

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

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

@keyframes press {
  0% {
    transform: scale(0.95);
    opacity: 0.95;
  }
  100% {
    transform: scale(2.4);
    opacity: 0;
    border-width: 0.5px;
  }
}

/* greeting above the box, hint under it */
.intro__to {
  position: absolute;
  left: 0;
  right: 0;
  top: max(calc(var(--sy, 47%) - var(--sr, 66px) * 2.85 - 92px), calc(env(safe-area-inset-top) + 62px));
  margin: 0;
  padding: 0 24px;
  text-align: center;
  font-family: var(--display);
  font-size: clamp(26px, 7.6vw, 34px);
  line-height: 1.15;
  color: var(--plum);
  text-shadow: 0 0 12px rgba(255, 252, 245, 1), 0 0 26px rgba(255, 250, 240, 0.9);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 1.4s var(--ease) 0.5s, transform 1.6s var(--ease) 0.5s;
}

.intro__hint {
  position: absolute;
  left: 50%;
  top: min(calc(var(--sy, 47%) + var(--sr, 66px) * 2.85 + 22px), calc(100% - 78px - env(safe-area-inset-bottom)));
  translate: -50% 0;
  margin: 0;
  padding: 10px 18px;
  border-radius: 999px;
  white-space: nowrap;
  background: rgba(251, 246, 238, 0.86);
  border: 1px solid rgba(61, 31, 53, 0.14);
  box-shadow: 0 10px 26px -14px rgba(61, 31, 53, 0.5);
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--plum);
  opacity: 0;
  transition: opacity 1.4s var(--ease-soft) 1.1s;
}

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

.intro.is-ready .intro__hint {
  opacity: 1;
  animation: bob 3.2s ease-in-out 2.6s infinite;
}

@keyframes bob {
  50% {
    transform: translateY(-4px);
  }
}

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

/* =========================================================
   Hero — the orchard; names rise out of a silk ribbon
   ========================================================= */

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

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

.hero__video {
  transform: scale(1.07);
  transition: transform 9s 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 78% 26% at 50% 24%, rgba(255, 252, 246, 0.72), rgba(255, 252, 246, 0) 72%),
    linear-gradient(to bottom, rgba(251, 246, 238, 0) 80%, rgba(251, 246, 238, 0.7) 94%, var(--ivory) 100%);
}

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

.hero__kicker {
  margin: 0 0 10px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--magenta-deep);
  text-shadow: 0 0 12px rgba(255, 252, 245, 1);
}

.names {
  margin: 0;
  font-weight: 400;
  line-height: 1;
  filter: drop-shadow(0 0 14px rgba(255, 251, 243, 0.9));
}

.names__slot {
  display: block;
  overflow: hidden;
  padding: 0.04em 0.1em 0.1em;
}

.names__one,
.names__two {
  display: block;
  font-family: var(--display);
  font-size: clamp(50px, 15vw, 68px);
  line-height: 1.08;
  /* plum, with a band of magenta that sweeps through once the name has risen */
  color: var(--plum);
  background: linear-gradient(100deg, var(--plum) 0 38%, var(--magenta) 47%, var(--saffron) 52%, var(--plum) 61% 100%);
  background-size: 320% 100%;
  background-position: 100% 0;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* the ribbon between the names, with the ampersand tied in its middle */
.names__ribbon {
  position: relative;
  display: block;
  width: min(70vw, 280px);
  height: 22px;
  margin: 0 auto;
}

.names__ribbon::before {
  content: "";
  position: absolute;
  inset: 0;
  --tile: 160px;
  background: url("media/ikat.jpg") repeat-x 0 50% / 160px 100%;
  -webkit-mask: var(--wave) 0 0 / 140px 100% repeat-x;
  mask: var(--wave) 0 0 / 140px 100% repeat-x;
  animation: drift 26s linear infinite;
}

.names__ribbon i {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ivory);
  box-shadow: 0 4px 12px -4px rgba(61, 31, 53, 0.45), inset 0 0 0 1.5px var(--saffron);
  font-family: var(--display);
  font-style: normal;
  font-size: 22px;
  line-height: 1;
  color: var(--magenta);
}

.hero__date {
  margin: 14px 0 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  font-family: var(--sans);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--plum);
  text-shadow: 0 0 10px rgba(255, 252, 245, 1), 0 0 22px rgba(255, 250, 240, 0.9);
}

.hero__date i {
  width: 5px;
  height: 5px;
  transform: rotate(45deg);
  background: var(--saffron);
}

/* ---------- Scroll cue ---------- */

.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(61, 31, 53, 0.18);
  background: rgba(251, 246, 238, 0.88);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 28px -12px rgba(61, 31, 53, 0.55);
  white-space: nowrap;
  text-decoration: none;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--plum);
}

.cue__arrow {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--magenta);
  stroke-width: 2;
  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: ribbon unfurls, names rise out of it, colour sweeps through ---------- */

.hero [data-h] {
  opacity: 0;
}

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

.hero.is-in .names__ribbon {
  animation: unfurl 1.5s var(--ease) 0.5s both;
}

.hero.is-in .names__ribbon i {
  animation: knot 1.2s cubic-bezier(0.3, 0.8, 0.3, 1.25) 1.5s both;
}

.hero.is-in .names__one {
  animation:
    up 1.7s var(--ease) 1s both,
    sweep 2.6s var(--ease-soft) 2.6s both;
}

.hero.is-in .names__two {
  animation:
    down 1.7s var(--ease) 1.25s both,
    sweep 2.6s var(--ease-soft) 2.9s both;
}

.hero.is-in .hero__date {
  animation: rise 1.6s var(--ease) 2.9s both;
}

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

@keyframes unfurl {
  from {
    opacity: 1;
    clip-path: inset(0 50% 0 50%);
  }
  to {
    opacity: 1;
    clip-path: inset(0 0 0 0);
  }
}

@keyframes knot {
  from {
    opacity: 0;
    transform: scale(0.4) rotate(-30deg);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes up {
  from {
    opacity: 1;
    transform: translateY(105%);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes down {
  from {
    opacity: 1;
    transform: translateY(-105%);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes sweep {
  from {
    background-position: 100% 0;
  }
  to {
    background-position: 0 0;
  }
}

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

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

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

@keyframes drift {
  from {
    background-position-x: 0;
  }
  to {
    background-position-x: calc(-1 * var(--tile, 320px));
  }
}

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

.page {
  position: relative;
  overflow-x: hidden; /* branches and silk ribbons hang off the edges */
  overflow-x: clip;
}

.section {
  position: relative;
  max-width: 560px;
  margin: 0 auto;
  padding: 64px 24px 66px;
  text-align: center;
}

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

.head {
  margin-bottom: 28px;
}

.label {
  display: block;
  margin: 0 0 8px;
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--magenta);
}

.title {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(36px, 10.5vw, 46px);
  line-height: 1.12;
  color: var(--plum);
}

/* ---------- Silk ribbons between sections (signature detail) ---------- */

.silk {
  position: relative;
  width: 124vw;
  max-width: 1300px;
  height: 44px;
  margin: 0 auto;
  left: 50%;
  translate: -50% 0;
  rotate: -2.4deg;
  filter: drop-shadow(0 8px 10px rgba(61, 31, 53, 0.16));
  pointer-events: none;
}

.silk i {
  position: absolute;
  inset: 0;
  --tile: 320px;
  background: url("media/ikat.jpg") repeat-x 0 50% / 320px 100%;
  -webkit-mask: var(--wave) 0 0 / 360px 100% repeat-x;
  mask: var(--wave) 0 0 / 360px 100% repeat-x;
  animation: drift 40s linear infinite;
}

/* a silk sheen catching the light */
.silk i::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0) 40%, rgba(0, 0, 0, 0.1) 100%);
}

.silk--b {
  rotate: 2deg;
}

.silk--b i {
  animation-direction: reverse;
  animation-duration: 52s;
}

/* Blossoming apricot branches in the corners */
.branch {
  position: absolute;
  top: -18px;
  width: min(50vw, 250px);
  pointer-events: none;
  transform-origin: 0 0;
  animation: sway 10s ease-in-out infinite alternate;
  z-index: 0;
}

.branch--tl {
  left: -22px;
}

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

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

/* Scroll reveals: long and soft */
[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 1.3s var(--ease), transform 1.5s var(--ease);
}

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

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

.invite {
  padding-top: 150px;
}

.invite__greet {
  margin: 0 0 16px;
  font-family: var(--display);
  font-size: clamp(30px, 8.6vw, 38px);
  line-height: 1.2;
  color: var(--magenta-deep);
}

.invite__text {
  margin: 0 auto 30px;
  max-width: 31ch;
  font-size: 19px;
  line-height: 1.7;
}

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

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

.parents__col {
  padding: 16px 10px;
  border-radius: 18px;
  background: var(--card);
  border: 1px solid var(--line);
}

.parents__col .label {
  font-size: 10.5px;
  letter-spacing: 0.18em;
  color: var(--turq);
}

.parents__names {
  display: block;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
}

.invite__quote {
  margin: 0;
  font-family: var(--display);
  font-size: 22px;
  color: var(--plum-soft);
}

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

.bigdate {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-bottom: 30px;
}

.bigdate__day {
  font-family: var(--display);
  font-size: 104px;
  line-height: 0.9;
  color: var(--magenta);
}

.bigdate__side {
  display: grid;
  gap: 6px;
  padding-left: 16px;
  border-left: 3px solid transparent;
  border-image: linear-gradient(var(--magenta), var(--saffron), var(--turq)) 1;
  text-align: left;
}

.bigdate__month {
  font-family: var(--display);
  font-size: 26px;
  line-height: 1.1;
}

.bigdate__wd {
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--plum-soft);
}

.cal {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  row-gap: 6px;
  max-width: 350px;
  margin: 0 auto 38px;
  padding: 18px 14px 14px;
  border-radius: 22px;
  background: var(--card);
  border: 1px solid var(--line);
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
}

.cal__wd {
  padding-bottom: 8px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--turq);
}

.cal__d {
  position: relative;
  display: grid;
  place-items: center;
  height: 38px;
}

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

/* the day: a magenta bead inside a ring of silk */
.cal__d.is-day::before {
  content: "";
  position: absolute;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #e0408c, var(--magenta) 55%, var(--magenta-deep));
  box-shadow: 0 6px 14px -4px rgba(194, 24, 107, 0.6);
}

.cal__d.is-day::after {
  content: "";
  position: absolute;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: url("media/ikat.jpg") 40% 50% / auto 200%;
  -webkit-mask: radial-gradient(circle, transparent 18.5px, #000 19px 21.5px, transparent 22px);
  mask: radial-gradient(circle, transparent 18.5px, #000 19px 21.5px, transparent 22px);
}

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

.cd {
  margin: 0 auto 30px;
}

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

.cd__cell {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 4px 10px;
  border-radius: 16px;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
}

.cd__cell::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 5px;
  background: url("media/ikat.jpg") repeat-x 0 50% / auto 400%;
}

.cd__num {
  font-family: var(--display);
  font-size: 32px;
  line-height: 1.1;
  font-variant-numeric: tabular-nums lining-nums;
}

.cd__unit {
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--plum-soft);
}

.cd__past {
  display: none;
  margin: 0;
  font-family: var(--display);
  font-size: 26px;
}

.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: 1.5px solid rgba(61, 31, 53, 0.3);
  background: rgba(255, 253, 249, 0.7);
  color: var(--plum);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  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(120deg, #d6267c, var(--magenta) 50%, var(--magenta-deep));
  color: #fff;
  box-shadow: 0 10px 24px -12px rgba(194, 24, 107, 0.8);
}

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

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

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

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

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

.tl {
  position: relative;
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 14px;
  padding-bottom: 24px;
}

.tl::before {
  content: "";
  position: absolute;
  left: 25px;
  top: 52px;
  bottom: 4px;
  width: 2px;
  border-radius: 2px;
  background: repeating-linear-gradient(var(--line) 0 6px, transparent 6px 11px);
}

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

.tl__ico {
  --c: var(--magenta);
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  color: var(--c);
  background: color-mix(in srgb, var(--c) 10%, var(--ivory));
  border: 1.5px solid color-mix(in srgb, var(--c) 45%, transparent);
}

.tl--1 .tl__ico {
  --c: var(--turq);
}

.tl--2 .tl__ico {
  --c: #c77d00;
}

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

.tl__body {
  padding-top: 2px;
}

.tl__time {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--magenta);
}

.tl--1 .tl__time {
  color: var(--turq);
}

.tl--2 .tl__time {
  color: #c77d00;
}

.tl__title {
  font-family: var(--display);
  font-size: 21px;
  line-height: 1.25;
}

.tl__note {
  margin-top: 3px;
  font-size: 15.5px;
  font-style: italic;
  line-height: 1.45;
  color: var(--plum-soft);
}

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

.venue__art {
  width: min(100%, 440px);
  margin: -8px auto 8px;
}

.venue__name {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: 28px;
  line-height: 1.2;
}

.venue__hall {
  margin: 6px 0 12px;
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--turq);
}

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

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

.mapcard {
  position: relative;
  padding: 6px;
  border-radius: 26px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: 0 20px 44px -28px rgba(61, 31, 53, 0.5);
}

.map {
  position: relative;
  height: 280px;
  border-radius: 20px;
  overflow: hidden;
  background: #f1e8da;
}

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

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

.pin svg {
  width: 42px;
  height: 54px;
  filter: drop-shadow(0 6px 6px rgba(61, 31, 53, 0.35));
}

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

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

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

.gifts {
  padding-top: 140px;
}

.gifts__note {
  margin: 0 auto 24px;
  max-width: 32ch;
  font-size: 17.5px;
  color: var(--plum-soft);
}

.cards {
  display: flex;
  gap: 14px;
  margin: 0 -24px;
  padding: 6px 24px 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(--sans);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--magenta);
}

.ccard {
  position: relative;
  width: 100%;
  aspect-ratio: 1.586;
  padding: 20px 34px 20px 22px;
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #fff;
  text-align: left;
  box-shadow: 0 20px 36px -18px rgba(61, 31, 53, 0.6);
}

.ccard--uzcard {
  background: linear-gradient(135deg, #17a3a2, #0c5f62);
}

.ccard--humo {
  background: linear-gradient(135deg, #5b2f50, #2c1426);
}

.ccard--visa {
  background: linear-gradient(135deg, #d6267c, #7d0d43);
}

/* a band of silk down the right edge of each card */
.ccard__silk {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  width: 16px;
  background: url("media/ikat.jpg") 0 0 / auto 260%;
  box-shadow: -1px 0 0 rgba(255, 255, 255, 0.35);
}

.ccard > *:not(.ccard__silk) {
  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, #ffe2a3, #d79a2b);
}

.ccard__sys {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
}

.ccard__num {
  font-family: var(--sans);
  font-size: clamp(18px, 5.6vw, 22px);
  font-weight: 700;
  letter-spacing: 0.1em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.ccard__holder {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
}

.ccard__bank {
  font-size: 13.5px;
  font-style: italic;
  opacity: 0.9;
}

.copy {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 253, 249, 0.8);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 700;
  color: var(--plum);
}

.copy.is-copied {
  background: var(--turq);
  border-color: var(--turq);
  color: #fff;
}

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

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

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

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

.rsvp__by {
  margin: 10px 0 0;
  font-style: italic;
  font-size: 17px;
  color: var(--plum-soft);
}

.reply {
  position: relative;
  padding: 24px 20px 22px;
  border-radius: 26px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: 0 24px 50px -32px rgba(61, 31, 53, 0.55);
  text-align: left;
  overflow: hidden;
}

/* a strip of silk along the top edge of the reply card */
.reply::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 8px;
  background: url("media/ikat.jpg") repeat-x 0 50% / auto 300%;
}

.form {
  display: grid;
  gap: 18px;
  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(--sans);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--turq);
}

.field input[type="text"],
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.75);
  font-size: 17px;
  outline: none;
  resize: none;
  transition: border-color 0.4s, box-shadow 0.4s;
}

.field input[type="text"]:focus,
.field textarea:focus {
  border-color: var(--magenta);
  box-shadow: 0 0 0 3px rgba(194, 24, 107, 0.12);
}

.field ::placeholder {
  color: rgba(107, 74, 96, 0.55);
  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(--line);
  background: rgba(255, 255, 255, 0.6);
  font-size: 17px;
  transition: background-color 0.4s, border-color 0.4s;
}

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

.choice input:checked + span {
  border-color: rgba(194, 24, 107, 0.5);
  background: rgba(194, 24, 107, 0.06);
}

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

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

.stepper {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
}

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

.stepper input {
  width: 34px;
  border: 0;
  background: transparent;
  text-align: center;
  font-family: var(--sans);
  font-size: 17px;
  font-weight: 700;
  -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__badge {
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: url("media/ikat.jpg") 30% 50% / auto 240%;
  box-shadow: 0 0 0 4px var(--ivory), 0 0 0 6px var(--magenta), 0 14px 30px -10px rgba(194, 24, 107, 0.6);
}

.sent__badge svg {
  width: 44px;
  height: 44px;
  padding: 8px;
  border-radius: 50%;
  background: var(--ivory);
  fill: none;
  stroke: var(--turq);
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sent__petals {
  position: absolute;
  left: 50%;
  top: calc(50% - 60px);
  width: 0;
  height: 0;
}

.sent__petals i {
  --a: 0deg;
  position: absolute;
  width: 12px;
  height: 9px;
  margin: -4px 0 0 -6px;
  border-radius: 70% 10% 70% 10%;
  background: #fbe3ea;
  box-shadow: inset 0 0 0 1px rgba(194, 24, 107, 0.25);
  opacity: 0;
}

.sent__petals i:nth-child(2) { --a: 45deg; background: #fff; }
.sent__petals i:nth-child(3) { --a: 90deg; }
.sent__petals i:nth-child(4) { --a: 135deg; background: #fde9c2; }
.sent__petals i:nth-child(5) { --a: 180deg; }
.sent__petals i:nth-child(6) { --a: 225deg; background: #fff; }
.sent__petals i:nth-child(7) { --a: 270deg; }
.sent__petals i:nth-child(8) { --a: 315deg; background: #d7f0ee; }

.sent__title {
  margin: 16px 0 6px;
  font-family: var(--display);
  font-size: 40px;
  line-height: 1.1;
  color: var(--magenta-deep);
}

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

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

.reply.is-sent .sent__badge {
  animation: bloom 1.1s cubic-bezier(0.3, 0.7, 0.25, 1.2) 0.5s both;
}

.reply.is-sent .sent__petals {
  opacity: 1;
}

.reply.is-sent .sent__petals i {
  animation: petal 2.2s var(--ease) 0.8s both;
}

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

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

@keyframes bloom {
  from {
    opacity: 0;
    transform: scale(0.3) rotate(-40deg);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes petal {
  0% {
    opacity: 0;
    transform: rotate(var(--a)) translateX(10px) rotate(0deg);
  }
  20% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: rotate(var(--a)) translateX(110px) rotate(200deg);
  }
}

.tg {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
  min-height: 44px;
  font-style: italic;
  font-size: 17px;
  color: var(--plum-soft);
  text-decoration: underline;
  text-decoration-color: rgba(194, 24, 107, 0.35);
  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(--ivory) 0%, rgba(251, 246, 238, 0.7) 8%, rgba(251, 246, 238, 0) 24%),
    radial-gradient(ellipse 70% 18% at 50% 20%, rgba(255, 244, 226, 0.55), rgba(255, 244, 226, 0) 72%),
    linear-gradient(to top, var(--ivory) 0%, rgba(251, 246, 238, 0) 14%);
}

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

.closing__wait {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(42px, 12.5vw, 56px);
  line-height: 1.1;
  color: var(--plum);
  text-shadow: 0 0 14px rgba(255, 244, 226, 1), 0 0 30px rgba(255, 238, 210, 0.9);
}

.closing__names {
  margin: 8px 0 0;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--magenta-deep);
  text-shadow: 0 0 12px rgba(255, 244, 226, 1);
  transition-delay: 0.25s;
}

.closing__amp {
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: 0;
}

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

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

/* a short length of silk tied in the middle */
.footer__knot {
  position: relative;
  width: 200px;
  height: 18px;
  margin: 0 auto 22px;
}

.footer__knot::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("media/ikat.jpg") repeat-x 0 50% / auto 100%;
  -webkit-mask: var(--wave) 0 0 / 100px 100% repeat-x;
  mask: var(--wave) 0 0 / 100px 100% repeat-x;
}

.footer__knot::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 22px;
  height: 22px;
  margin: -11px 0 0 -11px;
  border-radius: 50%;
  background: var(--saffron);
  box-shadow: 0 0 0 3px var(--ivory), 0 0 0 4.5px var(--magenta);
}

.footer__sign {
  margin: 0 0 6px;
  font-style: italic;
  font-size: 17px;
  color: var(--plum-soft);
}

.footer__tag {
  margin: 0;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.16em;
  color: var(--magenta);
}

/* =========================================================
   Wide screens: a tall card in the middle, the scene blurs to the sides
   ========================================================= */

@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(61, 31, 53, 0.25);
  }

  /* 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: 16%;
    pointer-events: none;
  }

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

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

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

  .silk {
    width: 100vw;
  }
}

/* Short phones: pull the names up a little */
@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(44px, 13.4vw, 56px);
  }

  .intro__to {
    top: calc(env(safe-area-inset-top) + 66px);
    font-size: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .branch,
  .silk i,
  .names__ribbon::before,
  .cue,
  .cue__arrow,
  .intro__pulse i,
  .intro__hint {
    animation: none !important;
  }

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

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

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