/* ==========================================================================
   ROYAL WEDDING INVITATION — SHASHIKANT & VARSHA
   Rich Burgundy, Ivory Cotton Paper & Champagne Gold Foil Aesthetic
   ========================================================================== */

:root {
  /* Royal Palette */
  --burgundy-deep: #24050b;
  --burgundy-rich: #4b0b17;
  --burgundy-velvet: #631120;
  --burgundy-mid: #7d192b;
  --crimson-wax: #7a1020;

  --ivory-paper: #faf4e8;
  --ivory-warm: #f4ead7;
  --ivory-cream: #f7f1e7;
  --parchment-edge: #e5d4b6;

  --gold-bright: #fae7a5;
  --gold-champagne: #d4af37;
  --gold-antique: #b0882a;
  --gold-deep: #7f5d14;

  --ink-royal: #2d1418;
  --ink-muted: #5c3a3f;
  --ink-soft: #7b5b5f;

  /* Typography */
  --font-display: 'Cinzel Decorative', 'Cinzel', Georgia, serif;
  --font-serif-caps: 'Cinzel', Georgia, serif;
  --font-editorial: 'Cormorant Garamond', Georgia, serif;
  --font-script: 'Alex Brush', 'Cormorant Garamond', cursive;
  --font-body: 'Lora', Georgia, serif;

  /* Elevation & Shadows */
  --shadow-card: 0 24px 60px rgba(18, 2, 6, 0.55), 0 4px 16px rgba(18, 2, 6, 0.28);
  --shadow-gold-glow: 0 0 28px rgba(212, 175, 55, 0.24);
  --radius-card: 14px;
}

/* Reset & Base */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  color: var(--ink-royal);
  background:
    radial-gradient(circle at 50% 18%, rgba(125, 25, 43, 0.42) 0%, rgba(36, 5, 11, 0.96) 62%, #150206 100%),
    #1b0308;
  background-attachment: fixed;
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.65;
}

/* Lock scrolling while envelope is sealed so guest experiences opening first */
body.state-sealed,
body.state-opening {
  overflow: hidden;
  height: 100vh;
}

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

/* Ambient Floating Gold Motes */
.ambient-motes {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.mote {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(250, 231, 165, 0.95) 0%, rgba(212, 175, 55, 0) 70%);
  opacity: 0;
  animation: floatMote var(--dur, 12s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}

@keyframes floatMote {
  0% {
    transform: translateY(20px) translateX(0) scale(0.6);
    opacity: 0;
  }
  25% {
    opacity: var(--max-opacity, 0.55);
  }
  75% {
    opacity: var(--max-opacity, 0.4);
  }
  100% {
    transform: translateY(-90px) translateX(var(--drift, 18px)) scale(1.1);
    opacity: 0;
  }
}

/* ==========================================================================
   STAGE 1 & 2: ROYAL ENVELOPE EXPERIENCE
   ========================================================================== */
.envelope-stage {
  position: relative;
  min-height: 100svh;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px 16px 36px;
  overflow: hidden;
  z-index: 10;
  transition: opacity 0.85s cubic-bezier(0.22, 1, 0.36, 1), transform 0.95s cubic-bezier(0.22, 1, 0.36, 1);
}

/* When opened and settled into scroll journey, smoothly cross-dissolve the envelope stage */
body.state-opened .envelope-stage {
  position: fixed;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.desk-lighting {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 68% 55% at 50% 48%, rgba(168, 42, 62, 0.26) 0%, transparent 70%),
    radial-gradient(circle at 50% 50%, rgba(212, 175, 55, 0.08) 0%, transparent 52%);
  pointer-events: none;
}

.envelope-prelude {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: clamp(20px, 4vh, 38px);
  z-index: 2;
  transition: opacity 0.45s ease, transform 0.45s ease;
}

body.state-opening .envelope-prelude {
  opacity: 0;
  transform: translateY(-10px);
}

.prelude-kicker {
  font-family: var(--font-serif-caps);
  font-size: clamp(0.75rem, 1.8vw, 0.9rem);
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: var(--gold-bright);
  opacity: 0.9;
}

.prelude-line {
  width: 72px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-champagne), transparent);
}

/* 3D Perspective Container — Vertical Portrait Royal Envelope */
.envelope-perspective {
  perspective: 1800px;
  perspective-origin: 50% 44%;
  width: min(82vw, 360px);
  z-index: 5;
}

/* Clickable Envelope Wrapper (no Open button!) */
.envelope-3d {
  --tilt-rx: 0deg;
  --tilt-ry: 0deg;
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1.42;
  transform-style: preserve-3d;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  outline: none;
}

body.state-sealed .envelope-3d:hover {
  transform: translateY(-6px) rotateX(calc(3deg + var(--tilt-rx))) rotateY(var(--tilt-ry)) scale(1.012);
}

body.state-sealed .envelope-3d:focus-visible {
  box-shadow: 0 0 0 3px rgba(250, 231, 165, 0.65);
  border-radius: 10px;
}

body.state-sealed .envelope-3d:active {
  transform: translateY(-2px) scale(0.996);
}

/* Shift envelope downward as flap opens so opened flap & emerging card stay centered in viewport */
.envelope-3d.is-flap-open {
  transform: translateY(clamp(68px, 13vh, 115px));
}

.envelope-shadow {
  position: absolute;
  inset: 6% 3% -9%;
  border-radius: 16px;
  background: radial-gradient(ellipse at center, rgba(6, 0, 2, 0.85) 0%, rgba(6, 0, 2, 0.35) 58%, transparent 78%);
  filter: blur(18px);
  transform: translateZ(-40px);
  transition: transform 0.6s ease, opacity 0.6s ease;
  pointer-events: none;
}

