/* ==========================================================================
   Kwee & Wai Wedding Invitation - Dual-Tone Purple & White Rose Theme
   Lightweight GPU-accelerated animations for Free Hosting
   ========================================================================== */

:root {
  /* Dual-Tone Purple Palette (အရင့် + အနု ၂ ရောင်စပ်) */
  --purple-deep: #1e0b33;
  --purple-royal: #351659;
  --purple-mid: #5a318c;
  --purple-soft: #9b72cf;
  --lavender-mist: #d9c3f5;
  --lavender-pale: #f5eeff;
  --paper-ivory: #fcf9ff;

  /* Accents */
  --rose-white: #ffffff;
  --gold-foil: #e7cfa1;
  --gold-deep: #b89254;
  --text-light: #f9f5ff;
  --text-muted-light: #dfd0f2;
  --text-dark: #25103d;
  --text-muted-dark: #5b4179;

  /* Typography */
  --font-my: "Noto Sans Myanmar", "Padauk", system-ui, -apple-system, sans-serif;
  --font-serif: "Cormorant Garamond", Georgia, serif;

  /* Elevation & Emboss */
  --emboss-shadow:
    0 20px 55px rgba(17, 5, 32, 0.42),
    inset 0 2px 3px rgba(255, 255, 255, 0.9),
    inset 0 -3px 8px rgba(114, 72, 166, 0.18);
  --glass-shadow: 0 14px 38px rgba(15, 4, 28, 0.34);

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

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  overflow-x: clip;
  max-width: 100%;
}

body {
  margin: 0;
  font-family: var(--font-my);
  color: var(--text-light);
  background: linear-gradient(
    165deg,
    var(--purple-deep) 0%,
    var(--purple-royal) 26%,
    var(--purple-mid) 56%,
    #7850ad 80%,
    var(--purple-royal) 100%
  );
  background-attachment: fixed;
  line-height: 1.85;
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

body.intro-locked {
  overflow: hidden;
  height: 100dvh;
}

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

button {
  font-family: inherit;
  cursor: pointer;
}

.svg-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}

.container {
  width: min(1040px, calc(100% - 2rem));
  margin-inline: auto;
}

.section {
  position: relative;
  padding: clamp(3.5rem, 7vw, 6rem) 0;
  scroll-margin-top: 4.5rem;
  overflow-x: clip;
  z-index: 2;
}

header[id] {
  scroll-margin-top: 4.5rem;
}

/* ==========================================================================
   PETAL CANVAS & SCROLL PROGRESS
   ========================================================================== */
#petal-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 5;
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
  z-index: 60;
}

.scroll-progress__bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--lavender-mist), var(--rose-white), var(--gold-foil));
  transition: width 0.1s linear;
}

/* ==========================================================================
   STAGE 1: FULL-SCREEN 3D REALISTIC EMBOSSED ENVELOPE & WAX SEAL
   ========================================================================== */
.envelope-intro {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: clamp(0rem, 2.5vw, 1.5rem);
  background:
    radial-gradient(circle at 25% 18%, rgba(183, 141, 232, 0.32), transparent 55%),
    radial-gradient(circle at 80% 82%, rgba(155, 114, 207, 0.25), transparent 55%),
    linear-gradient(155deg, #160626 0%, #311254 50%, #5a318c 100%);
  transition: opacity 0.9s var(--ease-japanese), transform 0.9s var(--ease-japanese), visibility 0.9s;
}

.envelope-intro.is-fading {
  opacity: 0;
  transform: scale(1.06);
  pointer-events: none;
  visibility: hidden;
}

.envelope-stage {
  position: relative;
  width: min(520px, 100vw);
  height: min(760px, 100dvh);
  display: grid;
  place-items: center;
  perspective: 1900px;
}

/* Realistic Full-Viewport 3D Embossed Envelope */
.envelope {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  border-radius: 18px;
  box-shadow: 0 34px 70px rgba(9, 2, 18, 0.72);
  overflow: visible;
}

/* Back Interior Lining */
.envelope__back {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(170deg, #2d114e 0%, #1d0935 100%);
  border: 1px solid rgba(231, 207, 161, 0.28);
  overflow: hidden;
}

.envelope__lining-pattern {
  position: absolute;
  inset: 14px;
  border-radius: 12px;
  border: 1px solid rgba(231, 207, 161, 0.22);
  background-image: radial-gradient(rgba(235, 217, 255, 0.14) 1px, transparent 1px);
  background-size: 16px 16px;
}

/* Inner Sliding Embossed Invitation Card */
.envelope__letter {
  position: absolute;
  left: 6%;
  right: 6%;
  top: 12%;
  bottom: 10%;
  border-radius: 14px;
  background: linear-gradient(172deg, #ffffff 0%, #f1e4ff 100%);
  box-shadow: 0 12px 35px rgba(15, 4, 28, 0.45);
  padding: 0.9rem;
  z-index: 2;
  transform: translate3d(0, 8%, 0) scale(0.95);
  transition: transform 1.05s var(--ease-japanese) 0.28s;
}

.envelope__letter-inner {
  height: 100%;
  border: 1.5px solid rgba(132, 90, 186, 0.34);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text-dark);
  padding: 1.25rem;
  box-shadow: inset 0 2px 6px rgba(155, 114, 207, 0.22);
}

.envelope__letter-rose {
  width: 68px;
  height: 68px;
  margin-bottom: 0.65rem;
}

.envelope__letter-kicker {
  margin: 0 0 0.45rem;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  color: var(--purple-mid);
}

.envelope__letter-names {
  margin: 0 0 0.75rem;
  font-size: clamp(1.2rem, 4.5vw, 1.55rem);
  font-weight: 700;
  line-height: 1.55;
  color: var(--purple-royal);
}

.envelope__letter-names span {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--gold-deep);
}

.envelope__letter-date {
  margin: 0.2rem 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--purple-mid);
}

