/* ==========================================================================
   Tokens
   ========================================================================== */

/* Klice (Pentagonistudio) — couple names only. Latin subset of klice.ttf. */
@font-face {
  font-family: "Klice";
  src:
    url("../assets/fonts/klice.woff2") format("woff2"),
    url("../assets/fonts/klice.woff") format("woff");
  font-display: swap;
}

:root {
  --phone-w: 390px;
  /* Desktop preview height: 680px as requested (390x680). The 720x960
     envelope source fills it via object-fit:cover plus a small overscan. */
  --phone-h: 680px;

  --c-page: #e7dddc;
  --c-burgundy: #681a21;
  --c-burgundy-deep: #4a1219;
  --c-rose: #8c3436;
  --c-card: #f8f1f1;
  --c-paper: #fefcf7;
  --c-field: #f8f5ee;
  --c-line: #d9cfc5;
  --c-chip: #eee8de;
  --c-ink: #322621;
  --c-muted: #6e605a;
  --c-gold: #d79e3b;
  --c-gold-soft: #c9a467;
  /* Gold dark enough for small text on ivory/white. */
  --c-gold-ink: #94672c;
  --c-ivory: #fdf9f3;
  --c-blush: #f3e8e4;

  --cjk: "Noto Serif TC", serif;
  --f-script: "Pinyon Script", cursive;
  --f-klice: "Klice", "Pinyon Script", cursive;
  --f-infant: "Cormorant Infant", "Cormorant", var(--cjk);
  --f-cormorant: "Cormorant", var(--cjk);
  --f-garamond: "Cormorant Garamond", var(--cjk);

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ==========================================================================
   Base
   ========================================================================== */

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

[hidden] {
  display: none !important;
}

html {
  scrollbar-gutter: stable;
  -webkit-text-size-adjust: 100%;
}

html.is-locked {
  overflow: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--c-burgundy-deep);
  color: var(--c-ink);
  font-family: var(--f-cormorant);
  /* Cormorant defaults to oldstyle figures, which sit low and small next
     to CJK text; lining figures keep digits at cap height everywhere. */
  font-variant-numeric: lining-nums;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1,
h2,
h3,
p {
  margin: 0;
}

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

a {
  color: inherit;
}

.noscript {
  padding: 40px;
  color: #fff;
  text-align: center;
}

/* ==========================================================================
   Desktop shell: decorative side panel + phone-sized invitation column
   ========================================================================== */

.phone {
  position: relative;
  width: min(100%, var(--phone-w));
  margin: 0 auto;
  background: var(--c-page);
  overflow-x: clip;
  box-shadow: 0 0 60px rgba(20, 2, 5, 0.45);
}

.aside {
  display: none;
}

@media (min-width: 960px) {
  :root {
    /* Figma 1440w default: aside 858px + stage 582px. The 390px phone is
       centered in the stage with 96px side padding; the stage scales with
       the viewport (min 438px so the phone always fits with >= 24px gaps). */
    --stage-w: max(438px, 40.4167vw);
    --phone-margin-r: max(24px, calc((var(--stage-w) - var(--phone-w)) / 2));
  }

  /* The page never scrolls on desktop (the phone column scrolls internally),
     so release the mobile `scrollbar-gutter` reservation: otherwise it
     shrinks the fixed-positioning viewport by a scrollbar width and the
     aside/stage split misses the Figma 858/582 values. */
  html {
    scrollbar-gutter: auto;
  }

  body {
    display: flex;
    align-items: center;
    justify-content: flex-end;
  }

  .phone {
    margin: 0 var(--phone-margin-r) 0 0;
    height: var(--phone-h);
    overflow-y: auto;
    scrollbar-width: thin;
    /* Figma phone chrome: 24px rounded corners + translucent white edge.
       Desktop only — mobile stays full-bleed. Border-box keeps the outer
       390x680 size intact. */
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
  }

  .aside {
    position: fixed;
    inset: 0 var(--stage-w) 0 0;
    display: grid;
    place-items: center;
    overflow: hidden;
    color: #f3e7dc;
    background:
      radial-gradient(120% 90% at 30% 20%, rgba(140, 52, 54, 0.55), transparent 60%),
      radial-gradient(90% 70% at 80% 100%, rgba(30, 4, 8, 0.6), transparent 70%),
      var(--c-burgundy-deep);
  }
}

.aside__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.aside__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.18;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.aside__floral {
  position: absolute;
  opacity: 0.9;
  filter: saturate(0.85) brightness(0.92);
}

.aside__floral--top {
  /* Figma "Arrangement 3 2": 292x320 bouquet hanging from the top edge. */
  top: -53px;
  right: 16px;
  width: clamp(180px, 20.3vw, 292px);
  mix-blend-mode: hard-light;
  opacity: 0.7;
}

.aside__floral--bottom {
  /* Figma "Arrangement 1 10": 623px wide in the 858px aside, bleeding off
     the left and bottom edges with the bouquet running diagonal. */
  left: -24%;
  bottom: -4%;
  width: clamp(360px, 43vw, 623px);
  transform: rotate(58deg);
}

.aside__inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  padding: 48px 32px;
  text-align: center;
}

