/* =========================================================
   CRISTINA & DENNIS — WEDDING INVITATION & LANDING PAGE
   Ultra HD Cinematic 3D WebGL Envelope & Cross-Device Compatibility
   ========================================================= */

/* --- DESIGN SYSTEM & TOKENS --- */
:root {
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-display: 'Cinzel', serif;
  --font-script: 'Great Vibes', cursive;
  --font-sans: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
  
  --ease-cinematic: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-smooth: cubic-bezier(0.16, 1, 0.3, 1);
}

/* 🍋 1. PALETTE AZURE & OLIVE CITRUS (Moodboard Ufficiale) */
body.theme-azure {
  --primary: #5E8DA1;          /* Azzurro Polvere */
  --primary-dark: #3F697C;
  --primary-light: #EEF4F7;
  --accent-gold: #C9A44F;      /* Oro antico */
  --accent-citrus: #F7DF7A;    /* Giallo Limone */
  --olive: #83965D;            /* Verde Oliva */
  --bg-page: #FAF8F5;          /* Sfondo Carta Panna */
  --bg-card: #FFFFFF;
  --text-main: #2C3539;
  --text-muted: #6B7B83;
  --border-delicate: rgba(94, 141, 161, 0.22);
  --border-gold: rgba(201, 164, 79, 0.35);
}

/* 🏛️ 2. PALETTE VERONA GOLD (Villa Cornaro Nobiliare) */
body.theme-verona {
  --primary: #B88E4B;
  --primary-dark: #8F6927;
  --primary-light: #FAF5EB;
  --accent-gold: #C5A059;
  --accent-citrus: #E8D298;
  --olive: #687050;
  --bg-page: #FDFBF7;
  --bg-card: #FFFFFF;
  --text-main: #2A2521;
  --text-muted: #796E65;
  --border-delicate: rgba(184, 142, 75, 0.25);
  --border-gold: rgba(197, 160, 89, 0.4);
}

/* 🌿 3. PALETTE BOTANICAL OLIVE (Verde Salvia) */
body.theme-botanical {
  --primary: #6D8257;
  --primary-dark: #4D6039;
  --primary-light: #F0F4EC;
  --accent-gold: #C49F30;
  --accent-citrus: #D5DDB7;
  --olive: #6D8257;
  --bg-page: #F7F7F2;
  --bg-card: #FFFFFF;
  --text-main: #242921;
  --text-muted: #6B7564;
  --border-delicate: rgba(109, 130, 87, 0.25);
  --border-gold: rgba(196, 159, 48, 0.35);
}

/* 🕊️ 4. PALETTE IVORY SILK (Ref. Template 051 — Seta & Oro) */
body.theme-silk {
  --primary: #96742B;          /* Oro Seta */
  --primary-dark: #5F4A15;
  --primary-light: #F7F1E3;
  --accent-gold: #B08D45;
  --accent-citrus: #EFE3C8;
  --olive: #6E6544;
  --bg-page: #FBF7EC;          /* Seta Avorio */
  --bg-card: #FFFDF8;
  --text-main: #3D3220;        /* Marrone scuro — contrasto deciso */
  --text-muted: #6A5B3E;
  --border-delicate: rgba(169, 134, 60, 0.22);
  --border-gold: rgba(197, 160, 89, 0.4);
}

/* --- RESET & MOBILE OPTIMIZATIONS --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.65;
  overflow-x: hidden;
  transition: background-color 0.5s ease;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button, a, input, select, textarea {
  touch-action: manipulation;
}

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

.container {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* =========================================================
   TOP FLOATING BAR
   ========================================================= */