.envelope__letter-hall {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted-dark);
}

/* Left & Right 3D Triangular Paper Folds */
.envelope__fold-left,
.envelope__fold-right {
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: inherit;
  pointer-events: none;
}

.envelope__fold-left {
  clip-path: polygon(0 10%, 54% 52%, 0 98%);
  background: linear-gradient(125deg, #a882db 0%, #6d42a8 65%, #482174 100%);
  box-shadow: inset 2px 0 6px rgba(255, 255, 255, 0.3);
}

.envelope__fold-right {
  clip-path: polygon(100% 10%, 46% 52%, 100% 98%);
  background: linear-gradient(235deg, #9d75d4 0%, #653a9f 65%, #3f1b68 100%);
  box-shadow: inset -2px 0 6px rgba(255, 255, 255, 0.25);
}

/* Bottom Front Embossed Pocket */
.envelope__pocket {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 54%;
  z-index: 4;
  border-radius: 0 0 18px 18px;
  overflow: hidden;
  clip-path: polygon(0 20%, 50% 0%, 100% 20%, 100% 100%, 0 100%);
  background:
    radial-gradient(circle at 50% 16%, rgba(255, 255, 255, 0.22), transparent 55%),
    linear-gradient(168deg, #bf9ee9 0%, #8256be 48%, #472074 100%);
  box-shadow:
    inset 0 3px 6px rgba(255, 255, 255, 0.48),
    inset 0 -10px 24px rgba(24, 6, 44, 0.55);
  pointer-events: none;
}

.envelope__emboss-frame {
  position: absolute;
  left: 14px;
  right: 14px;
  top: 22%;
  bottom: 14px;
  border-radius: 0 0 12px 12px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-top: none;
}

.envelope__rose {
  position: absolute;
  width: clamp(88px, 22vw, 118px);
  height: auto;
  opacity: 0.92;
  filter: drop-shadow(0 4px 10px rgba(24, 6, 44, 0.42));
}

.envelope__rose--bl {
  left: 6px;
  bottom: 6px;
  transform: rotate(-90deg);
}

.envelope__rose--br {
  right: 6px;
  bottom: 6px;
  transform: scaleX(-1) rotate(-90deg);
}

.envelope__pocket-text {
  position: absolute;
  left: 10%;
  right: 10%;
  bottom: 24%;
  text-align: center;
  color: #fcf7ff;
}

.envelope__to-badge {
  display: inline-block;
  font-size: clamp(0.76rem, 2.8vw, 0.88rem);
  padding: 0.2rem 0.85rem;
  border-radius: 999px;
  background: rgba(31, 10, 56, 0.34);
  border: 1px solid rgba(255, 255, 255, 0.25);
  margin-bottom: 0.55rem;
}

.envelope__couple-front {
  margin: 0;
  font-size: clamp(0.95rem, 3.6vw, 1.15rem);
  font-weight: 700;
  text-shadow: 0 2px 10px rgba(20, 4, 38, 0.55);
}

.envelope__date-front {
  margin: 0.2rem 0 0;
  font-size: 0.84rem;
  color: var(--gold-foil);
}

/* Dual-Faced 3D Top Flap */
.envelope__flap {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 55%;
  z-index: 5;
  transform-origin: top center;
  transform-style: preserve-3d;
  transform: rotateX(0deg);
  transition: transform 0.95s var(--ease-japanese);
  pointer-events: none;
}

.envelope__flap-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  clip-path: polygon(0 0, 100% 0, 100% 24%, 50% 98%, 0 24%);
  border-radius: 18px 18px 0 0;
}

.envelope__flap-face--outer {
  background:
    radial-gradient(circle at 50% 22%, rgba(255, 255, 255, 0.24), transparent 56%),
    linear-gradient(180deg, #c6a5ef 0%, #7d50b9 64%, #492177 100%);
  box-shadow:
    inset 0 2px 4px rgba(255, 255, 255, 0.55),
    0 12px 26px rgba(17, 4, 34, 0.42);
}

.envelope__flap-border {
  position: absolute;
  inset: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.4);
}

.envelope__flap-header {
  position: relative;
  z-index: 2;
  padding-top: clamp(2.2rem, 8vh, 4rem);
  text-align: center;
}

.envelope__flap-kicker {
  display: inline-block;
  padding: 0.25rem 1.15rem;
  border-radius: 999px;
  font-size: 0.88rem;
  letter-spacing: 0.14em;
  color: var(--gold-foil);
  background: rgba(29, 9, 53, 0.35);
  border: 1px solid rgba(231, 207, 161, 0.48);
}

.envelope__flap-face--inner {
  transform: rotateX(180deg);
  background: linear-gradient(180deg, #eadcf9 0%, #ccb2ee 100%);
}

.envelope__flap-inner-lining {
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(124, 82, 178, 0.3);
}

.envelope__cord {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* Tactile 3D Wax Seal (ဖယောင်းတံဆိပ်) */
.wax-seal {
  position: absolute;
  left: 50%;
  top: 52%;
  transform: translate(-50%, -50%) translateZ(24px);
  z-index: 7;
  width: 104px;
  height: 104px;
  border: 0;
  background: transparent;
  padding: 0;
  display: grid;
  place-items: center;
  transition: transform 0.55s var(--ease-japanese), opacity 0.45s ease;
}

.wax-seal:hover .wax-seal__body,
.wax-seal:focus-visible .wax-seal__body {
  transform: scale(1.08);
}

.wax-seal:focus-visible {
  outline: 2px solid var(--gold-foil);
  outline-offset: 6px;
  border-radius: 50%;
}

.wax-seal__pulse {
  position: absolute;
  inset: 2px;
  border-radius: 50%;
  border: 2px solid rgba(231, 207, 161, 0.65);
  animation: sealPulse 2.3s ease-out infinite;
}

@keyframes sealPulse {
  0% { transform: scale(0.92); opacity: 0.92; }
  100% { transform: scale(1.48); opacity: 0; }
}

.wax-seal__body {
  position: relative;
  width: 90px;
  height: 90px;
  border-radius: 47% 53% 49% 51% / 51% 47% 53% 49%;
  background:
    radial-gradient(circle at 32% 28%, #a670df 0%, #5b2893 48%, #2e0d53 100%);
  box-shadow:
    0 12px 28px rgba(14, 3, 28, 0.68),
    inset 0 3px 6px rgba(255, 255, 255, 0.45),
    inset 0 -6px 12px rgba(22, 4, 41, 0.78);
  display: grid;
  place-items: center;
  transition: transform 0.35s var(--ease-japanese);
}

.wax-seal__rim {
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  border: 1.5px solid rgba(247, 232, 200, 0.65);
  box-shadow:
    inset 0 2px 4px rgba(18, 4, 34, 0.65),
    0 1px 2px rgba(255, 255, 255, 0.35);
}

.wax-seal__crest {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.wax-seal__rose-icon {
  width: 30px;
  height: 30px;
  filter: drop-shadow(0 1px 2px rgba(20, 5, 36, 0.5));
}

.wax-seal__monogram {
  font-size: 0.84rem;
  font-weight: 700;
  color: #fff6e5;
  text-shadow: 0 1px 2px rgba(25, 6, 46, 0.8);
  margin-top: 2px;
}

.envelope__open-cue {
  position: absolute;
  left: 50%;
  bottom: max(1.35rem, env(safe-area-inset-bottom, 1.35rem));
  transform: translateX(-50%) translateZ(20px);
  z-index: 7;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  white-space: nowrap;
  padding: 0.62rem 1.25rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(29, 9, 53, 0.62);
  backdrop-filter: blur(8px);
  color: var(--rose-white);
  font-size: 0.88rem;
  transition: opacity 0.35s ease, transform 0.25s ease;
}

.envelope__open-cue:hover {
  transform: translateX(-50%) translateZ(20px) translateY(-2px);
}

.open-hint-btn__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold-foil);
  box-shadow: 0 0 10px var(--gold-foil);
}

/* Opened 3D Envelope Animation State */
.envelope.is-open .wax-seal {
  transform: translate(-50%, -68%) translateZ(40px) scale(0.72);
  opacity: 0;
  pointer-events: none;
}

.envelope.is-open .envelope__open-cue {
  opacity: 0;
  pointer-events: none;
}

.envelope.is-open .envelope__flap {
  transform: rotateX(176deg);
  z-index: 1;
}

.envelope.is-open .envelope__letter {
  z-index: 6;
  transform: translate3d(0, -14%, 50px) scale(1.04);
}

/* ==========================================================================
   STAGE 2: MAIN INVITATION & FLOATING NAV
   ========================================================================== */
.invitation-main {
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
  opacity: 0;
  transition: opacity 0.85s var(--ease-japanese);
}

.invitation-main.is-visible {
  opacity: 1;
}

.quick-nav {
  position: sticky;
  top: 0.75rem;
  z-index: 50;
  width: fit-content;
  max-width: min(calc(100vw - 1.2rem), 760px);
  margin: 0 auto;
  padding: 0.42rem 0.65rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  overflow-x: auto;
  scrollbar-width: none;
  border-radius: 999px;
  background: rgba(34, 13, 58, 0.74);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(217, 195, 245, 0.22);
  box-shadow: 0 10px 28px rgba(12, 3, 24, 0.35);
}

.quick-nav::-webkit-scrollbar {
  display: none;
}

.quick-nav a {
  color: var(--lavender-pale);
  text-decoration: none;
  font-size: 0.82rem;
  white-space: nowrap;
  padding: 0.3rem 0.72rem;
  border-radius: 999px;
  transition: background 0.25s ease, color 0.25s ease;
}

.quick-nav a:hover,
.quick-nav a.is-active {
  background: rgba(217, 195, 245, 0.22);
  color: var(--rose-white);
}

/* ==========================================================================
   HERO SECTION (Dual-Tone Purple + White Roses + Arched Portrait)
   ========================================================================== */
.hero {
  position: relative;
  min-height: 92dvh;
  display: grid;
  place-items: center;
  padding: 3rem 0 4rem;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 18%, rgba(203, 169, 244, 0.28), transparent 46%),
    radial-gradient(circle at 84% 72%, rgba(164, 118, 224, 0.26), transparent 50%);
}

.hero__rose {
  position: absolute;
  width: clamp(110px, 18vw, 180px);
  height: auto;
  opacity: 0.88;
  pointer-events: none;
  filter: drop-shadow(0 6px 14px rgba(17, 4, 34, 0.35));
}

.hero__rose--tl {
  top: 0.5rem;
  left: 0.5rem;
}

.hero__rose--tr {
  top: 0.5rem;
  right: 0.5rem;
  transform: scaleX(-1);
}

.hero__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero__blessing {
  margin: 0 0 0.25rem;
  font-size: 0.9rem;
  letter-spacing: 0.14em;
  color: var(--gold-foil);
}

.hero__title {
  margin: 0 0 1.8rem;
  font-size: clamp(1.35rem, 4vw, 2.05rem);
  font-weight: 600;
  color: var(--rose-white);
  text-shadow: 0 4px 20px rgba(16, 4, 31, 0.45);
}

.hero__portrait-wrap {
  position: relative;
  width: min(300px, 74vw);
  margin-bottom: 1.8rem;
}

.hero__arch-frame {
  position: relative;
  border-radius: 170px 170px 24px 24px;
  padding: 9px;
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.65), rgba(190, 152, 238, 0.35));
  box-shadow:
    0 24px 55px rgba(14, 3, 29, 0.52),
    inset 0 2px 4px rgba(255, 255, 255, 0.6);
}

.hero__portrait {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center top;
  border-radius: 162px 162px 18px 18px;
}

.hero__arch-border {
  position: absolute;
  inset: 16px;
  border-radius: 155px 155px 14px 14px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  pointer-events: none;
}

.hero__arch-rose {
  position: absolute;
  width: 64px;
  height: 64px;
  bottom: -14px;
  filter: drop-shadow(0 6px 12px rgba(21, 6, 39, 0.4));
  animation: gentleSway 6s ease-in-out infinite;
}

.hero__arch-rose--l {
  left: -18px;
}

.hero__arch-rose--r {
  right: -18px;
  transform: scaleX(-1);
  animation-delay: -3s;
}

@keyframes gentleSway {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-4px) rotate(3deg); }
}

