/* =========================================================
   Kapalak — a lace-lidded jar of pastel butterflies on a sunny
   windowsill; on the tap the ribbon slips, the lid lifts and the
   butterflies swirl out into light, over a spring meadow with a
   ribboned swing. Weddings.
   Built on shared/base.css; this sheet is the look.
   ========================================================= */

/* Bad Script's ‘ ’ stand far from their letters ("To ‘y"): the same two
   glyphs with tighter sides and a lower seat (media/PROMPTS.md says how) */
@font-face {
  font-family: "Kapalak Apos";
  src: url("/styles/kapalak/media/apos.woff2") format("woff2");
  unicode-range: U+2018-2019;
  font-display: swap;
}

:root {
  --bg: #fbf6fb;
  --ink: #3b2a48;
  --ink-soft: #77647f;
  --accent: #9a6dbf;
  --accent-deep: #6c4790;
  --accent-soft: #efe2f7;
  --peach: #f2b293;
  --mint: #9fd3bb;
  --butter: #f3d98a;
  --line: rgba(108, 71, 144, 0.14);
  --line-strong: rgba(108, 71, 144, 0.3);
  --surface: #fffaff;
  --on-accent: #fff9ff;
  --shadow: 96 64 128;
  --glow: rgba(255, 250, 255, 0.95);
  --intro-bg: #f6eef2;

  --display: "Kapalak Apos", "Bad Script", "Segoe Script", cursive;
  --body: "EB Garamond", Georgia, serif;
  --label: "Montserrat Alternates", "Trebuchet MS", sans-serif;

  --open-default: url("/styles/kapalak/media/open-poster.jpg");
  --amb-poster: url("/styles/kapalak/media/amb-poster.jpg");
  --close-poster: url("/styles/kapalak/media/close-poster.jpg");
  --dissolve: 2s;
  --pulse: rgba(255, 255, 255, 0.95);
  --pulse-glow: rgba(190, 150, 230, 0.55);
  --glint: rgba(220, 190, 255, 0.95);

  --fly-a: url("/styles/kapalak/media/fly-1.webp");
  --fly-b: url("/styles/kapalak/media/fly-3.webp");
  /* an apricot blossom petal */
  --petal: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 34'%3E%3Cdefs%3E%3CradialGradient id='g' cx='.5' cy='.85' r='.9'%3E%3Cstop offset='0' stop-color='%23f7b7c4'/%3E%3Cstop offset='.5' stop-color='%23fde3ea'/%3E%3Cstop offset='1' stop-color='%23fff8fa'/%3E%3C/radialGradient%3E%3C/defs%3E%3Cpath d='M15 33C6 28 1 20 2 12 3 5 8 1 12 2c1 2 5 2 6 0 4-1 9 3 10 10 1 8-4 16-13 21Z' fill='url(%23g)'/%3E%3C/svg%3E");
}

body {
  font-variant-numeric: lining-nums;
  font-size: 19.5px;
  background:
    radial-gradient(ellipse 120% 40% at 0% 0%, rgba(243, 217, 138, 0.14), transparent 70%),
    radial-gradient(ellipse 120% 50% at 100% 30%, rgba(159, 211, 187, 0.12), transparent 70%),
    radial-gradient(ellipse 120% 50% at 0% 70%, rgba(242, 178, 147, 0.12), transparent 70%),
    var(--bg);
}

.label {
  font-weight: 600;
  font-size: 10.5px;
  letter-spacing: 0.24em;
}

/* =========================================================
   A butterfly: one watercolour picture cut down the middle,
   each half folds on the body like a real wing
   ========================================================= */

.bfly {
  position: relative;
  display: block;
  width: var(--w, 40px);
  height: calc(var(--w, 40px) * 0.82);
  perspective: calc(var(--w, 40px) * 3);
  filter: var(--tint, none) drop-shadow(0 4px 4px rgba(96, 64, 128, 0.18));
}

.bfly::before,
.bfly::after {
  content: "";
  position: absolute;
  top: 0;
  width: 50%;
  height: 100%;
  background: var(--fly, var(--fly-a)) no-repeat;
  background-size: 200% 100%;
  animation: var(--flap, 0.34s) ease-in-out infinite alternate;
}