.logo {
  /* Figma AJ monogram: three vector parts at fixed offsets in a 68x89 box. */
  position: relative;
  width: 68px;
  height: 89px;
}

.logo__part {
  position: absolute;
}

.logo__part--1 {
  left: 0;
  top: 33.54px;
}

.logo__part--2 {
  left: 13.33px;
  top: 0;
}

.logo__part--3 {
  left: 45.51px;
  top: 18.73px;
}

.aside__date {
  display: grid;
  grid-template-columns: auto auto;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 14px;
  font-family: var(--f-infant);
}

.aside__year {
  grid-row: 1 / span 2;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  letter-spacing: 6px;
  font-size: 13px;
  opacity: 0.8;
}

.aside__md {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 22px;
  font-size: 64px;
  font-weight: 500;
  line-height: 1;
}

.aside__d {
  padding-top: 0.42em;
}

.aside__slash {
  position: absolute;
  left: 50%;
  top: 4px;
  width: 1px;
  height: 110%;
  background: currentColor;
  opacity: 0.7;
  transform: translateX(-50%) rotate(32deg);
}

.aside__weekday {
  grid-column: 2;
  justify-self: end;
  margin-top: 6px;
  font-size: 14px;
  letter-spacing: 3px;
  opacity: 0.8;
}

.aside__venue {
  font-family: var(--f-garamond);
  font-size: 18px;
  line-height: 1.6;
}

.aside__venue-zh {
  font-family: var(--cjk);
  font-size: 14px;
  letter-spacing: 1.5px;
  opacity: 0.8;
}

.aside__rule {
  width: 56px;
  height: 1px;
  background: currentColor;
  opacity: 0.4;
}

.aside__tagline {
  font-family: var(--f-garamond);
  font-style: italic;
  font-size: 19px;
  line-height: 1.6;
  opacity: 0.9;
}

.aside__cta {
  margin-top: 8px;
  padding: 14px 34px;
  border: 1px solid rgba(243, 231, 220, 0.55);
  border-radius: 2px;
  font-family: var(--cjk);
  font-size: 15px;
  letter-spacing: 4px;
  text-decoration: none;
  background: rgba(140, 52, 54, 0.55);
  transition: background 0.3s, border-color 0.3s;
}

.aside__cta:hover,
.aside__cta:focus-visible {
  background: var(--c-rose);
  border-color: #f3e7dc;
}

/* Desktop stage eyebrow above the phone column (e.g. "WEDDING INVITATION").
   Hidden on mobile and in short viewports where it would clip. */
.stage-label {
  display: none;
}

@media (min-width: 960px) and (min-height: 760px) {
  .stage-label {
    display: block;
    position: fixed;
    right: var(--phone-margin-r);
    top: calc((100vh - var(--phone-h)) / 2 - 28px);
    transform: translateY(-50%);
    margin: 0;
    font-family: var(--f-cormorant);
    font-size: 10px;
    letter-spacing: 2.18px;
    text-transform: uppercase;
    color: #f3e7dc;
    opacity: 0.51;
  }
}

/* Anything that must sit fixed over the phone column (not the whole viewport). */
.opening {
  position: fixed;
  inset: 0;
  z-index: 50;
  width: min(100%, var(--phone-w));
  margin: 0 auto;
}

@media (min-width: 960px) {
  .opening {
    left: auto;
    right: var(--phone-margin-r);
    margin: 0;
    top: calc(50vh - var(--phone-h) / 2);
    bottom: auto;
    height: var(--phone-h);
  }
}

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

.opening {
  overflow: hidden;
  /* Overscan: the poster/video frames carry baked-in white edges
     (28px sides, ~4px top/bottom at 720x960). Height-based 102% keeps the
     source aspect and pushes the edges out of view (see .opening__video).
     Pure background art, so the small crop loses no composition. */
  background: #5a1f27 url("../assets/img/envelope-poster.webp") center / auto 102% no-repeat;
  cursor: pointer;
  transition:
    opacity 1.2s var(--ease-out),
    filter 1.2s var(--ease-out),
    transform 1.4s var(--ease-out);
}

.opening:empty {
  display: none;
}

.opening.is-leaving {
  opacity: 0;
  filter: blur(6px) brightness(1.3);
  transform: scale(1.08);
  pointer-events: none;
}

.opening__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Total magnification vs exact-fit is cover (680/520 = 1.3077) x 1.02 =
     1.3338, the minimum that also hides the top baked-in white edge
     (cover alone leaves zero vertical crop). Side crop ~65px (16.7%) each,
     top crop ~6.8px; integer-free edges, so no subpixel seam. */
  transform: scale(1.02);
  background: #5a1f27;
}