body.state-sealed .envelope-3d:hover .envelope-shadow {
  transform: translateZ(-40px) scale(1.04) translateY(8px);
}

/* Layer 1: Envelope Back + Gold Mandala Interior Liner */
.envelope-back {
  position: absolute;
  inset: 0;
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 30%, rgba(120, 22, 38, 0.45), transparent 70%),
    linear-gradient(155deg, #4f0c18 0%, #370710 100%);
  border: 1px solid rgba(212, 175, 55, 0.45);
  box-shadow: inset 0 0 28px rgba(0, 0, 0, 0.55);
  overflow: hidden;
  transform: translateZ(-6px);
  z-index: 1;
}

.envelope-liner {
  position: absolute;
  inset: 7px;
  border-radius: 5px;
  background: linear-gradient(180deg, #f8eed9 0%, #ead6b0 100%);
  overflow: hidden;
  box-shadow: inset 0 12px 24px rgba(56, 12, 18, 0.25);
}

.liner-mandala-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.4;
  background-image:
    radial-gradient(circle at 0 0, transparent 22px, rgba(176, 136, 42, 0.32) 23px, transparent 24px),
    radial-gradient(circle at 28px 28px, transparent 22px, rgba(176, 136, 42, 0.32) 23px, transparent 24px),
    radial-gradient(circle at 14px 14px, rgba(125, 25, 43, 0.16) 2px, transparent 3px);
  background-size: 28px 28px;
}

.liner-gold-arch {
  position: absolute;
  inset: 10px 18px 0;
  border: 1px solid rgba(176, 136, 42, 0.55);
  border-bottom: none;
  border-radius: 240px 240px 0 0;
}

/* Layer 2: Physical Invitation Card Inside the Pocket */
.envelope-card-insert {
  position: absolute;
  left: 6%;
  right: 6%;
  top: 7%;
  bottom: 6%;
  z-index: 2;
  border-radius: 8px;
  background: linear-gradient(165deg, #fcf8f0 0%, #f3e6ce 100%);
  box-shadow:
    0 -2px 12px rgba(24, 3, 7, 0.35),
    0 10px 25px rgba(24, 3, 7, 0.32),
    inset 0 0 0 1px rgba(176, 136, 42, 0.45);
  padding: clamp(12px, 2.5vw, 22px);
  transform: translateY(4%) translateZ(2px);
  transition:
    transform 0.95s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.75s ease;
  overflow: hidden;
  pointer-events: none;
}

.insert-paper-texture {
  position: absolute;
  inset: 0;
  opacity: 0.55;
  background-image: radial-gradient(rgba(128, 92, 42, 0.08) 1px, transparent 0);
  background-size: 6px 6px;
}

.insert-gold-frame {
  position: relative;
  height: 100%;
  border: 1.5px solid rgba(176, 136, 42, 0.65);
  outline: 1px solid rgba(176, 136, 42, 0.3);
  outline-offset: -5px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 10px 14px;
}

.insert-crest {
  margin-bottom: 4px;
}

.insert-kicker {
  font-family: var(--font-serif-caps);
  font-size: clamp(0.55rem, 1.4vw, 0.72rem);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.insert-names {
  font-family: var(--font-script);
  font-size: clamp(1.85rem, 6.2vw, 2.6rem);
  font-weight: 400;
  color: var(--burgundy-rich);
  line-height: 1.04;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  margin: 10px 0 12px;
}

.insert-names .insert-amp {
  color: var(--gold-antique);
  font-size: 0.7em;
  line-height: 0.95;
}

.insert-subtitle {
  font-family: var(--font-editorial);
  font-style: italic;
  font-size: clamp(0.82rem, 2.6vw, 0.98rem);
  color: var(--ink-muted);
  max-width: 28ch;
  line-height: 1.45;
}

.insert-divider {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 56%;
  margin-top: 14px;
}

.insert-divider span {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-antique), transparent);
}

/* Card emergence states for vertical envelope */
.envelope-3d.is-card-sliding .envelope-card-insert {
  transform: translateY(-60%) translateZ(2px);
  box-shadow:
    0 24px 48px rgba(15, 2, 5, 0.55),
    0 4px 12px rgba(15, 2, 5, 0.28),
    inset 0 0 0 1px rgba(212, 175, 55, 0.65);
}

.envelope-3d.is-card-clearing .envelope-card-insert {
  z-index: 20;
  transform: translateY(-76%) translateZ(48px);
  transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}

.envelope-3d.is-card-expanding .envelope-card-insert {
  z-index: 20;
  transform: translateY(-18%) translateZ(72px) scale(1.12);
  box-shadow: 0 36px 80px rgba(10, 0, 3, 0.78);
  transition:
    transform 0.85s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.8s ease;
}

/* Layer 3: Front Folded Pocket (Left, Right, Bottom Paper Flaps) */
.envelope-pocket {
  position: absolute;
  inset: 0;
  z-index: 4;
  border-radius: 8px;
  overflow: hidden;
  transform: translateZ(6px);
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(212, 175, 55, 0.45);
  transition: opacity 0.65s ease;
}

.pocket-fold-left,
.pocket-fold-right,
.pocket-fold-bottom {
  position: absolute;
  inset: 0;
}

