/* ============================================================
   Wahab & Alishba — Visual Correction Pass
   Cinematic digital wedding invitation
   ============================================================ */

/* ------------------------------------------------------------
   Tokens
   ------------------------------------------------------------ */
:root {
  --paper-0: #1a0c0d;
  --paper-1: #241011;
  --paper-2: #301416;
  --paper-3: #3a171b;
  --paper-edge: rgba(183, 122, 98, 0.45);
  --paper-edge-soft: rgba(209, 160, 131, 0.28);

  --wax-1: #e8d09a;
  --wax-2: #c9a45a;
  --wax-3: #a8843f;
  --wax-4: #7a5c2e;
  --wax-engrave: #5c431c;

  --ivory: #f4e7d4;
  --cream: #eedcc5;
  --burgundy: #571e2a;
  --wine: #702a38;
  --gold: #b58a58;
  --gold-soft: #d1a083;
  --rose: #c98e78;
  --ink: #2a1413;

  --font-script: "Great Vibes", cursive;
  --font-serif: "Cormorant Garamond", "Palatino Linotype", Palatino, serif;
  --font-label: "Cinzel", "Cormorant Garamond", serif;

  --stage: 430px;
  --pad: 20px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --seal: 108px;
}

/* ------------------------------------------------------------
   Base — no horizontal scroll, no clipping
   ------------------------------------------------------------ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100svh;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  font-family: var(--font-serif);
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper-0);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

body.is-sealed {
  overflow: hidden;
  height: 100svh;
  user-select: none;
  -webkit-user-select: none;
}

body.is-open {
  overflow-x: hidden;
  overflow-y: auto;
  background: #f7e8dc;
}

body.is-scratching {
  touch-action: none;
  overscroll-behavior: none;
}

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

a {
  color: inherit;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

ul {
  list-style: none;
}

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

/* Typography roles */
.script {
  font-family: var(--font-script);
  font-weight: 400;
  font-style: normal;
  letter-spacing: 0.01em;
}

.label {
  font-family: var(--font-label);
  font-weight: 500;
  font-size: 0.62rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.section-label {
  text-align: center;
  color: var(--burgundy);
  margin-bottom: 0.85rem;
}

.inner {
  width: calc(100% - 40px);
  max-width: 100%;
  margin-inline: auto;
}

.reveal {
  opacity: 0;
  transform: translate3d(0, 16px, 0);
  transition:
    opacity 0.9s var(--ease),
    transform 0.9s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.ornament {
  width: min(140px, 50%);
  height: 1px;
  margin: 1.35rem auto;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(181, 138, 88, 0.55),
    transparent
  );
  position: relative;
}

.ornament::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 5px;
  height: 5px;
  border: 1px solid rgba(181, 138, 88, 0.55);
  transform: translate(-50%, -50%) rotate(45deg);
  background: var(--cream);
}

/* ------------------------------------------------------------
   Cover — phone IS the envelope
   ------------------------------------------------------------ */
.cover {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--paper-0);
  transition: opacity 0.55s ease, visibility 0.55s;
}

.cover.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.cover__stage {
  position: relative;
  width: 100%;
  max-width: var(--stage);
  height: 100svh;
  margin-inline: auto;
  overflow: visible;
  perspective: 1800px;
  perspective-origin: 50% 50%;
  background: var(--paper-0);
}

.cover__under {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: radial-gradient(ellipse at center, #2a1214 0%, var(--paper-0) 70%);
}

/* Inner invitation light — ONLY after flaps begin opening (never rectangular) */
.envelope-inner-light {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 1;
  width: 100px;
  height: 100px;
  margin: -50px 0 0 -50px;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(
    circle,
    rgba(255, 232, 190, 0.55) 0%,
    rgba(229, 177, 118, 0.28) 30%,
    rgba(180, 110, 60, 0.1) 55%,
    transparent 72%
  );
  filter: blur(8px);
  transform: scale(0.85);
  transition:
    opacity 0.9s var(--ease),
    width 1.15s var(--ease),
    height 1.15s var(--ease),
    margin 1.15s var(--ease),
    transform 1.15s var(--ease);
}

.cover.is-inner-light .envelope-inner-light {
  opacity: 0.75;
  width: 300px;
  height: 300px;
  margin: -150px 0 0 -150px;
  transform: scale(1);
}

.cover.is-finishing .envelope-inner-light {
  opacity: 0.35;
}

.cover__particles {
  position: absolute;
  inset: 0;
  z-index: 9;
  pointer-events: none;
}

.cover-particle {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: rgba(232, 200, 150, 0.75);
  opacity: 0;
  animation: particleDrift 1.3s var(--ease) forwards;
}

/* ------------------------------------------------------------
   Flaps — dark luxury paper, hinged, no pattern tiles
   ------------------------------------------------------------ */
.flap {
  position: absolute;
  inset: 0;
  z-index: 5;
  transform-style: preserve-3d;
  pointer-events: none;
  will-change: transform;
}

.flap__paper {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 90% 70% at 50% 40%, rgba(58, 23, 27, 0.55) 0%, transparent 60%),
    linear-gradient(160deg, var(--paper-2) 0%, var(--paper-1) 42%, var(--paper-0) 100%);
  box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.45);
}

.flap__grain {
  position: absolute;
  inset: 0;
  opacity: 0.04;
  background-image: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(255, 240, 220, 0.35) 3px,
    rgba(255, 240, 220, 0.35) 4px
  );
  pointer-events: none;
}

/* Thin metallic fold-edge highlights */
.flap__edge {
  position: absolute;
  background: linear-gradient(
    90deg,
    transparent,
    var(--paper-edge-soft) 20%,
    var(--paper-edge) 50%,
    var(--paper-edge-soft) 80%,
    transparent
  );
  opacity: 0.7;
  pointer-events: none;
}

.flap__edge--diag-bl,
.flap__edge--diag-br,
.flap__edge--diag-tl,
.flap__edge--diag-tr {
  width: 1px;
  height: 72%;
  top: 14%;
  left: 50%;
}

.flap--top .flap__edge--diag-bl {
  transform: translateX(-50%) rotate(28deg);
  transform-origin: top center;
  height: 54%;
  top: 0;
  left: 25%;
}

.flap--top .flap__edge--diag-br {
  transform: translateX(-50%) rotate(-28deg);
  transform-origin: top center;
  height: 54%;
  top: 0;
  left: 75%;
}

.flap--left .flap__edge--diag-tr {
  top: 0;
  left: auto;
  right: 0;
  width: 1px;
  height: 100%;
  background: linear-gradient(
    180deg,
    transparent 5%,
    var(--paper-edge) 45%,
    transparent 95%
  );
  transform: none;
}

.flap--left .flap__edge--diag-br {
  display: none;
}

.flap--right .flap__edge--diag-tl {
  top: 0;
  left: 0;
  width: 1px;
  height: 100%;
  background: linear-gradient(
    180deg,
    transparent 5%,
    var(--paper-edge) 45%,
    transparent 95%
  );
  transform: none;
}