.opening__prompt {
  position: absolute;
  left: 0;
  right: 0;
  bottom: max(9vh, 56px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 16px;
  border: 0;
  background: none;
  color: #f6e9d6;
  cursor: pointer;
  transition: opacity 0.6s, transform 0.6s;
  text-shadow: 0 1px 12px rgba(40, 6, 10, 0.6);
}

.opening.is-opening .opening__prompt {
  opacity: 0;
  transform: translateY(12px);
}

.opening__title {
  font-family: var(--cjk);
  font-size: 18px;
  letter-spacing: 8px;
  padding-left: 8px;
}

.opening__title::before,
.opening__title::after {
  content: "";
  display: inline-block;
  width: 28px;
  height: 1px;
  margin: 0 12px 0.3em;
  vertical-align: middle;
  background: currentColor;
  opacity: 0.6;
}

.opening__hint {
  font-family: var(--f-garamond);
  font-style: italic;
  font-size: 15px;
  letter-spacing: 1px;
  opacity: 0.75;
}

.opening__chevron {
  width: 12px;
  height: 12px;
  margin-top: 6px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(45deg);
  animation: nudge 1.8s ease-in-out infinite;
}

@keyframes nudge {
  0%,
  100% {
    transform: translateY(0) rotate(45deg);
    opacity: 0.5;
  }
  50% {
    transform: translateY(6px) rotate(45deg);
    opacity: 1;
  }
}

/* ==========================================================================
   Shared section pieces
   ========================================================================== */

.sound-toggle {
  position: absolute;
  z-index: 5;
  top: 17px;
  left: 21px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 22px;
  /* Stays legible over both the colourful film and its white ending. */
  background: rgba(74, 18, 25, 0.5);
  cursor: pointer;
  transition: background 0.3s;
}

.sound-toggle:hover,
.sound-toggle:focus-visible {
  background: rgba(74, 18, 25, 0.6);
}

.sound-toggle img {
  width: 22px;
  height: 22px;
}

.sound-toggle img {
  transition: opacity 0.3s;
}

/* Off: dimmed icon with a diagonal strike, so the state reads at a glance. */
.sound-toggle[aria-pressed="false"] img {
  opacity: 0.55;
}

.sound-toggle::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 26px;
  height: 1.5px;
  margin: -0.75px 0 0 -13px;
  border-radius: 1px;
  background: #fff;
  transform: rotate(-45deg) scaleX(0);
  transition: transform 0.35s var(--ease-out);
}

.sound-toggle[aria-pressed="false"]::after {
  transform: rotate(-45deg) scaleX(1);
}

/* Shown when the browser refused audible autoplay and the film fell back
   to muted. */
.sound-hint {
  position: absolute;
  z-index: 5;
  top: 26px;
  left: 74px;
  padding: 5px 12px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  background: rgba(74, 18, 25, 0.5);
  color: #fff;
  font-family: var(--cjk);
  font-size: 12px;
  letter-spacing: 1px;
  cursor: pointer;
  animation: fade-in 0.8s var(--ease-out) both;
}

.sec {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.sec > * {
  position: relative;
  z-index: 1;
}

.sec-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}

.sec-head__eyebrow {
  font-family: var(--f-garamond);
  font-weight: 600;
  font-size: 13px;
  line-height: 1.6;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--c-gold-ink);
}

.sec-head__title {
  font-family: var(--f-infant);
  font-weight: 700;
  font-size: 44px;
  line-height: 1.12;
  letter-spacing: 0.5px;
  color: var(--c-rose);
}

/* Chinese subtitle: upright (CJK has no true italic). */
.sec-head__sub {
  font-family: var(--cjk);
  font-size: 14.5px;
  line-height: 1.7;
  letter-spacing: 1.5px;
  color: var(--c-muted);
}

/* Hairline divider with a small gold lozenge, matching the film title rule. */
.divider {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 136px;
  margin-top: 6px;
}

.divider i {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--c-gold-soft));
}

.divider i:last-child {
  background: linear-gradient(270deg, transparent, var(--c-gold-soft));
}

.divider__gem {
  width: 6px;
  height: 6px;
  border: 1px solid var(--c-gold-soft);
  transform: rotate(45deg);
}

/* ---------- Reveal (scroll-in) ---------- */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 1s var(--ease-out) calc(var(--i, 0) * 120ms),
    transform 1.2s var(--ease-out) calc(var(--i, 0) * 120ms);
}