.hero__couple {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.4rem 0.9rem;
  margin-bottom: 1.15rem;
}

.hero__name {
  font-size: clamp(1.3rem, 4.2vw, 2.15rem);
  font-weight: 700;
  color: var(--rose-white);
  text-shadow: 0 3px 16px rgba(17, 4, 32, 0.45);
}

.hero__amp {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.7rem, 5vw, 2.5rem);
  color: var(--gold-foil);
}

.hero__meta-pill {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.35rem 0.7rem;
  padding: 0.65rem 1.35rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.11);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(235, 217, 255, 0.28);
  color: var(--lavender-pale);
  font-size: 0.9rem;
  margin-bottom: 1.8rem;
}

.hero__meta-pill .dot {
  color: var(--gold-foil);
}

.scroll-cue {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  color: var(--lavender-mist);
  text-decoration: none;
  font-size: 0.85rem;
  opacity: 0.9;
}

.scroll-cue svg {
  animation: bounceCue 1.9s ease-in-out infinite;
}

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

/* ==========================================================================
   SECTION HEADINGS & DIVIDERS
   ========================================================================== */
.section-head {
  text-align: center;
  margin-bottom: 2.2rem;
}

.section-head__eyebrow {
  margin: 0 0 0.25rem;
  font-size: 0.86rem;
  letter-spacing: 0.1em;
  color: var(--purple-mid);
}