.flap--right .flap__edge--diag-bl {
  display: none;
}

.flap--bottom .flap__edge--diag-tl {
  transform: translateX(-50%) rotate(-28deg);
  transform-origin: bottom center;
  height: 54%;
  top: auto;
  bottom: 0;
  left: 25%;
}

.flap--bottom .flap__edge--diag-tr {
  transform: translateX(-50%) rotate(28deg);
  transform-origin: bottom center;
  height: 54%;
  top: auto;
  bottom: 0;
  left: 75%;
}

/* Botanical dual layers — base (muted) + lit (mask-revealed from wax) */
@property --light-r {
  syntax: "<length>";
  inherits: true;
  initial-value: 0px;
}

.botanical {
  position: absolute;
  pointer-events: none;
  line-height: 0;
  overflow: visible;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, auto);
  --light-r: 0px;
}

.botanical__base,
.botanical__lit {
  grid-area: 1 / 1;
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  max-height: none;
  object-fit: contain;
  pointer-events: none;
}

.botanical__base {
  position: relative;
  z-index: 1;
  /* Pre-tap: dark embossed floral pressed into burgundy paper — NOT metallic */
  opacity: 0.55;
  filter: brightness(0.3) saturate(0.55) sepia(0.15) contrast(1.05);
  mix-blend-mode: multiply;
}

.botanical__lit {
  position: relative;
  z-index: 2;
  /* Illuminated foil — fully hidden until light travel begins */
  filter: brightness(1.22) contrast(1.14) saturate(1);
  opacity: 0;
  visibility: hidden;
  /*
    Travelling reveal: radius grows from a FIXED wax-nearest origin.
    At --light-r: 0px the mask exposes nothing (no soft-edge leak).
  */
  -webkit-mask-image: radial-gradient(
    circle at var(--ox, 50%) var(--oy, 50%),
    #000 0px,
    #000 var(--light-r),
    rgba(0, 0, 0, 0.65) calc(var(--light-r) + min(10px, var(--light-r))),
    transparent calc(var(--light-r) + min(26px, var(--light-r)))
  );
  mask-image: radial-gradient(
    circle at var(--ox, 50%) var(--oy, 50%),
    #000 0px,
    #000 var(--light-r),
    rgba(0, 0, 0, 0.65) calc(var(--light-r) + min(10px, var(--light-r))),
    transparent calc(var(--light-r) + min(26px, var(--light-r)))
  );
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
}

/* Lit layer only becomes paintable once the travelling-light sequence starts */
.cover.is-light-travel .botanical__lit,
.cover.is-light-hold .botanical__lit {
  opacity: 1;
  visibility: visible;
}

/*
  Narrow warm light-front band travelling with the reveal.
  Absolutely overlaid so it cannot desync base/lit sizing.
  Clipped to the botanical PNG so light sits ON the foil, not as an aura.
*/
.botanical__front {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(
    circle at var(--ox, 50%) var(--oy, 50%),
    transparent 0px,
    transparent max(0px, calc(var(--light-r) - 18px)),
    rgba(232, 184, 125, 0.35) max(0px, calc(var(--light-r) - 6px)),
    rgba(255, 245, 220, 0.75) var(--light-r),
    rgba(232, 184, 125, 0.35) calc(var(--light-r) + 10px),
    transparent calc(var(--light-r) + 24px)
  );
  mix-blend-mode: soft-light;
  -webkit-mask-image: var(--foil);
  mask-image: var(--foil);
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: var(--op, left center);
  mask-position: var(--op, left center);
}

.botanical--left {
  /* Raised + outward so foliage fills the visible left wedge under the top flap */
  left: -8px;
  top: 70px;
  width: clamp(152px, 41vw, 168px);
  max-height: none;
  /* Inner-lower stem nearest wax (PNG stem root is bottom-right) */
  --ox: 96%;
  --oy: 78%;
  --op: left top;
  --foil: url("assets/images/envelope-floral-left.png");
}

.botanical--left .botanical__base,
.botanical--left .botanical__lit {
  object-position: left top;
}

.botanical--right {
  /* Slight asymmetry vs left — higher, slightly narrower */
  right: -6px;
  top: 64px;
  width: clamp(148px, 40vw, 164px);
  max-height: none;
  /* Inner-lower stem nearest wax (PNG stem root is bottom-left) */
  --ox: 4%;
  --oy: 78%;
  --op: right top;
  --foil: url("assets/images/envelope-floral-right.png");
}

.botanical--right .botanical__base,
.botanical--right .botanical__lit {
  object-position: right top;
}

.botanical--bl {
  left: 0;
  bottom: 4%;
  width: 48%;
  max-height: 55%;
  /* Toward wax / upper-inner edge of bottom-left cluster */
  --ox: 90%;
  --oy: 12%;
  --op: left bottom;
  --foil: url("assets/images/envelope-floral-bottom-left.png");
}

.botanical--bl .botanical__base,
.botanical--bl .botanical__lit {
  object-position: left bottom;
}

.botanical--br {
  right: 0;
  bottom: 4%;
  width: 48%;
  max-height: 55%;
  /* Toward wax / upper-inner edge of bottom-right cluster */
  --ox: 10%;
  --oy: 12%;
  --op: right bottom;
  --foil: url("assets/images/envelope-floral-bottom-right.png");
}

.botanical--br .botanical__base,
.botanical--br .botanical__lit {
  object-position: right bottom;
}

/* Travelling reveal — --light-r grows from wax-nearest origin */
.cover.is-light-travel .botanical--left {
  animation: lightRadiusGrow 1250ms linear 0ms forwards;
}

.cover.is-light-travel .botanical--left .botanical__front {
  animation: lightFrontFade 1250ms linear 0ms forwards;
}

.cover.is-light-travel .botanical--right {
  animation: lightRadiusGrow 1250ms linear 100ms forwards;
}

.cover.is-light-travel .botanical--right .botanical__front {
  animation: lightFrontFade 1250ms linear 100ms forwards;
}

.cover.is-light-travel .botanical--bl {
  animation: lightRadiusGrow 1100ms linear 500ms forwards;
}

.cover.is-light-travel .botanical--bl .botanical__front {
  animation: lightFrontFade 1100ms linear 500ms forwards;
}

.cover.is-light-travel .botanical--br {
  animation: lightRadiusGrow 1100ms linear 580ms forwards;
}

.cover.is-light-travel .botanical--br .botanical__front {
  animation: lightFrontFade 1100ms linear 580ms forwards;
}

@keyframes lightRadiusGrow {
  0% {
    --light-r: 0px;
  }
  100% {
    --light-r: 420px;
  }
}

@keyframes lightFrontFade {
  0% {
    opacity: 0;
  }
  8% {
    opacity: 1;
  }
  85% {
    opacity: 0.8;
  }
  100% {
    opacity: 0;
  }
}

/* After full travel — hold illuminated foil (no aura) */
.cover.is-light-hold .botanical--left,
.cover.is-light-hold .botanical--right,
.cover.is-light-hold .botanical--bl,
.cover.is-light-hold .botanical--br {
  animation: none !important;
  --light-r: 420px;
}