/* Rich burgundy silk-paper texture via layered gradients (no CSS filter inside preserve-3d) */
.pocket-fold-left {
  clip-path: polygon(0 0, 52% 40%, 0 100%);
  background:
    linear-gradient(125deg, #651221 0%, #460914 70%, #2f050c 100%);
}

.pocket-fold-right {
  clip-path: polygon(100% 0, 48% 40%, 100% 100%);
  background:
    linear-gradient(235deg, #5e101f 0%, #3f0812 70%, #29040a 100%);
}

.pocket-fold-bottom {
  clip-path: polygon(0 100%, 50% 34%, 100% 100%);
  background:
    radial-gradient(circle at 50% 80%, rgba(132, 27, 45, 0.42), transparent 65%),
    linear-gradient(180deg, #621120 0%, #410913 56%, #2a040b 100%);
  box-shadow: inset 0 14px 22px rgba(250, 231, 165, 0.06);
}

.pocket-gold-trim {
  position: absolute;
  inset: 8px;
  border-radius: 4px;
  border: 1px solid rgba(212, 175, 55, 0.35);
  pointer-events: none;
}

.pocket-corner {
  position: absolute;
  width: clamp(32px, 6vw, 46px);
  height: clamp(32px, 6vw, 46px);
  opacity: 0.82;
}

.pocket-corner-bl {
  bottom: 10px;
  left: 10px;
  transform: rotate(-90deg);
}

.pocket-corner-br {
  bottom: 10px;
  right: 10px;
  transform: rotate(180deg);
}

/* Layer 4: 3D Hinged Top Flap */
.envelope-flap {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 44%;
  transform-origin: top center;
  transform-style: preserve-3d;
  transform: translateZ(10px) rotateX(0deg);
  z-index: 5;
  transition: transform 0.9s cubic-bezier(0.36, 0.04, 0.24, 1), opacity 0.65s ease;
  pointer-events: none;
}

.envelope-3d.is-flap-open .envelope-flap {
  transform: translateZ(-3px) rotateX(180deg);
}

.envelope-3d.is-flap-behind .envelope-flap {
  z-index: 1;
}

.flap-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.flap-outer {
  transform: translateZ(0.5px);
}

.flap-outer-shape {
  width: 100%;
  height: 100%;
  clip-path: polygon(0 0, 100% 0, 50% 96%);
  background:
    radial-gradient(circle at 50% 24%, rgba(145, 32, 52, 0.45), transparent 68%),
    linear-gradient(180deg, #691322 0%, #4b0b17 65%, #37060f 100%);
  box-shadow: inset 0 1px 0 rgba(250, 231, 165, 0.35);
}

.flap-gold-border {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.flap-lotus-accent {
  position: absolute;
  top: 14%;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0.72;
}

.flap-inner {
  transform: rotateY(180deg) translateZ(0.5px);
}

.flap-inner-shape {
  width: 100%;
  height: 100%;
  clip-path: polygon(0 0, 100% 0, 50% 96%);
  background:
    radial-gradient(circle at 50% 20%, rgba(255, 250, 236, 0.9), transparent 70%),
    repeating-linear-gradient(
      45deg,
      rgba(176, 136, 42, 0.14) 0px,
      rgba(176, 136, 42, 0.14) 1px,
      transparent 1px,
      transparent 10px
    ),
    linear-gradient(180deg, #f3e4c3 0%, #e4ca98 100%);
  border-top: 2px solid rgba(176, 136, 42, 0.65);
}

/* Layer 5: Personalized Two-Piece Wax Seal */
.wax-seal {
  position: absolute;
  left: 50%;
  top: 41%;
  width: clamp(74px, 19vw, 94px);
  height: clamp(74px, 19vw, 94px);
  transform: translate(-50%, -50%) translateZ(16px);
  z-index: 6;
  pointer-events: none;
}

.wax-glow {
  position: absolute;
  inset: -14px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.38) 0%, transparent 70%);
  opacity: 0.65;
  animation: sealBreathe 3.2s ease-in-out infinite;
}

@keyframes sealBreathe {
  0%, 100% { transform: scale(0.95); opacity: 0.5; }
  50% { transform: scale(1.08); opacity: 0.88; }
}

.wax-half {
  position: absolute;
  inset: 0;
  transition: transform 0.68s cubic-bezier(0.32, 0.08, 0.24, 1), opacity 0.68s ease;
}

.wax-half-left {
  clip-path: polygon(0 0, 52% 0, 48% 35%, 54% 58%, 47% 82%, 51% 100%, 0 100%);
}

.wax-half-right {
  clip-path: polygon(52% 0, 100% 0, 100% 100%, 51% 100%, 47% 82%, 54% 58%, 48% 35%);
}

.wax-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.wax-monogram {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 700;
  fill: url(#gold-foil);
  letter-spacing: 0.04em;
}

.wax-crack {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.18s ease, transform 0.25s ease;
}

.wax-sparks {
  position: absolute;
  inset: 0;
}

.wax-sparks span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold-bright);
  opacity: 0;
}

/* Seal Breaking Animation */
.envelope-3d.is-seal-cracking .wax-crack {
  opacity: 1;
  transform: scale(1.06);
}

.envelope-3d.is-seal-broken .wax-glow {
  opacity: 0;
  animation: none;
}

.envelope-3d.is-seal-broken .wax-crack {
  opacity: 0;
}

.envelope-3d.is-seal-broken .wax-half-left {
  transform: translate(-38px, 34px) rotate(-22deg) scale(0.86);
  opacity: 0;
}

.envelope-3d.is-seal-broken .wax-half-right {
  transform: translate(38px, 38px) rotate(24deg) scale(0.86);
  opacity: 0;
}

.envelope-3d.is-seal-broken .wax-sparks span:nth-child(1) { animation: spark1 0.65s ease-out forwards; }
.envelope-3d.is-seal-broken .wax-sparks span:nth-child(2) { animation: spark2 0.65s ease-out forwards; }
.envelope-3d.is-seal-broken .wax-sparks span:nth-child(3) { animation: spark3 0.65s ease-out forwards; }
.envelope-3d.is-seal-broken .wax-sparks span:nth-child(4) { animation: spark4 0.65s ease-out forwards; }
.envelope-3d.is-seal-broken .wax-sparks span:nth-child(5) { animation: spark5 0.65s ease-out forwards; }
.envelope-3d.is-seal-broken .wax-sparks span:nth-child(6) { animation: spark6 0.65s ease-out forwards; }

@keyframes spark1 { 0% { opacity: 1; transform: translate(0, 0) scale(1); } 100% { opacity: 0; transform: translate(-48px, -42px) scale(0.2); } }
@keyframes spark2 { 0% { opacity: 1; transform: translate(0, 0) scale(1); } 100% { opacity: 0; transform: translate(46px, -38px) scale(0.2); } }
@keyframes spark3 { 0% { opacity: 1; transform: translate(0, 0) scale(1); } 100% { opacity: 0; transform: translate(-56px, 12px) scale(0.2); } }
@keyframes spark4 { 0% { opacity: 1; transform: translate(0, 0) scale(1); } 100% { opacity: 0; transform: translate(54px, 16px) scale(0.2); } }
@keyframes spark5 { 0% { opacity: 1; transform: translate(0, 0) scale(1); } 100% { opacity: 0; transform: translate(-24px, -58px) scale(0.2); } }
@keyframes spark6 { 0% { opacity: 1; transform: translate(0, 0) scale(1); } 100% { opacity: 0; transform: translate(22px, 52px) scale(0.2); } }

/* Fade envelope shell cleanly without overriding the opened flap's rotateX(180deg) */
.envelope-3d.is-card-expanding .envelope-back,
.envelope-3d.is-card-expanding .envelope-pocket,
.envelope-3d.is-card-expanding .envelope-flap,
.envelope-3d.is-card-expanding .envelope-shadow {
  opacity: 0;
  transition: opacity 0.65s ease;
}

/* Whisper Cue under Envelope */
.envelope-whisper {
  margin-top: clamp(22px, 4.5vh, 42px);
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-editorial);
  font-style: italic;
  font-size: clamp(0.95rem, 2.4vw, 1.12rem);
  letter-spacing: 0.06em;
  color: rgba(250, 231, 165, 0.86);
  transition: opacity 0.4s ease;
  z-index: 2;
}

body.state-opening .envelope-whisper {
  opacity: 0;
}

.whisper-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold-champagne);
  opacity: 0.75;
}

