/* ==========================================================================
   INTERACTIVE WEDDING INVITATION — STYLESHEET
   John & Jessa • October 24, 2026 • Dumaguete City
   ========================================================================== */

:root {
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Montserrat', 'Manrope', -apple-system, sans-serif;
  --font-script: 'Cormorant Garamond', Georgia, serif;
  --font-display: 'Cinzel', 'Cormorant Garamond', serif;

  --color-gold-light: #f2e2be;
  --color-gold: #c5a880;
  --color-gold-dark: #8e6d3b;
  --color-gold-metallic: linear-gradient(135deg, #dfc18c 0%, #b89758 50%, #8e6d3b 100%);
  --color-cream: #fffdf9;
  --color-parchment: #f9f6f0;
  --color-linen: #f2ede4;
  --color-espresso: #252220;
  --color-charcoal: #3c3835;
  --color-muted: #78726d;
  --color-wax: #b83528;
  --color-wax-gold: #c5973c;
  --shadow-subtle: 0 10px 30px rgba(0, 0, 0, 0.08);
  --shadow-luxury: 0 25px 60px -15px rgba(28, 22, 16, 0.22);
  --shadow-door: 0 30px 80px rgba(0, 0, 0, 0.4);
  --transition-smooth: cubic-bezier(0.25, 1, 0.35, 1);
  --transition-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html, body {
  width: 100%;
  height: 100%;
  overflow-x: hidden;
  background-color: #f7f1e7;
  color: var(--color-charcoal);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.lock-scroll {
  overflow: hidden;
}

/* Ambient Particles Canvas */
.ambient-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 15;
}

/* ==========================================================================
   NAVIGATION & TOP CONTROLS
   ========================================================================== */
.invitation-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 1.25rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
  background: linear-gradient(to bottom, rgba(242, 237, 228, 0.92) 0%, rgba(242, 237, 228, 0) 100%);
  pointer-events: none;
  transition: opacity 0.5s ease;
}

.invitation-header * {
  pointer-events: auto;
}

.header-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-espresso);
  text-decoration: none;
  padding: 0.5rem 1.1rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(197, 168, 128, 0.4);
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.header-back-link:hover {
  background: #ffffff;
  transform: translateX(-3px);
  border-color: var(--color-gold);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.control-btn {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(197, 168, 128, 0.4);
  color: var(--color-espresso);
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  padding: 0.5rem 0.9rem;
  border-radius: 9999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: all 0.3s ease;
  user-select: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.control-btn:hover {
  background: #ffffff;
  transform: translateY(-2px);
  border-color: var(--color-gold);
}

/* ==========================================================================
   STAGE CONTAINER
   ========================================================================== */
.invitation-experience {
  position: relative;
  width: 100vw;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  perspective: 1400px;
}

/* ==========================================================================
   STAGE 1: THE WAX-SEALED ENVELOPE (INITIAL LOAD)
   ========================================================================== */
.envelope-stage {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 50;
  background: radial-gradient(circle at center, #fbf7f0 0%, #ede3d3 60%, #e0d3bc 100%);
  transition: opacity 1.2s var(--transition-smooth), transform 1.2s var(--transition-smooth), visibility 1.2s;
  perspective: 1400px;
}

.envelope-stage.stage-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: scale(0.92);
}

.envelope-botanical-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.15;
  background-image: radial-gradient(#9a846a 1px, transparent 1px);
  background-size: 24px 24px;
}

.envelope-scene-header {
  text-align: center;
  margin-bottom: 2rem;
  z-index: 10;
  padding: 0 1rem;
}

.scene-script-tagline {
  font-family: var(--font-script);
  font-style: italic;
  font-weight: 500;
  font-size: 1.55rem;
  letter-spacing: 0.03em;
  color: var(--color-gold-dark);
  line-height: 1.25;
}

.scene-title {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-espresso);
  margin-top: 0.3rem;
}

.scene-subtitle {
  font-family: var(--font-sans);
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-top: 0.35rem;
}

.envelope-wrapper {
  position: relative;
  width: 90vw;
  max-width: 520px;
  height: 350px;
  margin: 0 auto;
  perspective: 1200px;
  transform-style: preserve-3d;
}

.envelope-body {
  position: relative;
  width: 100%;
  height: 100%;
  background: #fdfbf7;
  border-radius: 12px;
  box-shadow: var(--shadow-luxury), 0 5px 15px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(197, 168, 128, 0.35);
  overflow: visible;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2.2rem;
  transform-style: preserve-3d;
  transition: transform 0.4s ease;
}

.envelope-body::before {
  content: '';
  position: absolute;
  inset: 10px;
  border: 1px dashed rgba(197, 168, 128, 0.4);
  border-radius: 8px;
  pointer-events: none;
}

/* Calligraphy Envelope Addressing */
.envelope-address {
  text-align: center;
  position: relative;
  z-index: 10;
  user-select: none;
}

.envelope-recipient {
  font-family: var(--font-script);
  font-style: italic;
  font-weight: 500;
  font-size: 1.6rem;
  line-height: 1.25;
  letter-spacing: 0.02em;
  color: var(--color-espresso);
}

.envelope-couple {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-gold-dark);
  margin-top: 0.4rem;
}