.top-control-bar {
  position: fixed;
  top: 1.2rem;
  left: 1.2rem;
  right: 1.2rem;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.top-control-bar > * {
  pointer-events: auto;
}

.pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.15rem;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: #ffffff;
  background: rgba(20, 20, 20, 0.75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.pill-btn:hover {
  background: rgba(20, 20, 20, 0.9);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-1px);
}

.pill-btn i {
  width: 14px;
  height: 14px;
}

/* Equalizer bar animation */
.equalizer-bars {
  display: flex;
  align-items: flex-end;
  gap: 2.5px;
  height: 12px;
}

.equalizer-bars .bar {
  width: 2.5px;
  height: 4px;
  background-color: #ffffff;
  border-radius: 1px;
  transition: height 0.2s ease;
}

.music-pill.playing .equalizer-bars .bar:nth-child(1) { animation: soundBar 0.8s ease-in-out infinite alternate; }
.music-pill.playing .equalizer-bars .bar:nth-child(2) { animation: soundBar 1.1s ease-in-out infinite alternate 0.2s; }
.music-pill.playing .equalizer-bars .bar:nth-child(3) { animation: soundBar 0.9s ease-in-out infinite alternate 0.4s; }

@keyframes soundBar {
  0% { height: 3px; }
  100% { height: 12px; }
}

.bar-right-controls,
.top-bar-right-cluster {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

/* Selettore Lingua IT / RO */
.lang-switch-pill {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 38px;
  min-height: 38px;
  padding: 2px 5px;
  background: rgba(20, 20, 20, 0.75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  box-sizing: border-box;
}

.lang-opt-btn {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.25s ease;
  line-height: 1;
}

.lang-opt-btn:hover {
  color: #ffffff;
}

.lang-opt-btn.active {
  background: #ffffff;
  color: #1a1a1a;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.lang-sep {
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.68rem;
  user-select: none;
  margin: 0 1px;
}

/* Switcher Animazione: 3D Reale vs Film Video */
.anim-mode-toggle,
.mode-switch-pill {
  display: flex;
  align-items: center;
  background: rgba(20, 20, 20, 0.75);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 2px;
}

.anim-tab-btn,
.mode-toggle-opt {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.anim-tab-btn i,
.mode-toggle-opt i {
  width: 13px;
  height: 13px;
}

.anim-tab-btn.active,
.mode-toggle-opt.active {
  background: #ffffff;
  color: #1a1a1a;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.palette-swatches-mini {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(20, 20, 20, 0.75);
  backdrop-filter: blur(14px);
  padding: 5px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.palette-dot-btn {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.6);
  cursor: pointer;
  transition: transform 0.2s ease;
}

.palette-dot-btn[data-theme="theme-azure"] { background: #5E8DA1; }
.palette-dot-btn[data-theme="theme-verona"] { background: #C5A059; }
.palette-dot-btn[data-theme="theme-botanical"] { background: #6D8257; }

.palette-dot-btn.active {
  transform: scale(1.25);
  border-color: #ffffff;
  box-shadow: 0 0 6px #ffffff;
}

/* =========================================================
   3D WEBGL & ULTRA HD ENVELOPE STAGE
   ========================================================= */
.video-envelope-stage {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #12100e;
  background-image: radial-gradient(circle at center, #24201c 0%, #0d0c0b 100%);
  overflow: hidden;
  cursor: pointer;
  height: 100vh;
  height: 100svh;
  height: 100dvh;
  transition: opacity 1.3s var(--ease-cinematic), transform 1.5s var(--ease-cinematic), visibility 1.3s ease;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

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

/* 1. CONTAINER WEBGL 3D (CANVAS DI THREE.JS) */
.webgl-3d-stage {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease;
}

.webgl-3d-stage canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

/* Modalità switch */
body.mode-3d-real .webgl-3d-stage {
  display: flex;
  opacity: 1;
}

body.mode-3d-real .video-envelope-container {
  display: none !important;
}

body.mode-video .webgl-3d-stage {
  display: none !important;
}

body.mode-video .video-envelope-container {
  display: flex !important;
}

/* 2. CONTAINER VIDEO FILM */
.video-envelope-container {
  position: relative;
  width: max(100vw, calc(100dvh * 0.5625));
  height: max(100dvh, calc(100vw / 0.5625));
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 4;
}

.envelope-hd-video {
  width: 100%;
  height: 100%;
  max-width: 720px;
  object-fit: cover;
  margin: 0 auto;
  pointer-events: none;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  will-change: transform, opacity;
  image-rendering: -webkit-optimize-contrast;
}

/* Overlay Interattivo */
.video-overlay-layer {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 10;
  transform: translateZ(0);
}

/* In modalità 3D reale, nascondiamo il sigillo 2D perché il sigillo è già un vero oggetto 3D con monogramma C&D */
body.mode-3d-real .center-seal-trigger {
  opacity: 0;
  pointer-events: auto; /* Manteniamo l'area cliccabile per facilità */
}

/* Sigillo Centrale Interattivo */
.center-seal-trigger {
  position: absolute;
  top: 49%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 76px;
  height: 76px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  pointer-events: auto;
  transition: transform 0.3s ease;
  outline: none;
}

.center-seal-trigger:hover,
.center-seal-trigger:active {
  transform: translate(-50%, -50%) scale(1.08);
}

.custom-wax-badge {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: url('assets/red_seal_cd_1024.png') no-repeat center center;
  background-size: contain;
  box-shadow: 0 10px 28px rgba(120, 15, 30, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.4s ease;
}

.badge-monogram {
  display: none;
}

.seal-glow-ring {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 2px solid #F7DF7A;
  opacity: 0;
  animation: sealGlowPulse 2.2s infinite;
}

@keyframes sealGlowPulse {
  0% { transform: scale(0.85); opacity: 0.8; }
  100% { transform: scale(1.45); opacity: 0; }
}

/* Informazioni Spose & Luoghi in Basso */
.envelope-footer-info {
  position: absolute;
  bottom: 7%;
  left: 0;
  right: 0;
  text-align: center;
  padding: 0 1.5rem;
  color: #ffffff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
  transition: opacity 0.5s ease;
}

.tap-open-prompt {
  pointer-events: auto;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #F7DF7A;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  padding: 0.4rem 1.1rem;
  border-radius: 999px;
  border: 1px solid rgba(247, 223, 122, 0.35);
  margin-bottom: 0.8rem;
  animation: promptFloat 2s ease-in-out infinite alternate;
}

.tap-open-prompt i {
  width: 14px;
  height: 14px;
}

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

.envelope-couple-names {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 400;
  letter-spacing: 0.08em;
  color: #FAF4E5;
  margin-bottom: 0.2rem;
}

.envelope-date-line {
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.3em;
  color: #C9A44F;
  margin-bottom: 0.25rem;
}

.envelope-venue-line {
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
}

/* Quando l'animazione si avvia */
.video-envelope-stage.playing .video-overlay-layer {
  opacity: 0;
  transition: opacity 0.5s ease;
}

/* =========================================================
   REVEALED INVITATION ACTIONS (INVITO 3D SEMPRE VISIBILE)
   ========================================================= */
.revealed-invitation-actions {
  position: absolute;
  bottom: 5.5%;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  z-index: 50;
  pointer-events: auto;
  opacity: 0;
  transform: translate(-50%, 20px);
  transition: opacity 0.8s var(--ease-cinematic), transform 0.8s var(--ease-cinematic);
}

.revealed-invitation-actions.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.revealed-invitation-actions.hidden {
  display: none !important;
}

.card-read-notice {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.card-read-notice .script-badge {
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #F7DF7A;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  padding: 0.25rem 0.95rem;
  border-radius: 999px;
  border: 1px solid rgba(247, 223, 122, 0.4);
}

.card-read-notice .prompt-text {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-style: italic;
  color: #FFFFFF;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.85);
}

.btn-proceed {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: linear-gradient(135deg, #C9A44F 0%, #DFBE76 50%, #B88E35 100%);
  color: #241A05;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 0.95rem 2.2rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45), 0 0 20px rgba(201, 164, 79, 0.4);
  cursor: pointer;
  transition: all 0.3s ease;
  animation: pulseGoldButton 2.4s infinite;
}

.btn-proceed:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.6), 0 0 28px rgba(201, 164, 79, 0.65);
}

.btn-proceed i {
  width: 18px;
  height: 18px;
  animation: bounceDown 1.8s infinite;
}

@keyframes pulseGoldButton {
  0%, 100% { box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45), 0 0 15px rgba(201, 164, 79, 0.3); }
  50% { box-shadow: 0 12px 35px rgba(0, 0, 0, 0.55), 0 0 26px rgba(201, 164, 79, 0.6); }
}

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

/* =========================================================
   MAIN WEDDING EDITORIAL PAGE (STILE TEMPLATE-049)
   ========================================================= */
.wedding-landing {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 1.2s var(--ease-cinematic), transform 1.2s var(--ease-cinematic);
  padding-top: 2rem;
}

.wedding-landing.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- 1. EDITORIAL HERO SECTION (LUXURY ITALIAN WEDDING) --- */
.editorial-hero-section {
  padding: 4.5rem 1.5rem 3.5rem;
  background: var(--bg-page);
  display: flex;
  justify-content: center;
  position: relative;
}

.editorial-hero-section .hero-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 1040px;
  width: 100%;
}

.hero-top-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 0.8rem;
}

.hero-top-badge .badge-leaf {
  font-size: 0.9rem;
}

.hero-monogram-emblem {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1.5px solid var(--accent-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  background: radial-gradient(circle, rgba(201, 164, 79, 0.12) 0%, transparent 70%);
  box-shadow: 0 4px 14px rgba(201, 164, 79, 0.15);
}

.hero-monogram-emblem .mono-cd {
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--accent-gold);
}

.hero-couple-title {
  font-family: var(--font-serif);
  font-size: clamp(2.8rem, 6.5vw, 4.6rem);
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--text-main);
  line-height: 1.08;
  margin-bottom: 0.6rem;
  text-transform: uppercase;
}

.hero-date-venue-line {
  font-family: var(--font-display);
  font-size: clamp(0.85rem, 2vw, 1.05rem);
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 2.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.hero-date-venue-line .bullet-dot {
  color: var(--accent-gold);
}

/* Arched Showcase Diptych Grid */
.hero-diptych-grid {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  align-items: center;
  gap: 3rem;
  width: 100%;
  max-width: 960px;
  margin-bottom: 3rem;
  text-align: left;
}

.hero-portrait-card {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.arch-frame-deluxe {
  position: relative;
  width: 100%;
  max-width: 330px;
  aspect-ratio: 3 / 4.2;
  border-radius: 170px 170px 18px 18px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.14), 0 4px 16px rgba(0, 0, 0, 0.06);
  border: 8px solid #ffffff;
  background: #ffffff;
}

.arch-frame-deluxe .arch-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 15%;
  transition: transform 0.7s var(--ease-cinematic);
}

.arch-frame-deluxe:hover .arch-photo {
  transform: scale(1.04);
}

.arch-gold-filigree {
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(201, 164, 79, 0.6);
  border-radius: 160px 160px 12px 12px;
  pointer-events: none;
}

.portrait-caption-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 1rem;
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.7);
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(201, 164, 79, 0.25);
}

.portrait-caption-pill i {
  width: 12px;
  height: 12px;
  color: var(--primary);
}

/* Welcome Card beside Portrait */
.hero-welcome-card {
  background: #ffffff;
  border-radius: 14px;
  padding: 2.8rem 2.4rem;
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(201, 164, 79, 0.25);
  position: relative;
}

.welcome-script-tag {
  display: block;
  font-family: var(--font-script);
  font-size: 1.8rem;
  color: var(--primary);
  margin-bottom: 0.4rem;
  line-height: 1.2;
}

.welcome-title {
  font-family: var(--font-serif);
  font-size: clamp(1.7rem, 3.2vw, 2.2rem);
  font-weight: 500;
  color: var(--text-main);
  line-height: 1.2;
  margin-bottom: 1rem;
}

.welcome-gold-divider {
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-gold), transparent);
  margin-bottom: 1.4rem;
}

.welcome-text {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  line-height: 1.7;
  color: var(--text-main);
  margin-bottom: 2rem;
  font-style: italic;
}

.welcome-quick-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.btn-hero-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.8rem 1.6rem;
  background: var(--text-main);
  color: #ffffff;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border-radius: 999px;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.btn-hero-primary:hover {
  background: var(--primary);
  transform: translateY(-2px);
}

.btn-hero-primary i {
  width: 15px;
  height: 15px;
}

.btn-hero-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.8rem 1.6rem;
  background: transparent;
  color: var(--text-main);
  border: 1px solid var(--accent-gold);
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border-radius: 999px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.btn-hero-secondary:hover {
  background: rgba(201, 164, 79, 0.12);
  transform: translateY(-2px);
}

.btn-hero-secondary i {
  width: 15px;
  height: 15px;
  color: var(--primary);
}

.hero-locations-mini {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding-top: 1.4rem;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.loc-mini-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.loc-mini-item i {
  width: 22px;
  height: 22px;
  color: var(--primary);
}

.loc-mini-item div {
  display: flex;
  flex-direction: column;
}

.loc-mini-item strong {
  font-family: var(--font-display);
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-main);
}

.loc-mini-item span {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  color: var(--text-muted);
}

.loc-mini-sep {
  width: 1px;
  height: 32px;
  background: rgba(0, 0, 0, 0.1);
}

/* Quick Jump Pill Navigation */
.hero-quick-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  width: 100%;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}

