/* ==========================================================================
   MOTHER OF PEARL — ROYAL WEDDING INVITATION
   Graziella & James — Villa Aurelia, Rome
   ========================================================================== */

:root {
  --bg-sand: #e6ded8;
  --pearl-light: #fefdfa;
  --pearl-card: #f9f3ef;
  --pearl-tint: #f3efe6;
  --pearl-shade: #e6dfd1;
  --pearl-dark: #63524c;
  --gold-accent: #cda851;
  --gold-dark: #9e7d30;
  --ink-primary: #3d2822;
  --ink-secondary: #63524c;
  --ink-muted: #8c7870;
  --ink-faint: #b3a098;
  
  --font-script: "Pinyon Script", "Great Vibes", cursive;
  --font-serif: "Cormorant Garamond", Georgia, serif;
  --font-roman: "Cinzel", "Cormorant Garamond", serif;
  --font-sans: "DM Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  
  --shadow-subtle: 0 4px 20px rgba(61, 40, 34, 0.08);
  --shadow-medium: 0 8px 30px rgba(61, 40, 34, 0.15);
  --shadow-deep: 0 16px 45px rgba(35, 20, 15, 0.25);
  --shadow-glow: 0 0 35px rgba(205, 168, 81, 0.4);
}

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

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

body {
  background-color: var(--bg-sand);
  background-image: 
    radial-gradient(circle at 50% 0%, #f1e9e4 0%, #dfd5ce 100%);
  color: var(--ink-primary);
  font-family: var(--font-sans);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-x: hidden;
  user-select: none;
}

/* --------------------------------------------------------------------------
   PREVIEW TOP BAR (Desktop switcher)
   -------------------------------------------------------------------------- */
.preview-bar {
  width: 100%;
  max-width: 1200px;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 100;
}

.preview-bar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.preview-tag {
  background: rgba(99, 82, 76, 0.12);
  color: var(--ink-secondary);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2px;
  padding: 4px 10px;
  border-radius: 20px;
}

.preview-title {
  font-size: 12px;
  color: var(--ink-muted);
  letter-spacing: 0.5px;
}

.view-switcher {
  display: flex;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(10px);
  padding: 3px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.switcher-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-muted);
  cursor: pointer;
  transition: all 0.25s ease;
}