.envelope-event-meta {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-top: 0.3rem;
}

/* Envelope Flaps */
.envelope-flap-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 185px;
  transform-origin: top center;
  transform-style: preserve-3d;
  transition: transform 1.2s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 30;
  overflow: visible;
  pointer-events: auto;
}

.envelope-flap-triangle {
  position: absolute;
  inset: 0;
  clip-path: polygon(0 0, 50% 100%, 100% 0);
  background: linear-gradient(180deg, #f7f3eb 0%, #ece5d8 100%);
  border-radius: 12px 12px 0 0;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.12));
}

.envelope-flap-triangle::after {
  content: '';
  position: absolute;
  inset: 0;
  clip-path: polygon(4px 0, 50% calc(100% - 6px), calc(100% - 4px) 0);
  background: linear-gradient(180deg, #faf7f2 0%, #f1ebe1 100%);
}

.envelope-stage.envelope-opened .envelope-flap-top {
  transform: rotateX(180deg);
  z-index: 5;
}

/* The 3D Wax Seal */
.wax-seal {
  position: absolute;
  bottom: -32px;
  left: 50%;
  transform: translateX(-50%) translateZ(25px);
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #f0c56b 0%, #c49433 50%, #875e18 100%);
  box-shadow: 0 10px 28px rgba(78, 52, 13, 0.5), 
              inset 0 3px 6px rgba(255, 255, 255, 0.7), 
              inset 0 -3px 6px rgba(0, 0, 0, 0.4);
  border: 3px solid #b88628;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 50;
  transition: transform 0.3s var(--transition-bounce), filter 0.3s ease;
  user-select: none;
}

.wax-seal::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.4) 0%, transparent 70%);
  animation: sealAura 2.5s ease-in-out infinite alternate;
}

@keyframes sealAura {
  0% { transform: scale(0.9); opacity: 0.5; }
  100% { transform: scale(1.15); opacity: 0.9; }
}

.wax-seal:hover {
  transform: translateX(-50%) scale(1.1);
  filter: brightness(1.1);
}

.wax-seal-inner {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px dashed rgba(255, 255, 255, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.wax-seal-monogram {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff4d1;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6), 0 -1px 0 rgba(255, 255, 255, 0.4);
  letter-spacing: 0.05em;
}

/* Wax Broken State */
.envelope-stage.envelope-opened .wax-seal {
  opacity: 0;
  transform: translateX(-50%) scale(0.4);
  pointer-events: none;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.envelope-action-cue {
  margin-top: 3.5rem;
  text-align: center;
}

.seal-prompt-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1.6rem;
  border-radius: 9999px;
  background: #fff;
  border: 1px solid rgba(197, 168, 128, 0.5);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  color: var(--color-espresso);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  animation: gentlePulse 2.5s ease-in-out infinite;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.seal-prompt-pill:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}

@keyframes gentlePulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 15px rgba(212, 175, 55, 0.2); }
  50% { transform: scale(1.03); box-shadow: 0 0 28px rgba(212, 175, 55, 0.45); }
}

/* ==========================================================================
   STAGE 2: THE INTERACTIVE INVITATION SUITE
   ========================================================================== */