.nav-pill-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 1.05rem;
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(201, 164, 79, 0.3);
  border-radius: 999px;
  text-decoration: none;
  transition: all 0.25s ease;
  backdrop-filter: blur(8px);
}

.nav-pill-link:hover {
  background: var(--text-main);
  color: #ffffff;
  border-color: var(--text-main);
  transform: translateY(-2px);
}

.nav-pill-link.highlight {
  background: linear-gradient(135deg, #FBF8EE 0%, #FAF2DF 100%);
  border-color: var(--accent-gold);
  color: #7A5B18;
}

.nav-pill-link i {
  width: 13px;
  height: 13px;
}

/* --- 4. MIDPAGE INVITATION SECTION (PARTECIPAZIONE A METÀ PAGINA) --- */
.midpage-invitation-section {
  padding: 6rem 1.5rem;
  background: linear-gradient(180deg, var(--bg-page) 0%, #F5F1E6 50%, var(--bg-page) 100%);
  display: flex;
  justify-content: center;
  position: relative;
}

.midpage-card-wrapper {
  display: flex;
  justify-content: center;
  width: 100%;
  position: relative;
}

/* Lettera Fisica Amalfi Luxury */
.luxury-invitation-letter {
  width: 100%;
  max-width: 780px;
  background: #FCFBF7;
  padding: 1.8rem;
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.09), 0 4px 16px rgba(0, 0, 0, 0.04);
  position: relative;
  border: 1px solid rgba(201, 164, 79, 0.3);
}

.letter-gold-border {
  border: 2px solid #D4AF37;
  padding: 3.2rem 2.5rem;
  position: relative;
  text-align: center;
  background: radial-gradient(circle at 50% 20%, rgba(255, 255, 255, 0.95) 0%, rgba(252, 251, 247, 0.98) 100%);
}

.letter-gold-border::before {
  content: '';
  position: absolute;
  inset: 6px;
  border: 1px dashed rgba(201, 164, 79, 0.4);
  pointer-events: none;
}

.letter-script-intro {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-style: italic;
  color: var(--secondary);
  margin-bottom: 0.8rem;
}

.letter-monogram {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  color: var(--primary);
  margin-bottom: 0.8rem;
}

.letter-couple-title {
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 6vw, 3.8rem);
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--text-main);
  line-height: 1.1;
  margin-bottom: 1rem;
}

.letter-wax-stamp {
  position: absolute;
  bottom: -24px;
  right: 28px;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.25));
  pointer-events: none;
  transition: transform 0.4s ease;
}

.letter-wax-stamp .stamp-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.letter-gold-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 1.2rem auto 2rem;
  max-width: 320px;
}

.letter-gold-divider .divider-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, #D4AF37, transparent);
}

.letter-gold-divider .divider-icon {
  font-size: 1.1rem;
}

.letter-date-heading {
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 2.5vw, 1.35rem);
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 2.4rem;
}

.letter-events-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 2rem;
  margin-bottom: 2.5rem;
  text-align: center;
}

.letter-event-col {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.letter-col-separator {
  width: 1px;
  height: 110px;
  background: linear-gradient(180deg, transparent, rgba(201, 164, 79, 0.5), transparent);
}

.event-time-badge {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--primary-dark);
  background: var(--primary-light);
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  margin-bottom: 0.6rem;
}

.event-time-badge.gold {
  color: #7A5B18;
  background: #FAF0D6;
}

.letter-event-col .event-name {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.35rem;
}

.letter-event-col .event-loc {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-style: italic;
  font-weight: 500;
  color: var(--primary);
  margin-bottom: 0.2rem;
}

.letter-event-col .event-street {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.4;
  max-width: 250px;
}

.letter-family-dedication {
  margin-top: 1.8rem;
  padding-top: 1.8rem;
  border-top: 1px solid rgba(201, 164, 79, 0.25);
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-style: italic;
  color: var(--secondary);
}

.quote-mark {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  color: var(--accent-gold);
  line-height: 0;
  display: block;
  margin-bottom: 0.5rem;
  opacity: 0.6;
}

/* --- COUNTDOWN (MINIMAL CARD) --- */
.editorial-countdown-section {
  padding: 4.5rem 0;
  background: var(--primary-light);
  border-top: 1px solid var(--border-delicate);
  border-bottom: 1px solid var(--border-delicate);
}

.countdown-minimal-card {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}

.countdown-eyebrow {
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.countdown-headline {
  font-family: var(--font-serif);
  font-size: 2.1rem;
  font-weight: 400;
  color: var(--text-main);
  margin-bottom: 2rem;
}

.countdown-digits-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2.2rem;
}

.digit-box {
  background: #ffffff;
  border: 1px solid var(--border-delicate);
  border-radius: 12px;
  padding: 1.2rem 1.4rem;
  min-width: 90px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.04);
}

.digit-box .number {
  display: block;
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 500;
  color: var(--primary-dark);
  line-height: 1;
  margin-bottom: 0.3rem;
}

.digit-box .label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
}

.separator {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--primary);
  opacity: 0.5;
}

.btn-calendar {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.8rem;
  background: #ffffff;
  border: 1px solid var(--primary);
  color: var(--primary-dark);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-calendar:hover {
  background: var(--primary);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(94, 141, 161, 0.25);
}

.btn-calendar i {
  width: 16px;
  height: 16px;
}

/* --- COMMON EDITORIAL HEADINGS --- */
.editorial-section-head {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 3.5rem;
}

.editorial-section-head .eyebrow {
  display: block;
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.editorial-section-head .editorial-title {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 400;
  color: var(--text-main);
  line-height: 1.15;
  margin-bottom: 0.6rem;
}

.editorial-section-head .title-leaf {
  font-size: 1.2rem;
  margin-top: 0.4rem;
}

.section-subtext {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-style: italic;
  color: var(--text-muted);
  line-height: 1.6;
}

/* --- LA NOSTRA STORIA (TRIPTYCH) --- */
.editorial-story-section {
  padding: 6rem 0;
  background: var(--bg-page);
}

.story-triptych {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.2rem;
}

.story-item {
  background: #ffffff;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border-delicate);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  transition: transform 0.4s var(--ease-cinematic), box-shadow 0.4s ease;
}

.story-item:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.08);
}

.story-item.featured-story {
  border-color: var(--accent-gold);
  box-shadow: 0 12px 32px rgba(201, 164, 79, 0.15);
}

.story-photo-box {
  position: relative;
  height: 320px;
  overflow: hidden;
  background: #f2ece1;
}

.story-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
  transition: transform 0.7s var(--ease-cinematic);
}

.story-item.featured-story .story-photo {
  object-position: center 30%;
}

.story-item:hover .story-photo {
  transform: scale(1.05);
}

.photo-tag {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(8px);
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--primary-dark);
}