/* ==========================================================================
   STAGE 3 TO 9: COMPLETE SCROLLABLE WEDDING INVITATION
   ========================================================================== */
.invitation-journey {
  position: relative;
  z-index: 4;
  width: 100%;
  padding-bottom: 64px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

body.state-opened .invitation-journey {
  opacity: 1;
  pointer-events: auto;
}

.section {
  width: min(92vw, 880px);
  margin: 0 auto;
  padding: clamp(44px, 7vh, 84px) 0;
}

.section-card-hero {
  min-height: 92svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: clamp(56px, 9vh, 96px);
}

/* Section Headers */
.section-header {
  text-align: center;
  margin-bottom: clamp(24px, 4vh, 38px);
}

.section-eyebrow {
  display: inline-block;
  font-family: var(--font-serif-caps);
  font-size: clamp(0.7rem, 1.6vw, 0.82rem);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold-bright);
  margin-bottom: 8px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4.4vw, 2.75rem);
  font-weight: 400;
  color: var(--ivory-paper);
  letter-spacing: 0.06em;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.45);
}

/* Shared Royal Card Surface (Ivory Cotton Paper + Double Gold Foil Border) */
.royal-card {
  position: relative;
  width: 100%;
  border-radius: var(--radius-card);
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 252, 244, 0.95) 0%, transparent 55%),
    linear-gradient(170deg, #fcf8f0 0%, #f4ead7 58%, #eddcc0 100%);
  box-shadow: var(--shadow-card);
  padding: clamp(30px, 5vw, 58px) clamp(22px, 5vw, 54px);
  overflow: hidden;
}

.card-paper-overlay {
  position: absolute;
  inset: 0;
  opacity: 0.42;
  background-image:
    radial-gradient(rgba(138, 102, 46, 0.08) 1px, transparent 0),
    radial-gradient(rgba(75, 11, 23, 0.04) 1px, transparent 0);
  background-size: 9px 9px, 15px 15px;
  background-position: 0 0, 4px 5px;
  pointer-events: none;
}

.card-double-border {
  position: absolute;
  inset: 12px;
  border: 1.5px solid rgba(176, 136, 42, 0.58);
  outline: 1px solid rgba(176, 136, 42, 0.3);
  outline-offset: -6px;
  border-radius: 8px;
  pointer-events: none;
}

.card-corner {
  position: absolute;
  width: clamp(38px, 6vw, 54px);
  height: clamp(38px, 6vw, 54px);
  opacity: 0.85;
}

.card-corner.tl { top: 4px; left: 4px; }
.card-corner.tr { top: 4px; right: 4px; transform: rotate(90deg); }
.card-corner.br { bottom: 4px; right: 4px; transform: rotate(180deg); }
.card-corner.bl { bottom: 4px; left: 4px; transform: rotate(-90deg); }

/* Scroll Reveal Animation */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.85s cubic-bezier(0.22, 1, 0.36, 1), transform 0.85s cubic-bezier(0.22, 1, 0.36, 1);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Emerged Main Card Intro */
.emerged-card {
  max-width: 720px;
  text-align: center;
}

body.state-opened .emerged-card {
  opacity: 1;
  transform: translateY(0);
}