.reveal--bloom {
  transform: translateY(18px) scale(0.94);
  transform-origin: 50% 80%;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Text rising out of an invisible mask. */
.rise {
  display: inline-block;
  overflow: hidden;
  padding-bottom: 0.08em;
  vertical-align: bottom;
}

.rise > span {
  display: inline-block;
  transform: translateY(105%);
  transition: transform 1.3s var(--ease-out) calc(var(--i, 0) * 120ms + 150ms);
}

.is-visible .rise > span {
  transform: none;
}

/* ==========================================================================
   Decor: parallax florals, butterflies, petals (see js/decor.js)
   ========================================================================== */

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

.sec > .floral,
.floral {
  position: absolute;
  z-index: 0;
  pointer-events: none;
}

.is-inview > .floral,
.is-inview .map__layer {
  will-change: transform;
}

.floral img {
  width: 100%;
  height: auto;
}

/* Butterfly: two wings hinge on the body with rotateY (a real 3D flap),
   while .bfly__fly carries it along a looping flight path. Animations are
   paused until the section is in view. */
.sec > .bfly,
.bfly {
  position: absolute;
  z-index: 2;
  width: calc(var(--s, 14px) * 2);
  height: calc(var(--s, 14px) * 1.4);
  transform: rotate(var(--tilt, 0deg));
  pointer-events: none;
}

.bfly__fly {
  position: absolute;
  inset: 0;
  perspective: 140px;
  animation: var(--flight, flight-a) var(--dur, 16s) ease-in-out var(--delay, 0s) infinite;
  animation-play-state: paused;
}

.bfly--b {
  --flight: flight-b;
}

.bfly--c {
  --flight: flight-c;
}

.bfly--perch {
  --flight: perch-sway;
  --dur: 7s;
}

.bfly__wing {
  position: absolute;
  top: 0;
  width: 50%;
  height: 100%;
  animation: flap-r 0.28s ease-in-out var(--delay, 0s) infinite alternate;
  animation-play-state: paused;
}

.bfly__wing svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.bfly__wing--r {
  left: 50%;
  transform-origin: 0 50%;
}

.bfly__wing--l {
  right: 50%;
  transform-origin: 100% 50%;
  animation-name: flap-l;
}

.bfly__wing--l svg {
  transform: scaleX(-1);
}

.bfly--perch .bfly__wing {
  animation: rest-r 3.4s ease-in-out var(--delay, 0s) infinite;
  animation-play-state: paused;
}

.bfly--perch .bfly__wing--l {
  animation-name: rest-l;
}

.bfly__body {
  position: absolute;
  left: 50%;
  top: 20%;
  width: 2px;
  height: 60%;
  margin-left: -1px;
  border-radius: 2px;
  background: #4b2b27;
}

.is-inview .bfly__fly,
.is-inview .bfly__wing {
  animation-play-state: running;
}

@keyframes flap-r {
  to {
    transform: rotateY(68deg);
  }
}

@keyframes flap-l {
  to {
    transform: rotateY(-68deg);
  }
}

@keyframes rest-r {
  0%,
  55%,
  100% {
    transform: rotateY(12deg);
  }
  66% {
    transform: rotateY(72deg);
  }
  76% {
    transform: rotateY(18deg);
  }
  86% {
    transform: rotateY(66deg);
  }
}

@keyframes rest-l {
  0%,
  55%,
  100% {
    transform: rotateY(-12deg);
  }
  66% {
    transform: rotateY(-72deg);
  }
  76% {
    transform: rotateY(-18deg);
  }
  86% {
    transform: rotateY(-66deg);
  }
}

@keyframes flight-a {
  0%,
  100% {
    transform: translate3d(0, 0, 0) rotate(-10deg);
  }
  25% {
    transform: translate3d(-38px, -26px, 0) rotate(8deg);
  }
  50% {
    transform: translate3d(-64px, 8px, 0) rotate(-4deg);
  }
  75% {
    transform: translate3d(-22px, 30px, 0) rotate(12deg);
  }
}

@keyframes flight-b {
  0%,
  100% {
    transform: translate3d(0, 0, 0) rotate(12deg);
  }
  30% {
    transform: translate3d(46px, -34px, 0) rotate(-6deg);
  }
  55% {
    transform: translate3d(84px, -6px, 0) rotate(10deg);
  }
  80% {
    transform: translate3d(30px, 22px, 0) rotate(-8deg);
  }
}

@keyframes flight-c {
  0%,
  100% {
    transform: translate3d(0, 0, 0) rotate(0deg);
  }
  20% {
    transform: translate3d(30px, -50px, 0) rotate(14deg);
  }
  45% {
    transform: translate3d(-20px, -90px, 0) rotate(-10deg);
  }
  70% {
    transform: translate3d(-50px, -36px, 0) rotate(6deg);
  }
}

@keyframes perch-sway {
  0%,
  100% {
    transform: rotate(-3deg);
  }
  50% {
    transform: rotate(3deg) translate3d(0, -1px, 0);
  }
}

.sec > .petals,
.petals {
  position: absolute;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.petal {
  position: absolute;
  top: -24px;
  width: var(--s, 12px);
  height: calc(var(--s, 12px) * 0.72);
  border-radius: 80% 0 80% 0;
  background: linear-gradient(135deg, #f8d3ca, #e9a397);
  opacity: 0;
  animation: petal-fall var(--dur, 14s) linear var(--delay, 0s) infinite;
  animation-play-state: paused;
}

.petal:nth-child(even) {
  background: linear-gradient(135deg, #fdf3ea, #f0c9b8);
  animation-name: petal-fall-alt;
}

.is-inview .petal {
  animation-play-state: running;
}

@keyframes petal-fall {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0) rotate(0deg);
  }
  8%,
  80% {
    opacity: 0.85;
  }
  50% {
    transform: translate3d(34px, 480px, 0) rotate(200deg);
  }
  100% {
    opacity: 0;
    transform: translate3d(-12px, 980px, 0) rotate(380deg);
  }
}

@keyframes petal-fall-alt {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0) rotate(40deg);
  }
  8%,
  80% {
    opacity: 0.8;
  }
  50% {
    transform: translate3d(-30px, 470px, 0) rotate(-150deg);
  }
  100% {
    opacity: 0;
    transform: translate3d(16px, 980px, 0) rotate(-320deg);
  }
}