.section-head__title {
  margin: 0;
  font-size: clamp(1.35rem, 3.6vw, 1.9rem);
  font-weight: 700;
  color: var(--purple-royal);
}

.section-head__sub {
  margin: 0.55rem auto 0;
  max-width: 600px;
  font-size: 0.95rem;
  color: var(--lavender-pale);
}

.section-head__sub--dark {
  color: var(--text-muted-dark);
}

.section-head--light .section-head__eyebrow {
  color: var(--gold-foil);
}

.section-head--light .section-head__title {
  color: var(--rose-white);
}

.rose-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  margin: 1rem auto 0;
  width: min(280px, 75%);
}

.rose-divider__line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(90, 49, 140, 0.45), transparent);
}

.rose-divider--light .rose-divider__line {
  background: linear-gradient(90deg, transparent, rgba(231, 207, 161, 0.65), transparent);
}

/* ==========================================================================
   EMBOSSED INVITATION CARD & FAMILY LINEAGE
   ========================================================================== */
.embossed-card {
  position: relative;
  border-radius: 24px;
  padding: clamp(2.2rem, 5vw, 4rem) clamp(1.35rem, 4.5vw, 3.5rem);
  background:
    radial-gradient(circle at 15% 12%, rgba(223, 198, 250, 0.52), transparent 45%),
    radial-gradient(circle at 85% 88%, rgba(215, 187, 246, 0.42), transparent 45%),
    linear-gradient(170deg, #ffffff 0%, var(--lavender-pale) 100%);
  color: var(--text-dark);
  box-shadow: var(--emboss-shadow);
  border: 1px solid rgba(255, 255, 255, 0.85);
  overflow: hidden;
}

.embossed-card__inner-border {
  position: absolute;
  inset: 14px;
  border-radius: 16px;
  border: 1.5px solid rgba(124, 82, 178, 0.24);
  box-shadow: inset 0 1px 4px rgba(90, 49, 140, 0.1);
  pointer-events: none;
}

.embossed-card__rose {
  position: absolute;
  width: clamp(82px, 14vw, 128px);
  height: auto;
  pointer-events: none;
  opacity: 0.88;
}

.embossed-card__rose--tl {
  top: 4px;
  left: 4px;
}

.embossed-card__rose--br {
  right: 4px;
  bottom: 4px;
  transform: rotate(180deg);
}

.lineage-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1.75rem 2rem;
}