.card-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-lotus {
  margin-bottom: 10px;
}

.sanskrit-blessing {
  font-family: var(--font-editorial);
  font-size: clamp(0.95rem, 2.2vw, 1.15rem);
  letter-spacing: 0.12em;
  color: var(--burgundy-mid);
  margin-bottom: 16px;
}

.invitation-prelude {
  font-family: var(--font-serif-caps);
  font-size: clamp(0.76rem, 1.9vw, 0.92rem);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 16px;
}

.couple-royal-title {
  font-family: var(--font-script);
  font-size: clamp(3rem, 9vw, 5.2rem);
  font-weight: 400;
  line-height: 1.04;
  color: var(--burgundy-rich);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.04em;
  margin-bottom: 18px;
}

.name-ampersand {
  font-size: 0.68em;
  line-height: 0.95;
  color: var(--gold-antique);
}

.ornamental-rule {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: min(260px, 70%);
  margin: 4px auto 22px;
}

.rule-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-antique), transparent);
}

.rule-diamond {
  width: 8px;
  height: 8px;
  transform: rotate(45deg);
  background: var(--gold-champagne);
  box-shadow: 0 0 8px rgba(212, 175, 55, 0.5);
}

.invitation-body {
  font-family: var(--font-editorial);
  font-size: clamp(1.2rem, 2.8vw, 1.48rem);
  font-style: italic;
  color: var(--ink-royal);
  max-width: 44ch;
  line-height: 1.6;
}

.scroll-cue {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--burgundy-mid);
  opacity: 0.85;
}

.scroll-cue-text {
  font-family: var(--font-serif-caps);
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.scroll-cue-arrow {
  animation: gentleBob 2.2s ease-in-out infinite;
}

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

/* ==========================================================================
   4. GROOM & BRIDE INTRODUCTION (Jharokha Arch + pic_2.jpeg)
   ========================================================================== */
.couple-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(250px, 0.95fr) 1fr;
  gap: clamp(26px, 4.5vw, 48px);
  align-items: center;
}

.couple-arch-wrapper {
  display: flex;
  justify-content: center;
}

.jharokha-frame {
  position: relative;
  width: min(100%, 340px);
  aspect-ratio: 3 / 4.25;
  padding: 10px;
  border-radius: 200px 200px 14px 14px;
  background: linear-gradient(160deg, rgba(212, 175, 55, 0.35), rgba(125, 25, 43, 0.16));
  box-shadow:
    0 18px 40px rgba(45, 10, 16, 0.22),
    inset 0 0 0 1px rgba(176, 136, 42, 0.65);
}

.jharokha-arch-inner {
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 190px 190px 10px 10px;
  background: var(--ivory-warm);
}

.couple-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.7s ease;
}

.photo-portrait-top {
  /* Ensures Varsha & Shashikant's faces and attire in pic_2.jpeg are centered without distortion */
  object-position: center 22%;
}

.jharokha-frame:hover .couple-photo {
  transform: scale(1.025);
}

.jharokha-gold-outline {
  position: absolute;
  inset: 5px;
  border-radius: 195px 195px 12px 12px;
  border: 1px solid rgba(212, 175, 55, 0.55);
  pointer-events: none;
}

.couple-profiles {
  display: flex;
  flex-direction: column;
  gap: 20px;
  text-align: center;
}

.profile-card {
  padding: 12px 8px;
}

.profile-role {
  display: inline-block;
  font-family: var(--font-serif-caps);
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-bottom: 4px;
}

.profile-name {
  font-family: var(--font-script);
  font-size: clamp(2.2rem, 4.5vw, 3rem);
  font-weight: 400;
  color: var(--burgundy-rich);
  line-height: 1.15;
  margin-bottom: 8px;
}

.profile-note {
  font-family: var(--font-editorial);
  font-size: clamp(1.06rem, 2.2vw, 1.2rem);
  color: var(--ink-muted);
  max-width: 36ch;
  margin: 0 auto;
}

.profile-knot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 68%;
  margin: 0 auto;
}

.knot-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(176, 136, 42, 0.6), transparent);
}

/* ==========================================================================
   5. SAVE THE DATE — PULL TO REVEAL (Inspired by reference image)
   ========================================================================== */
.save-date-card {
  position: relative;
  max-width: 520px;
  margin: 0 auto;
  border-radius: 16px;
  background: #f6f1ea;
  box-shadow: var(--shadow-card);
  padding: clamp(32px, 5vw, 52px) clamp(24px, 5vw, 46px) clamp(34px, 5vw, 48px);
  text-align: center;
  overflow: hidden;
}

.save-date-paper-texture {
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image: radial-gradient(rgba(140, 110, 75, 0.09) 1px, transparent 0);
  background-size: 7px 7px;
  pointer-events: none;
}

.save-date-border {
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(176, 136, 42, 0.42);
  border-radius: 10px;
  pointer-events: none;
}

.std-heading {
  position: relative;
  z-index: 2;
  font-family: var(--font-editorial);
  font-size: clamp(1.55rem, 4.5vw, 2.35rem);
  font-weight: 400;
  letter-spacing: 0.22em;
  color: #8f725b;
  margin-bottom: 22px;
}

.std-arch-frame {
  position: relative;
  z-index: 2;
  width: min(100%, 340px);
  aspect-ratio: 3 / 3.85;
  margin: 0 auto 24px;
  border-radius: 220px 220px 6px 6px;
  overflow: hidden;
  box-shadow:
    0 14px 30px rgba(60, 32, 22, 0.14),
    0 0 0 1px rgba(176, 136, 42, 0.35);
}