.photo-tag.special {
  background: var(--accent-gold);
  color: #ffffff;
}

.story-content {
  padding: 1.8rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.story-h3 {
  font-family: var(--font-serif);
  font-size: 1.45rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.6rem;
}

.story-p {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* =========================================================
   THE GOLD RAIL TIMELINE (STILE TEMPLATE-049)
   ========================================================= */
.gold-rail-section {
  padding: 6.5rem 0;
  background: #ffffff;
  border-top: 1px solid var(--border-delicate);
  border-bottom: 1px solid var(--border-delicate);
}

.gold-rail-wrapper {
  position: relative;
  max-width: 820px;
  margin: 0 auto;
  padding: 1rem 0;
}

/* Binario dorato verticale */
.gold-rail-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 36px;
  width: 2px;
  background: linear-gradient(to bottom, transparent, var(--accent-gold) 15%, var(--accent-gold) 85%, transparent);
}

.rail-stop {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 2.5rem;
  margin-bottom: 3.5rem;
}

.rail-stop:last-child {
  margin-bottom: 0;
}

.rail-node {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--bg-page);
  border: 2px solid var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  z-index: 2;
}

.rail-node.gold {
  border-color: var(--accent-gold);
  box-shadow: 0 6px 18px rgba(201, 164, 79, 0.25);
}

.rail-node i {
  width: 28px;
  height: 28px;
  color: var(--primary);
  transition: transform 0.3s ease;
}

.rail-node.gold i {
  color: #7A5B18;
}

.node-time {
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
}

.rail-card {
  background: var(--bg-page);
  border: 1px solid var(--border-delicate);
  border-radius: 16px;
  padding: 2.2rem;
  flex: 1;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.03);
  transition: transform 0.3s ease;
}

.rail-card:hover {
  transform: translateX(4px);
}

.rail-card.highlight {
  border-color: var(--border-gold);
  box-shadow: 0 12px 32px rgba(201, 164, 79, 0.1);
}

.rail-cat {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--primary);
  display: block;
  margin-bottom: 0.3rem;
}

.rail-venue-name {
  font-family: var(--font-serif);
  font-size: 1.85rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.rail-address {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.rail-address i {
  width: 15px;
  height: 15px;
  color: var(--primary);
  flex-shrink: 0;
}

.rail-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.rail-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.rail-btn-map, .rail-btn-apple {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.6rem 1.25rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-decoration: none;
  border-radius: 999px;
  transition: all 0.25s ease;
}

.rail-btn-map i, .rail-btn-apple i {
  width: 14px;
  height: 14px;
}

.rail-btn-map {
  background: var(--primary);
  color: #ffffff;
}

.rail-btn-map:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

.rail-btn-apple {
  background: #ffffff;
  color: var(--text-main);
  border: 1px solid var(--border-delicate);
}

.rail-btn-apple:hover {
  background: var(--primary-light);
  transform: translateY(-2px);
}

/* --- PALETTE SWATCHES & DRESS CODE --- */
.editorial-palette-section {
  padding: 6rem 0;
  background: var(--bg-page);
}

.palette-swatches-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.8rem;
  margin-bottom: 3.5rem;
}

.swatch-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.swatch-disc {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  border: 4px solid #ffffff;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease;
}

.swatch-disc:hover {
  transform: scale(1.12);
}

.swatch-title {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-main);
}

.swatch-code {
  font-size: 0.75rem;
  font-family: monospace;
  color: var(--text-muted);
}

.moodboard-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.8rem;
  margin-bottom: 3.5rem;
}

.strip-card {
  position: relative;
  aspect-ratio: 3 / 4;
  height: auto;
  min-height: 340px;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(201, 164, 79, 0.28);
  background: #f2ece1;
}

.strip-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
  transition: transform 0.7s var(--ease-cinematic);
}

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

.strip-label {
  position: absolute;
  bottom: 0.95rem;
  left: 0.95rem;
  right: 0.95rem;
  padding: 0.65rem 1rem;
  background: rgba(18, 18, 18, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #FAF4E5;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  line-height: 1.35;
}

.dress-advice-banner {
  background: #ffffff;
  border: 1px solid var(--border-gold);
  border-radius: 16px;
  padding: 2rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  max-width: 780px;
  margin: 0 auto;
  box-shadow: 0 8px 24px rgba(201, 164, 79, 0.08);
}

.dress-advice-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dress-advice-body h4 {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  margin-bottom: 0.3rem;
}

.dress-advice-body p {
  font-size: 0.94rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* =========================================================
   BUILT-IN RSVP (STILE FINE STATIONERY)
   ========================================================= */
.editorial-rsvp-section {
  padding: 6.5rem 0;
  background: #ffffff;
  border-top: 1px solid var(--border-delicate);
}

.stationery-rsvp-card {
  max-width: 700px;
  margin: 0 auto;
  background: var(--bg-page);
  border: 1px solid var(--border-gold);
  border-radius: 20px;
  padding: 3.5rem 2.5rem;
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.06);
  position: relative;
}

.rsvp-header-box {
  text-align: center;
  margin-bottom: 2.8rem;
}

.rsvp-top-tag {
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--primary);
  display: block;
  margin-bottom: 0.4rem;
}

.rsvp-title {
  font-family: var(--font-serif);
  font-size: 2.4rem;
  font-weight: 400;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.rsvp-instruction {
  font-size: 0.95rem;
  color: var(--text-muted);
}

.stationery-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.form-field label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 0.9rem 1.1rem;
  border: 1px solid var(--border-delicate);
  border-radius: 8px;
  background: #ffffff;
  font-size: 0.95rem;
  color: var(--text-main);
  transition: all 0.25s ease;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.presence-toggle-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.toggle-option input {
  display: none;
}

.toggle-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.95rem 1rem;
  border: 1px solid var(--border-delicate);
  border-radius: 8px;
  background: #ffffff;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.25s ease;
}

.toggle-box i {
  width: 17px;
  height: 17px;
  color: var(--text-muted);
}

.toggle-option input:checked + .toggle-box {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary-dark);
}

.toggle-option input:checked + .toggle-box i {
  color: var(--primary);
}

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

.rsvp-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
}

.btn-rsvp-submit, .btn-rsvp-whatsapp {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.95rem 1.8rem;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  border-radius: 999px;
  cursor: pointer;
  border: none;
  transition: all 0.3s ease;
}

.btn-rsvp-submit i, .btn-rsvp-whatsapp i {
  width: 18px;
  height: 18px;
}

.btn-rsvp-submit {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(94, 141, 161, 0.25);
}

.btn-rsvp-submit:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

.btn-rsvp-whatsapp {
  background: #25D366;
  color: #ffffff;
}

.btn-rsvp-whatsapp:hover {
  background: #1EBE5D;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.3);
}

.rsvp-success-banner {
  text-align: center;
  padding: 2.2rem;
  background: #F0FDF4;
  border: 1px solid #BBF7D0;
  border-radius: 12px;
  margin-top: 1.5rem;
}

.rsvp-success-banner.hidden {
  display: none;
}

.success-spark {
  font-size: 2.2rem;
  margin-bottom: 0.4rem;
}

.rsvp-success-banner h3 {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  color: #166534;
}

.rsvp-success-banner p {
  color: #15803D;
  font-size: 0.95rem;
}

/* --- FAQ & DETTAGLI --- */
.editorial-faq-section {
  padding: 6rem 0;
  background: var(--bg-page);
}

.faq-trio {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.faq-item {
  background: #ffffff;
  border: 1px solid var(--border-delicate);
  border-radius: 16px;
  padding: 2.2rem 1.8rem;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.03);
}

.faq-symbol {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.2rem;
}

.faq-item h4 {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  margin-bottom: 0.6rem;
}