.bfly::before {
  left: 0;
  background-position: 0 0;
  transform-origin: 100% 50%;
  animation-name: wing-l;
}

.bfly::after {
  right: 0;
  background-position: 100% 0;
  transform-origin: 0 50%;
  animation-name: wing-r;
}

@keyframes wing-l {
  from {
    transform: rotateY(8deg);
  }
  to {
    transform: rotateY(72deg);
  }
}

@keyframes wing-r {
  from {
    transform: rotateY(-8deg);
  }
  to {
    transform: rotateY(-72deg);
  }
}

/* ---------- Opening ---------- */

.intro__kicker {
  color: var(--accent-deep);
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.95), 0 0 3px rgba(255, 255, 255, 0.9);
}

.intro__to {
  font-size: clamp(34px, 10vw, 46px);
  color: var(--accent-deep);
  text-shadow: 0 0 18px rgba(255, 255, 255, 1), 0 0 6px rgba(255, 255, 255, 0.9);
}

.intro__hint {
  letter-spacing: 0.14em;
  background: rgba(255, 250, 255, 0.82);
  color: var(--accent-deep);
}

/* the jar breathes a little while it waits */
.intro__video {
  animation: breathe 5s ease-in-out infinite;
  transform-origin: 51% 60%;
}

/* paused, not stopped: no jump when the film starts */
body.is-opening .intro__video {
  animation-play-state: paused;
}

@keyframes breathe {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.012);
  }
}

/* ---------- Hero ---------- */

.hero__veil {
  background:
    radial-gradient(ellipse 100% 30% at 50% 22%, rgba(255, 250, 252, 0.7), rgba(255, 250, 252, 0) 74%),
    linear-gradient(to bottom, rgba(251, 246, 251, 0) 84%, rgba(251, 246, 251, 0.8) 95%, var(--bg) 100%);
}

.hero__text {
  top: max(8%, calc(env(safe-area-inset-top) + 56px));
  padding: 0 20px;
}

.hero__kicker {
  margin: 0 0 4px;
  font-family: var(--label);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--accent-deep);
  text-shadow: 0 0 12px var(--glow), 0 0 4px var(--glow);
}

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

.name {
  display: block;
  white-space: nowrap;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(62px, 19vw, 84px);
  line-height: 1.15;
  color: var(--accent-deep);
  text-shadow: 0 0 22px var(--glow), 0 0 8px var(--glow), 0 0 2px #fff;
}

.names__amp {
  display: block;
  margin: -6px 0 -4px;
  font-family: var(--body);
  font-style: italic;
  font-size: clamp(24px, 7vw, 30px);
  line-height: 1.1;
  color: var(--ink);
  text-shadow: 0 0 12px var(--glow), 0 0 4px var(--glow);
}

.hero__date {
  position: absolute;
  left: 50%;
  bottom: max(98px, calc(env(safe-area-inset-bottom) + 86px));
  translate: -50% 0;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 22px;
  border-radius: 999px;
  background: rgba(255, 250, 255, 0.9);
  border: 1px solid var(--line-strong);
  white-space: nowrap;
  font-style: italic;
  font-size: 19px;
  color: var(--ink);
  box-shadow: 0 12px 26px -14px rgb(var(--shadow) / 0.7);
}

/* a tiny butterfly between the date and the weekday */
.hero__date i {
  --w: 18px;
  width: 18px;
  height: 15px;
  background: var(--fly-a) center / contain no-repeat;
  animation: nod 2.6s ease-in-out infinite;
}

@keyframes nod {
  0%,
  100% {
    transform: scaleX(1);
  }
  50% {
    transform: scaleX(0.55);
  }
}

.cue {
  color: var(--accent-deep);
}

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

/* the names flutter in, letter by letter (shared/joy.js splits them) */
.hero.is-in .name,
.hero.is-in .names__amp {
  animation: none;
  opacity: 1;
}

.hero .name .ch {
  opacity: 0;
}

.hero.is-in .name .ch {
  animation: flutter-in 1.3s var(--ease) calc(var(--start) + var(--i) * 90ms) both;
}

.name--one {
  --start: 0.7s;
}

.name--two {
  --start: 1.9s;
}

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

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

.hero {
  --cue-d: 3.8s;
}