/* Phones and low-power devices: fewer moving pieces. */
.is-lite .is-extra {
  display: none;
}

/* ==========================================================================
   Film (save-the-date, v13)
   ========================================================================== */

.film {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 560px;
  max-height: 960px;
  overflow: hidden;
  isolation: isolate;
  background: #fff;
}

@media (min-width: 960px) {
  .film {
    /* Inner height of the 680px phone frame (2px border each side). */
    height: calc(var(--phone-h) - 4px);
    min-height: 0;
  }
}

.film__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #fff;
  transition: opacity 1.2s var(--ease-out);
}

.film.is-still .film__video {
  opacity: 0;
}

.film__title {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 20px 7%;
  text-align: center;
  color: var(--c-burgundy);
  pointer-events: none;
}

.film__eyebrow,
.film__name,
.film__amp,
.film__date,
.film__venue {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 1.8s var(--ease-out),
    transform 2s var(--ease-out);
}

.film__rule {
  opacity: 0;
  transform: scaleX(0);
  transition:
    opacity 1s var(--ease-out),
    transform 1.8s var(--ease-out);
}

.film__title .bfly {
  opacity: 0;
  transition: opacity 1.6s var(--ease-out);
}

.is-titled .film__eyebrow,
.is-titled .film__name,
.is-titled .film__amp,
.is-titled .film__date,
.is-titled .film__venue,
.is-titled .film__rule,
.is-titled .film__title .bfly {
  opacity: 1;
  transform: none;
}

.is-titled .film__eyebrow {
  transition-delay: 0.1s;
}
.is-titled .film__name:nth-child(1) {
  transition-delay: 0.55s;
}
.is-titled .film__amp {
  transition-delay: 0.95s;
}
.is-titled .film__name:nth-child(3) {
  transition-delay: 1.25s;
}
.is-titled .film__rule {
  transition-delay: 1.8s;
}
.is-titled .film__date {
  transition-delay: 2.1s;
}
.is-titled .film__venue {
  transition-delay: 2.4s;
}
.is-titled .film__title .bfly {
  transition-delay: 2.9s;
}

.film__eyebrow {
  font-family: var(--f-garamond);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 6px;
  padding-left: 6px;
  text-transform: uppercase;
  color: var(--c-gold-ink);
}

.film__names {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 10px 0 4px;
  font-family: var(--f-klice);
  font-weight: 400;
  font-size: 76px;
  line-height: 1;
}

/* Klice swashes overhang the glyph box; padding keeps them unclipped. */
.film__name {
  padding: 0 0.35em;
}

.film__amp {
  margin: -0.42em 0 -0.36em;
  font-size: 0.8em;
  color: var(--c-gold-soft);
}

.film__rule {
  width: 120px;
  height: 1px;
  margin: 18px 0 16px;
  background: linear-gradient(90deg, transparent, var(--c-gold-soft), transparent);
}

.film__date {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--f-infant);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: 3px;
}

.film__date i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--c-gold-soft);
}

.film__venue {
  margin-top: 10px;
  font-family: var(--f-garamond);
  font-style: italic;
  font-size: 16px;
  letter-spacing: 0.5px;
  color: var(--c-muted);
}

.film__replay,
.film__play {
  position: absolute;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(104, 26, 33, 0.35);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  color: var(--c-burgundy);
  cursor: pointer;
}

.film__replay {
  right: 18px;
  bottom: 22px;
  padding: 6px 14px;
  font-family: var(--f-garamond);
  font-size: 13px;
  letter-spacing: 1.5px;
  animation: fade-in 1.2s var(--ease-out) both;
}

.film__play {
  left: 50%;
  bottom: 15%;
  padding: 10px 20px;
  font-family: var(--cjk);
  font-size: 13px;
  letter-spacing: 2px;
  transform: translateX(-50%);
}

.film__play-icon {
  width: 0;
  height: 0;
  border-left: 8px solid currentColor;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
}

.film__scroll {
  position: absolute;
  left: 50%;
  bottom: 5%;
  width: 1px;
  height: 52px;
  margin-left: -0.5px;
  overflow: hidden;
  background: rgba(104, 26, 33, 0.14);
  opacity: 0;
  transition: opacity 1.4s var(--ease-out) 3.2s;
}

.is-titled .film__scroll {
  opacity: 1;
}

.film__scroll span {
  position: absolute;
  inset: 0;
  background: var(--c-burgundy);
  animation: scroll-line 2.2s ease-in-out infinite;
}

@keyframes scroll-line {
  0% {
    transform: translateY(-100%);
  }
  60%,
  100% {
    transform: translateY(100%);
  }
}

/* ==========================================================================
   Info + countdown (mirror card)
   ========================================================================== */