.faq-item p {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.iban-reveal-trigger {
  background: none;
  border: none;
  color: var(--primary-dark);
  font-weight: 600;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 1.1rem;
  cursor: pointer;
}

.iban-envelope {
  margin-top: 0.8rem;
  padding: 0.85rem;
  background: var(--bg-page);
  border: 1px dashed var(--border-gold);
  border-radius: 8px;
  cursor: pointer;
}

.iban-envelope.hidden {
  display: none;
}

.iban-tit {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.iban-val {
  display: block;
  font-family: monospace;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
  margin: 0.2rem 0;
}

.iban-copy-tip {
  display: block;
  font-size: 0.72rem;
  color: var(--primary);
  font-style: italic;
}

/* --- EDITORIAL FOOTER --- */
.editorial-footer {
  text-align: center;
  padding: 5rem 1rem 3rem;
  background: #ffffff;
  border-top: 1px solid var(--border-delicate);
}

.footer-crest {
  font-family: var(--font-display);
  font-size: 2.2rem;
  letter-spacing: 0.35em;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.footer-couple {
  font-family: var(--font-serif);
  font-size: 2.4rem;
  font-weight: 400;
  margin-bottom: 0.3rem;
}

.footer-date-line {
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.25em;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.footer-closing-word {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-style: italic;
  color: var(--text-muted);
  max-width: 480px;
  margin: 0 auto 3rem;
}

.footer-bottom-line {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  padding-top: 1.5rem;
  max-width: 600px;
  margin: 0 auto;
}

/* =========================================================
   RESPONSIVE DESIGN (MOBILE & TABLET COMPATIBILITY)
   ========================================================= */
@media (max-width: 900px) {
  .story-triptych,
  .faq-trio,
  .moodboard-strip {
    grid-template-columns: 1fr;
  }

  .gold-rail-line {
    left: 28px;
  }

  .rail-stop {
    gap: 1.5rem;
  }

  .rail-node {
    width: 58px;
    height: 58px;
  }

  .node-time {
    font-size: 0.75rem;
  }
}

@media (max-width: 640px) {
  /* 1. TOP FLOATING BAR & SYMMETRICAL ACTION PILLS */
  .top-control-bar {
    top: max(0.75rem, calc(env(safe-area-inset-top) + 0.35rem));
    left: max(0.75rem, env(safe-area-inset-left));
    right: max(0.75rem, env(safe-area-inset-right));
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .pill-btn {
    height: 38px;
    min-height: 38px;
    padding: 0 0.95rem;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    box-sizing: border-box;
    border-radius: 999px;
  }

  .music-pill #musicLabel {
    display: inline-block;
  }

  .top-bar-right-cluster {
    display: flex;
    align-items: center;
    gap: 0.45rem;
  }

  .lang-switch-pill {
    height: 38px;
    min-height: 38px;
    padding: 2px 4px;
  }

  .lang-opt-btn {
    font-size: 0.68rem;
    padding: 0.25rem 0.45rem;
  }

  /* 2. ENVELOPE FOOTER INFO */
  .envelope-footer-info {
    bottom: max(3.5%, calc(env(safe-area-inset-bottom) + 0.8rem));
    padding: 0 1rem;
    width: 100%;
    box-sizing: border-box;
  }

  .envelope-couple-names {
    font-size: clamp(1.3rem, 5.5vw, 1.7rem);
    letter-spacing: 0.06em;
    margin-bottom: 0.15rem;
    white-space: nowrap;
  }

  .envelope-date-line {
    font-size: 0.8rem;
    letter-spacing: 0.18em;
    margin-bottom: 0.2rem;
  }

  .envelope-venue-line {
    font-size: 0.6rem;
    letter-spacing: 0.1em;
  }

  .tap-open-prompt {
    font-size: 0.68rem;
    letter-spacing: 0.04em;
    padding: 0.4rem 0.8rem;
    margin-bottom: 0.5rem;
    min-height: 36px;
    max-width: calc(100vw - 2rem);
    box-sizing: border-box;
    white-space: normal;
    justify-content: center;
    text-align: center;
  }

  /* Azioni invito aperto */
  .revealed-invitation-actions {
    bottom: max(2.5%, calc(env(safe-area-inset-bottom) + 0.6rem));
    width: calc(100% - 2rem);
    max-width: 340px;
    gap: 0.45rem;
  }

  .card-read-notice .prompt-text {
    font-size: 0.88rem;
  }

  .card-read-notice .script-badge {
    font-size: 0.65rem;
    padding: 0.2rem 0.75rem;
  }

  .btn-proceed {
    width: 100%;
    min-height: 48px;
    justify-content: center;
    font-size: 0.78rem;
    padding: 0.85rem 1.2rem;
    letter-spacing: 0.1em;
    box-sizing: border-box;
  }

  /* 3. EDITORIAL HERO & WELCOME ACTIONS */
  .editorial-hero-section {
    padding: 5rem 1rem 3.2rem;
  }

  .hero-top-badge {
    font-size: 0.68rem;
    letter-spacing: 0.22em;
    margin-bottom: 0.6rem;
  }

  .hero-monogram-emblem {
    width: 46px;
    height: 46px;
    margin: 0 auto 0.75rem;
  }

  .hero-monogram-emblem .mono-cd {
    font-size: 0.84rem;
    letter-spacing: 0.18em;
  }

  .hero-couple-title {
    font-size: clamp(2.1rem, 7.5vw, 2.7rem);
    letter-spacing: 0.05em;
    line-height: 1.15;
    margin-bottom: 0.6rem;
  }

  .hero-date-venue-line {
    font-size: 0.82rem;
    letter-spacing: 0.14em;
    gap: 0.45rem;
    margin-bottom: 1.8rem;
    line-height: 1.45;
  }

  .hero-diptych-grid {
    grid-template-columns: 1fr;
    gap: 1.8rem;
    text-align: center;
    max-width: 420px;
    margin: 0 auto 1.5rem auto;
  }

  .arch-frame-deluxe {
    max-width: 260px;
    aspect-ratio: 3 / 4.2;
    border-radius: 135px 135px 14px 14px;
    margin: 0 auto;
    border-width: 6px;
  }

  .arch-gold-filigree {
    border-radius: 125px 125px 10px 10px;
  }

  .portrait-caption-pill {
    font-size: 0.65rem;
    padding: 0.35rem 0.85rem;
    margin-top: 0.85rem;
  }

  .hero-welcome-card {
    padding: 2rem 1.3rem;
    border-radius: 16px;
    text-align: center;
  }

  .welcome-script-tag {
    font-size: 1.6rem;
    margin-bottom: 0.3rem;
  }

  .welcome-title {
    font-size: 1.55rem;
    line-height: 1.25;
    margin-bottom: 0.75rem;
  }

  .welcome-gold-divider {
    margin: 0 auto 1.2rem auto;
  }

  .welcome-text {
    font-size: 1.02rem;
    line-height: 1.65;
    margin-bottom: 1.6rem;
  }

  /* Hero Call To Action Buttons — Full Width & Perfect Vertical Order */
  .welcome-quick-actions {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 0.75rem;
    margin-bottom: 1.6rem;
  }

  .btn-hero-primary,
  .btn-hero-secondary {
    width: 100%;
    min-height: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 1.2rem;
    font-size: 0.76rem;
    font-weight: 600;
    box-sizing: border-box;
    text-align: center;
    border-radius: 999px;
  }

  /* Mini Locations Badges — Clean Symmetrical Cards */
  .hero-locations-mini {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    width: 100%;
    align-items: stretch;
    padding-top: 1.2rem;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
  }

  .loc-mini-item {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    background: rgba(94, 141, 161, 0.06);
    border: 1px solid rgba(94, 141, 161, 0.16);
    border-radius: 12px;
    padding: 0.65rem 1rem;
    gap: 0.85rem;
    text-align: left;
    box-sizing: border-box;
  }

  .loc-mini-sep {
    display: none;
  }

  /* Quick Navigation Bar — Swipeable Clean Horizontal Track */
  .hero-quick-nav {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    align-items: center;
    gap: 0.55rem;
    padding: 0.6rem 0.65rem;
    margin-top: 1.4rem;
    width: 100%;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

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

  .nav-pill-link {
    flex-shrink: 0;
    white-space: nowrap;
    min-height: 38px;
    height: 38px;
    padding: 0 1rem;
    font-size: 0.68rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    border-radius: 999px;
  }

  /* Section Headings on Mobile */
  .editorial-section-head {
    margin: 0 auto 2.2rem;
    padding: 0 0.5rem;
  }

  .editorial-section-head .eyebrow {
    font-size: 0.7rem;
    letter-spacing: 0.22em;
    margin-bottom: 0.4rem;
  }

  .editorial-section-head .editorial-title {
    font-size: clamp(1.8rem, 6.2vw, 2.2rem);
    line-height: 1.2;
    margin-bottom: 0.45rem;
  }

  .editorial-section-head .title-leaf {
    font-size: 1.05rem;
    margin-top: 0.25rem;
  }

  .section-subtext {
    font-size: 0.96rem;
    line-height: 1.55;
  }

  /* 4. COUNTDOWN SECTION & CALENDAR BUTTON */
  .editorial-countdown-section {
    padding: 3.5rem 1rem;
  }

  .countdown-headline {
    font-size: 1.55rem;
    line-height: 1.25;
    margin-bottom: 1.4rem;
  }

  .countdown-digits-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    width: 100%;
    max-width: 350px;
    margin: 0 auto 1.6rem auto;
  }

  .digit-box {
    flex: 1 1 0;
    min-width: 0;
    padding: 0.75rem 0.2rem;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
  }

  .digit-box .number {
    font-size: clamp(1.4rem, 5vw, 1.7rem);
    line-height: 1;
    margin-bottom: 0.2rem;
  }

  .digit-box .label {
    font-size: 0.62rem;
    letter-spacing: 0.08em;
  }

  .separator {
    font-size: 1.25rem;
    padding: 0 1px;
    opacity: 0.4;
  }

  .btn-calendar {
    width: 100%;
    max-width: 320px;
    min-height: 48px;
    height: 48px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 1.2rem;
    font-size: 0.74rem;
    box-sizing: border-box;
    text-align: center;
    border-radius: 999px;
  }

  /* 5. EDITORIAL STORY SECTION */
  .editorial-story-section {
    padding: 4rem 1rem;
  }

  .story-triptych {
    grid-template-columns: 1fr;
    gap: 1.8rem;
    max-width: 420px;
    margin: 0 auto;
  }

  .story-item {
    border-radius: 16px;
  }

  .story-photo-box {
    height: auto;
    aspect-ratio: 16 / 11;
    max-height: 260px;
  }

  .story-content {
    padding: 1.4rem 1.2rem;
  }

  .story-h3 {
    font-size: 1.25rem;
    margin-bottom: 0.45rem;
  }

  .story-p {
    font-size: 0.9rem;
    line-height: 1.6;
  }

  /* 6. MIDPAGE INVITATION SECTION */
  .midpage-invitation-section {
    padding: 4.5rem 1rem;
  }

  .luxury-invitation-letter {
    padding: 1.1rem 0.65rem;
    border-radius: 8px;
  }

  .letter-gold-border {
    padding: 2.2rem 1rem 2.6rem;
  }

  .letter-script-intro {
    font-size: 1rem;
    margin-bottom: 0.6rem;
  }

  .letter-monogram {
    font-size: 1.2rem;
    margin-bottom: 0.6rem;
  }

  .letter-couple-title {
    font-size: clamp(1.9rem, 6.5vw, 2.3rem);
    margin-bottom: 0.6rem;
    line-height: 1.15;
  }

  .letter-gold-divider {
    margin: 0.8rem auto 1.4rem;
    max-width: 240px;
  }

  .letter-date-heading {
    font-size: 1rem;
    letter-spacing: 0.18em;
    margin-bottom: 1.6rem;
  }

  .letter-events-grid {
    grid-template-columns: 1fr;
    gap: 1.4rem;
  }

  .letter-col-separator {
    width: 60px;
    height: 1px;
    margin: 0 auto;
    background: var(--accent-gold);
    opacity: 0.5;
  }

  .event-time-badge {
    font-size: 0.72rem;
    padding: 0.25rem 0.8rem;
    margin-bottom: 0.45rem;
  }

  .letter-event-col .event-name {
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
  }

  .letter-event-col .event-loc {
    font-size: 1.05rem;
    margin-bottom: 0.15rem;
  }

  .letter-event-col .event-street {
    font-size: 0.82rem;
    line-height: 1.45;
    max-width: 100%;
  }

  .letter-family-dedication {
    font-size: 1.02rem;
    line-height: 1.55;
    margin-top: 1.6rem;
    padding-top: 1.4rem;
    padding-bottom: 1.2rem;
  }

  .letter-wax-stamp {
    width: 60px;
    height: 60px;
    bottom: -20px;
    right: 16px;
  }

  /* 7. GOLD RAIL TIMELINE & MAP BUTTONS */
  .gold-rail-section {
    padding: 4rem 1rem;
  }

  .gold-rail-line {
    left: 23px; /* 48px node center */
  }

  .rail-stop {
    gap: 1.1rem;
    margin-bottom: 2.5rem;
  }

  .rail-node {
    width: 48px;
    height: 48px;
  }

  .rail-node i {
    width: 22px;
    height: 22px;
  }

  .rail-card {
    padding: 1.5rem 1.15rem;
    border-radius: 14px;
  }

  .rail-cat {
    font-size: 0.7rem;
    letter-spacing: 0.18em;
    margin-bottom: 0.25rem;
  }

  .rail-venue-name {
    font-size: 1.35rem;
    margin-bottom: 0.35rem;
  }

  .rail-address {
    font-size: 0.84rem;
    margin-bottom: 0.75rem;
    gap: 0.35rem;
  }

  .rail-desc {
    font-size: 0.88rem;
    line-height: 1.6;
    margin-bottom: 1.2rem;
  }

  .rail-buttons {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 0.65rem;
  }

  .rail-btn-map,
  .rail-btn-apple {
    width: 100%;
    min-height: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 1.2rem;
    font-size: 0.8rem;
    font-weight: 600;
    box-sizing: border-box;
    text-align: center;
    border-radius: 999px;
  }

  /* 8. PALETTE SWATCHES & MOODBOARD PHOTOS */
  .editorial-palette-section {
    padding: 4rem 1rem;
  }

  .palette-swatches-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.85rem 0.65rem;
    margin-bottom: 2.5rem;
  }

  .swatch-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: calc(33.333% - 0.75rem);
    min-width: 75px;
    max-width: 95px;
    text-align: center;
  }

  .swatch-disc {
    width: 48px;
    height: 48px;
    margin-bottom: 0.35rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  }

  .swatch-title {
    font-size: 0.76rem;
    line-height: 1.25;
    margin-bottom: 0.15rem;
  }

  .swatch-code {
    font-size: 0.65rem;
    opacity: 0.85;
  }

  .moodboard-strip {
    grid-template-columns: 1fr;
    gap: 1.4rem;
    max-width: 360px;
    margin: 0 auto 2.5rem auto;
  }

  .strip-card {
    aspect-ratio: 4 / 4.8;
    min-height: 320px;
    border-radius: 16px;
  }

  .strip-label {
    bottom: 0.75rem;
    left: 0.75rem;
    right: 0.75rem;
    font-size: 0.72rem;
    padding: 0.55rem 0.85rem;
  }

  .dress-advice-banner {
    flex-direction: column;
    text-align: center;
    padding: 1.8rem 1.2rem;
    gap: 1rem;
    border-radius: 16px;
    max-width: 100%;
  }

  .dress-advice-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto;
  }

  .dress-advice-body h4 {
    font-size: 1.2rem;
    margin-bottom: 0.45rem;
    line-height: 1.3;
  }

  .dress-advice-body p {
    font-size: 0.88rem;
    line-height: 1.6;
  }

  /* 9. RSVP FORM & ACTION BUTTONS */
  .editorial-rsvp-section {
    padding: 4.5rem 1rem;
  }

  .stationery-rsvp-card {
    padding: 2.2rem 1.2rem;
    border-radius: 18px;
  }

  .rsvp-header-box {
    margin-bottom: 2rem;
  }

  .rsvp-top-tag {
    font-size: 0.7rem;
    letter-spacing: 0.22em;
    margin-bottom: 0.35rem;
  }

  .rsvp-title {
    font-size: clamp(1.7rem, 6vw, 2.1rem);
    line-height: 1.2;
    margin-bottom: 0.45rem;
  }

  .rsvp-instruction {
    font-size: 0.88rem;
    line-height: 1.55;
  }

  .form-field {
    gap: 0.4rem;
  }

  .form-field label {
    font-size: 0.84rem;
    font-weight: 600;
  }

  .presence-toggle-grid {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    width: 100%;
  }

  .toggle-option {
    width: 100%;
  }

  .toggle-box {
    width: 100%;
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.85rem;
    padding: 0.85rem 1.1rem;
    box-sizing: border-box;
    text-align: left;
    border-radius: 10px;
    font-size: 0.88rem;
  }

  .toggle-box i {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
  }

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

  /* iOS Safari autofix 16px */
  .form-field input,
  .form-field select,
  .form-field textarea {
    font-size: 16px !important;
    padding: 0.85rem 1rem;
    border-radius: 10px;
  }

  .rsvp-action-row {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 0.75rem;
    margin-top: 1rem;
  }

  .btn-rsvp-submit,
  .btn-rsvp-whatsapp {
    width: 100%;
    flex: none;
    min-height: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 1.4rem;
    font-size: 0.88rem;
    font-weight: 600;
    box-sizing: border-box;
    text-align: center;
    border-radius: 999px;
  }

  /* 10. FAQ & IBAN */
  .editorial-faq-section {
    padding: 4rem 1rem;
  }

  .faq-trio {
    gap: 1.4rem;
  }

  .faq-item {
    padding: 1.8rem 1.2rem;
    border-radius: 16px;
  }

  .faq-symbol {
    width: 48px;
    height: 48px;
    margin: 0 auto 0.9rem auto;
  }

  .faq-item h4 {
    font-size: 1.2rem;
    margin-bottom: 0.4rem;
  }

  .faq-item p {
    font-size: 0.88rem;
    line-height: 1.6;
  }

  .iban-reveal-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 42px;
    padding: 0.55rem 1.25rem;
    border-radius: 999px;
    background: var(--bg-page);
    border: 1px solid var(--border-gold);
    color: var(--primary-dark);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    box-sizing: border-box;
    margin-top: 1.2rem;
  }

  .iban-envelope {
    margin-top: 0.85rem;
    padding: 1rem;
    border-radius: 10px;
  }

  /* 11. EDITORIAL FOOTER SAFE PADDING */
  .editorial-footer {
    padding: 4rem 1.2rem max(3.5rem, calc(env(safe-area-inset-bottom) + 2.5rem));
  }

  .footer-crest {
    font-size: 1.8rem;
    margin-bottom: 0.35rem;
  }

  .footer-couple {
    font-size: 2rem;
    margin-bottom: 0.25rem;
  }

  .footer-date-line {
    font-size: 0.85rem;
    letter-spacing: 0.22em;
    margin-bottom: 1.2rem;
  }

  .footer-closing-word {
    font-size: 1.05rem;
    line-height: 1.6;
    margin-bottom: 2rem;
  }

  .footer-bottom-line {
    font-size: 0.72rem;
    line-height: 1.5;
    padding-top: 1.2rem;
  }
}