.lineage-block {
  text-align: center;
  padding: 1.2rem 1rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(155, 114, 207, 0.22);
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.9);
}

.lineage-block__role {
  display: inline-block;
  padding: 0.16rem 0.85rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--rose-white);
  background: linear-gradient(135deg, var(--purple-royal), var(--purple-soft));
  margin-bottom: 0.85rem;
}

.lineage-block__family {
  margin: 0 0 0.75rem;
  font-size: 0.94rem;
  color: var(--text-muted-dark);
}

.lineage-block__family strong {
  color: var(--text-dark);
  font-weight: 600;
}

.lineage-block__name {
  margin: 0.9rem 0 0;
  font-size: clamp(1.22rem, 3vw, 1.5rem);
  font-weight: 700;
  color: var(--purple-royal);
}

.lineage-amp {
  display: grid;
  place-items: center;
}

.lineage-amp span {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--purple-royal), var(--purple-soft));
  color: var(--rose-white);
  font-size: 1rem;
  font-weight: 600;
  box-shadow: 0 8px 20px rgba(72, 33, 117, 0.3);
}

.invitation-note {
  position: relative;
  z-index: 1;
  margin-top: 2.1rem;
  padding-top: 1.5rem;
  border-top: 1px dashed rgba(124, 82, 178, 0.35);
  text-align: center;
}

.invitation-note p {
  margin: 0;
  font-size: 1.03rem;
  font-weight: 500;
  color: var(--purple-royal);
}

/* ==========================================================================
   COUNTDOWN TIMER
   ========================================================================== */
.countdown-section {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(217, 195, 245, 0.08), rgba(255, 255, 255, 0.02));
}

.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(0.7rem, 2.4vw, 1.35rem);
  max-width: 720px;
  margin-inline: auto;
}

.countdown-card {
  position: relative;
  padding: clamp(1.1rem, 3vw, 1.8rem) 0.5rem;
  border-radius: 18px;
  text-align: center;
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.16), rgba(155, 114, 207, 0.12));
  backdrop-filter: blur(10px);
  border: 1px solid rgba(235, 217, 255, 0.3);
  box-shadow: var(--glass-shadow);
}

.countdown-card__num {
  display: block;
  font-size: clamp(1.7rem, 5.2vw, 2.75rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--rose-white);
  text-shadow: 0 2px 12px rgba(21, 5, 39, 0.45);
}

.countdown-card__label {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.9rem;
  color: var(--gold-foil);
}