.info {
  padding: 84px 24px 92px;
  /* Starts on the film's white ending, then warms into ivory/blush. */
  background: linear-gradient(180deg, #fff 0, var(--c-ivory) 160px, var(--c-blush) 100%);
}

.mirror {
  position: relative;
  display: grid;
  place-items: center;
  width: 332px;
  max-width: 100%;
  height: 483px;
  margin: 36px auto 0;
}

.mirror__frame {
  position: absolute;
  top: 8px;
  left: 0;
  width: 332px;
  height: 467px;
  border-radius: 180px;
  object-fit: cover;
  filter: drop-shadow(0 22px 26px rgba(74, 18, 25, 0.28));
}

.mirror__glass {
  position: absolute;
  top: calc(50% + 9px - 173px);
  left: calc(50% - 121px);
  width: 242px;
  height: 346px;
  border-radius: 50%;
  background: radial-gradient(60% 55% at 50% 38%, rgba(255, 236, 228, 0.12), rgba(40, 6, 10, 0.18) 100%);
  box-shadow:
    inset 0 0 0 1px rgba(215, 158, 59, 0.28),
    inset 0 0 30px rgba(30, 4, 8, 0.35);
}

.mirror__content {
  position: relative;
  top: -4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 242px;
  color: #fff;
  text-align: center;
}

.mirror__label {
  font-family: var(--f-cormorant);
  font-weight: 600;
  font-size: 18px;
  line-height: 1.2;
  letter-spacing: 3px;
  text-transform: uppercase;
  opacity: 0.45;
}

.mirror__date {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 100%;
  padding: 8px 0 16px;
  margin-bottom: 16px;
  font-family: var(--f-infant);
  font-weight: 500;
  font-size: 32px;
  line-height: 1.21;
  color: rgba(255, 255, 255, 0.85);
}

.mirror__date::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: calc(50% - 60px);
  width: 120px;
  height: 1px;
  background: url("../assets/img/date-divider.svg") center / 120px 1px no-repeat;
}

.mirror__date-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mirror__date-row i {
  width: 1px;
  height: 24px;
  border-left: 1px solid rgba(255, 255, 255, 0.8);
}

.mirror__countdown {
  padding: 12px 0;
  font-family: var(--f-infant);
  font-weight: 700;
  font-size: 36px;
  line-height: 1.21;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--c-gold);
}

.info__venue {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 28px;
  font-family: var(--f-garamond);
  font-size: 18px;
  line-height: 1.5;
  text-align: center;
  color: var(--c-ink);
}

.info__venue-zh {
  font-family: var(--cjk);
  font-size: 13px;
  letter-spacing: 2px;
  color: var(--c-muted);
}

/* ==========================================================================
   Schedule
   ========================================================================== */

.schedule {
  padding: 64px 24px 92px;
  background: var(--c-blush);
}

.schedule__card {
  position: relative;
  padding: 72px 26px 34px;
  border-radius: 171px 171px 20px 20px;
  background: var(--c-ivory);
  box-shadow: 0 34px 60px -34px rgba(74, 18, 25, 0.45);
}

.schedule__card::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(201, 164, 103, 0.55);
  border-radius: 163px 163px 14px 14px;
  pointer-events: none;
}

.sec-head--card {
  margin-bottom: 30px;
}

.timeline {
  position: relative;
}

.timeline__track {
  position: absolute;
  left: 11px;
  top: 12px;
  bottom: 30px;
  width: 1px;
  background: rgba(104, 26, 33, 0.14);
}

.timeline__fill {
  position: absolute;
  inset: 0;
  background: linear-gradient(var(--c-gold-soft), var(--c-rose));
  transform: scaleY(0);
  transform-origin: top;
}

.timeline__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline__item {
  position: relative;
  padding: 0 0 30px 42px;
}

.timeline__bloom {
  position: absolute;
  left: 0;
  top: 1px;
  width: 23px;
  height: 23px;
  color: #eeb2a5;
  transform: scale(0.2) rotate(-120deg);
  transition: transform 1.4s var(--ease-out) 0.3s;
}

.timeline__item.is-visible .timeline__bloom {
  transform: none;
}

.timeline__time {
  font-family: var(--f-infant);
  font-weight: 700;
  font-size: 15px;
  line-height: 1.6;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--c-gold-ink);
}

.timeline__title {
  font-family: var(--f-infant);
  font-weight: 700;
  font-size: 28px;
  line-height: 1.15;
  letter-spacing: 0.5px;
  color: var(--c-rose);
}

.timeline__desc {
  margin-top: 8px;
  font-family: var(--f-garamond);
  font-weight: 500;
  font-size: 17px;
  line-height: 1.45;
  color: rgba(50, 38, 33, 0.82);
}

/* ==========================================================================
   Traffic
   ========================================================================== */

.traffic {
  display: flex;
  flex-direction: column;
  gap: 34px;
  padding: 84px 24px 92px;
  background: linear-gradient(180deg, var(--c-ivory), #f8f1ea);
}

.map {
  position: relative;
  margin: 0;
}

/* Arched window onto a palette-toned static map; the map layer drifts
   slightly on scroll (parallax) and the pin drops in on reveal. */
.map__window {
  position: relative;
  display: block;
  height: 236px;
  overflow: hidden;
  border-radius: 50% 50% 8px 8px / 34% 34% 8px 8px;
  background: #f4e9e1;
  box-shadow: 0 26px 44px -30px rgba(74, 18, 25, 0.55);
  /* Safari: keep the rounded clip while the child layer is transformed. */
  -webkit-mask-image: -webkit-radial-gradient(white, black);
}

.map__window::after {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: inherit;
  pointer-events: none;
}

.map__layer {
  position: absolute;
  left: -6%;
  top: 50%;
  width: 112%;
  margin-top: -36%;
  aspect-ratio: 684 / 492;
}

.map__image {
  width: 100%;
  height: 100%;
}

.map__vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(75% 70% at 50% 46%, transparent 55%, rgba(74, 18, 25, 0.16) 100%);
  pointer-events: none;
}