.cover.is-light-hold .botanical__lit,
.cover.is-light-hold .botanical--left .botanical__lit,
.cover.is-light-hold .botanical--right .botanical__lit,
.cover.is-light-hold .botanical--bl .botanical__lit,
.cover.is-light-hold .botanical--br .botanical__lit {
  animation: none !important;
  -webkit-mask-image: none !important;
  mask-image: none !important;
  opacity: 1;
  visibility: visible;
}

.cover.is-light-hold .botanical__front,
.cover.is-light-hold .botanical--left .botanical__front,
.cover.is-light-hold .botanical--right .botanical__front,
.cover.is-light-hold .botanical--bl .botanical__front,
.cover.is-light-hold .botanical--br .botanical__front {
  animation: none !important;
  opacity: 0 !important;
}

.cover.is-light-hold .botanical__base {
  opacity: 0.35;
}

/* Geometry — slight overlap so closed state has no gaps */
.flap--top {
  z-index: 8;
  transform-origin: top center;
  clip-path: polygon(0 0, 100% 0, 50% 54%);
  transition: transform 1.15s var(--ease);
}

.flap--left {
  z-index: 7;
  transform-origin: left center;
  clip-path: polygon(0 0, 54% 50%, 0 100%);
  transition: transform 1.2s var(--ease) 0.1s;
}

.flap--right {
  z-index: 7;
  transform-origin: right center;
  clip-path: polygon(100% 0, 100% 100%, 46% 50%);
  transition: transform 1.2s var(--ease) 0.16s;
}

.flap--bottom {
  z-index: 6;
  transform-origin: bottom center;
  clip-path: polygon(50% 46%, 100% 100%, 0 100%);
  transition: transform 1.25s var(--ease) 0.24s;
}

.cover.is-opening .flap--top {
  transform: rotateX(-165deg);
}

.cover.is-opening .flap--left {
  transform: rotateY(-165deg);
}

.cover.is-opening .flap--right {
  transform: rotateY(165deg);
}

.cover.is-opening .flap--bottom {
  transform: rotateX(165deg);
}

.cover.is-opening {
  background: transparent;
}

.cover.is-opening .cover__stage {
  background: transparent;
}

.cover.is-opening .cover__under {
  opacity: 0;
  transition: opacity 0.8s var(--ease);
}

.cover.is-finishing {
  opacity: 0;
  transition: opacity 0.9s var(--ease);
}

/* ------------------------------------------------------------
   Wax light source + travelling traces (NOT large fog)
   ------------------------------------------------------------ */
.wax-source {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 18;
  width: 0;
  height: 0;
  margin: 0;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(
    circle,
    rgba(255, 238, 204, 0.95) 0%,
    rgba(232, 184, 125, 0.55) 38%,
    rgba(196, 126, 83, 0.18) 62%,
    transparent 78%
  );
  filter: blur(4px);
  transform: translate(-50%, -50%) scale(0.4);
  transition:
    width 0.35s var(--ease),
    height 0.35s var(--ease),
    opacity 0.35s var(--ease),
    transform 0.35s var(--ease);
}

.cover.is-wax-lit .wax-source {
  width: 115px;
  height: 115px;
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.cover.is-wax-lit-soft .wax-source {
  width: 105px;
  height: 105px;
  opacity: 0.7;
}

.cover.is-halo-fade .wax-source {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.85);
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease);
}

/* Thin warm light traces: wax → botanical stems */
.wax-traces {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 17;
  width: 0;
  height: 0;
  pointer-events: none;
}

.wax-trace {
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 1.75px;
  border-radius: 2px;
  opacity: 0;
  transform-origin: left center;
  background: linear-gradient(
    90deg,
    rgba(255, 238, 204, 0.9),
    rgba(232, 184, 125, 0.55),
    transparent
  );
  filter: blur(0.5px);
}

.wax-trace--l {
  transform: rotate(208deg);
}

.wax-trace--r {
  transform: rotate(-28deg);
}

.wax-trace--bl {
  transform: rotate(145deg);
}

.wax-trace--br {
  transform: rotate(35deg);
}

.cover.is-traces .wax-trace {
  animation: waxTraceTravel 0.6s var(--ease) forwards;
}

.cover.is-traces .wax-trace--r {
  animation-delay: 0.06s;
}

.cover.is-traces .wax-trace--bl {
  animation-delay: 0.12s;
}

.cover.is-traces .wax-trace--br {
  animation-delay: 0.16s;
}

@keyframes waxTraceTravel {
  0% {
    width: 0;
    opacity: 0;
  }
  22% {
    opacity: 0.9;
  }
  70% {
    width: 115px;
    opacity: 0.7;
  }
  100% {
    width: 135px;
    opacity: 0;
  }
}

/* ------------------------------------------------------------
   Wax seal
   ------------------------------------------------------------ */
.wax-seal {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 20;
  width: var(--seal);
  height: var(--seal);
  margin: calc(var(--seal) / -2) 0 0 calc(var(--seal) / -2);
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translate3d(0, 0, 0) scale(1);
  transition:
    transform 0.18s var(--ease),
    opacity 0.35s var(--ease),
    filter 0.35s var(--ease);
  filter: none;
  outline: none;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

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

.wax-seal.is-pressed {
  transform: translate3d(0, 0, 0) scale(0.96);
}

.wax-seal.is-lit .wax-seal__img {
  filter: brightness(1.1) saturate(1.05);
}

.wax-seal.is-lit .wax-seal__body {
  filter: drop-shadow(0 0 14px rgba(232, 196, 120, 0.45));
}

.wax-seal.is-releasing {
  animation: sealRelease 0.35s var(--ease) forwards;
  pointer-events: none;
}

@keyframes sealRelease {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 1;
  }
  35% {
    transform: translate3d(0, -5px, 0) scale(1.06);
    opacity: 1;
  }
  100% {
    transform: translate3d(0, -5px, 0) scale(0.92);
    opacity: 0;
  }
}

.wax-seal.is-gone {
  visibility: hidden;
  pointer-events: none;
  opacity: 0;
}

.wax-seal__aura {
  position: absolute;
  inset: -14px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(212, 175, 88, 0.32) 0%,
    rgba(168, 130, 55, 0.12) 42%,
    transparent 70%
  );
  animation: sealBreath 3.6s ease-in-out infinite;
  pointer-events: none;
}

.wax-seal__body {
  position: absolute;
  inset: -6%;
  border-radius: 0;
  overflow: visible;
  background: transparent;
  box-shadow: none;
  pointer-events: none;
}

.wax-seal__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.45));
}

.wax-seal__hint {
  position: absolute;
  top: calc(100% + 0.9rem);
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100vw - 40px);
  font-family: var(--font-label);
  font-size: 0.55rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(244, 231, 212, 0.55);
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.wax-seal.is-pressed .wax-seal__hint,
.wax-seal.is-releasing .wax-seal__hint,
.wax-seal.is-lit .wax-seal__hint,
.wax-seal.is-gone .wax-seal__hint {
  opacity: 0;
}