.cards-stage {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 40;
  background: radial-gradient(circle at center, #fcf9f4 0%, #f4ede3 60%, #e8dcce 100%);
  transition: opacity 1s var(--transition-smooth), transform 1s var(--transition-smooth), visibility 1s;
  padding: 5rem 1.5rem 2.5rem 1.5rem;
  overflow-y: auto;
}

.cards-stage.stage-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: scale(0.94);
}

/* Card Presentation Deck */
.card-presentation-deck {
  position: relative;
  width: 100%;
  max-width: 450px;
  height: 74vh;
  min-height: 520px;
  max-height: 680px;
  margin: 0 auto;
  perspective: 1600px;
  transform-style: preserve-3d;
  transition: max-width 0.75s var(--transition-smooth), height 0.75s var(--transition-smooth), min-height 0.75s var(--transition-smooth), max-height 0.75s var(--transition-smooth);
}

.card-presentation-deck.viewing-landscape {
  max-width: min(94vw, 880px);
  height: min(74vh, min(calc(94vw / 1.418), 620px));
  min-height: 240px;
  max-height: 620px;
}

.invitation-card {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #fffdfb;
  border-radius: 16px;
  box-shadow: var(--shadow-luxury), 0 0 0 1px rgba(197, 168, 128, 0.35);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.65s var(--transition-smooth), opacity 0.65s var(--transition-smooth), filter 0.65s ease;
  user-select: none;
  backface-visibility: hidden;
  transform-style: preserve-3d;
  opacity: 0 !important;
  pointer-events: none !important;
  visibility: hidden !important;
  transform: translateY(40px) scale(0.92);
}

.invitation-card:not(.card-active) * {
  pointer-events: none !important;
}

/* Active and Surrounding Card States */
.invitation-card.card-active {
  opacity: 1 !important;
  pointer-events: auto !important;
  visibility: visible !important;
  transform: translateY(0) scale(1);
  z-index: 25;
}

.invitation-card.card-active * {
  pointer-events: auto;
}

.invitation-card.card-prev {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transform: translateX(-120%) rotate(-8deg) scale(0.9);
  z-index: 10;
}

.invitation-card.card-next {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transform: translateX(120%) rotate(8deg) scale(0.9);
  z-index: 10;
}

/* ==========================================================================
   GATEFOLD ARCH DOORS CARD (CARD 1)
   ========================================================================== */
.card-gatefold-container {
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.gatefold-card {
  position: relative;
  width: 100%;
  height: 100%;
  perspective: 1600px;
  transform-style: preserve-3d;
  border-radius: 16px;
  cursor: pointer;
}

/* Inside card revealed beneath the open doors */
.gatefold-inside {
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: 16px;
  overflow: hidden;
  background: #fffdfb;
  box-shadow: var(--shadow-luxury), 0 0 0 1px rgba(197, 168, 128, 0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px;
  box-sizing: border-box;
}

/* The Doors Wrapper */
.gatefold-doors-wrapper {
  position: absolute;
  inset: 0;
  display: flex;
  z-index: 20;
  pointer-events: auto;
  border-radius: 14px;
  overflow: hidden;
  perspective: 1600px;
  transform-style: preserve-3d;
  transition: visibility 0.85s;
}

/* Door Flaps (Left & Right halves) */
.gatefold-door {
  position: relative;
  width: 50%;
  height: 100%;
  overflow: hidden;
  transform-style: preserve-3d;
  transition: transform 0.85s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.7s ease, visibility 0.85s;
  will-change: transform, opacity;
}

.gatefold-door-left {
  transform-origin: left center;
  border-radius: 14px 0 0 14px;
  box-shadow: 4px 0 16px rgba(0, 0, 0, 0.15);
  border-right: 1px solid rgba(197, 168, 128, 0.5);
}

.gatefold-door-right {
  transform-origin: right center;
  border-radius: 0 14px 14px 0;
  box-shadow: -4px 0 16px rgba(0, 0, 0, 0.15);
  border-left: 1px solid rgba(197, 168, 128, 0.5);
}

.gatefold-door-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Inner Crease Shadows */
.door-crease-shadow {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 25px;
  pointer-events: none;
  z-index: 5;
}

.door-crease-left {
  right: 0;
  background: linear-gradient(to left, rgba(0, 0, 0, 0.12), transparent);
}

.door-crease-right {
  left: 0;
  background: linear-gradient(to right, rgba(0, 0, 0, 0.12), transparent);
}

/* Doors Opened State: Slide outward and smoothly vanish! NO WINGS! */
.gatefold-card.doors-open .gatefold-doors-wrapper {
  pointer-events: none !important;
  visibility: hidden !important;
  display: none !important;
}

.gatefold-card.doors-open .gatefold-inside {
  z-index: 50 !important;
  pointer-events: auto !important;
}

.gatefold-card.doors-open .gatefold-inside * {
  pointer-events: auto;
}

.gatefold-card.doors-open .gatefold-door-left {
  transform: translateX(-110%) rotateY(-60deg);
  opacity: 0;
  pointer-events: none !important;
  visibility: hidden !important;
}

.gatefold-card.doors-open .gatefold-door-right {
  transform: translateX(110%) rotateY(60deg);
  opacity: 0;
  pointer-events: none !important;
  visibility: hidden !important;
}

/* Center Opening Badge / Prompt */
.door-center-seal {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 30;
  pointer-events: auto;
  cursor: pointer;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.gatefold-card.doors-open .door-center-seal {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.6);
  pointer-events: none;
}

.door-seal-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.4rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(197, 168, 128, 0.6);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15), 0 0 15px rgba(212, 175, 55, 0.3);
  color: var(--color-espresso);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  animation: gentlePulse 2.5s ease-in-out infinite;
  cursor: pointer;
  transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.door-seal-badge:hover {
  transform: scale(1.06);
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2), 0 0 20px rgba(212, 175, 55, 0.5);
}