.map__pin {
  position: absolute;
  width: 30px;
  height: 41px;
  margin: -41px 0 0 -15px;
}

.map__pin-icon {
  position: relative;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 4px 4px rgba(74, 18, 25, 0.3));
  opacity: 0;
  transform: translateY(-28px);
  transition:
    opacity 0.6s var(--ease-out) 0.5s,
    transform 0.9s cubic-bezier(0.34, 1.56, 0.64, 1) 0.5s;
}

.map.is-visible .map__pin-icon {
  opacity: 1;
  transform: none;
}

.map__pulse {
  position: absolute;
  left: 50%;
  bottom: -7px;
  width: 46px;
  height: 16px;
  margin-left: -23px;
  border: 1.5px solid rgba(104, 26, 33, 0.55);
  border-radius: 50%;
  opacity: 0;
  animation: pulse 2.6s ease-out 1.2s infinite;
  animation-play-state: paused;
}

.is-inview .map__pulse {
  animation-play-state: running;
}

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

.map__attr {
  position: absolute;
  right: 14px;
  bottom: 34px;
  padding: 1px 6px;
  border-radius: 2px;
  background: rgba(253, 249, 243, 0.8);
  font-family: system-ui, sans-serif;
  font-size: 8.5px;
  color: var(--c-muted);
  white-space: nowrap;
}

.map__card {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin: -26px 16px 0;
  padding: 18px 16px 16px;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 18px 36px -24px rgba(74, 18, 25, 0.45);
  text-align: center;
}

.map__venue {
  font-family: var(--f-garamond);
  font-weight: 600;
  font-size: 17px;
  line-height: 1.35;
  color: var(--c-ink);
}

.map__address {
  font-family: var(--cjk);
  font-size: 12.5px;
  line-height: 1.7;
  letter-spacing: 1px;
  color: var(--c-muted);
}

.map__links {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.map__link {
  padding: 7px 14px;
  border: 1px solid rgba(104, 26, 33, 0.35);
  border-radius: 999px;
  font-family: var(--f-garamond);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 1px;
  text-decoration: none;
  color: var(--c-burgundy);
  transition: background 0.3s, color 0.3s;
}

.map__link:hover,
.map__link:focus-visible {
  background: var(--c-burgundy);
  color: #fff;
}

.map > .bfly {
  z-index: 3;
}

/* Shuttle highlight card */
.shuttle {
  position: relative;
  padding: 30px 22px 26px;
  border-radius: 4px;
  color: #f6ebe0;
  text-align: center;
  background:
    radial-gradient(120% 90% at 18% 0%, rgba(140, 52, 54, 0.95), transparent 70%),
    var(--c-burgundy-deep);
  box-shadow: 0 30px 50px -32px rgba(74, 18, 25, 0.8);
}

.shuttle::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(215, 158, 59, 0.45);
  border-radius: 2px;
  pointer-events: none;
}

.shuttle__icon {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #f6ebe0;
}

.shuttle__eyebrow {
  margin-top: 12px;
  font-family: var(--f-garamond);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--c-gold);
}

.shuttle__title {
  margin-top: 4px;
  font-family: var(--cjk);
  font-weight: 500;
  font-size: 20px;
  letter-spacing: 4px;
}

.shuttle__route {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 22px 0 18px;
  padding: 0;
  list-style: none;
}

.shuttle__route::before {
  content: "";
  position: absolute;
  top: 5px;
  left: 12.5%;
  right: 12.5%;
  height: 1px;
  background: repeating-linear-gradient(90deg, rgba(246, 235, 224, 0.7) 0 4px, transparent 4px 8px);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.8s var(--ease-out) 0.3s;
}

.shuttle.is-visible .shuttle__route::before {
  transform: none;
}

.shuttle__route li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  font-family: var(--cjk);
  font-size: 12px;
  letter-spacing: 0.5px;
  opacity: 0;
  transform: translateY(6px);
  transition:
    opacity 0.7s var(--ease-out) calc(0.45s + var(--i) * 0.4s),
    transform 0.7s var(--ease-out) calc(0.45s + var(--i) * 0.4s);
}

.shuttle.is-visible .shuttle__route li {
  opacity: 1;
  transform: none;
}

.shuttle__dot {
  position: relative;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #f6ebe0;
  box-shadow: 0 0 0 3px rgba(215, 158, 59, 0.35);
}

.shuttle__route li:last-child .shuttle__dot {
  background: var(--c-gold);
}

.shuttle__desc {
  font-family: var(--cjk);
  font-size: 14.5px;
  line-height: 1.9;
  letter-spacing: 0.5px;
  text-align: left;
  color: rgba(246, 235, 224, 0.92);
}