/* =========================================================
   MOBILE FLOATING RSVP PILL & TOUCH OPTIMIZATIONS
   ========================================================= */
.mobile-floating-rsvp {
  display: none;
}

@media (max-width: 640px) {
  /* Prevent 300ms mobile touch delay */
  a, button, input, select, textarea, .pill-btn, .tap-open-prompt, .rail-node, .toggle-box, .btn-calendar {
    touch-action: manipulation;
  }

  .mobile-floating-rsvp {
    display: block;
    position: fixed;
    bottom: max(1.1rem, calc(env(safe-area-inset-bottom) + 0.6rem));
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    z-index: 85;
    width: calc(100% - 2.4rem);
    max-width: 320px;
    margin: 0 auto;
    opacity: 0;
    pointer-events: none;
    transition: transform 0.4s var(--ease-cinematic), opacity 0.4s ease;
    box-sizing: border-box;
  }

  .mobile-floating-rsvp.visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .floating-rsvp-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: 100%;
    height: 50px;
    min-height: 50px;
    padding: 0 1.4rem;
    background: rgba(30, 27, 24, 0.92);
    color: #FAF6ED;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(201, 164, 79, 0.5);
    border-radius: 999px;
    font-family: var(--font-display);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-decoration: none;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4);
    box-sizing: border-box;
  }

  .floating-rsvp-btn i {
    width: 16px;
    height: 16px;
    color: var(--accent-gold);
  }

  .floating-sparkle {
    font-size: 0.85rem;
    animation: sparkleSpin 2.5s infinite linear;
  }
}