@keyframes flutter-in {
  0% {
    opacity: 0;
    transform: translate(-14px, -34px) rotate(-18deg) scale(0.5);
    filter: blur(5px);
  }
  45% {
    opacity: 1;
    transform: translate(6px, -8px) rotate(8deg) scale(1.08);
    filter: blur(0);
  }
  70% {
    transform: translate(-2px, 3px) rotate(-3deg) scale(0.98);
  }
  100% {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Butterflies wandering across the page ---------- */

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

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

.flutter > i {
  position: absolute;
  left: 0;
  top: 0;
  will-change: transform;
  animation: var(--path) var(--d) linear var(--delay) infinite;
}

.flutter > i:nth-child(1) { --path: wander-a; --d: 26s; --delay: -3s; }
.flutter > i:nth-child(2) { --path: wander-b; --d: 31s; --delay: -14s; }
.flutter > i:nth-child(3) { --path: wander-c; --d: 23s; --delay: -9s; }
.flutter > i:nth-child(4) { --path: wander-a; --d: 35s; --delay: -24s; }

.flutter > i:nth-child(1) .bfly { --w: 38px; --flap: 0.3s; }
.flutter > i:nth-child(2) .bfly { --w: 30px; --flap: 0.26s; --fly: var(--fly-b); --tint: hue-rotate(-28deg) saturate(1.5); }
.flutter > i:nth-child(3) .bfly { --w: 26px; --flap: 0.24s; --tint: hue-rotate(40deg) saturate(1.6); }
.flutter > i:nth-child(4) .bfly { --w: 34px; --flap: 0.32s; --fly: var(--fly-b); --tint: hue-rotate(160deg) saturate(1.4); }

/* loose, looping flights that leave the screen for a while */
@keyframes wander-a {
  0% { transform: translate(-60px, 72vh) rotate(30deg); }
  20% { transform: translate(24vw, 58vh) rotate(10deg); }
  35% { transform: translate(38vw, 64vh) rotate(-10deg); }
  55% { transform: translate(62vw, 40vh) rotate(24deg); }
  75% { transform: translate(84vw, 30vh) rotate(6deg); }
  100% { transform: translate(112vw, 12vh) rotate(30deg); }
}

@keyframes wander-b {
  0% { transform: translate(110vw, 26vh) rotate(-40deg); }
  25% { transform: translate(76vw, 38vh) rotate(-20deg); }
  45% { transform: translate(58vw, 30vh) rotate(-60deg); }
  65% { transform: translate(34vw, 52vh) rotate(-24deg); }
  100% { transform: translate(-60px, 66vh) rotate(-40deg); }
}

@keyframes wander-c {
  0% { transform: translate(20vw, 108vh) rotate(0deg); }
  30% { transform: translate(34vw, 76vh) rotate(16deg); }
  50% { transform: translate(18vw, 58vh) rotate(-14deg); }
  75% { transform: translate(40vw, 30vh) rotate(10deg); }
  100% { transform: translate(28vw, -60px) rotate(-6deg); }
}

/* ---------- A butterfly lands on each title (added by kapalak.js) ---------- */

.perch {
  position: absolute;
  margin: -10px 0 0 2px;
  opacity: 0;
}

.perch .bfly {
  --w: 34px;
  --flap: 0.22s;
}

.head.is-in .perch {
  animation: land 2.6s cubic-bezier(0.3, 0.7, 0.3, 1) 0.5s both;
}

/* after landing, the wings rest and open now and then */
.head.is-in .perch .bfly::before,
.head.is-in .perch .bfly::after {
  animation-duration: 0.22s, 5s;
  animation-iteration-count: 12, infinite;
  animation-direction: alternate, normal;
  animation-delay: 0.5s, 3.2s;
}

.head.is-in .perch .bfly::before {
  animation-name: wing-l, rest-l;
}

.head.is-in .perch .bfly::after {
  animation-name: wing-r, rest-r;
}

@keyframes rest-l {
  0%, 70%, 100% { transform: rotateY(64deg); }
  78%, 90% { transform: rotateY(10deg); }
}

@keyframes rest-r {
  0%, 70%, 100% { transform: rotateY(-64deg); }
  78%, 90% { transform: rotateY(-10deg); }
}

@keyframes land {
  0% {
    opacity: 0;
    transform: translate(150px, -160px) rotate(40deg);
  }
  15% {
    opacity: 1;
  }
  45% {
    transform: translate(40px, -70px) rotate(-10deg);
  }
  70% {
    transform: translate(16px, -30px) rotate(20deg);
  }
  100% {
    opacity: 1;
    transform: rotate(14deg);
  }
}

/* ---------- Bursts (shared/joy.js) ---------- */

.joy-p.bfly {
  --w: 22px;
  --flap: 0.18s;
}

.joy-petal {
  width: 12px;
  height: 14px;
  background: var(--petal) center / contain no-repeat;
}

/* ---------- Sections ---------- */

.title {
  position: relative;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(40px, 12vw, 52px);
  line-height: 1.2;
  color: var(--accent-deep);
}

.divider {
  width: min(84%, 320px);
  margin-top: 10px;
}

.corner {
  width: min(42vw, 180px);
}

.section:has(> .corner) {
  padding-top: 176px;
}

/* sections open a little like wings: a soft unfold instead of a plain rise */
[data-reveal] {
  transform: translateY(26px) scale(0.97);
  filter: blur(3px);
  transition:
    opacity 1.3s var(--ease),
    transform 1.5s cubic-bezier(0.34, 1.4, 0.64, 1),
    filter 1.2s var(--ease);
}

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

.invite__greet {
  font-family: var(--display);
  font-size: clamp(30px, 9vw, 36px);
  color: var(--accent-deep);
}

.invite__text {
  font-size: 20.5px;
}

.invite .divider {
  margin: 0 auto 28px;
}

/* ---------- Photos: polaroids taped into a scrapbook ---------- */

.photos__grid {
  gap: 30px 12px;
  margin-top: 34px;
  padding: 0 4px;
}

/* each polaroid has its own small tilt, and drifts in like a falling leaf */
.photo {
  --r: -2.2deg;
  position: relative;
  padding: 10px 10px 30px;
  background: var(--surface);
  border-radius: 3px;
  box-shadow:
    0 1px 2px rgb(var(--shadow) / 0.12),
    0 14px 30px -12px rgb(var(--shadow) / 0.32);
  transform: translateY(34px) rotate(calc(var(--r) * 3)) scale(0.92);
}

.photo.is-in {
  transform: rotate(var(--r));
}

.photo:nth-child(4n + 2) { --r: 3deg; }
.photo:nth-child(4n + 3) { --r: -3.4deg; }
.photo:nth-child(4n + 4) { --r: 1.8deg; }

.photo--wide {
  width: 96%;
  justify-self: center;
}

/* two portraits lean on each other; the second sits a little lower */
.photo--pair + .photo--pair {
  margin-top: 26px;
}

.photo img {
  border-radius: 1px;
  background: var(--accent-soft);
}

/* a strip of pastel washi tape holds each one */
.photo::before {
  content: "";
  position: absolute;
  z-index: 1;
  top: -11px;
  left: 50%;
  width: 84px;
  height: 22px;
  margin-left: -42px;
  background: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.28) 0 6px, transparent 6px 12px), rgba(201, 166, 232, 0.62);
  rotate: calc(var(--r) * -1.6);
  box-shadow: 0 1px 2px rgb(var(--shadow) / 0.1);
}