.transport {
  display: flex;
  flex-direction: column;
  margin: -6px 0 0;
  padding: 0;
  list-style: none;
}

.transport__item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 15px 0;
  border-bottom: 1px solid var(--c-line);
}

.transport__item:last-child {
  border-bottom: 0;
}

.transport__icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(201, 164, 103, 0.45);
  border-radius: 50%;
  background: #fff;
}

.transport__title {
  font-family: var(--f-garamond);
  font-weight: 600;
  font-size: 17px;
  line-height: 26px;
  color: var(--c-ink);
}

/* Chinese lines with figures: Noto Serif TC's own Latin digits match the
   Han glyphs in height and stroke weight. */
.transport__desc {
  margin-top: 2px;
  font-family: var(--cjk);
  font-size: 13.5px;
  line-height: 1.7;
  letter-spacing: 0.3px;
  color: var(--c-muted);
}

/* ==========================================================================
   FAQ
   ========================================================================== */

.faq {
  padding: 84px 24px 92px;
  background: var(--c-blush);
}

.accordion {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 30px;
}

.accordion__item {
  border: 1px solid rgba(201, 164, 103, 0.38);
  border-radius: 14px;
  background: rgba(253, 249, 243, 0.94);
  box-shadow: 0 14px 30px -26px rgba(74, 18, 25, 0.6);
}

.accordion__question {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 17px 16px 17px 18px;
  font-family: var(--f-garamond);
  font-weight: 600;
  font-size: 16.5px;
  line-height: 1.45;
  color: var(--c-ink);
  list-style: none;
  cursor: pointer;
}

.accordion__question::-webkit-details-marker {
  display: none;
}

.accordion__num {
  flex: none;
  font-family: var(--f-infant);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 1px;
  color: var(--c-gold-ink);
}

.accordion__q {
  flex: 1;
}

.accordion__icon {
  position: relative;
  flex: none;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(104, 26, 33, 0.3);
  border-radius: 50%;
  transition: transform 0.5s var(--ease-out), background 0.3s;
}

.accordion__icon::before,
.accordion__icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 10px;
  height: 1px;
  margin: -0.5px 0 0 -5px;
  background: var(--c-burgundy);
}

.accordion__icon::after {
  transform: rotate(90deg);
}

.accordion__item[open] .accordion__icon {
  transform: rotate(135deg);
  background: rgba(215, 158, 59, 0.15);
}

.accordion__answer {
  padding: 0 20px 20px 47px;
  font-family: var(--cjk);
  font-size: 14.5px;
  line-height: 1.9;
  letter-spacing: 0.3px;
  color: var(--c-muted);
}

.accordion__answer p + p {
  margin-top: 10px;
}

.accordion__item[open] .accordion__answer {
  animation: unfold 0.6s var(--ease-out);
}

@keyframes unfold {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
}

/* ==========================================================================
   Footer + attendance link
   ========================================================================== */

.footer {
  padding: 196px 24px 132px;
  text-align: center;
  background: linear-gradient(180deg, var(--c-blush), var(--c-ivory) 45%);
}

.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.footer__thanks {
  max-width: 300px;
  font-family: var(--f-cormorant);
  font-size: 12px;
  line-height: 1.6;
  letter-spacing: 3.5px;
  text-transform: uppercase;
  color: var(--c-muted);
}

.footer__names {
  padding: 0 0.35em;
  font-family: var(--f-klice);
  font-size: 64px;
  line-height: 1.25;
  color: var(--c-burgundy);
}

.footer__date {
  font-family: var(--f-infant);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 5px;
  color: var(--c-gold-ink);
}

.footer__cta {
  margin-top: 14px;
  padding: 14px 34px;
  border: 1px solid rgba(104, 26, 33, 0.55);
  border-radius: 2px;
  font-family: var(--cjk);
  font-size: 15px;
  letter-spacing: 4px;
  text-decoration: none;
  color: var(--c-burgundy);
  background: rgba(104, 26, 33, 0.06);
  transition: background 0.3s, color 0.3s, border-color 0.3s;
}

.footer__cta:hover,
.footer__cta:focus-visible {
  background: var(--c-burgundy);
  border-color: var(--c-burgundy);
  color: #f5f1ea;
}

.footer__note {
  max-width: 290px;
  margin-top: 4px;
  font-family: var(--cjk);
  font-size: 12.5px;
  line-height: 1.8;
  letter-spacing: 0.5px;
  color: var(--c-muted);
}

.footer__credit {
  max-width: 280px;
  margin: 44px auto 0;
  text-wrap: balance;
  font-family: var(--f-cormorant);
  font-size: 11px;
  line-height: 1.5;
  color: var(--c-muted);
  opacity: 0.8;
}

.footer__credit a {
  text-decoration: none;
}

/* ==========================================================================
   Motion preferences
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }

  /* Butterflies rest with open wings, petals are hidden, nothing loops. */
  .bfly__fly,
  .bfly__wing,
  .map__pulse,
  .film__scroll span {
    animation: none !important;
  }

  .petals {
    display: none;
  }

  .timeline__fill {
    transform: none;
  }
}