.std-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Preserves couple & carved gazebo arch from pic_1.jpeg cleanly without distortion */
  object-position: center 62%;
  display: block;
}

.std-photo-veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(246, 241, 234, 0.12) 0%,
    rgba(246, 241, 234, 0.04) 55%,
    rgba(246, 241, 234, 0.18) 100%
  );
  pointer-events: none;
}

.std-names {
  position: relative;
  z-index: 2;
  font-family: var(--font-script);
  font-size: clamp(2.3rem, 6.2vw, 3.25rem);
  font-weight: 400;
  color: var(--ink-royal);
  line-height: 1.15;
  margin-bottom: 22px;
}

/* Tactile Physical Pull-Down Silk Ribbon & Parting Sash Doors */
.pull-reveal-stage {
  position: relative;
  z-index: 3;
  width: min(100%, 380px);
  margin: 0 auto;
  padding-bottom: 72px;
}

.pull-reveal-box {
  position: relative;
  width: 100%;
  height: 92px;
  border-radius: 12px;
  overflow: hidden;
  border: 1.5px solid rgba(176, 136, 42, 0.65);
  background: linear-gradient(135deg, #fffdf8 0%, #f3e4c5 100%);
  box-shadow:
    inset 0 2px 10px rgba(110, 74, 22, 0.14),
    0 8px 22px rgba(45, 10, 16, 0.14);
}

.revealed-date-plate {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
}

.revealed-date {
  font-family: var(--font-serif-caps);
  font-size: clamp(1rem, 3vw, 1.32rem);
  font-weight: 600;
  letter-spacing: 0.2em;
  font-variant-numeric: lining-nums tabular-nums;
  font-feature-settings: "lnum" 1, "tnum" 1;
  color: var(--burgundy-rich);
}

.revealed-time {
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-serif-caps);
  font-size: clamp(0.86rem, 2.3vw, 1.04rem);
  font-weight: 600;
  letter-spacing: 0.14em;
  font-variant-numeric: lining-nums tabular-nums;
  font-feature-settings: "lnum" 1, "tnum" 1;
  color: var(--ink-muted);
}

.time-badge {
  font-family: var(--font-serif-caps);
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(176, 136, 42, 0.18);
  color: var(--gold-deep);
  border: 1px solid rgba(176, 136, 42, 0.4);
}

.date-shimmer {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    110deg,
    transparent 20%,
    rgba(255, 255, 255, 0.72) 50%,
    transparent 80%
  );
  transform: translateX(-120%);
  pointer-events: none;
}

.pull-reveal-box.is-revealed .date-shimmer {
  animation: shimmerSweep 1.15s ease-out forwards;
}

@keyframes shimmerSweep {
  to { transform: translateX(120%); }
}

/* Left & Right Parting Velvet Sash Doors */
.ribbon-doors {
  position: absolute;
  inset: 0;
  display: flex;
  z-index: 3;
  pointer-events: none;
}

.ribbon-door {
  position: relative;
  width: 50%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 50% 45%, rgba(145, 29, 48, 0.42), transparent 72%),
    linear-gradient(145deg, #5c0f1d 0%, #3a0711 100%);
  will-change: transform;
}

.ribbon-door-left {
  border-right: 1px solid rgba(250, 231, 165, 0.45);
  box-shadow: 4px 0 14px rgba(0, 0, 0, 0.25);
}

.ribbon-door-right {
  border-left: 1px solid rgba(250, 231, 165, 0.45);
  box-shadow: -4px 0 14px rgba(0, 0, 0, 0.25);
}

.ribbon-doors.is-animating .ribbon-door {
  transition: transform 0.65s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.45s ease;
}

.ribbon-doors.is-done {
  opacity: 0;
  transition: opacity 0.35s ease;
}

.door-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.2;
  background-image: repeating-linear-gradient(
    45deg,
    rgba(250, 231, 165, 0.42) 0px,
    rgba(250, 231, 165, 0.42) 1px,
    transparent 1px,
    transparent 11px
  );
}

.door-label {
  position: relative;
  font-family: var(--font-serif-caps);
  font-size: clamp(0.68rem, 1.9vw, 0.82rem);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-bright);
  padding: 0 14px;
}

.ribbon-door-left .door-label {
  padding-right: 26px;
}

.ribbon-door-right .door-label {
  padding-left: 26px;
}

/* Vertical Silk Ribbon & Hanging Pull-Down Tail */
.ribbon-assembly {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 56px;
  height: 100%;
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
}

.ribbon-assembly.is-animating .ribbon-vertical-band,
.ribbon-assembly.is-animating .ribbon-knot,
.ribbon-assembly.is-animating .ribbon-pull-tail {
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.45s ease;
}