.countdown-status {
  text-align: center;
  margin: 1.25rem 0 0;
  color: var(--lavender-pale);
  font-size: 0.95rem;
}

/* ==========================================================================
   EVENT DETAILS & ACTIONS
   ========================================================================== */
.details-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.detail-card {
  padding: 2rem 1.4rem;
  border-radius: 20px;
  text-align: center;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.14), rgba(133, 88, 189, 0.16));
  backdrop-filter: blur(10px);
  border: 1px solid rgba(235, 217, 255, 0.28);
  box-shadow: var(--glass-shadow);
  transition: transform 0.35s var(--ease-japanese);
}

.detail-card:hover {
  transform: translateY(-4px);
}

.detail-card__icon {
  width: 58px;
  height: 58px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--gold-foil);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(231, 207, 161, 0.35);
}

.detail-card h3 {
  margin: 0 0 0.45rem;
  font-size: 1rem;
  color: var(--gold-foil);
}

.detail-card__main {
  margin: 0 0 0.3rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--rose-white);
}

.detail-card__sub {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted-light);
}

.details-actions {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.9rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.85rem 1.5rem;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.25s var(--ease-japanese), box-shadow 0.25s ease, background 0.25s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: linear-gradient(135deg, #6b3ca5 0%, #3d1869 100%);
  color: var(--rose-white);
  border-color: rgba(231, 207, 161, 0.45);
  box-shadow: 0 10px 26px rgba(24, 7, 46, 0.45);
}

.btn-primary:hover {
  box-shadow: 0 14px 32px rgba(24, 7, 46, 0.6);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.1);
  color: var(--rose-white);
  border-color: rgba(235, 217, 255, 0.38);
  backdrop-filter: blur(8px);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.18);
}

.btn-full {
  width: 100%;
}

/* ==========================================================================
   CURATED JAPANESE EDITORIAL PHOTO GALLERY & INTERLEAVED FLOW
   ========================================================================== */
.gallery-section {
  overflow: hidden;
}

.editorial-showcase {
  margin-bottom: 1.5rem;
}

.editorial-row {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 1rem;
  align-items: stretch;
}

.editorial-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.editorial-duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.editorial-duo--tall {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.editorial-card {
  position: relative;
  padding: 6px;
  border-radius: 18px;
  border: 1px solid rgba(235, 217, 255, 0.28);
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.2), rgba(155, 114, 207, 0.16));
  box-shadow: var(--glass-shadow);
  overflow: hidden;
  aspect-ratio: 3 / 4;
}

.editorial-card--tall {
  aspect-ratio: auto;
  min-height: 100%;
}

.editorial-card--wide {
  aspect-ratio: 3 / 2;
}

.editorial-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  border-radius: 13px;
  transition: transform 0.75s var(--ease-japanese);
}

.editorial-card:hover img {
  transform: scale(1.05);
}

.editorial-card__badge {
  position: absolute;
  right: 14px;
  bottom: 14px;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--rose-white);
  background: rgba(29, 9, 53, 0.68);
  border: 1px solid rgba(231, 207, 161, 0.45);
  backdrop-filter: blur(6px);
}

/* Interleaved Couple Name Banner */
.name-interlude {
  padding: clamp(2rem, 5vw, 3.2rem) 0 1.2rem;
}

.name-interlude__inner {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.name-interlude__line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(231, 207, 161, 0.75), transparent);
}

.name-interlude__center {
  text-align: center;
  flex-shrink: 0;
  padding: 0.75rem 1.25rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(235, 217, 255, 0.24);
  backdrop-filter: blur(8px);
}

.name-interlude__names {
  margin: 0.25rem 0 0;
  font-size: clamp(1rem, 3.5vw, 1.38rem);
  font-weight: 700;
  color: var(--rose-white);
}

.name-interlude__names span {
  color: var(--gold-foil);
  margin: 0 0.25rem;
}

.name-interlude__date {
  margin: 0.2rem 0 0;
  font-size: 0.84rem;
  color: var(--gold-foil);
}

/* Interleaved Countdown */
.countdown-interlude {
  padding: clamp(2rem, 4.5vw, 3.4rem) 0;
  margin: 1rem 0 2.2rem;
  scroll-margin-top: 4.5rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(217, 195, 245, 0.1), rgba(255, 255, 255, 0.03));
  border-block: 1px solid rgba(235, 217, 255, 0.16);
}

/* Right-to-Left Sliding Filmstrip (ညာဘက်ဘေးကနေ ဘယ်ဘက်ဘေး တိုးလာ) */
.filmstrip-wrap {
  margin-top: clamp(2.4rem, 5vw, 3.5rem);
}

.filmstrip-hint {
  margin: 0 0 0.9rem;
  text-align: center;
  font-size: 0.86rem;
  color: var(--gold-foil);
}

.filmstrip-viewport {
  width: 100%;
  overflow: hidden;
  padding: 0.5rem 0;
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}