.switcher-btn.active {
  background: #ffffff;
  color: var(--ink-primary);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

/* --------------------------------------------------------------------------
   VIEWPORT & PHONE FRAME
   -------------------------------------------------------------------------- */
.app-viewport {
  width: 100%;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px 0;
  perspective: 1200px;
}

/* Mobile-First Device Styling */
body.mode-device .phone-frame {
  width: 100%;
  min-height: 100dvh;
  max-width: 28rem; /* max-w-md */
  margin: 0 auto;
  background: #ffffff;
  border-radius: 0;
  padding: 0;
  position: relative;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  overflow-x: hidden;
  transition: all 0.3s ease;
}

body.mode-device .phone-bezel {
  display: none !important;
}

body.mode-device .phone-screen {
  width: 100%;
  min-height: 100dvh;
  border-radius: 0;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
  background: var(--pearl-card);
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

/* Mode Fullscreen */
body.mode-fullscreen .phone-frame {
  width: min(540px, 100%);
  height: 100vh;
  border-radius: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

body.mode-fullscreen .phone-bezel {
  display: none;
}

body.mode-fullscreen .phone-screen {
  border-radius: 0;
  height: 100vh;
}

/* Hide scrollbar for a clean mobile look */
.phone-screen::-webkit-scrollbar {
  width: 0;
  display: none;
}
.phone-screen {
  scrollbar-width: none;
}

/* ==========================================================================
   INITIAL LOCKED STATE & 3D REALISTIC DIGITAL ENVELOPE (100VH OVERLAY)
   ========================================================================== */

/* Strict No-Scroll & Hidden Content on Initial Load */
html.initial-locked,
body.initial-locked {
  overflow: hidden !important;
  height: 100vh !important;
  max-height: 100vh !important;
  touch-action: none !important;
}

body.initial-locked #invitationContent {
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

body.initial-locked .floating-controls {
  opacity: 0 !important;
  pointer-events: none !important;
  transform: translateY(20px);
}

body.initial-locked .preview-bar {
  opacity: 0 !important;
  pointer-events: none !important;
}

body.initial-locked .phone-screen {
  overflow: hidden !important;
}

/* Fullscreen 100vh Realistic Digital Envelope Scene */
.envelope-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  touch-action: none;
}

/* Royal Blush Silk & Velvet Background */
.silk-fabric-bg {
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(ellipse at 50% 35%, #fff1ea 0%, #ebd2c6 40%, #cca091 100%),
    linear-gradient(135deg, #dfc2b6 0%, #ba8a79 100%);
  box-shadow: inset 0 0 140px rgba(110, 65, 50, 0.25);
}

/* 3D Realistic Envelope Scene */
.envelope-3d-scene {
  perspective: 1400px;
  perspective-origin: center 40%;
  width: min(350px, 92vw);
  height: min(700px, 92vh);
  aspect-ratio: 1 / 2;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 10;
}

.envelope-3d-box {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  border-radius: 24px;
  box-shadow: 
    0 35px 80px rgba(50, 25, 30, 0.4),
    0 10px 25px rgba(0, 0, 0, 0.25);
}

/* Inner Invitation Card (revealed when flap opens, slides up and out) */
.envelope-inner-card {
  position: absolute;
  inset: 0;
  border-radius: 24px;
  overflow: hidden;
  z-index: 10;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  will-change: transform;
}

/* Front Lower Pocket */
.envelope-front-pocket {
  position: absolute;
  inset: 0;
  border-radius: 24px;
  overflow: hidden;
  z-index: 20;
  pointer-events: none;
  will-change: transform, opacity;
}

/* 3D Luxury Folio Page-Turn Animation */
.card-scene-container {
  perspective: 1400px !important;
  transform-style: preserve-3d !important;
}

.folio-cover-page {
  position: absolute;
  inset: 0;
  transform-origin: left center !important;
  transform-style: preserve-3d !important;
  will-change: transform, box-shadow;
}

.folio-cover-front,
.folio-cover-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden !important;
  -webkit-backface-visibility: hidden !important;
  transform-style: preserve-3d !important;
}

.folio-cover-back {
  transform: rotateY(180deg) !important;
  background: linear-gradient(135deg, #faf4ee 0%, #ece2d9 50%, #dfd2c7 100%) !important;
  box-shadow: inset 8px 0 20px rgba(60, 35, 30, 0.18);
}

/* Physical Luxury Envelope 3D Layers */
.envelope-physical-layers {
  perspective: 1000px !important;
  transform-style: preserve-3d !important;
}

.envelope-pocket {
  position: absolute;
  inset: 0;
  will-change: transform, opacity;
  filter: drop-shadow(0 -4px 16px rgba(45, 20, 25, 0.22));
}

.envelope-fold-top {
  position: absolute;
  inset: 0;
  transform-origin: top center !important;
  transform-style: preserve-3d !important;
  will-change: transform, opacity;
  filter: drop-shadow(0 8px 20px rgba(45, 20, 25, 0.28));
}

.envelope-fold-top .flap-front,
.envelope-fold-top .flap-back {
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.wax-seal-unit {
  position: absolute;
  top: 51.4%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 50;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  will-change: transform, opacity;
  transition: transform 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.wax-seal-unit:hover {
  transform: translate(-50%, -50%) scale(1.04);
}

.wax-seal-unit:active {
  transform: translate(-50%, -50%) scale(0.94);
}

.seal-glint-sweep {
  box-shadow: inset 0 0 15px rgba(255, 255, 255, 0.8);
}

/* Royal Emerald Silk Color Sheen */
.envelope-dusty-mauve-tint {
  display: none;
}

.envelope-physical-layers img {
  filter: none;
}

/* 3D Folding Top Flap (folds open backwards 180deg in 3D space) */
.envelope-top-flap {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform-origin: top center;
  transform-style: preserve-3d;
  z-index: 30;
  border-radius: 24px 24px 0 0;
  will-change: transform;
}

.flap-front-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 24px 24px 0 0;
}

.flap-back-face {
  position: absolute;
  inset: 0;
  transform: rotateX(180deg);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 24px 24px 0 0;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.1);
}

.wax-seal-wrapper {
  position: absolute;
  top: 52%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 118px;
  height: 144px;
  z-index: 40;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s ease;
}

.wax-seal-img-wrap {
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 2;
}

.wax-seal-pulse-ring {
  position: absolute;
  inset: 12px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 240, 230, 0.85);
  animation: sealPulse 2.2s infinite ease-out;
  pointer-events: none;
}

@keyframes sealPulse {
  0% { transform: scale(0.85); opacity: 0.85; }
  50% { opacity: 0.4; }
  100% { transform: scale(1.3); opacity: 0; }
}

.seal-prompt {
  position: absolute;
  bottom: -24px;
  white-space: nowrap;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 2.2px;
  color: #704b50;
  background: rgba(255, 255, 255, 0.95);
  padding: 5px 12px;
  border-radius: 14px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  pointer-events: none;
  animation: promptFloat 2s infinite ease-in-out;
}

@keyframes promptFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

/* Interactive Silk Ribbon Untying Layer */
.ribbon-untying-layer {
  position: absolute;
  top: 48%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  width: 100%;
  pointer-events: none;
  z-index: 25;
  will-change: transform, opacity;
}

/* 3D Physical Book-Hinge Card Opening */
.card-inside-page {
  box-shadow: inset 0 0 40px rgba(70, 45, 40, 0.08);
}

.card-cover-hinge {
  transform-origin: left center;
  transform-style: preserve-3d;
  will-change: transform;
}

.cover-front-face {
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  box-shadow: 
    0 15px 35px rgba(50, 25, 30, 0.25),
    inset 0 1px 2px rgba(255, 255, 255, 0.9);
}

.cover-back-face {
  transform: rotateY(180deg);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  box-shadow: inset 10px 0 30px rgba(50, 25, 30, 0.15);
}

.card-page-shadow {
  transition: opacity 0.3s ease;
  pointer-events: none;
}

/* Photorealistic Sheer Organza Ribbon & 3D Debossed Mother of Pearl Card */
.mother-pearl-card {
  box-shadow: 
    inset 0 2px 4px rgba(255, 255, 255, 0.8),
    0 4px 8px rgba(0, 0, 0, 0.1),
    0 25px 60px rgba(55, 35, 30, 0.28);
  border: 1px solid rgba(255, 240, 235, 0.65);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  will-change: transform, opacity;
}

.mother-pearl-card:hover {
  transform: translateY(-2px);
  box-shadow: 
    inset 0 2px 4px rgba(255, 255, 255, 0.85),
    0 8px 16px rgba(0, 0, 0, 0.12),
    0 30px 70px rgba(55, 35, 30, 0.32);
}

.embossed-backdrop {
  position: absolute;
  inset: 0;
  z-index: 20;
  will-change: transform, opacity;
}

.active-ribbon-layer,
.organza-ribbon-stage {
  position: absolute;
  inset: 0;
  pointer-events: auto !important;
  z-index: 40;
  overflow: hidden;
  cursor: pointer;
}

.untie-cta,
.untie-button {
  pointer-events: auto !important;
  z-index: 50 !important;
  cursor: pointer;
}

.ribbon-left {
  will-change: transform, opacity;
  transform-origin: left center !important;
}

.ribbon-right {
  will-change: transform, opacity;
  transform-origin: right center !important;
}

.ribbon-tails {
  will-change: transform, opacity;
  transform-origin: top center !important;
}

.ribbon-knot {
  will-change: transform, opacity;
  transform-origin: center center !important;
}

.organza-band-wrap {
  position: absolute;
  top: 48.1%;
  transform: translateY(-50%);
  width: 50%;
  height: 13%;
  will-change: transform, opacity;
  pointer-events: none;
}

.organza-left-wrap {
  right: 50%;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.organza-right-wrap {
  left: 50%;
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

.organza-left-wrap img,
.organza-right-wrap img {
  height: 100%;
  width: 100%;
  object-fit: fill;
  backdrop-filter: blur(0.5px);
  -webkit-backdrop-filter: blur(0.5px);
  mix-blend-mode: multiply;
  filter: drop-shadow(0 3px 8px rgba(60, 35, 40, 0.15));
}

.organza-knot-group {
  position: absolute;
  top: 45%;
  left: 50%;
  transform: translateX(-50%);
  width: 53%;
  height: 35.5%;
  z-index: 55;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  transform-origin: 50% 12%;
  will-change: transform, opacity;
  pointer-events: none;
}

.organza-knot-group img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 8px 18px rgba(50, 25, 30, 0.32));
}

/* Envelope 3D Box & Multi-Step Opening Stages */
.card-scene-container {
  width: 100%;
  height: 100dvh;
  max-width: 28rem; /* max-w-md */
  margin-left: auto;
  margin-right: auto;
  position: relative;
  overflow: hidden;
  background-color: #ffffff;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.envelope-3d-box {
  width: 100%;
  height: 100%;
  position: relative;
  perspective: 1200px;
  overflow: hidden;
  background-color: #ffffff;
  will-change: transform;
}

.inner-card-stage {
  will-change: transform, opacity;
}

.envelope-top-flap {
  transform-style: preserve-3d;
  will-change: transform;
}

.envelope-front-pocket {
  will-change: transform, opacity;
}

.ribbon-tap-pulse {
  animation: ribbonPulse 2s infinite ease-out;
}

@keyframes ribbonPulse {
  0% { transform: scale(0.85); opacity: 0.9; }
  50% { opacity: 0.4; }
  100% { transform: scale(1.4); opacity: 0; }
}

.ribbon-prompt {
  animation: promptFloat 2.2s infinite ease-in-out;
}

.seal-tap-pulse {
  animation: sealPulse 2.2s infinite ease-out;
}

/* Luxury Google Calligraphy Typography */
.font-calligraphy {
  font-family: 'Great Vibes', 'Pinyon Script', 'Alex Brush', cursive !important;
}

/* High-End Pressed Paper & Embossed Stationery Textures */
.invitation-main {
  background: 
    radial-gradient(circle at 50% 10%, rgba(255, 255, 255, 0.75) 0%, transparent 60%),
    linear-gradient(180deg, #fbf7f3 0%, #f7eee7 40%, #f4e9e0 100%);
  box-shadow: inset 0 0 60px rgba(185, 150, 135, 0.16);
}

.card-plaque, .stay-card {
  box-shadow: 
    inset 0 0 35px rgba(185, 150, 135, 0.14),
    inset 0 1px 2px rgba(255, 255, 255, 0.95),
    0 15px 35px rgba(60, 40, 35, 0.08);
}
.envelope-overlay.ribbon-scattered .sp-5 { transform: translate(-80px, -140px) scale(2); opacity: 1; }
.envelope-overlay.ribbon-scattered .sp-6 { transform: translate(90px, -130px) scale(1.9); opacity: 1; }
.envelope-overlay.ribbon-scattered .sp-7 { transform: translate(-190px, -20px) scale(1.4); opacity: 1; }
.envelope-overlay.ribbon-scattered .sp-8 { transform: translate(200px, -10px) scale(1.6); opacity: 1; }

/* Stucco Texture on Envelope Exterior */
.envelope-box::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 12px;
  background: 
    radial-gradient(circle at 30% 25%, rgba(255,255,255,0.7) 0%, transparent 50%),
    radial-gradient(circle at 80% 75%, rgba(210,185,175,0.4) 0%, transparent 60%);
  pointer-events: none;
}

/* Envelope Backing & Silk Lining */
.envelope-back {
  position: absolute;
  inset: 0;
  background: #f1e2da;
  border-radius: 12px;
}

.envelope-lining {
  position: absolute;
  top: 15px;
  left: 15px;
  right: 15px;
  bottom: 15px;
  background: linear-gradient(135deg, #f8efe9 0%, #ecdacf 100%);
  border-radius: 8px;
  border: 1px dashed rgba(188, 161, 150, 0.4);
}

/* Interior Card Peek */
.envelope-invitation-card {
  position: absolute;
  top: 25px;
  left: 22px;
  right: 22px;
  bottom: 25px;
  background: #fdf9f6;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid #e7d5cd;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 1s cubic-bezier(0.2, 0.8, 0.2, 1);
  z-index: 3;
}

.card-inner-emboss {
  text-align: center;
  padding: 20px;
}

.card-hint-text {
  font-family: var(--font-script);
  font-size: 32px;
  color: var(--ink-secondary);
  opacity: 0.85;
}

/* Satin Ribbon & Tied Bow across card */
.envelope-ribbon {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  z-index: 5;
  pointer-events: none;
  transition: opacity 0.8s ease;
}

/* --------------------------------------------------------------------------
   FLOATING AUDIO & RSVP CONTROLS (HIDDEN AS REQUESTED)
   -------------------------------------------------------------------------- */
.floating-controls {
  display: none !important;
}

.music-pill, .rsvp-pill {
  height: 40px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: rgba(253, 249, 246, 0.88);
  backdrop-filter: blur(12px);
  color: var(--ink-secondary);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.2px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  box-shadow: 0 4px 18px rgba(78, 59, 53, 0.14);
  cursor: pointer;
  transition: all 0.25s ease;
  text-decoration: none;
}

.music-pill:hover, .rsvp-pill:hover {
  background: #ffffff;
  color: var(--ink-primary);
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(78, 59, 53, 0.2);
}

.music-icon-wrap {
  display: flex;
  align-items: flex-end;
  gap: 2.5px;
  height: 14px;
  margin-right: 8px;
}

.music-icon-wrap .bar {
  width: 2.5px;
  background: var(--gold-accent);
  border-radius: 2px;
  height: 4px;
  transition: height 0.2s ease;
}

.music-pill.playing .bar-1 { animation: soundBar 0.9s infinite ease-in-out; }
.music-pill.playing .bar-2 { animation: soundBar 0.7s infinite ease-in-out 0.2s; }
.music-pill.playing .bar-3 { animation: soundBar 1.1s infinite ease-in-out 0.4s; }

@keyframes soundBar {
  0%, 100% { height: 4px; }
  50% { height: 14px; }
}

.rsvp-pill {
  background: var(--ink-primary);
  color: #fff;
  border-color: var(--ink-primary);
}
.rsvp-pill:hover {
  background: var(--ink-secondary);
  color: #fff;
}

/* --------------------------------------------------------------------------
   PEARL SPARKLE / PETAL LAYER
   -------------------------------------------------------------------------- */
.pearl-dust-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 85;
  overflow: hidden;
}

.dust-particle {
  position: absolute;
  top: -20px;
  border-radius: 50%;
  pointer-events: none;
  animation: fall linear forwards;
}

.particle-petal {
  background: linear-gradient(135deg, #fcece8 0%, #e8c7be 100%);
  border-radius: 80% 0 80% 0;
  opacity: 0.65;
}

.particle-shimmer {
  background: radial-gradient(circle, #ffffff 0%, #f7e6d9 70%, transparent 100%);
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.8);
}

@keyframes fall {
  to {
    transform: translate3d(var(--drift), 105vh, 0) rotate(540deg);
    opacity: 0;
  }
}

/* --------------------------------------------------------------------------
   2. INVITATION MAIN CONTENT
   -------------------------------------------------------------------------- */
.invitation-main {
  width: 100%;
  background: var(--pearl-card);
  color: var(--ink-primary);
  position: relative;
  overflow: hidden;
}

/* Universal Section Styling */
.card-section {
  position: relative;
  padding: 55px 24px;
  text-align: center;
}

/* Subtle Mother of Pearl Stucco Background */
.stucco-wash {
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(ellipse at 50% 10%, rgba(255, 255, 255, 0.8) 0%, transparent 60%),
    radial-gradient(circle at 10% 80%, rgba(235, 218, 209, 0.5) 0%, transparent 45%),
    radial-gradient(circle at 90% 40%, rgba(228, 209, 200, 0.4) 0%, transparent 50%);
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   SECTION 1: HERO / COVER CARD
   -------------------------------------------------------------------------- */
.section-cover {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 24px 50px;
}

.baroque-frame-overlay {
  position: absolute;
  inset: 16px;
  pointer-events: none;
  z-index: 2;
}

.frame-svg {
  width: 100%;
  height: 100%;
  object-fit: fill;
}

.cover-content {
  position: relative;
  z-index: 5;
  max-width: 330px;
  margin: 0 auto;
}

.family-intro {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 14.5px;
  letter-spacing: 0.8px;
  color: var(--ink-muted);
  margin-bottom: 24px;
}

.names-wrap {
  margin: 15px 0 22px;
}

.couple-names {
  font-family: var(--font-script);
  font-weight: 400;
  line-height: 0.95;
  color: var(--ink-primary);
  letter-spacing: 0.5px;
}

.name-first {
  display: block;
  font-size: clamp(34px, 9vw, 50px);
  color: #433531;
  white-space: nowrap;
}

.name-amp {
  display: block;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 24px;
  color: var(--gold-accent);
  margin: 2px 0 4px;
}

.name-second {
  display: block;
  font-size: clamp(34px, 9vw, 50px);
  color: #433531;
  white-space: nowrap;
}

.event-stamp-line {
  margin: 22px 0 20px;
  position: relative;
  display: inline-block;
  padding: 0 16px;
}

.event-stamp-line::before, .event-stamp-line::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 28px;
  height: 1px;
  background: var(--gold-accent);
  opacity: 0.6;
}
.event-stamp-line::before { left: -22px; }
.event-stamp-line::after { right: -22px; }

.wedding-date {
  font-family: var(--font-serif);
  font-size: 15px;
  letter-spacing: 3.5px;
  color: var(--ink-secondary);
  font-weight: 500;
}

.location-stamp-line {
  margin-top: 10px;
}

.venue-title {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 21px;
  color: var(--ink-primary);
  margin-bottom: 4px;
}

.city-title {
  font-family: var(--font-sans);
  font-size: 9px;
  letter-spacing: 3.2px;
  color: var(--ink-muted);
  font-weight: 600;
}

.scroll-prompt {
  margin-top: 38px;
  animation: bounceDown 2s infinite ease-in-out;
}

.scroll-arrow {
  font-size: 20px;
  color: var(--gold-accent);
}

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

/* --------------------------------------------------------------------------
   SECTION 2: COUNTDOWN (Soft dusty blue angel backdrop & antique plaque)
   -------------------------------------------------------------------------- */
.section-countdown {
  position: relative;
  background: #90a5af;
  background-image: 
    radial-gradient(circle at 50% 20%, rgba(255, 255, 255, 0.25) 0%, transparent 60%),
    linear-gradient(180deg, #8ba0aa 0%, #9cb1bb 100%);
  padding: 50px 20px 45px;
  overflow: hidden;
  box-shadow: inset 0 6px 15px rgba(0, 0, 0, 0.08);
}

.countdown-wrap {
  position: relative;
  z-index: 2;
  max-width: 320px;
  margin: 0 auto;
}

.script-title-angel {
  font-family: var(--font-script);
  font-size: 46px;
  font-weight: 400;
  color: #ffffff;
  margin-bottom: 20px;
  text-shadow: 0 2px 10px rgba(40, 55, 65, 0.25);
}

.antique-countdown-box {
  background: #fffdfa;
  border: 1px solid #cda851;
  outline: 1px solid #ebd28e;
  outline-offset: 4px;
  border-radius: 14px;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 
    0 10px 30px rgba(10, 35, 26, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.count-antique-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.count-antique-item .count-num {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 600;
  color: #0b251d;
  line-height: 1;
}

.count-antique-item .count-unit {
  font-family: var(--font-sans);
  font-size: 6.5px;
  font-weight: 600;
  letter-spacing: 1.5px;
  color: #83949a;
  margin-top: 5px;
}

.count-divider {
  font-family: var(--font-serif);
  font-size: 18px;
  color: #b0c1c8;
  margin-top: -6px;
  opacity: 0.7;
}

.script-subtitle-see {
  font-family: var(--font-script);
  font-size: 38px;
  color: #ffffff;
  margin-top: 20px;
  text-shadow: 0 2px 10px rgba(40, 55, 65, 0.25);
}

/* --------------------------------------------------------------------------
   SECTION 3: COUPLE PORTRAIT (Mother-of-Pearl shell plaque)
   -------------------------------------------------------------------------- */
.section-portrait {
  padding: 45px 20px 50px;
  background: var(--pearl-card);
}

.mop-shell-plaque {
  position: relative;
  max-width: 320px;
  margin: 0 auto;
  padding: 28px 20px;
  background: 
    radial-gradient(circle at 45% 35%, #ffffff 0%, #fbf3ed 35%, #eedcd3 70%, #d8c2b7 100%);
  border-radius: 12px;
  box-shadow: 
    0 12px 40px rgba(65, 48, 42, 0.16),
    inset 0 0 20px rgba(255, 255, 255, 0.8);
  border: 1px solid #ded0c8;
}

/* Pearl Studs surrounding the portrait */
.pearl-studs-frame {
  position: absolute;
  inset: 12px;
  border: 2px dotted #cca89c;
  border-radius: 8px;
  pointer-events: none;
  opacity: 0.55;
}

.portrait-oval-frame {
  width: 220px;
  height: 285px;
  position: relative;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.oval-frame-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  z-index: 3;
  pointer-events: none;
  filter: drop-shadow(0 4px 10px rgba(60, 42, 36, 0.2));
}

.portrait-photo-mask {
  width: 146px;
  height: 196px;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
  z-index: 1;
  box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.35);
}

.couple-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: sepia(0.1) saturate(0.95);
  transition: transform 1.2s ease;
}

.portrait-oval-frame:hover .couple-img {
  transform: scale(1.05);
}

/* Scratch to Reveal Interactive Canvas Layer */
.scratch-canvas {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 53%;
  height: 78%;
  border-radius: 50%;
  cursor: crosshair;
  touch-action: none;
  z-index: 20;
  box-shadow: inset 0 2px 6px rgba(255, 255, 255, 0.7), 0 4px 15px rgba(112, 75, 80, 0.2);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.scratch-canvas:active {
  cursor: grabbing;
}

.scratch-badge {
  letter-spacing: 2px;
  box-shadow: 0 4px 14px rgba(185, 135, 118, 0.25);
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.scratch-badge:hover {
  box-shadow: 0 6px 18px rgba(185, 135, 118, 0.4);
}

.pearl-shimmer-sweep {
  position: absolute;
  inset: -100%;
  background: linear-gradient(
    45deg,
    transparent 40%,
    rgba(255, 255, 255, 0.45) 50%,
    transparent 60%
  );
  animation: shimmerSweep 6s infinite ease-in-out;
  pointer-events: none;
}

@keyframes shimmerSweep {
  0% { transform: translateX(-100%) translateY(-100%); }
  40%, 100% { transform: translateX(100%) translateY(100%); }
}

/* --------------------------------------------------------------------------
   SECTION 4: LOCATION / VENUE
   -------------------------------------------------------------------------- */
.section-location {
  background: #fcf8f5;
  padding: 50px 24px;
  border-top: 1px solid rgba(220, 200, 190, 0.4);
}

.section-label {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 500;
  letter-spacing: 0.5px;
  color: var(--ink-primary);
  margin-bottom: 2px;
}

.venue-script {
  font-family: var(--font-script);
  font-size: 40px;
  color: var(--gold-dark);
  font-weight: 400;
  margin-bottom: 4px;
}

.venue-caps {
  font-family: var(--font-sans);
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 3px;
  color: var(--ink-muted);
  margin-bottom: 26px;
}

.sketch-container {
  max-width: 320px;
  margin: 0 auto 24px;
}

.villa-sketch-img {
  width: 100%;
  height: auto;
  display: block;
}

.location-body {
  max-width: 300px;
  margin: 0 auto 28px;
  font-size: 12.5px;
  line-height: 1.75;
  color: var(--ink-secondary);
}

.location-body p {
  margin-bottom: 12px;
}

.note-italic {
  font-style: italic;
  color: var(--ink-muted);
  font-size: 11.5px;
}

/* Pearl Outline Luxury Button */
.pearl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fffdfb;
  color: var(--ink-primary);
  border: 1px solid #c9b2a7;
  outline: 1px solid #dfcfc7;
  outline-offset: 3px;
  padding: 12px 28px;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 2px;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(90, 68, 62, 0.08);
  transition: all 0.3s ease;
  border-radius: 2px;
}

.pearl-btn:hover {
  background: var(--pearl-tint);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(90, 68, 62, 0.14);
}

/* --------------------------------------------------------------------------
   SECTION 5: THE DAY / TIMELINE (Bas-Relief Plaster Curtains & Pearl Nodes)
   -------------------------------------------------------------------------- */
.section-timeline {
  position: relative;
  background: #fbf7f4;
  padding: 55px 20px 65px;
  border-top: 1px solid rgba(220, 200, 190, 0.4);
  overflow: hidden;
}

.drapery {
  position: absolute;
  top: 15px;
  bottom: 15px;
  width: 50px;
  pointer-events: none;
  z-index: 2;
  opacity: 0.9;
}
.drapery-left { left: 6px; }
.drapery-right { right: 6px; transform: scaleX(-1); }
.drapery-svg { width: 100%; height: 100%; object-fit: fill; }

.timeline-content-wrap {
  position: relative;
  z-index: 5;
  max-width: 290px;
  margin: 0 auto;
}

.script-title-the-day {
  font-family: var(--font-script);
  font-size: 54px;
  font-weight: 400;
  color: #3b4e57;
  margin-bottom: 4px;
  line-height: 1;
}

.timeline-intro {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 13px;
  color: #7d6b63;
  margin-bottom: 34px;
  line-height: 1.5;
}

.timeline-list {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 24px;
  text-align: left;
  padding-left: 15px;
}

.timeline-list::before {
  content: "";
  position: absolute;
  top: 10px;
  bottom: 20px;
  left: 20px;
  width: 1px;
  background: rgba(188, 161, 150, 0.5);
}

.timeline-row {
  position: relative;
  padding-left: 24px;
}

.timeline-pearl-node {
  position: absolute;
  left: -1px;
  top: 4px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffffff 0%, #f7ebe4 60%, #bca196 100%);
  border: 1px solid #7c675e;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.time-stamp {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 16px;
  color: #3b4e57;
  margin-bottom: 2px;
}

.time-stamp small {
  font-size: 10px;
  font-style: normal;
  letter-spacing: 1px;
}

.time-title {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--ink-primary);
  margin-bottom: 2px;
}

.time-sub {
  font-size: 11.5px;
  color: var(--ink-muted);
  font-style: italic;
}

/* --------------------------------------------------------------------------
   SECTION 6: DRESS CODE
   -------------------------------------------------------------------------- */
.section-dresscode {
  padding: 50px 20px;
  background: var(--pearl-card);
}

.card-plaque {
  background: #fdfaf7;
  border: 1px solid #d4c0b5;
  outline: 1px solid #ebdcd4;
  outline-offset: 6px;
  border-radius: 10px;
  padding: 38px 20px;
  max-width: 320px;
  margin: 0 auto;
  position: relative;
  box-shadow: 0 8px 30px rgba(85, 62, 54, 0.08);
}

.card-heading {
  font-family: var(--font-serif);
  font-size: 27px;
  font-weight: 500;
  color: var(--ink-primary);
}

.script-subheading {
  font-family: var(--font-script);
  font-size: 34px;
  color: var(--gold-dark);
  margin-bottom: 18px;
}

.dress-sketch-wrap {
  width: 200px;
  margin: 0 auto 20px;
}

.dress-sketch-img {
  width: 100%;
  height: auto;
  display: block;
}

.dress-desc {
  font-size: 12px;
  line-height: 1.7;
  color: var(--ink-secondary);
  margin-bottom: 12px;
}

.dress-caution {
  font-style: italic;
  font-size: 11.5px;
  color: var(--ink-muted);
  margin-bottom: 24px;
}

.wax-coins-row {
  display: flex;
  justify-content: space-between;
  padding: 0 10px;
}

.wax-coin {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #f4eae3, #bca196);
  border: 1px solid #8e7368;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(78, 59, 53, 0.2);
}

.wax-coin span {
  font-family: var(--font-script);
  font-size: 16px;
  color: #4b3a34;
}

/* --------------------------------------------------------------------------
   SECTION 7: TRANSPORTATION
   -------------------------------------------------------------------------- */
.section-transport {
  padding: 50px 20px;
  background: #fbf6f2;
  border-top: 1px solid rgba(220, 200, 190, 0.4);
}

.stamps-header {
  width: 240px;
  margin: 0 auto 15px;
}

.stamps-svg-img {
  width: 100%;
  height: auto;
  display: block;
}

.card-heading-script {
  font-family: var(--font-script);
  font-size: 42px;
  color: var(--ink-primary);
  margin-bottom: 15px;
}

.transport-body {
  font-size: 12px;
  line-height: 1.75;
  color: var(--ink-secondary);
  margin-bottom: 24px;
}
.transport-body p { margin-bottom: 10px; }

/* --------------------------------------------------------------------------
   SECTION 8: WHERE TO STAY
   -------------------------------------------------------------------------- */
.section-stay {
  padding: 50px 20px;
  background: var(--pearl-card);
  border-top: 1px solid rgba(220, 200, 190, 0.4);
}

.stay-sub {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 13.5px;
  color: var(--ink-muted);
  max-width: 290px;
  margin: 6px auto 30px;
  line-height: 1.5;
}

.hotel-card {
  position: relative;
  background: #fffdfb;
  border-radius: 8px;
  padding: 30px 22px;
  max-width: 320px;
  margin: 0 auto 28px;
  box-shadow: 0 6px 25px rgba(85, 62, 54, 0.08);
}

.hotel-frame-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hotel-frame-img {
  width: 100%;
  height: 100%;
  object-fit: fill;
}

.hotel-content {
  position: relative;
  z-index: 2;
}

.hotel-name {
  font-family: var(--font-serif);
  font-size: 21px;
  font-weight: 500;
  color: var(--ink-primary);
  margin-bottom: 6px;
}

.hotel-address {
  font-size: 10.5px;
  color: var(--ink-muted);
  margin-bottom: 15px;
}

.hotel-meta {
  margin-bottom: 14px;
}

.meta-badge {
  display: inline-block;
  background: rgba(188, 161, 150, 0.18);
  color: var(--ink-secondary);
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 1.2px;
  padding: 4px 10px;
  border-radius: 12px;
}

.meta-rate {
  font-size: 10px;
  color: var(--gold-dark);
  font-style: italic;
  margin-top: 4px;
}

.hotel-description {
  font-size: 11.5px;
  line-height: 1.65;
  color: var(--ink-secondary);
  margin-bottom: 20px;
}

.hotel-book-btn {
  display: inline-block;
  border: 1px solid #bca196;
  background: #fff;
  color: var(--ink-primary);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 2px;
  padding: 8px 24px;
  text-decoration: none;
  transition: all 0.25s ease;
}

.hotel-book-btn:hover {
  background: var(--gold-accent);
  color: #fff;
}

/* --------------------------------------------------------------------------
   SECTION 9: WEDDING GIFT
   -------------------------------------------------------------------------- */
.section-gift {
  padding: 50px 20px;
  background: #fbf5f0;
  border-top: 1px solid rgba(220, 200, 190, 0.4);
}

.gift-lead {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 15px;
  color: var(--gold-dark);
  margin-bottom: 12px;
}

.gift-body {
  font-size: 12px;
  line-height: 1.7;
  color: var(--ink-secondary);
  margin-bottom: 24px;
}

/* --------------------------------------------------------------------------
   SECTION 10: RSVP FORM
   -------------------------------------------------------------------------- */
.section-rsvp {
  padding: 55px 20px;
  background: #f7ede7;
  border-top: 1px solid rgba(220, 200, 190, 0.4);
}

.rsvp-sub {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 13.5px;
  color: var(--ink-muted);
  margin-top: -6px;
  margin-bottom: 28px;
}

.luxury-rsvp-form {
  text-align: left;
}

.input-field {
  margin-bottom: 18px;
}

.input-field label {
  display: block;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--ink-secondary);
  margin-bottom: 6px;
}

.luxury-rsvp-form input[type="text"],
.luxury-rsvp-form input[type="tel"],
.luxury-rsvp-form select,
.luxury-rsvp-form textarea {
  width: 100%;
  background: #fffefd;
  border: 1px solid #d9c5ba;
  padding: 10px 12px;
  border-radius: 4px;
  font-family: var(--font-sans);
  font-size: 12.5px;
  color: var(--ink-primary);
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s;
}

.luxury-rsvp-form input:focus,
.luxury-rsvp-form select:focus,
.luxury-rsvp-form textarea:focus {
  border-color: var(--gold-accent);
  box-shadow: 0 0 0 2px rgba(188, 161, 150, 0.2);
}

.attendance-options {
  display: flex;
  gap: 10px;
}

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

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

.radio-pill span {
  display: block;
  text-align: center;
  padding: 9px 6px;
  border: 1px solid #d9c5ba;
  background: #fff;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-muted);
  transition: all 0.25s ease;
}

.radio-pill input:checked + span {
  background: var(--ink-primary);
  border-color: var(--ink-primary);
  color: #fff;
}

.submit-btn {
  width: 100%;
  margin-top: 12px;
  padding: 14px 20px;
}

.rsvp-status-message {
  text-align: center;
  font-size: 12px;
  margin-top: 14px;
  min-height: 20px;
}

.rsvp-status-message.success { color: #3b6b4c; }
.rsvp-status-message.error { color: #9c3f38; }

/* --------------------------------------------------------------------------
   FOOTER
   -------------------------------------------------------------------------- */
.invitation-footer {
  padding: 45px 20px 60px;
  background: #eae0d8;
  text-align: center;
  border-top: 1px solid rgba(200, 180, 170, 0.4);
}

.footer-monogram-emblem {
  font-family: var(--font-serif);
  font-size: 32px;
  color: var(--ink-secondary);
  letter-spacing: 4px;
  margin-bottom: 8px;
}

.footer-monogram-emblem i {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 18px;
  color: var(--gold-dark);
}

.footer-date {
  font-size: 8.5px;
  letter-spacing: 2.5px;
  color: var(--ink-muted);
  margin-bottom: 4px;
}

.footer-credit {
  font-family: var(--font-script);
  font-size: 26px;
  color: var(--ink-secondary);
}

/* --------------------------------------------------------------------------
   LUXURY MODALS
   -------------------------------------------------------------------------- */
.luxury-modal {
  border: none;
  background: transparent;
  padding: 20px;
  max-width: 380px;
  width: 90%;
  margin: auto;
}

.luxury-modal::backdrop {
  background: rgba(35, 27, 24, 0.65);
  backdrop-filter: blur(4px);
}

.modal-card {
  background: #fdfaf7;
  border: 1px solid #d8c3b7;
  outline: 1px solid #ebded7;
  outline-offset: 6px;
  border-radius: 10px;
  padding: 30px 24px;
  position: relative;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.25);
  text-align: center;
}

.modal-close-btn {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  font-size: 24px;
  color: var(--ink-muted);
  cursor: pointer;
}

.modal-title {
  font-family: var(--font-serif);
  font-size: 22px;
  color: var(--ink-primary);
  margin-bottom: 16px;
}

.modal-content {
  text-align: left;
  font-size: 12px;
  line-height: 1.65;
  color: var(--ink-secondary);
  margin-bottom: 22px;
}

.modal-content ul {
  padding-left: 20px;
  margin: 10px 0;
}

.registry-bank-box {
  background: #f5ebe5;
  padding: 12px;
  border-radius: 6px;
  border: 1px dashed #cbb5aa;
  margin-top: 10px;
  font-size: 11px;
}

.modal-btn {
  width: 100%;
}

/* --------------------------------------------------------------------------
   MOBILE RESPONSIVENESS
   -------------------------------------------------------------------------- */
@media (max-width: 600px) {
  .preview-bar {
    display: none;
  }
  
  .app-viewport {
    padding: 0;
  }
  
  body.mode-device .phone-frame {
    width: 100%;
    height: 100vh;
    border-radius: 0;
    padding: 0;
    background: transparent;
    box-shadow: none;
  }
  
  body.mode-device .phone-bezel {
    display: none;
  }
  
  body.mode-device .phone-screen {
    border-radius: 0;
    height: 100vh;
  }
}