.photo:nth-child(3n + 2)::before { background-color: rgba(242, 178, 147, 0.62); }
.photo:nth-child(3n + 3)::before { background-color: rgba(159, 211, 187, 0.66); }

.photo--pair::before {
  width: 62px;
  margin-left: -31px;
}

.photo__cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 4px;
  font-family: var(--display);
  font-size: 17px;
  color: var(--accent-deep);
}

/* a butterfly rests on the corner of some photos (kapalak.js) */
.photo .perch {
  top: auto;
  bottom: 6px;
  right: -12px;
  margin: 0;
}

.photo:nth-child(even) .perch {
  right: auto;
  left: -12px;
  bottom: auto;
  top: 20px;
}

.photo.is-in .perch {
  animation: land 2.6s cubic-bezier(0.3, 0.7, 0.3, 1) 0.9s both;
}

.photo.is-in .perch .bfly::before,
.photo.is-in .perch .bfly::after {
  animation-duration: 0.22s, 5s;
  animation-iteration-count: 12, infinite;
  animation-direction: alternate, normal;
  animation-delay: 0.9s, 3.6s;
}

.photo.is-in .perch .bfly::before {
  animation-name: wing-l, rest-l;
}

.photo.is-in .perch .bfly::after {
  animation-name: wing-r, rest-r;
}