.filmstrip-track {
  display: flex;
  gap: 0.9rem;
  width: max-content;
  will-change: transform;
  animation: marqueeRTL 38s linear infinite;
}

.filmstrip-viewport:hover .filmstrip-track,
.filmstrip-viewport:active .filmstrip-track {
  animation-play-state: paused;
}

@keyframes marqueeRTL {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-50%, 0, 0); }
}

.filmstrip-slide {
  flex: 0 0 auto;
  width: clamp(148px, 34vw, 210px);
  height: clamp(200px, 46vw, 280px);
  padding: 5px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 12px 28px rgba(15, 4, 28, 0.4);
}

.filmstrip-slide--wide {
  width: clamp(240px, 56vw, 340px);
}

.filmstrip-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  border-radius: 11px;
}

.wish-card--featured {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(242, 230, 255, 0.9));
  border: 1.5px solid rgba(184, 146, 84, 0.48);
  box-shadow: 0 8px 22px rgba(72, 33, 117, 0.12);
}

/* ==========================================================================
   RSVP FORM & WISHES WALL
   ========================================================================== */
.embossed-card--rsvp {
  max-width: 780px;
  margin-inline: auto;
}

.rsvp-form {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--purple-royal);
}

.req {
  color: #a82b6f;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.78rem 0.95rem;
  border-radius: 12px;
  border: 1.5px solid rgba(124, 82, 178, 0.28);
  background: rgba(255, 255, 255, 0.88);
  color: var(--text-dark);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--purple-mid);
  box-shadow: 0 0 0 4px rgba(155, 114, 207, 0.2);
}

.radio-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.radio-pill {
  position: relative;
  cursor: pointer;
}

.radio-pill input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.radio-pill span {
  display: inline-block;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  border: 1.5px solid rgba(124, 82, 178, 0.3);
  background: rgba(255, 255, 255, 0.75);
  color: var(--purple-royal);
  font-size: 0.88rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.radio-pill input:checked + span {
  background: linear-gradient(135deg, var(--purple-royal), var(--purple-mid));
  color: var(--rose-white);
  border-color: transparent;
  box-shadow: 0 6px 16px rgba(72, 33, 117, 0.25);
}

.rsvp-feedback {
  min-height: 1.4rem;
  font-size: 0.92rem;
  text-align: center;
  color: var(--purple-royal);
}

.rsvp-feedback.is-success {
  padding: 0.8rem 1rem;
  border-radius: 12px;
  background: rgba(132, 90, 186, 0.14);
  border: 1px solid rgba(132, 90, 186, 0.35);
}

.rsvp-feedback.is-error {
  padding: 0.75rem 1rem;
  border-radius: 12px;
  background: rgba(190, 42, 95, 0.12);
  color: #8f1b47;
}

/* Wishes Wall */
.wishes-wall {
  position: relative;
  z-index: 1;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px dashed rgba(124, 82, 178, 0.3);
}

.wishes-wall__title {
  margin: 0 0 1rem;
  font-size: 1.05rem;
  color: var(--purple-royal);
  text-align: center;
}

.wishes-list {
  display: grid;
  gap: 0.75rem;
}

.wish-card {
  padding: 0.95rem 1.15rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(155, 114, 207, 0.22);
}

.wish-card__text {
  margin: 0 0 0.3rem;
  font-size: 0.92rem;
  color: var(--text-dark);
}

.wish-card__author {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--purple-mid);
}

/* ==========================================================================
   KPAY QR GIFT SECTION (At the End)
   ========================================================================== */
.kpay-card {
  position: relative;
  max-width: 540px;
  margin-inline: auto;
  padding: clamp(2rem, 5vw, 3rem) 1.5rem;
  border-radius: 24px;
  text-align: center;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.15), rgba(155, 114, 207, 0.14));
  backdrop-filter: blur(12px);
  border: 1px solid rgba(235, 217, 255, 0.32);
  box-shadow: var(--glass-shadow);
}

.kpay-card__rose {
  width: 56px;
  height: 56px;
  margin: 0 auto 0.5rem;
}

.kpay-card .section-head__eyebrow {
  color: var(--gold-foil);
}

.kpay-card__title {
  margin: 0.25rem 0 0.75rem;
  font-size: clamp(1.2rem, 3.4vw, 1.55rem);
  color: var(--rose-white);
}

.kpay-card__desc {
  margin: 0 auto 1.5rem;
  font-size: 0.93rem;
  color: var(--text-muted-light);
}

.kpay-qr-frame {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  padding: 0.75rem;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 18px 38px rgba(13, 3, 25, 0.45);
  transition: transform 0.3s var(--ease-japanese);
}

.kpay-qr-frame:hover {
  transform: scale(1.03);
}

.kpay-qr-frame img {
  width: min(230px, 60vw);
  border-radius: 10px;
}

.kpay-qr-frame__hint {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--purple-royal);
}