@keyframes sparkleSpin {
  0% { transform: scale(0.9) rotate(0deg); }
  50% { transform: scale(1.15) rotate(15deg); }
  100% { transform: scale(0.9) rotate(0deg); }
}

/* =========================================================
   PERFORMANCE & SMOOTH SCROLL OPTIMIZATIONS (60-120 FPS)
   ========================================================= */
.editorial-story-section,
.gold-rail-section,
.editorial-palette-section,
.editorial-faq-section {
  content-visibility: auto;
  contain-intrinsic-size: 1px 650px;
}

.arch-photo,
.story-photo,
.strip-card img,
.luxury-invitation-letter {
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* Evita jitter durante il compositing */
.wedding-landing {
  will-change: auto;
}


/* =========================================================
   IVORY SILK COLLECTION — OVERRIDE (Ref. Template 051)
   Seta avorio, oro antico, tipografia serif & script
   ========================================================= */

body.theme-silk {
  font-family: var(--font-serif);
  background-color: var(--bg-page);
  background-image:
    linear-gradient(rgba(251, 247, 236, 0.82), rgba(251, 247, 236, 0.9)),
    url('../assets/silk_bg.jpg');
  background-size: cover;
  background-attachment: fixed;
  background-position: center top;
  color: var(--text-main);
}

body.theme-silk h1,
body.theme-silk h2,
body.theme-silk h3 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--primary-dark);
}

body.theme-silk .editorial-section-head .editorial-title,
body.theme-silk .countdown-headline,
body.theme-silk .welcome-title,
body.theme-silk .letter-couple-title,
body.theme-silk .rsvp-title,
body.theme-silk .footer-couple {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--primary-dark);
}

body.theme-silk .editorial-section-head .eyebrow,
body.theme-silk .countdown-eyebrow,
body.theme-silk .rsvp-top-tag,
body.theme-silk .hero-top-badge,
body.theme-silk .rail-cat {
  font-family: var(--font-display);
  color: var(--primary);
  letter-spacing: 0.32em;
}