/* Card Artwork Wrapper for other cards */
.card-artwork-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  overflow: hidden;
  border-radius: inherit;
  padding: 12px;
  box-sizing: border-box;
}

.card-artwork-img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
  border-radius: 6px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* Foil Shine Overlay that moves with cursor / tilt */
.card-foil-sheen {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(125deg, transparent 35%, rgba(255, 230, 160, 0.25) 48%, rgba(255, 255, 255, 0.45) 50%, rgba(255, 230, 160, 0.25) 52%, transparent 65%);
  background-size: 250% 250%;
  background-position: 100% 100%;
  pointer-events: none !important;
  mix-blend-mode: overlay;
  transition: background-position 0.2s ease;
  z-index: 25;
}

/* Card 1: Landscape Card Specific Artwork Styling */
.card-artwork-landscape {
  background: #ffffff;
  padding: 8px;
  box-shadow: inset 0 0 0 1px rgba(197, 168, 128, 0.25);
  cursor: default;
}

.card-landscape-img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  cursor: default;
}

/* Card 5: Interactive Details & Schedule Layout */
.card-interactive-details {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
  width: 100%;
  padding: 1.25rem 1.15rem;
  background: linear-gradient(180deg, #fffdfb 0%, #faf6ee 100%);
  border-radius: inherit;
  box-sizing: border-box;
  gap: 0.65rem;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--color-gold) transparent;
}

.details-card-header {
  text-align: center;
  margin-bottom: 0.1rem;
}

.details-card-title {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--color-charcoal);
  letter-spacing: 0.04em;
  line-height: 1.15;
}

.details-subtitle {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-gold-dark);
  margin-top: 0.2rem;
}

/* Timeline List for Ceremony & Reception */
.details-events-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  width: 100%;
}

.details-event-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  background: rgba(248, 243, 234, 0.85);
  border: 1px solid rgba(197, 168, 128, 0.4);
  border-radius: 10px;
  padding: 0.45rem 0.75rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.details-event-row:hover {
  transform: translateY(-1px);
  border-color: var(--color-gold);
  box-shadow: 0 4px 12px rgba(184, 141, 77, 0.15);
}

.event-icon-badge {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid rgba(197, 168, 128, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.event-row-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
}

.event-title-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
}

.event-heading {
  font-family: var(--font-display);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-espresso);
}

.event-time-pill {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  font-weight: 700;
  background: var(--color-gold-light);
  color: var(--color-espresso);
  padding: 0.08rem 0.42rem;
  border-radius: 9999px;
  white-space: nowrap;
}