.kpay-card__account {
  margin: 1rem 0 0.25rem;
  font-size: 0.96rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--gold-foil);
}

.kpay-card__phone {
  margin: 0 0 1.25rem;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--rose-white);
}

.kpay-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

/* ==========================================================================
   FOOTER & FLOATING MUSIC BUTTON
   ========================================================================== */
.footer {
  padding: 2.5rem 0 5rem;
  text-align: center;
  border-top: 1px solid rgba(217, 195, 245, 0.16);
}

.footer__rose {
  width: 46px;
  height: 46px;
  margin: 0 auto 0.65rem;
}

.footer__thanks {
  margin: 0 auto 0.9rem;
  max-width: 580px;
  font-size: 0.94rem;
  color: var(--text-muted-light);
}

.footer__names {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--rose-white);
}

.footer__date {
  margin: 0.25rem 0 0;
  font-size: 0.9rem;
  color: var(--gold-foil);
}

/* Floating Music Button */
.music-fab {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 80;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.65rem 1.05rem;
  border-radius: 999px;
  border: 1px solid rgba(231, 207, 161, 0.5);
  background: rgba(36, 13, 62, 0.88);
  backdrop-filter: blur(10px);
  color: var(--rose-white);
  box-shadow: 0 10px 28px rgba(11, 2, 22, 0.55);
  transition: transform 0.25s ease, opacity 0.35s ease;
}

.music-fab.is-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(14px);
}

.music-fab__bars {
  display: inline-flex;
  align-items: flex-end;
  gap: 2.5px;
  height: 15px;
}

.music-fab__bars i {
  display: block;
  width: 2.5px;
  height: 5px;
  border-radius: 2px;
  background: var(--gold-foil);
}

.music-fab.is-playing .music-fab__bars i {
  animation: eqBar 0.9s ease-in-out infinite alternate;
}

.music-fab.is-playing .music-fab__bars i:nth-child(2) { animation-delay: 0.2s; }
.music-fab.is-playing .music-fab__bars i:nth-child(3) { animation-delay: 0.4s; }
.music-fab.is-playing .music-fab__bars i:nth-child(4) { animation-delay: 0.15s; }

@keyframes eqBar {
  from { height: 4px; }
  to { height: 15px; }
}

.music-fab__label {
  font-size: 0.82rem;
  font-weight: 600;
}

/* ==========================================================================
   LIGHTBOX MODAL
   ========================================================================== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  background: rgba(15, 4, 28, 0.92);
  backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox__stage {
  max-width: min(90vw, 880px);
  max-height: 85dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
}

.lightbox__stage img {
  max-width: 100%;
  max-height: 76dvh;
  border-radius: 12px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65);
}

.lightbox__caption {
  margin: 0;
  font-size: 0.9rem;
  color: var(--lavender-pale);
}

.lightbox__close,
.lightbox__nav {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(45, 18, 76, 0.72);
  color: var(--rose-white);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  font-size: 1.4rem;
}

.lightbox__close {
  top: 1rem;
  right: 1rem;
}

.lightbox__nav--prev {
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox__nav--next {
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
}

/* ==========================================================================
   JAPANESE SCROLL-TRIGGERED REVEAL ANIMATIONS
   ========================================================================== */
.reveal-up,
.reveal-left,
.reveal-right,
.reveal-from-right,
.reveal-from-left,
.reveal-scale,
.reveal-fade {
  opacity: 0;
  will-change: transform, opacity;
  transition:
    opacity 0.9s var(--ease-japanese),
    transform 0.9s var(--ease-japanese);
}

.reveal-up { transform: translateY(34px); }
.reveal-left,
.reveal-from-left { transform: translateX(-56px); }
.reveal-right,
.reveal-from-right { transform: translateX(64px); }
.reveal-scale { transform: scale(0.92); }
.reveal-fade { transform: translateY(12px); }

.draw-line {
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 1s var(--ease-japanese);
}

.draw-line.is-revealed {
  transform: scaleX(1) !important;
}

.is-revealed {
  opacity: 1 !important;
  transform: none !important;
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS
   ========================================================================== */
@media (max-width: 860px) {
  .lineage-grid,
  .details-grid,
  .editorial-row {
    grid-template-columns: 1fr;
  }

  .editorial-card--tall {
    aspect-ratio: 3 / 4;
  }

  .editorial-duo--tall {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .envelope-intro {
    padding: 0;
  }

  .envelope-stage {
    width: 100vw;
    height: 100dvh;
  }

  .envelope {
    border-radius: 0;
  }

  .envelope__pocket {
    border-radius: 0;
  }

  .envelope__flap-face {
    border-radius: 0;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .hide-sm {
    display: none;
  }

  .name-interlude__line {
    display: none;
  }

  .name-interlude__center {
    width: 100%;
  }

  .wax-seal {
    width: 96px;
    height: 96px;
  }

  .wax-seal__body {
    width: 84px;
    height: 84px;
  }
}

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