.photos__hint {
  margin-top: 30px;
  font-family: var(--label);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.parents__names {
  font-style: italic;
  font-size: 20.5px;
}

.invite__quote {
  font-family: var(--display);
  font-size: 30px;
  color: var(--accent);
}

/* ---------- Date: the day between two beating wings ---------- */

.bigdate {
  gap: 6px;
  margin-bottom: 8px;
}

.bigdate__month {
  font-family: var(--label);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--accent);
}

.wings {
  position: relative;
  display: grid;
  place-items: center;
  width: 250px;
  height: 206px;
  perspective: 700px;
  filter: drop-shadow(0 14px 18px rgb(var(--shadow) / 0.22));
}

/* the two halves of the watercolour butterfly, beating slowly */
.wings__l,
.wings__r {
  position: absolute;
  top: 0;
  width: 50%;
  height: 100%;
  background: var(--fly-a) no-repeat;
  background-size: 200% 100%;
  animation: 3.4s ease-in-out infinite;
}

.wings__l {
  left: 0;
  background-position: 0 0;
  transform-origin: 100% 50%;
  animation-name: beat-l;
}

.wings__r {
  right: 0;
  background-position: 100% 0;
  transform-origin: 0 50%;
  animation-name: beat-r;
}

@keyframes beat-l {
  0%, 100% { transform: rotateY(0deg); }
  50% { transform: rotateY(40deg); }
}

@keyframes beat-r {
  0%, 100% { transform: rotateY(0deg); }
  50% { transform: rotateY(-40deg); }
}