/* --- Pulsanti: pill oro come ref --- */
body.theme-silk .pill-btn {
  background: rgba(255, 253, 247, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: var(--primary-dark);
  border: 1px solid var(--border-gold);
  box-shadow: 0 4px 16px rgba(126, 98, 36, 0.12);
  font-family: var(--font-display);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
}

body.theme-silk .pill-btn:hover {
  background: #fffdf7;
  border-color: var(--primary);
  color: var(--primary);
}

/* --- Bottoni principali: oro pieno, pill --- */
body.theme-silk .btn-hero-primary,
body.theme-silk .btn-rsvp-submit,
body.theme-silk .btn-proceed {
  background: linear-gradient(135deg, #C9A85C 0%, #A9863C 55%, #8F6F2A 100%);
  color: #FFFDF6;
  border: none;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  box-shadow: 0 8px 24px rgba(143, 111, 42, 0.28);
}

body.theme-silk .btn-hero-primary:hover,
body.theme-silk .btn-rsvp-submit:hover,
body.theme-silk .btn-proceed:hover {
  background: linear-gradient(135deg, #D8B86C 0%, #B8923F 55%, #9A782E 100%);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(143, 111, 42, 0.36);
}

body.theme-silk .btn-hero-secondary,
body.theme-silk .btn-calendar,
body.theme-silk .btn-rsvp-whatsapp {
  background: #FFFDF7;
  color: var(--primary-dark);
  border: 1px solid var(--border-gold);
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 0.76rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

body.theme-silk .btn-hero-secondary:hover,
body.theme-silk .btn-calendar:hover,
body.theme-silk .btn-rsvp-whatsapp:hover {
  background: var(--primary);
  color: #FFFDF6;
  border-color: var(--primary);
}

/* --- Countdown: numeri serif oro, senza card bianche --- */
body.theme-silk .digit-box {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0.6rem 1rem;
}

body.theme-silk .digit-box .number {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 2.9rem;
  color: var(--primary-dark);
}

body.theme-silk .digit-box .label {
  font-family: var(--font-display);
  font-size: 0.62rem;
  letter-spacing: 0.3em;
  color: var(--text-muted);
}

body.theme-silk .separator {
  color: var(--primary);
  opacity: 0.6;
  font-family: var(--font-serif);
}

/* --- Testo corpo serif elegante --- */
body.theme-silk .section-subtext,
body.theme-silk .welcome-text,
body.theme-silk .story-p,
body.theme-silk .faq-item p,
body.theme-silk .letter-family-dedication,
body.theme-silk .rsvp-instruction {
  font-family: var(--font-serif);
  font-size: 1.12rem;
  color: var(--text-muted);
}

body.theme-silk .welcome-script-tag,
body.theme-silk .letter-script-intro,
body.theme-silk .card-read-notice .script-badge {
  font-family: var(--font-script);
  color: var(--primary);
}

/* --- Card e superfici: carta crema, bordi oro --- */
body.theme-silk .luxury-invitation-letter,
body.theme-silk .stationery-rsvp-card,
body.theme-silk .hero-welcome-card,
body.theme-silk .rail-card,
body.theme-silk .faq-item,
body.theme-silk .story-item {
  background: rgba(255, 253, 247, 0.75);
  border: 1px solid var(--border-gold);
  box-shadow: 0 10px 34px rgba(126, 98, 36, 0.08);
}

body.theme-silk .letter-gold-border {
  border-color: var(--border-gold);
}

/* --- Form RSVP: campi pill crema --- */
body.theme-silk .form-field input,
body.theme-silk .form-field select,
body.theme-silk .form-field textarea {
  background: #FFFEF9;
  border: 1px solid var(--border-delicate);
  border-radius: 999px;
  font-family: var(--font-serif);
  color: var(--text-main);
  padding: 0.85rem 1.4rem;
}

body.theme-silk .form-field textarea {
  border-radius: 22px;
}

body.theme-silk .form-field input:focus,
body.theme-silk .form-field select:focus,
body.theme-silk .form-field textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(169, 134, 60, 0.12);
}

body.theme-silk .form-field label {
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #6E5716;
  font-weight: 600;
}

/* --- Hero: nuvolette di seta --- */
body.theme-silk .editorial-hero-section {
  position: relative;
  overflow: hidden;
}

body.theme-silk .silk-hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('../assets/silk_wave.jpg');
  background-size: 120% auto;
  background-position: center bottom;
  background-repeat: no-repeat;
  opacity: 0.55;
  pointer-events: none;
}

/* --- Footer: drappeggio seta --- */
body.theme-silk .silk-footer-wave {
  display: block;
  width: 100%;
  height: clamp(120px, 22vw, 300px);
  background-image: url('../assets/silk_wave.jpg');
  background-size: cover;
  background-position: center bottom;
  margin-bottom: -2px;
}

body.theme-silk .editorial-footer {
  background: transparent;
  position: relative;
}

/* --- Nav pill --- */
body.theme-silk .nav-pill-link {
  background: rgba(255, 253, 247, 0.8);
  border: 1px solid var(--border-delicate);
  color: var(--text-main);
  font-family: var(--font-display);
  font-size: 0.64rem;
  letter-spacing: 0.2em;
}

body.theme-silk .nav-pill-link:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* --- Timeline node oro --- */
body.theme-silk .rail-node.gold {
  background: linear-gradient(135deg, #C9A85C, #8F6F2A);
  border-color: #FFFDF7;
}

/* --- Palette disc: bordo oro --- */
body.theme-silk .swatch-disc {
  box-shadow: 0 0 0 4px #FFFDF7, 0 0 0 5px var(--border-gold), 0 8px 20px rgba(126, 98, 36, 0.15);
}

/* --- Busta 3D: alone oro caldo su seta --- */
body.theme-silk .video-envelope-stage {
  background: radial-gradient(ellipse at center, #FDFAF1 0%, #F6EFDD 55%, #EFE5CC 100%);
}

@media (max-width: 768px) {
  body.theme-silk .digit-box .number { font-size: 2rem; }
  body.theme-silk .editorial-section-head .editorial-title { font-size: 2.4rem; }
}


/* --- Fix busta su sfondo seta chiaro --- */
body.theme-silk .tap-open-prompt {
  color: var(--primary-dark);
  background: rgba(255, 253, 247, 0.85);
  border: 1px solid var(--border-gold);
}

body.theme-silk .envelope-couple-names {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--primary-dark);
  text-shadow: 0 2px 14px rgba(255, 253, 247, 0.9);
}

body.theme-silk .envelope-date-line {
  color: var(--primary);
}

body.theme-silk .envelope-venue-line {
  color: var(--text-muted);
}

/* --- Toggle lingua su tema seta --- */
body.theme-silk .lang-switch-pill {
  background: rgba(255, 253, 247, 0.85);
  border: 1px solid var(--border-gold);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

body.theme-silk .lang-opt-btn {
  color: var(--text-muted);
}

body.theme-silk .lang-opt-btn.active {
  background: linear-gradient(135deg, #C9A85C, #8F6F2A);
  color: #FFFDF7;
}

body.theme-silk .lang-sep {
  color: var(--border-gold);
}

/* --- Monogramma immagine 4k --- */
body.theme-silk .hero-monogram-emblem {
  width: 110px;
  height: 110px;
  background: transparent;
  border: none;
  box-shadow: none;
  margin: 0 auto 0.6rem;
}

body.theme-silk .hero-monogram-emblem .mono-cd-img {
  width: 110px;
  height: 110px;
  object-fit: contain;
  filter: drop-shadow(0 3px 10px rgba(95, 74, 21, 0.25));
}

/* --- Date line hero centrata --- */
body.theme-silk .hero-date-venue-line {
  justify-content: center;
  text-align: center;
  width: 100%;
}

/* --- Schedule: descrizione card piú leggibile --- */
body.theme-silk .rail-desc {
  font-size: 1.12rem;
  line-height: 1.7;
  color: var(--text-muted);
}

/* --- RSVP: contrasto input e placeholder --- */
body.theme-silk .form-field input,
body.theme-silk .form-field select,
body.theme-silk .form-field textarea {
  color: #241C10;
  background: #FFFFFF;
  font-size: 1.08rem;
  font-weight: 500;
  border: 1.5px solid #C4B28A;
  caret-color: var(--primary);
}

body.theme-silk .form-field input:focus,
body.theme-silk .form-field select:focus,
body.theme-silk .form-field textarea:focus {
  border-color: #9A7B33;
  box-shadow: 0 0 0 4px rgba(169, 134, 60, 0.2);
  background: #FFFFFF;
}

body.theme-silk .form-field select {
  color: #241C10;
}

/* --- Foto villa nella card ricevimento --- */
body.theme-silk .rail-photo {
  display: block;
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--border-gold);
  margin-bottom: 1.1rem;
  box-shadow: 0 6px 18px rgba(95, 74, 21, 0.14);
}

body.theme-silk .form-field input::placeholder,
body.theme-silk .form-field textarea::placeholder {
  color: #6B5D45;
  opacity: 1;
  font-weight: 400;
}