.event-venue-name {
  font-family: var(--font-serif);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--color-charcoal);
  line-height: 1.15;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.event-venue-location {
  font-family: var(--font-sans);
  font-size: 0.68rem;
  color: var(--color-muted);
  line-height: 1.15;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.event-map-link {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-family: var(--font-sans);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-gold-dark);
  text-decoration: none;
  padding: 0.32rem 0.55rem;
  border-radius: 6px;
  background: #ffffff;
  border: 1px solid rgba(197, 168, 128, 0.5);
  transition: all 0.2s ease;
  flex-shrink: 0;
  white-space: nowrap;
}

.event-map-link:hover {
  background: var(--color-gold-dark);
  color: #fff;
  border-color: var(--color-gold-dark);
}

/* Dress Code Section & Color Swatches Palette */
.dress-code-section {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(197, 168, 128, 0.38);
  border-radius: 12px;
  padding: 0.65rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  text-align: center;
}

.dress-code-header-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
}

.dress-code-title {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-charcoal);
}

.dress-code-badge {
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-gold-dark);
  background: rgba(197, 168, 128, 0.18);
  padding: 0.12rem 0.5rem;
  border-radius: 9999px;
  border: 1px solid rgba(197, 168, 128, 0.35);
}

.swatches-grid {
  display: flex;
  justify-content: center;
  gap: 0.85rem;
  margin: 0.25rem 0 0.1rem;
}

.swatch-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  transition: transform 0.2s ease;
}

.swatch-item:hover {
  transform: translateY(-2px) scale(1.08);
}

.swatch-bubble {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.swatch-item:hover .swatch-bubble {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.swatch-item.swatch-active .swatch-bubble {
  outline: 2px solid var(--color-gold-dark);
  outline-offset: 2px;
  transform: scale(1.1);
  box-shadow: 0 4px 14px rgba(184, 141, 77, 0.4);
}

.swatch-item.swatch-active .swatch-name {
  color: var(--color-gold-dark);
  font-weight: 700;
}

.swatch-name {
  font-family: var(--font-sans);
  font-size: 0.64rem;
  letter-spacing: 0.02em;
  color: var(--color-muted);
}

/* Card 5: RSVP & Digital Keepsake Actions */
.card-rsvp-keepsake {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 1.8rem 1.4rem;
  text-align: center;
  background: radial-gradient(circle at center, #fffdfb 0%, #f7f1e6 100%);
  border-radius: inherit;
  box-sizing: border-box;
  position: relative;
  z-index: 10;
  pointer-events: auto;
}

.rsvp-seal-emblem {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: radial-gradient(circle, #ecd097 0%, #b88d4d 70%, #5f411b 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.8rem;
  box-shadow: 0 8px 24px rgba(184, 141, 77, 0.35);
  border: 2px solid #fff;
}

.rsvp-seal-emblem span {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: #2e1e0d;
}

.rsvp-card-title {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--color-espresso);
  margin-bottom: 0.35rem;
}

.rsvp-deadline-pill {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #b83528;
  background: rgba(184, 53, 40, 0.08);
  padding: 0.28rem 0.85rem;
  border-radius: 9999px;
  margin-bottom: 1rem;
  border: 1px solid rgba(184, 53, 40, 0.2);
}

.rsvp-card-body {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--color-charcoal);
  line-height: 1.55;
  max-width: 350px;
  margin-bottom: 1.4rem;
}

.rsvp-action-stack {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  width: 100%;
  max-width: 310px;
  position: relative;
  z-index: 20;
  pointer-events: auto;
}

.rsvp-action-stack a,
.rsvp-action-stack button {
  position: relative;
  z-index: 25;
  pointer-events: auto !important;
  cursor: pointer !important;
}

.btn-primary-gold {
  background: linear-gradient(135deg, #dfc18c 0%, #c5a880 50%, #9e7a46 100%);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.85rem 1.5rem;
  border-radius: 9999px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(184, 141, 77, 0.35);
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-primary-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(184, 141, 77, 0.5);
  filter: brightness(1.05);
}

.btn-secondary-outline {
  background: #fff;
  color: var(--color-espresso);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.72rem 1.3rem;
  border-radius: 9999px;
  text-decoration: none;
  border: 1px solid rgba(197, 168, 128, 0.6);
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-secondary-outline:hover {
  background: #fbf9f4;
  border-color: var(--color-gold-dark);
  transform: translateY(-2px);
}

/* ==========================================================================
   CARD CONTROLS & BOTTOM NAVIGATION
   ========================================================================== */
.card-nav-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 440px;
  margin-top: 1.25rem;
  gap: 1rem;
  z-index: 40;
}

.nav-arrow-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffffff 0%, #fdfbf7 100%);
  border: 2px solid var(--color-gold);
  box-shadow: 0 8px 24px rgba(184, 141, 77, 0.32), 0 2px 8px rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-gold-dark);
  cursor: pointer;
  transition: all 0.25s var(--transition-smooth);
  flex-shrink: 0;
}

.nav-arrow-btn:hover:not(:disabled) {
  background: var(--color-gold-metallic);
  color: #fff;
  border-color: var(--color-gold-dark);
  transform: scale(1.12);
  box-shadow: 0 12px 30px rgba(184, 141, 77, 0.48), 0 4px 12px rgba(0, 0, 0, 0.1);
}

.nav-arrow-btn:active:not(:disabled) {
  transform: scale(0.96);
}

.nav-arrow-btn:disabled {
  opacity: 0.25;
  cursor: not-allowed;
  box-shadow: none;
  border-color: rgba(197, 168, 128, 0.3);
}

.card-dots-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.dot-btn {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(197, 168, 128, 0.35);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
}

.dot-btn:hover {
  background: var(--color-gold);
}

.dot-btn.dot-active {
  width: 26px;
  border-radius: 12px;
  background: var(--color-gold-dark);
}

.card-counter-label {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-muted);
  font-weight: 600;
  text-align: center;
  margin-top: 0.7rem;
}