/* the body, with the day on it */
.bigdate__day {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 50px;
  height: 92px;
  margin-top: 14px;
  border-radius: 26px;
  background: linear-gradient(180deg, #7a56a0, var(--accent-deep));
  box-shadow: 0 12px 22px -10px rgb(var(--shadow) / 0.8), inset 0 2px 6px rgba(255, 255, 255, 0.3);
  font-family: var(--label);
  font-size: 30px;
  font-weight: 600;
  line-height: 1;
  color: #fff;
}

.bigdate.is-in .wings {
  animation: alight 1.6s cubic-bezier(0.34, 1.4, 0.64, 1) 0.2s both;
}

@keyframes alight {
  from {
    transform: translateY(-30px) scale(0.6) rotate(-10deg);
  }
  to {
    transform: none;
  }
}

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

.bigdate__meta {
  margin: 0 0 30px;
  font-style: italic;
  font-size: 21px;
}

.cal {
  border-radius: 20px;
}

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

.cal__d.is-day::before {
  background: radial-gradient(circle at 35% 30%, #b892dc, var(--accent) 55%, var(--accent-deep));
  box-shadow: 0 0 0 4px var(--accent-soft), 0 8px 16px -6px rgb(var(--shadow) / 0.6);
  animation: heartbeat 2.4s ease-in-out infinite;
}

@keyframes heartbeat {
  0%, 60%, 100% { transform: scale(1); }
  20% { transform: scale(1.14); }
  35% { transform: scale(1.02); }
  45% { transform: scale(1.1); }
}

.cd__num {
  display: inline-block;
  font-family: var(--label);
  font-weight: 500;
  color: var(--accent-deep);
}

.cd__past {
  font-family: var(--display);
  font-size: 30px;
  color: var(--accent-deep);
}

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

.btn {
  font-family: var(--label);
  font-weight: 600;
  letter-spacing: 0.1em;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s;
}

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

.btn--solid {
  background: linear-gradient(135deg, #b08ad6, var(--accent-deep));
  box-shadow: 0 14px 26px -14px rgb(var(--shadow) / 0.9);
}

/* ---------- Program: pastel rings, a different colour each hour ---------- */

.tl__time {
  font-family: var(--label);
  font-size: 16px;
  font-weight: 600;
  color: var(--accent-deep);
}

.tl__ico {
  background: #fff;
  border: 2px solid var(--accent);
  color: var(--accent-deep);
  box-shadow: 0 0 0 5px var(--accent-soft);
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.3s;
  transform: scale(0.4) rotate(-30deg);
}

.tl.is-in .tl__ico {
  transform: none;
}

.tl:nth-child(3n + 2) .tl__ico {
  border-color: #e59a7a;
  color: #b0603f;
  box-shadow: 0 0 0 5px #fde8dd;
}

.tl:nth-child(3n + 3) .tl__ico {
  border-color: #6fb595;
  color: #3e7d62;
  box-shadow: 0 0 0 5px #e1f3ea;
}

.tl::before {
  background: repeating-linear-gradient(var(--accent) 0 3px, transparent 3px 9px);
  opacity: 0.35;
}

.tl__title {
  font-weight: 600;
}

.tl__note {
  font-style: italic;
}

.detail__ico {
  background: #fff;
  border: 2px solid var(--accent);
  color: var(--accent-deep);
}

.detail__title {
  font-weight: 600;
}

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

.venue__name {
  font-family: var(--display);
  font-weight: 400;
  font-size: 34px;
  color: var(--accent-deep);
}

/* ---------- Gifts: lilac, peach and mint cards ---------- */

.ccard {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: linear-gradient(135deg, #b791dc, #7650a0);
}

/* a butterfly resting on the corner of each card */
.ccard::before {
  content: "";
  position: absolute;
  right: 16px;
  top: 46px;
  width: 54px;
  height: 46px;
  background: var(--fly-a) center / contain no-repeat;
  opacity: 0.55;
  rotate: 18deg;
}

.ccard--humo {
  background: linear-gradient(135deg, #f0a98b, #c9705a);
}

.ccard--visa {
  background: linear-gradient(135deg, #88c9aa, #4b8e70);
}

/* ---------- Answer ---------- */

.choice input:checked + span {
  animation: pop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes pop {
  0% { transform: scale(0.92); }
  100% { transform: none; }
}

.sent__art {
  width: 140px;
}

.reply.is-sent .sent__art {
  animation: alight 1.6s cubic-bezier(0.34, 1.4, 0.64, 1) 0.3s both;
}

.sent__title {
  font-family: var(--display);
  color: var(--accent-deep);
}

/* ---------- Closing ---------- */

.closing__veil {
  background:
    linear-gradient(to bottom, var(--bg) 0%, rgba(251, 246, 251, 0.55) 7%, rgba(251, 246, 251, 0) 20%),
    radial-gradient(ellipse 90% 18% at 50% 19%, rgba(60, 30, 80, 0.4), transparent 76%),
    linear-gradient(to top, var(--bg) 0%, rgba(251, 246, 251, 0) 14%);
}

.closing__wait {
  font-family: var(--display);
  font-size: clamp(46px, 14vw, 62px);
  color: #fff6fb;
  text-shadow: 0 2px 18px rgba(50, 20, 70, 0.75);
}

.closing__names {
  font-family: var(--label);
  color: #ffe1d2;
  text-shadow: 0 1px 10px rgba(50, 20, 70, 0.85);
}

.closing__amp {
  font-family: var(--body);
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0.05em;
  text-transform: none;
}

.footer__art {
  width: 120px;
}

.footer__sign {
  font-style: italic;
}

/* ---------- Small and wide screens ---------- */

@media (max-height: 700px) and (max-aspect-ratio: 3/4) {
  .hero__text {
    top: max(5%, calc(env(safe-area-inset-top) + 56px));
  }

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

@media (min-aspect-ratio: 3/4) {
  .name {
    font-size: min(84px, 8.6vh);
  }
}

@media (prefers-reduced-motion: reduce) {
  .flutter,
  .perch {
    display: none;
  }

  .hero.is-in .name .ch,
  .hero .name .ch {
    animation: none;
    opacity: 1;
  }

  .intro__video,
  .wings__l,
  .wings__r,
  .bfly::before,
  .bfly::after,
  .cal__d.is-day::before,
  .hero__date i {
    animation: none !important;
  }

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

@media (prefers-reduced-motion: reduce) {
  .photo {
    transform: rotate(var(--r));
  }
}