/* ------------------------------------------------------------
   Music
   ------------------------------------------------------------ */
.music-btn {
  position: fixed;
  right: 16px;
  bottom: max(4.75rem, calc(env(safe-area-inset-bottom) + 3.6rem));
  z-index: 900;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, #8a4a52 0%, var(--burgundy) 55%, #2a1014 100%);
  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.35),
    inset 0 0 0 1px rgba(201, 142, 120, 0.45),
    inset 0 1px 2px rgba(255, 230, 210, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.45s ease, transform 0.45s var(--ease);
}

.music-btn.is-visible {
  opacity: 1;
  transform: scale(1);
}

.music-btn__icon {
  width: 12px;
  height: 12px;
  background: var(--ivory);
  clip-path: polygon(0 0, 100% 50%, 0 100%);
  margin-left: 2px;
}

.music-btn.is-playing .music-btn__icon {
  clip-path: none;
  width: 10px;
  height: 12px;
  margin-left: 0;
  background: linear-gradient(
    90deg,
    var(--ivory) 0 3px,
    transparent 3px 7px,
    var(--ivory) 7px 10px
  );
}

/* ------------------------------------------------------------
   Rose petal layer — envelope → hero reveal only
   ------------------------------------------------------------ */
.petal-layer {
  position: fixed;
  inset: 0;
  z-index: 850;
  pointer-events: none;
  overflow: hidden;
}

.rose-petal {
  position: absolute;
  top: -30px;
  left: 0;
  pointer-events: none;
  will-change: transform, opacity;
  opacity: 0.92;
  transform: translate3d(0, 0, 0) rotate(0deg);
  animation-name: petalFall;
  animation-timing-function: cubic-bezier(0.33, 0.05, 0.55, 1);
  animation-fill-mode: forwards;
}

.rose-petal::before {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 70% 10% 65% 20% / 55% 25% 75% 30%;
  background: radial-gradient(
    ellipse 70% 60% at 35% 30%,
    rgba(255, 255, 255, 0.55) 0%,
    transparent 45%
  ),
  var(--petal-color, #fff4e8);
  box-shadow:
    inset -1px -2px 3px rgba(60, 15, 20, 0.18),
    inset 1px 1px 2px rgba(255, 255, 255, 0.35);
}

.rose-petal--narrow::before {
  border-radius: 80% 15% 70% 18% / 65% 20% 80% 25%;
}

.rose-petal--soft::before {
  border-radius: 60% 20% 55% 30% / 50% 35% 65% 40%;
}

.rose-petal--bg {
  filter: blur(0.7px);
  opacity: 0.55;
}

.rose-petal--mid {
  filter: none;
  opacity: 0.9;
}

.rose-petal--fg {
  filter: blur(0.45px);
  opacity: 0.85;
}

@keyframes petalFall {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0) rotate(var(--petal-rot-start, -20deg));
  }
  8% {
    opacity: var(--petal-opacity, 0.9);
  }
  35% {
    transform: translate3d(var(--petal-drift-a, 18px), 35vh, 0)
      rotate(calc(var(--petal-rot-start, -20deg) + 80deg));
  }
  65% {
    transform: translate3d(var(--petal-drift-b, -22px), 70vh, 0)
      rotate(calc(var(--petal-rot-start, -20deg) + 180deg));
  }
  100% {
    opacity: 0;
    transform: translate3d(var(--petal-drift-c, 12px), 110vh, 0)
      rotate(var(--petal-rot-end, 260deg));
  }
}

/* ------------------------------------------------------------
   Invitation shell — already behind the envelope (no page-swap)
   ------------------------------------------------------------ */
.invitation {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--stage);
  margin-inline: auto;
  overflow-x: hidden;
  background: #120808;
  opacity: 1;
  transform: none;
}

body.is-sealed .invitation {
  pointer-events: none;
}

body.is-open .invitation {
  pointer-events: auto;
}

/* ------------------------------------------------------------
   Hero — full-bleed cinematic palace world
   Dark burgundy stationery typography over bright artwork
   ------------------------------------------------------------ */