/* Toast notification for link copying */
.toast-msg {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--color-espresso);
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.4s var(--transition-bounce), opacity 0.4s ease;
  z-index: 1000;
}

.toast-msg.toast-visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ==========================================================================
   RESPONSIVE DESIGN BREAKPOINTS
   ========================================================================== */
@media (max-width: 640px) {
  .invitation-header {
    padding: 0.9rem 1.1rem;
  }

  .header-back-link span.back-text {
    display: none;
  }

  .scene-script-tagline {
    font-size: 1.8rem;
  }

  .scene-title {
    font-size: 1.15rem;
  }

  .envelope-wrapper {
    height: 300px;
  }

  .envelope-recipient {
    font-size: 1.9rem;
  }

  .envelope-couple {
    font-size: 1rem;
  }

  .cards-stage {
    padding: 3.6rem 0.6rem 1.5rem 0.6rem !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
  }

  .card-presentation-deck {
    max-width: 90vw;
    height: 68vh;
    min-height: 480px;
    max-height: 600px;
  }

  .card-presentation-deck.viewing-landscape {
    width: 100% !important;
    max-width: min(calc(100vw - 1.2rem), 880px) !important;
    height: auto !important;
    min-height: unset !important;
    max-height: 72vh !important;
    aspect-ratio: 2000 / 1410 !important;
    margin: 0 auto !important;
  }

  .card-gatefold-container,
  .gatefold-card,
  .gatefold-inside,
  .gatefold-doors-wrapper {
    border-radius: 12px !important;
  }

  .gatefold-door-left {
    border-radius: 12px 0 0 12px !important;
  }

  .gatefold-door-right {
    border-radius: 0 12px 12px 0 !important;
  }

  .gatefold-card.doors-open .gatefold-inside {
    padding: 2px !important;
    border-radius: 12px !important;
    box-sizing: border-box !important;
  }

  .card-artwork-landscape {
    width: 100% !important;
    height: 100% !important;
    padding: 0 !important;
    border-radius: 10px !important;
    box-sizing: border-box !important;
  }

  .card-landscape-img {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    object-position: center !important;
    border-radius: 8px !important;
    display: block !important;
  }

  .card-interactive-details {
    padding: 1rem 0.85rem;
    gap: 0.5rem;
  }

  .nav-arrow-btn {
    width: 48px;
    height: 48px;
    font-size: 1.25rem;
  }
}

@media (min-width: 1200px) {
  .card-presentation-deck {
    max-width: 460px;
    height: 72vh;
    max-height: 700px;
  }
}

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