.ribbon-assembly.is-done {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.ribbon-vertical-band {
  width: 24px;
  height: 96px;
  background: linear-gradient(90deg, #681020 0%, #9b1d33 48%, #5b0c1a 100%);
  border-left: 1.5px solid rgba(250, 231, 165, 0.72);
  border-right: 1.5px solid rgba(250, 231, 165, 0.72);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  transform-origin: top center;
  will-change: transform;
}

.ribbon-knot {
  position: absolute;
  top: 46px;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #fae7a5 0%, #d4af37 55%, #8f681c 100%);
  border: 1.5px solid #fff3c7;
  box-shadow: 0 4px 12px rgba(20, 2, 6, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  will-change: transform;
}

.ribbon-knot span {
  font-family: var(--font-display);
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--burgundy-deep);
  letter-spacing: 0.02em;
}

.ribbon-pull-tail {
  position: relative;
  margin-top: -4px;
  width: 44px;
  height: 70px;
  background: linear-gradient(90deg, #741224 0%, #a52038 50%, #640e1d 100%);
  border-left: 1.5px solid rgba(250, 231, 165, 0.78);
  border-right: 1.5px solid rgba(250, 231, 165, 0.78);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 82%, 0 100%);
  color: var(--gold-bright);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-bottom: 10px;
  gap: 2px;
  cursor: grab;
  pointer-events: auto;
  user-select: none;
  touch-action: none;
  filter: drop-shadow(0 8px 14px rgba(32, 4, 9, 0.42));
  will-change: transform;
}

.ribbon-pull-tail:active,
.ribbon-assembly.is-dragging .ribbon-pull-tail {
  cursor: grabbing;
}

.ribbon-pull-tail:focus-visible {
  outline: 2px solid var(--gold-champagne);
  outline-offset: 4px;
}

.tail-gold-stripe {
  position: absolute;
  inset: 0 5px;
  border-left: 1px dashed rgba(250, 231, 165, 0.45);
  border-right: 1px dashed rgba(250, 231, 165, 0.45);
  pointer-events: none;
}

.tail-text {
  font-family: var(--font-serif-caps);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.tail-arrow {
  animation: nudgeDown 1.7s ease-in-out infinite;
}

.ribbon-assembly.is-dragging .tail-arrow,
.ribbon-assembly.is-done .tail-arrow {
  animation: none;
}

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

.pull-hint {
  position: relative;
  z-index: 2;
  margin-top: 6px;
  font-family: var(--font-editorial);
  font-style: italic;
  font-size: 0.96rem;
  color: var(--ink-muted);
  transition: opacity 0.35s ease;
}

.pull-hint.is-nudge {
  color: var(--burgundy-mid);
  font-weight: 600;
}

/* ==========================================================================
   6. LIVE COUNTDOWN & 8. CALENDAR LOCK/UNLOCK TRANSITIONS
   ========================================================================== */
.is-locked-until-reveal .royal-card {
  border: 1px solid rgba(212, 175, 55, 0.28);
}

.reveal-veil-notice {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  padding: 18px 12px;
  color: var(--ink-muted);
  font-family: var(--font-editorial);
  font-size: 1.15rem;
}

.reveal-veil-notice[hidden] {
  display: none;
}

.veil-jump-link {
  font-family: var(--font-serif-caps);
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--burgundy-rich);
  text-decoration: none;
  border-bottom: 1px solid rgba(176, 136, 42, 0.65);
  padding-bottom: 2px;
}

.veil-jump-link:hover {
  color: var(--gold-deep);
}

.countdown-active[hidden],
.calendar-active[hidden] {
  display: none;
}

.countdown-active,
.calendar-active {
  position: relative;
  z-index: 2;
  text-align: center;
  animation: unveilSection 0.75s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes unveilSection {
  0% { opacity: 0; transform: translateY(14px) scale(0.98); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.countdown-subtitle {
  font-family: var(--font-editorial);
  font-size: clamp(1.05rem, 2.5vw, 1.25rem);
  font-variant-numeric: lining-nums;
  font-feature-settings: "lnum" 1;
  color: var(--ink-muted);
  margin-bottom: 26px;
}

.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(8px, 2vw, 20px);
  max-width: 660px;
  margin: 0 auto;
}

.time-tile {
  position: relative;
  min-width: 0;
}

.tile-arch {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(14px, 2.8vw, 26px) 6px clamp(12px, 2.2vw, 20px);
  border-radius: clamp(14px, 4vw, 36px) clamp(14px, 4vw, 36px) 12px 12px;
  background: linear-gradient(170deg, #5a0f1c 0%, #380710 100%);
  border: 1.5px solid rgba(212, 175, 55, 0.65);
  box-shadow:
    0 12px 28px rgba(38, 6, 12, 0.28),
    inset 0 0 18px rgba(0, 0, 0, 0.35);
}

.time-value {
  font-family: var(--font-serif-caps);
  font-weight: 600;
  font-size: clamp(1.4rem, 4.2vw, 2.65rem);
  line-height: 1.05;
  color: var(--gold-bright);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
  font-variant-numeric: lining-nums tabular-nums;
  font-feature-settings: "lnum" 1, "tnum" 1;
}

.time-label {
  margin-top: 6px;
  font-family: var(--font-serif-caps);
  font-size: clamp(0.54rem, 1.35vw, 0.74rem);
  letter-spacing: clamp(0.08em, 0.25vw, 0.2em);
  text-transform: uppercase;
  color: rgba(250, 244, 232, 0.85);
}

.countdown-celebration {
  margin-top: 22px;
  font-family: var(--font-editorial);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--burgundy-rich);
}

/* ==========================================================================
   7. WEDDING VENUE & GOOGLE MAPS
   ========================================================================== */
.venue-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.venue-pin-badge {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: linear-gradient(145deg, #5a0f1c, #37060f);
  border: 1.5px solid rgba(212, 175, 55, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  box-shadow: 0 10px 24px rgba(36, 5, 11, 0.28);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.venue-pin-badge:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 14px 28px rgba(36, 5, 11, 0.38), var(--shadow-gold-glow);
}

.venue-name {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 400;
  margin-bottom: 4px;
}

.venue-link-text {
  color: var(--burgundy-rich);
  text-decoration: none;
  transition: color 0.2s ease;
}

.venue-link-text:hover {
  color: var(--gold-deep);
}

.venue-address {
  font-family: var(--font-editorial);
  font-size: clamp(1.15rem, 2.8vw, 1.4rem);
  margin-bottom: 18px;
}

.venue-link-sub {
  color: var(--ink-muted);
  text-decoration: none;
  border-bottom: 1px dashed rgba(176, 136, 42, 0.55);
  padding-bottom: 2px;
}

.venue-link-sub:hover {
  color: var(--burgundy-rich);
}

.venue-timing-pill {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 999px;
  background: rgba(176, 136, 42, 0.13);
  border: 1px solid rgba(176, 136, 42, 0.38);
  font-family: var(--font-editorial);
  font-size: 1.02rem;
  color: var(--ink-royal);
  margin-bottom: 26px;
}

.venue-timing-pill strong {
  font-family: var(--font-serif-caps);
  font-size: 0.86rem;
  letter-spacing: 0.08em;
  font-variant-numeric: lining-nums tabular-nums;
  font-feature-settings: "lnum" 1, "tnum" 1;
}

/* Royal Buttons */
.royal-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 999px;
  font-family: var(--font-serif-caps);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.royal-btn-primary {
  background: linear-gradient(135deg, #621120 0%, #3c0711 100%);
  color: var(--gold-bright);
  border-color: rgba(212, 175, 55, 0.72);
  box-shadow: 0 10px 24px rgba(36, 5, 11, 0.28);
}

.royal-btn-primary:hover,
.royal-btn-primary:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(36, 5, 11, 0.38), var(--shadow-gold-glow);
  outline: none;
}

.royal-btn-secondary {
  background: linear-gradient(135deg, rgba(250, 231, 165, 0.35) 0%, rgba(212, 175, 55, 0.2) 100%);
  color: var(--burgundy-rich);
  border-color: rgba(176, 136, 42, 0.75);
}

.royal-btn-secondary:hover,
.royal-btn-secondary:focus-visible {
  transform: translateY(-2px);
  background: linear-gradient(135deg, rgba(250, 231, 165, 0.6) 0%, rgba(212, 175, 55, 0.35) 100%);
  box-shadow: 0 10px 22px rgba(45, 10, 16, 0.14);
  outline: none;
}

/* ==========================================================================
   8. ADD TO CALENDAR
   ========================================================================== */
.calendar-summary {
  font-family: var(--font-editorial);
  font-size: clamp(1.08rem, 2.5vw, 1.28rem);
  font-variant-numeric: lining-nums;
  font-feature-settings: "lnum" 1;
  color: var(--ink-muted);
  max-width: 48ch;
  margin: 0 auto 24px;
}

.calendar-datetime {
  font-family: var(--font-serif-caps);
  font-size: 0.86em;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--burgundy-rich);
  font-variant-numeric: lining-nums tabular-nums;
  font-feature-settings: "lnum" 1, "tnum" 1;
}

.calendar-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

/* ==========================================================================
   9. THANK YOU SECTION
   ========================================================================== */
.section-thank-you {
  padding-bottom: clamp(48px, 8vh, 88px);
}

.thank-you-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.diya-emblem {
  position: relative;
  margin-bottom: 14px;
}

.diya-halo {
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(247, 214, 116, 0.42) 0%, transparent 70%);
  animation: diyaPulse 2.8s ease-in-out infinite;
}

.diya-flame {
  transform-origin: 32px 28px;
  animation: flameFlicker 2.4s ease-in-out infinite;
}

@keyframes diyaPulse {
  0%, 100% { transform: scale(0.92); opacity: 0.65; }
  50% { transform: scale(1.12); opacity: 1; }
}

@keyframes flameFlicker {
  0%, 100% { transform: scale(1) rotate(-1.5deg); }
  50% { transform: scale(1.06, 1.1) rotate(1.5deg); }
}

.thank-you-inner .section-eyebrow {
  color: var(--gold-deep);
}

.thank-you-title {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4.5vw, 2.75rem);
  font-weight: 400;
  color: var(--burgundy-rich);
  margin-bottom: 18px;
}

.thank-you-quote {
  font-family: var(--font-editorial);
  font-style: italic;
  font-size: clamp(1.22rem, 3vw, 1.56rem);
  line-height: 1.65;
  color: var(--ink-royal);
  max-width: 44ch;
  margin-bottom: 24px;
}

.thank-you-signature {
  font-family: var(--font-script);
  font-size: clamp(2.1rem, 5vw, 2.85rem);
  color: var(--burgundy-rich);
  line-height: 1.15;
}

.thank-you-families {
  font-family: var(--font-serif-caps);
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-top: 6px;
}

/* ==========================================================================
   RESPONSIVE ADJUSTMENTS
   ========================================================================== */
@media (max-width: 768px) {
  .couple-grid {
    grid-template-columns: 1fr;
  }

  .jharokha-frame {
    max-width: 280px;
  }
}

@media (max-width: 480px) {
  .insert-crest {
    width: 66px;
    height: 40px;
    margin-bottom: 4px;
  }

  .insert-subtitle {
    font-size: 0.78rem;
    line-height: 1.38;
  }
}

@media (max-width: 420px) {
  .card-double-border {
    inset: 8px;
  }

  .pull-reveal-box {
    height: 86px;
  }

  .ribbon-vertical-band {
    height: 90px;
  }

  .ribbon-knot {
    top: 43px;
  }
}

/* ==========================================================================
   ACCESSIBILITY: RESPECT REDUCED MOTION
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .mote,
  .wax-glow,
  .scroll-cue-arrow,
  .tail-arrow,
  .diya-halo,
  .diya-flame {
    animation: none !important;
  }

  .envelope-3d,
  .envelope-flap,
  .envelope-card-insert,
  .wax-half,
  .envelope-stage,
  .invitation-journey,
  [data-reveal],
  .ribbon-door,
  .ribbon-pull-tail {
    transition-duration: 0.15s !important;
  }
}