.hero {
  position: relative;
  min-height: 100svh;
  width: 100%;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding:
    max(1.5svh, env(safe-area-inset-top))
    12px
    max(3rem, env(safe-area-inset-bottom));
  overflow: hidden;
  color: #6a1e29;
  text-align: center;
  background: #120808;
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  opacity: 1;
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.hero.is-lit .hero__media {
  opacity: 1;
}

.hero__img {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center 42%;
  transform: scale(1.06);
  transform-origin: center center;
  will-change: transform;
}

.hero.is-cinematic .hero__img {
  transform: scale(1);
  transition: transform 8.2s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Single invitation lockup — one composition in central open sky */
.hero__lockup {
  position: absolute;
  top: clamp(165px, 20vh, 205px);
  left: 50%;
  z-index: 2;
  width: calc(100% - 32px);
  max-width: 360px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero__day {
  margin: 0 0 clamp(76px, 9.5svh, 90px);
  font-family: var(--font-script);
  font-size: clamp(1.78rem, 8vw, 2.45rem);
  font-weight: 400;
  line-height: 1.1;
  color: #6b1f2a;
  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.35);
}

.hero__names {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  margin: 0;
}

.hero__name {
  display: block;
  max-width: 100%;
  font-family: var(--font-script);
  font-weight: 400;
  line-height: 1.08;
  color: #6a1e29;
  white-space: nowrap;
  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.35);
}

.hero__name--one {
  font-size: clamp(34px, 9vw, 38px);
}

.hero__name--two {
  font-size: clamp(31px, 8.2vw, 35px);
}

.hero__amp {
  display: block;
  margin: 4px 0 6px;
  font-family: var(--font-script);
  font-size: clamp(22px, 5.8vw, 25px);
  line-height: 1;
  color: #7a2933;
}

/* Scroll — keep absolute placement; offset heading gap increase */
.hero__scroll {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  margin-top: clamp(50px, 7.2svh, 62px);
  text-decoration: none;
  font-family: var(--font-script);
  font-size: clamp(15px, 4.2vw, 18px);
  font-weight: 400;
  letter-spacing: 0.02em;
  color: #7a2933;
}

.hero__chevron {
  width: 6px;
  height: 6px;
  margin-top: 0.2rem;
  border-right: 1.4px solid #7a2933;
  border-bottom: 1.4px solid #7a2933;
  transform: rotate(45deg);
  animation: chevronBounce 2s ease-in-out infinite;
}

/* Entrance — soft fade / rise only */
.hero__day,
.hero__name,
.hero__amp,
.hero__scroll {
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.hero.is-revealing [data-hero="heading"],
.hero.is-revealing [data-hero="name1"],
.hero.is-revealing [data-hero="amp"],
.hero.is-revealing [data-hero="name2"],
.hero.is-revealing [data-hero="scroll"] {
  opacity: 1;
  transform: translateY(0);
}

.hero.is-revealing [data-hero="heading"] {
  transition-delay: 0ms;
}

.hero.is-revealing [data-hero="name1"] {
  transition-delay: 250ms;
}

.hero.is-revealing [data-hero="amp"] {
  transition-delay: 450ms;
}

.hero.is-revealing [data-hero="name2"] {
  transition-delay: 600ms;
}

.hero.is-revealing [data-hero="scroll"] {
  transition-delay: 1000ms;
}

@media (min-width: 768px) {
  .hero__img {
    object-position: center 40%;
  }
}

/* ------------------------------------------------------------
   Stationery world — continuous wedding paper below hero
   ------------------------------------------------------------ */
.stationery {
  position: relative;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  color: #681e29;
  background:
    radial-gradient(ellipse 120% 40% at 50% 0%, rgba(255, 248, 240, 0.55) 0%, transparent 55%),
    radial-gradient(ellipse 80% 30% at 20% 40%, rgba(230, 194, 185, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse 70% 35% at 80% 70%, rgba(198, 154, 117, 0.08) 0%, transparent 45%),
    linear-gradient(180deg, #f5e2d6 0%, #f7e8dc 18%, #f8ece3 48%, #f2ddd0 78%, #f7e8dc 100%);
}

.stationery::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  z-index: 0;
}

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

/* Soft handmade paper seams */
.paper-seam {
  position: relative;
  height: 52px;
  margin: -1px 0;
  pointer-events: none;
  z-index: 2;
}

.paper-seam::before {
  content: "";
  position: absolute;
  left: -4%;
  right: -4%;
  top: 0;
  height: 100%;
  background: var(--seam-fill, #f3ded1);
  opacity: 0.92;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 80' preserveAspectRatio='none'%3E%3Cpath fill='white' d='M0,28 C80,8 160,48 240,30 C320,12 400,50 480,28 C560,8 640,46 720,26 C800,10 880,48 960,30 C1040,14 1120,44 1200,24 L1200,80 L0,80 Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 80' preserveAspectRatio='none'%3E%3Cpath fill='white' d='M0,28 C80,8 160,48 240,30 C320,12 400,50 480,28 C560,8 640,46 720,26 C800,10 880,48 960,30 C1040,14 1120,44 1200,24 L1200,80 L0,80 Z'/%3E%3C/svg%3E");
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}

.paper-seam--a { --seam-fill: #f3ded1; }
.paper-seam--b { --seam-fill: #f8ece3; }
.paper-seam--c { --seam-fill: #f2ddd0; }
.paper-seam--d { --seam-fill: #f5e2d6; }
.paper-seam--e { --seam-fill: #f8ece3; }
.paper-seam--f { --seam-fill: #f3ded1; }

/* Shared CSS rose corner motifs */
.invite__floral,
.scratch-section__deco,
.closing__floral {
  position: absolute;
  pointer-events: none;
  z-index: 0;
}

.invite__floral::before,
.invite__floral::after,
.scratch-section__deco::before,
.scratch-section__deco::after,
.closing__floral::before,
.closing__floral::after {
  content: "";
  position: absolute;
  border-radius: 60% 40% 55% 45% / 50% 45% 55% 50%;
}

/* ------------------------------------------------------------
   1. Invitation message
   ------------------------------------------------------------ */
.invite {
  position: relative;
  width: 100%;
  margin-top: -28px;
  padding: 58px 28px 56px;
  text-align: center;
  background:
    radial-gradient(ellipse 90% 50% at 50% -10%, rgba(255, 250, 245, 0.7) 0%, transparent 60%),
    #f7e8dc;
  overflow: hidden;
}

.invite::before {
  content: "";
  position: absolute;
  left: -3%;
  right: -3%;
  top: 0;
  height: 40px;
  pointer-events: none;
  background: #f7e8dc;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 80' preserveAspectRatio='none'%3E%3Cpath fill='white' d='M0,28 C80,8 160,48 240,30 C320,12 400,50 480,28 C560,8 640,46 720,26 C800,10 880,48 960,30 C1040,14 1120,44 1200,24 L1200,0 L0,0 Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 80' preserveAspectRatio='none'%3E%3Cpath fill='white' d='M0,28 C80,8 160,48 240,30 C320,12 400,50 480,28 C560,8 640,46 720,26 C800,10 880,48 960,30 C1040,14 1120,44 1200,24 L1200,0 L0,0 Z'/%3E%3C/svg%3E");
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
}

.invite__floral--tl {
  top: -8px;
  left: -18px;
  width: 118px;
  height: 140px;
  opacity: 0.72;
  background:
    radial-gradient(circle at 42% 38%, #8b2332 0 10px, transparent 11px),
    radial-gradient(circle at 58% 48%, #dfa9a5 0 8px, transparent 9px),
    radial-gradient(circle at 36% 58%, #f7e7dc 0 6px, transparent 7px),
    radial-gradient(circle at 62% 28%, #a52d3d 0 7px, transparent 8px),
    radial-gradient(ellipse 18px 40px at 48% 72%, rgba(118, 83, 76, 0.35) 0%, transparent 70%);
  filter: blur(0.15px);
}

.invite__floral--tr {
  top: -4px;
  right: -20px;
  width: 110px;
  height: 130px;
  opacity: 0.68;
  background:
    radial-gradient(circle at 55% 40%, #722b36 0 9px, transparent 10px),
    radial-gradient(circle at 38% 52%, #e6c2b9 0 7px, transparent 8px),
    radial-gradient(circle at 64% 60%, #fff4e8 0 5px, transparent 6px),
    radial-gradient(ellipse 16px 36px at 50% 75%, rgba(118, 83, 76, 0.3) 0%, transparent 70%);
}

.invite__copy {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 300px;
  margin-inline: auto;
}

.invite__hosts {
  margin: 0 0 1.65rem;
  font-family: var(--font-script);
  font-size: clamp(26px, 7.2vw, 30px);
  line-height: 1.2;
  color: #681e29;
}

.invite__body {
  margin: 0 auto 1.85rem;
  max-width: 240px;
  font-family: var(--font-serif);
  font-size: clamp(15px, 4vw, 16.5px);
  font-weight: 400;
  line-height: 1.6;
  color: #76534c;
}

.invite__name {
  margin: 0;
  font-family: var(--font-script);
  font-size: clamp(32px, 9vw, 37px);
  line-height: 1.15;
  color: #681e29;
}

.invite__name--bride {
  font-size: clamp(30px, 8.4vw, 35px);
}

.invite__with {
  margin: 0.45rem 0 0.5rem;
  font-family: var(--font-script);
  font-size: clamp(17px, 4.6vw, 19px);
  font-style: italic;
  color: #c69a75;
}

.invite__wish {
  margin: 2rem auto 0;
  max-width: 260px;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(14px, 3.8vw, 15.5px);
  line-height: 1.58;
  color: #76534c;
}

.invite__family {
  margin: 1.75rem 0 0;
  font-family: var(--font-script);
  font-size: clamp(20px, 5.5vw, 24px);
  line-height: 1.3;
  color: #722b36;
}

/* ------------------------------------------------------------
   2. Countdown
   ------------------------------------------------------------ */
.countdown-section {
  width: 100%;
  padding: 28px 20px 48px;
  text-align: center;
  background: #f3ded1;
}

.countdown__heading {
  margin: 0 0 0.55rem;
  font-family: var(--font-script);
  font-size: clamp(28px, 8vw, 36px);
  line-height: 1.2;
  color: #681e29;
}

.countdown-ornament {
  width: 72px;
  height: 10px;
  margin: 0 auto 1.4rem;
  background:
    radial-gradient(circle at 50% 50%, #c69a75 0 1.5px, transparent 2px),
    linear-gradient(90deg, transparent, rgba(198, 154, 117, 0.55), transparent);
  background-size: 100% 100%, 100% 1px;
  background-position: center, center;
  background-repeat: no-repeat;
}

.countdown {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.2rem;
  width: 100%;
  max-width: 22rem;
  margin-inline: auto;
}

.countdown.is-done {
  display: none;
}

.countdown__cell {
  min-width: 0;
  padding: 0.2rem 0.1rem;
}

.countdown__value {
  display: block;
  font-family: var(--font-serif);
  font-size: clamp(28px, 8vw, 38px);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: 0.02em;
  color: #71313a;
}

.countdown__label {
  display: block;
  margin-top: 0.35rem;
  font-family: var(--font-serif);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #76534c;
}

.countdown__begun {
  margin: 0.5rem auto 0;
  font-family: var(--font-script);
  font-size: clamp(24px, 6.5vw, 30px);
  color: #681e29;
  line-height: 1.25;
}

.countdown__begun[hidden] {
  display: none;
}

/* ------------------------------------------------------------
   3. Scratch to reveal
   ------------------------------------------------------------ */
.scratch-section {
  position: relative;
  width: 100%;
  padding: 36px 18px 64px;
  text-align: center;
  background: #f8ece3;
  overflow: hidden;
}

.scratch-section__deco--tr {
  top: 18px;
  right: -12px;
  width: 86px;
  height: 100px;
  opacity: 0.55;
  background:
    radial-gradient(circle at 48% 36%, #8b2332 0 7px, transparent 8px),
    radial-gradient(circle at 62% 52%, #e6c2b9 0 5px, transparent 6px),
    radial-gradient(ellipse 12px 28px at 40% 70%, rgba(118, 83, 76, 0.28) 0%, transparent 70%);
}

.scratch-section__deco--bl {
  bottom: 24px;
  left: -14px;
  width: 90px;
  height: 105px;
  opacity: 0.5;
  background:
    radial-gradient(circle at 55% 42%, #a52d3d 0 6px, transparent 7px),
    radial-gradient(circle at 38% 55%, #fff4e8 0 5px, transparent 6px),
    radial-gradient(ellipse 14px 30px at 58% 78%, rgba(118, 83, 76, 0.25) 0%, transparent 70%);
}

.scratch-section__heading {
  position: relative;
  z-index: 1;
  margin: 0 0 0.7rem;
  font-family: var(--font-script);
  font-size: clamp(30px, 8.5vw, 38px);
  line-height: 1.2;
  color: #681e29;
}

.scratch-section__hint {
  position: relative;
  z-index: 1;
  margin: 0 0 1.75rem;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 15px;
  color: #76534c;
}

.scratch {
  position: relative;
  z-index: 1;
  width: min(318px, calc(100% - 18px));
  aspect-ratio: 1 / 1.08;
  margin: 0 auto;
}

.scratch__glow {
  position: absolute;
  inset: 6% 10%;
  z-index: 0;
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 55%, rgba(104, 30, 41, 0.28) 0%, transparent 70%);
  opacity: 0;
  transform: scale(0.96);
  transition: opacity 0.8s ease, transform 0.8s ease;
  pointer-events: none;
}

.scratch.is-complete .scratch__glow {
  opacity: 1;
  transform: scale(1);
}

.scratch__heart {
  position: absolute;
  inset: 0;
  z-index: 1;
  clip-path: url(#heartClip);
  -webkit-clip-path: url(#heartClip);
  background:
    radial-gradient(ellipse at 50% 32%, #8a3540 0%, #681e29 48%, #4f1520 100%);
  box-shadow: inset 0 0 0 1px rgba(230, 194, 185, 0.22);
  overflow: hidden;
}

.scratch-heart-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  gap: 0.38rem;
  /* Extra bottom padding so WALIMA clears the heart tip */
  padding: 20% 16% 22%;
  box-sizing: border-box;
  text-align: center;
}

.date-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.02rem;
  flex: 0 0 auto;
  width: 100%;
  max-width: 11rem;
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 0.55s var(--ease),
    transform 0.55s var(--ease);
}

.scratch.is-revealed .date-group {
  opacity: 1;
  transform: translateY(0);
}

.scratch.is-revealed .date-group[data-date="1"] { transition-delay: 0ms; }
.scratch.is-revealed .date-group[data-date="2"] { transition-delay: 170ms; }
.scratch.is-revealed .date-group[data-date="3"] { transition-delay: 340ms; }

.date-number {
  font-family: var(--font-serif);
  font-size: clamp(22px, 5.8vw, 26px);
  font-weight: 500;
  line-height: 1;
  color: #f7e8dc;
}

.date-month {
  font-family: var(--font-serif);
  font-size: clamp(10.5px, 2.7vw, 12px);
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  line-height: 1.15;
  color: #f7e8dc;
  white-space: nowrap;
}

.date-event {
  font-family: var(--font-serif);
  font-size: clamp(10.5px, 2.7vw, 12px);
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  line-height: 1.15;
  color: #f0d8cb;
  white-space: nowrap;
}

.scratch__canvas {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: crosshair;
  clip-path: url(#heartClip);
  -webkit-clip-path: url(#heartClip);
  opacity: 1;
  transform: scale(1);
  transition:
    opacity 0.8s ease,
    transform 0.8s ease;
}

.scratch.is-dissolving .scratch__canvas {
  opacity: 0;
  transform: scale(1.015);
  pointer-events: none;
}

.scratch.is-complete .scratch__canvas {
  visibility: hidden;
  pointer-events: none;
}

/* ------------------------------------------------------------
   4. Schedule of Events — scroll-linked journey
   ------------------------------------------------------------ */
.schedule {
  --schedule-paper: #f2ddd0;
  width: 100%;
  padding: 40px 18px 72px;
  text-align: center;
  background: var(--schedule-paper);
}

.schedule__heading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  margin: 0 0 2.4rem;
  font-family: var(--font-script);
  font-size: clamp(30px, 8.2vw, 38px);
  line-height: 1.2;
  color: #681e29;
}

.schedule__flourish {
  display: block;
  width: 28px;
  height: 1px;
  background: linear-gradient(90deg, transparent, #c69a75, transparent);
  position: relative;
  flex-shrink: 0;
}

.schedule__flourish::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 5px;
  height: 5px;
  border: 1px solid rgba(198, 154, 117, 0.7);
  transform: translate(-50%, -50%) rotate(45deg);
  background: var(--schedule-paper);
}

.schedule__rail {
  position: relative;
  width: 100%;
  max-width: 340px;
  margin-inline: auto;
  padding: 0 4px 8px;
}

@media (min-width: 768px) {
  .schedule__rail {
    max-width: 480px;
  }
}

.schedule__spine {
  position: absolute;
  /* Align with diamond column center: 31% + half of 13% */
  left: calc(31% + 6.5%);
  top: 0;
  bottom: 0;
  width: 0;
  transform: translateX(-50%);
  z-index: 1;
  pointer-events: none;
}

.schedule__line {
  position: absolute;
  left: 50%;
  top: 0;
  width: 1px;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 1;
}

.schedule__line--base {
  height: 100%;
  background: rgba(105, 38, 47, 0.28);
}

.schedule__line--progress {
  height: 0;
  background: #8a3540;
  transform-origin: top center;
  will-change: height;
}

/* Burgundy rose marker — scroll-linked */
.schedule__rose {
  position: absolute;
  left: 50%;
  top: 0;
  width: 42px;
  height: 42px;
  margin-left: -21px;
  z-index: 3;
  transform: translate3d(0, 0, 0);
  will-change: transform;
  filter: drop-shadow(0 2px 3px rgba(45, 10, 16, 0.28));
}

.schedule__rose-svg {
  display: block;
  width: 42px;
  height: 42px;
  overflow: visible;
}

.schedule__day {
  position: relative;
  z-index: 1;
  padding-bottom: 0;
}

/* Centered blocks mask the timeline line — no card look */
.schedule__day-head,
.schedule__venue-block,
.schedule__day-sep {
  position: relative;
  z-index: 4;
  width: fit-content;
  max-width: calc(100% - 36px);
  margin-inline: auto;
  padding-inline: 20px;
  background: var(--schedule-paper);
  box-shadow: none;
  border: none;
  border-radius: 0;
}

.schedule__day-head {
  padding-top: 0.15rem;
  padding-bottom: 0.35rem;
  margin-bottom: 72px;
  text-align: center;
}

/* Rose-driven progressive reveal — permanent once shown */
.timeline-reveal {
  opacity: 0;
  transform: translateY(14px);
  filter: blur(2px);
  transition:
    opacity 0.75s ease,
    transform 0.75s cubic-bezier(0.22, 1, 0.36, 1),
    filter 0.6s ease;
}

.timeline-reveal.is-revealed {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

.schedule__day-name {
  margin: 0 0 16px;
  font-family: var(--font-label);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #681e29;
}

.schedule__weekday {
  margin: 0 0 16px;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 15px;
  color: #76534c;
}

.schedule__fulldate {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(17px, 4.6vw, 19px);
  font-weight: 500;
  color: #722b36;
  white-space: nowrap;
}

.schedule__stop {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 31% 13% 56%;
  align-items: center;
  column-gap: 0;
  min-height: 104px;
  padding: 0 2px;
}

.schedule__time {
  justify-self: end;
  padding-right: 10px;
  font-family: var(--font-serif);
  font-size: clamp(20px, 5.4vw, 23px);
  font-weight: 400;
  line-height: 1.15;
  color: #681e29;
  text-align: right;
  background: var(--schedule-paper);
  box-shadow: -10px 0 0 var(--schedule-paper), 4px 0 0 var(--schedule-paper);
}

.schedule__diamond {
  justify-self: center;
  width: 7px;
  height: 7px;
  border: 1px solid rgba(105, 38, 47, 0.35);
  background: rgba(105, 38, 47, 0.18);
  transform: rotate(45deg) scale(0.65);
  opacity: 0.15;
  transition:
    background 0.55s ease,
    border-color 0.55s ease,
    opacity 0.55s ease,
    transform 0.55s ease;
  position: relative;
  z-index: 2;
}

.schedule__stop.is-revealed .schedule__diamond {
  background: #722b36;
  border-color: #722b36;
  opacity: 1;
  transform: rotate(45deg) scale(1);
}

.schedule__label {
  justify-self: start;
  padding-left: 10px;
  font-family: var(--font-serif);
  font-size: clamp(16px, 4.4vw, 18px);
  line-height: 1.25;
  color: #681e29;
  text-align: left;
  background: var(--schedule-paper);
  box-shadow: 10px 0 0 var(--schedule-paper), -4px 0 0 var(--schedule-paper);
}

.schedule__venue-block {
  margin-top: 80px;
  margin-bottom: 0.25rem;
  padding-top: 0.55rem;
  padding-bottom: 0.55rem;
  text-align: center;
}

.schedule__venue {
  margin: 0 0 0.25rem;
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 500;
  color: #722b36;
}

.schedule__place {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 14px;
  line-height: 1.55;
  color: #76534c;
}

.schedule__day-sep {
  width: 56px;
  height: 18px;
  margin: 88px auto 88px;
  padding-inline: 14px;
  background-color: var(--schedule-paper);
  background-image: linear-gradient(90deg, transparent, rgba(198, 154, 117, 0.55), transparent);
  background-size: 100% 1px;
  background-position: center;
  background-repeat: no-repeat;
}

.schedule__day-sep::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 5px;
  height: 5px;
  border: 1px solid rgba(198, 154, 117, 0.7);
  transform: translate(-50%, -50%) rotate(45deg);
  background: var(--schedule-paper);
}

.schedule.is-reduced .timeline-reveal {
  opacity: 1;
  transform: none;
  filter: none;
  transition: none;
}

.schedule.is-reduced .schedule__diamond {
  background: #722b36;
  border-color: #722b36;
  opacity: 1;
  transform: rotate(45deg) scale(1);
}

.schedule.is-reduced .schedule__line--progress {
  height: 100% !important;
}

/* ------------------------------------------------------------
   5. Celebration venues
   ------------------------------------------------------------ */
.venues-section {
  width: 100%;
  padding: 36px 28px 52px;
  text-align: center;
  background: #f5e2d6;
}

.venues__heading {
  margin: 0 0 2.1rem;
  font-family: var(--font-script);
  font-size: clamp(30px, 8.2vw, 38px);
  line-height: 1.2;
  color: #681e29;
}

.venue {
  width: 100%;
  max-width: 280px;
  margin-inline: auto;
}

.venue__name {
  margin: 0 0 0.45rem;
  font-family: var(--font-script);
  font-size: clamp(24px, 6.5vw, 30px);
  line-height: 1.2;
  color: #681e29;
}

.venue__address {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 15.5px;
  line-height: 1.55;
  color: #76534c;
}

.venue__used {
  margin: 0.65rem 0 1.1rem;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 13.5px;
  letter-spacing: 0.04em;
  color: #c69a75;
}

.venue__maps {
  display: inline-block;
  padding: 0.55rem 1.15rem;
  font-family: var(--font-serif);
  font-size: 13.5px;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: #681e29;
  background: transparent;
  border: 1px solid rgba(104, 30, 41, 0.45);
  border-radius: 4px;
  transition: background 0.25s ease, border-color 0.25s ease;
}

.venue__maps:hover,
.venue__maps:focus-visible {
  background: rgba(104, 30, 41, 0.05);
  border-color: rgba(104, 30, 41, 0.7);
}

.venue__sep {
  width: min(140px, 45%);
  height: 1px;
  margin: 2.1rem auto;
  background: linear-gradient(90deg, transparent, rgba(198, 154, 117, 0.55), transparent);
  position: relative;
}

.venue__sep::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 5px;
  height: 5px;
  border: 1px solid rgba(198, 154, 117, 0.65);
  transform: translate(-50%, -50%) rotate(45deg);
  background: #f5e2d6;
}

/* ------------------------------------------------------------
   6. Contact
   ------------------------------------------------------------ */
.contact-section {
  width: 100%;
  padding: 36px 28px 48px;
  text-align: center;
  background: #f8ece3;
}

.contact__heading {
  margin: 0 0 1.8rem;
  font-family: var(--font-script);
  font-size: clamp(28px, 7.5vw, 34px);
  line-height: 1.2;
  color: #681e29;
}

.contact {
  display: grid;
  gap: 1.5rem;
  width: 100%;
  max-width: 240px;
  margin-inline: auto;
}

.contact__name {
  margin: 0 0 0.25rem;
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 500;
  color: #722b36;
}

.contact__phone {
  font-family: var(--font-serif);
  font-size: 15px;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: #76534c;
  border-bottom: 1px solid rgba(198, 154, 117, 0.45);
}

/* ------------------------------------------------------------
   7. Closing
   ------------------------------------------------------------ */
.closing {
  position: relative;
  width: 100%;
  padding: 48px 28px max(88px, calc(env(safe-area-inset-bottom) + 72px));
  text-align: center;
  background:
    radial-gradient(ellipse 80% 40% at 50% 100%, rgba(230, 194, 185, 0.2) 0%, transparent 55%),
    #f7e8dc;
  overflow: hidden;
}

.closing__floral--bl {
  left: -16px;
  bottom: 8px;
  width: 130px;
  height: 150px;
  opacity: 0.7;
  background:
    radial-gradient(circle at 48% 42%, #8b2332 0 11px, transparent 12px),
    radial-gradient(circle at 62% 55%, #dfa9a5 0 8px, transparent 9px),
    radial-gradient(circle at 34% 58%, #fff4e8 0 6px, transparent 7px),
    radial-gradient(circle at 55% 28%, #a52d3d 0 7px, transparent 8px),
    radial-gradient(ellipse 20px 48px at 45% 78%, rgba(118, 83, 76, 0.32) 0%, transparent 70%);
}

.closing__floral--br {
  right: -18px;
  bottom: 4px;
  width: 120px;
  height: 145px;
  opacity: 0.65;
  background:
    radial-gradient(circle at 52% 40%, #722b36 0 10px, transparent 11px),
    radial-gradient(circle at 36% 54%, #e6c2b9 0 7px, transparent 8px),
    radial-gradient(circle at 60% 62%, #f7e7dc 0 5px, transparent 6px),
    radial-gradient(ellipse 18px 42px at 50% 80%, rgba(118, 83, 76, 0.28) 0%, transparent 70%);
}

.closing__heading {
  position: relative;
  z-index: 1;
  margin: 0 auto 1.6rem;
  max-width: 280px;
  font-family: var(--font-script);
  font-size: clamp(26px, 7vw, 32px);
  line-height: 1.25;
  color: #681e29;
}

.closing__names {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  margin: 0;
}

.closing__name {
  font-family: var(--font-script);
  font-size: clamp(28px, 7.8vw, 34px);
  line-height: 1.15;
  color: #681e29;
}

.closing__amp {
  font-family: var(--font-script);
  font-size: 22px;
  color: #c69a75;
  line-height: 1;
  margin: 0.15rem 0;
}

.closing__flourish {
  position: relative;
  z-index: 1;
  width: 88px;
  height: 14px;
  margin: 1.6rem auto 0;
  background:
    radial-gradient(circle at 50% 50%, #c69a75 0 1.6px, transparent 2px),
    linear-gradient(90deg, transparent, rgba(198, 154, 117, 0.65), transparent);
  background-size: 100% 100%, 100% 1px;
  background-position: center, center;
  background-repeat: no-repeat;
}

/* ------------------------------------------------------------
   Animations
   ------------------------------------------------------------ */
@keyframes sealBreath {
  0%,
  100% {
    opacity: 0.35;
    transform: scale(1);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.06);
  }
}

@keyframes chevronBounce {
  0%,
  100% {
    transform: rotate(45deg) translateY(0);
  }
  50% {
    transform: rotate(45deg) translateY(4px);
  }
}

@keyframes particleDrift {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0) scale(0.5);
  }
  25% {
    opacity: 0.75;
  }
  100% {
    opacity: 0;
    transform: translate3d(var(--tx, 0), var(--ty, -80px), 0) scale(0.2);
  }
}

/* ------------------------------------------------------------
   Responsive
   ------------------------------------------------------------ */
@media (max-width: 359px) {
  :root {
    --seal: 82px;
    --pad: 18px;
  }

  .scratch {
    width: min(300px, calc(100% - 14px));
  }

  .scratch-heart-content {
    padding: 21% 15% 23%;
    gap: 0.32rem;
  }

  .countdown__value {
    font-size: clamp(24px, 7.2vw, 30px);
  }
}

@media (min-width: 390px) {
  :root {
    --seal: 92px;
  }

  .scratch {
    width: 320px;
  }

  .scratch-heart-content {
    padding: 20% 16% 22%;
    gap: 0.38rem;
  }
}

@media (min-width: 414px) {
  :root {
    --seal: 96px;
  }
}

@media (min-width: 768px) {
  body.is-open {
    background: #f7e8dc;
  }

  .cover__stage,
  .invitation {
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.5);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .wax-seal__aura,
  .hero__chevron {
    animation: none;
  }

  .date-group {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .hero__img {
    transform: scale(1) !important;
    transition: none !important;
  }

  .hero__day,
  .hero__name,
  .hero__amp,
  .hero__scroll {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    clip-path: none !important;
    transition: none !important;
  }

  .flap--top,
  .flap--left,
  .flap--right,
  .flap--bottom,
  .invitation,
  .reveal,
  .wax-source,
  .envelope-inner-light {
    transition-duration: 0.3s !important;
    transition-delay: 0s !important;
  }

  .cover-particle,
  .wax-traces,
  .botanical__front,
  .petal-layer {
    display: none;
  }

  .cover.is-light-travel .botanical--left,
  .cover.is-light-travel .botanical--right,
  .cover.is-light-travel .botanical--bl,
  .cover.is-light-travel .botanical--br,
  .cover.is-light-travel .botanical__lit,
  .cover.is-light-hold .botanical__lit {
    animation: none !important;
    --light-r: 420px;
    -webkit-mask-image: none !important;
    mask-image: none !important;
    opacity: 1;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
