/* ═════════════════════════════════════════════════════════════════════
   QUINCE TEMPLATE — NAYELI FUENTES
   Full Website Invitation (Clean Flyer Design, No Fake Phone Bezel)
   ═════════════════════════════════════════════════════════════════════ */

/* ── DESIGN SYSTEM VARIABLES ── */
:root {
  /* Warm Kraft, Ivory Linen, Peach & Blush Scheme (Exact Match to Reference) */
  --bg-page: #f8f5ee;
  --bg-page-gradient: radial-gradient(circle at 50% 15%, #ffffff 0%, #f6f1e8 60%, #ece4d6 100%);
  --card-white: #ffffff;

  /* Text Colors */
  --text-dark: #271f1b;
  --text-charcoal: #3c322d;
  --text-subtle: #61534b;
  --text-muted: #88786f;

  /* Kraft Camel, Peach & Rose Gold Accents */
  --kraft-camel: #c89e6c;
  --kraft-camel-dark: #a97e4e;
  --rose-gold: #c88676;
  --rose-gold-dark: #ab6a5b;
  --rose-gold-light: #f5ddd6;
  --ribbon-blush: #eac5bc;
  --ribbon-blush-hover: #e2b7ad;
  --gold-accent: #c49658;

  /* Typography Families */
  --font-script: 'Alex Brush', cursive;
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-editorial-num: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Transitions */
  --transition-smooth: all 0.35s cubic-bezier(0.25, 1, 0.5, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg-page-gradient);
  min-height: 100vh;
  color: var(--text-dark);
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: 1.5;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

/* Prevent accidental scrolling while envelope is closed.
   NOTE: intentionally NOT using position:fixed here — toggling that
   property off on iOS Safari can leave the viewport unable to scroll
   even after the class is removed. overflow:hidden + touch-action:none
   achieve the same lock without that bug. */
html:not(.site-entered),
body:not(.site-entered) {
  overflow: hidden !important;
  height: 100vh !important;
  touch-action: none !important;
}

/* Background bokeh sparkle canvas */
#ambient-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.6;
}

/* ── FLOATING AUDIO CONTROL BAR (PLAY/PAUSE & VOLUME SLIDER) ── */
.audio-control-bar {
  position: fixed;
  top: calc(1.2rem + env(safe-area-inset-top, 0px));
  right: calc(1.5rem + env(safe-area-inset-right, 0px));
  z-index: 1100;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(200, 134, 118, 0.35);
  border-radius: 999px;
  padding: 4px 10px 4px 6px;
  box-shadow: 0 4px 18px rgba(178, 115, 99, 0.16);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease 0.2s, background 0.3s ease, box-shadow 0.3s ease;
}

body.site-entered .audio-control-bar {
  opacity: 1;
  pointer-events: auto;
}

.audio-control-bar:hover {
  background: #ffffff;
  box-shadow: 0 6px 22px rgba(178, 115, 99, 0.22);
}

.audio-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px 8px;
  border-radius: 999px;
  -webkit-tap-highlight-color: transparent;
  transition: opacity 0.2s ease, transform 0.15s ease;
}

.audio-btn:hover {
  opacity: 0.85;
}

.audio-btn:active {
  transform: scale(0.92);
}

.audio-play-icon,
.audio-pause-icon {
  font-size: 0.72rem;
  color: var(--rose-gold);
  line-height: 1;
  display: inline-flex;
  align-items: center;
}

.audio-wave {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 14px;
}

.audio-wave i {
  display: block;
  width: 2.5px;
  height: 4px;
  background: var(--rose-gold);
  border-radius: 2px;
  transition: height 0.2s ease;
}

.audio-btn.playing .audio-wave i:nth-child(1) {
  animation: soundWave 1.1s infinite ease-in-out 0.1s;
}

.audio-btn.playing .audio-wave i:nth-child(2) {
  animation: soundWave 1.1s infinite ease-in-out 0.3s;
}

.audio-btn.playing .audio-wave i:nth-child(3) {
  animation: soundWave 1.1s infinite ease-in-out 0.2s;
}

.audio-btn.playing .audio-wave i:nth-child(4) {
  animation: soundWave 1.1s infinite ease-in-out 0.4s;
}

@keyframes soundWave {

  0%,
  100% {
    height: 3px;
  }

  50% {
    height: 14px;
  }
}

/* Volume Panel & Slider */
.audio-volume-panel {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding-left: 0.4rem;
  border-left: 1px solid rgba(200, 134, 118, 0.28);
}

.volume-mute-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-subtle);
  display: flex;
  align-items: center;
  padding: 8px;
  border-radius: 50%;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.2s ease, transform 0.2s ease;
}

.volume-mute-btn:hover {
  color: var(--text-dark);
  transform: scale(1.1);
}

.volume-mute-btn:active {
  transform: scale(0.9);
}

.volume-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 80px;
  height: 40px;
  background: transparent;
  outline: none;
  cursor: pointer;
}

.volume-slider::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 2px;
  background: rgba(200, 134, 118, 0.25);
}

.volume-slider::-moz-range-track {
  height: 4px;
  border-radius: 2px;
  background: rgba(200, 134, 118, 0.25);
}

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  margin-top: -9px;
  border-radius: 50%;
  background: var(--rose-gold);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.volume-slider::-webkit-slider-thumb:hover {
  transform: scale(1.25);
}

.volume-slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 50%;
  background: var(--rose-gold);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
  cursor: pointer;
}

/* ── FLOATING LANGUAGE CONTROL BAR (TOP-LEFT) ── */
.lang-control-bar {
  position: fixed;
  top: calc(1.2rem + env(safe-area-inset-top, 0px));
  left: calc(1.5rem + env(safe-area-inset-left, 0px));
  z-index: 1200;
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(200, 134, 118, 0.35);
  border-radius: 999px;
  padding: 4px 6px;
  box-shadow: 0 4px 18px rgba(178, 115, 99, 0.16);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease 0.2s, background 0.3s ease, box-shadow 0.3s ease;
}

body.site-entered .lang-control-bar {
  opacity: 1;
  pointer-events: auto;
}

.lang-control-bar:hover {
  background: #ffffff;
  box-shadow: 0 6px 22px rgba(178, 115, 99, 0.22);
}

.lang-control-bar .lang-btn-group {
  display: flex;
  align-items: center;
  gap: 3px;
  background: transparent;
  border: none;
  padding: 0;
  box-shadow: none;
}

.lang-control-bar .lang-pill-btn {
  border: none;
  background: transparent;
  padding: 0.4rem 0.75rem;
  min-height: 38px;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text-subtle);
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  -webkit-tap-highlight-color: transparent;
  transition: all 0.2s ease;
}

.lang-control-bar .lang-pill-btn:active {
  transform: scale(0.95);
}

.lang-control-bar .lang-pill-btn:hover {
  color: var(--text-dark);
}

.lang-control-bar .lang-pill-btn.active {
  background: linear-gradient(135deg, #c88676, #b27363);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(178, 115, 99, 0.35);
}

.lang-flag {
  font-size: 0.85rem;
  line-height: 1;
}

/* ── COLLAPSIBLE ARROW TOGGLE FOR LANGUAGE / AUDIO BARS ── */
.control-arrow-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--rose-gold-dark);
  border-radius: 50%;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.2s ease, transform 0.15s ease;
}

.control-arrow-btn:hover {
  background: rgba(200, 134, 118, 0.14);
}

.control-arrow-btn:active {
  background: rgba(200, 134, 118, 0.22);
  transform: scale(0.92);
}

.control-arrow-btn .arrow-icon {
  display: block;
  font-size: 1.05rem;
  line-height: 1;
  transition: transform 0.35s cubic-bezier(0.25, 1, 0.5, 1);
}

.lang-btn-group,
.audio-collapsible-content {
  overflow: hidden;
  max-width: 260px;
  opacity: 1;
  transition: max-width 0.4s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.25s ease, margin 0.4s ease;
}

.lang-control-bar .lang-btn-group {
  margin-left: 2px;
}

.audio-control-bar .audio-collapsible-content {
  margin-right: 2px;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.lang-control-bar.collapsed .lang-btn-group,
.audio-control-bar.collapsed .audio-collapsible-content {
  max-width: 0;
  opacity: 0;
  margin-left: 0;
  margin-right: 0;
  pointer-events: none;
}

.lang-control-bar.collapsed #lang-collapse-toggle .arrow-icon,
.audio-control-bar.collapsed #audio-collapse-toggle .arrow-icon {
  transform: rotate(180deg);
}

/* ── MAIN INVITATION CARD CONTAINER ── */
.invitation-wrapper {
  position: relative;
  width: 100%;
  max-width: 520px;
  margin: 3.6rem auto 3rem;
  background-color: var(--card-white);
  background-image:
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.95) 0%, rgba(253, 248, 245, 0.7) 100%),
    url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M20 0 L40 20 L20 40 L0 20 Z' fill='none' stroke='%23d9bba8' stroke-width='0.4' stroke-opacity='0.2'/%3E%3Ccircle cx='20' cy='20' r='1.5' fill='%23c8a060' fill-opacity='0.18'/%3E%3C/svg%3E");
  border: 1px solid rgba(196, 158, 88, 0.28);
  border-radius: 24px;
  box-shadow:
    0 25px 70px rgba(180, 115, 99, 0.14),
    0 4px 20px rgba(0, 0, 0, 0.04),
    inset 0 0 0 1px rgba(255, 255, 255, 0.9),
    inset 0 0 35px rgba(247, 216, 206, 0.22);
  overflow: visible;
}

/* ── OVERLAPPING FLORAL CORNER SPRAYS ON INVITATION CARD ── */
.invitation-floral-frame {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 25;
  /* Overlap in front of the letter border & contents */
}

.invitation-flower-spray {
  position: absolute;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 14px 26px rgba(70, 45, 30, 0.18));
}

.flower-card-top-right {
  top: -52px;
  right: -52px;
  width: 280px;
  height: 280px;
  max-width: 55vw;
  max-height: 55vw;
}

.flower-card-bottom-left {
  bottom: -52px;
  left: -52px;
  width: 280px;
  height: 280px;
  max-width: 55vw;
  max-height: 55vw;
}

/* Inside Envelope Card Mini Floral Accent */
.env-card-floral-frame {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 15;
}

.env-card-flower {
  position: absolute;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 4px 10px rgba(70, 45, 30, 0.12));
}

.env-card-flower.top-right {
  top: -24px;
  right: -24px;
  width: 105px;
  height: 105px;
}

.env-card-flower.bottom-left {
  bottom: -24px;
  left: -24px;
  width: 105px;
  height: 105px;
}

/* Ornate Gold Filigree Corner Accents */
.corner-filigree {
  position: absolute;
  width: 48px;
  height: 48px;
  pointer-events: none;
  z-index: 10;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 48 48' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 4 C14 4 22 12 22 22 M4 4 C4 14 12 22 22 22 M4 4 L14 14 M4 4 L4 28 M4 4 L28 4 M8 8 C16 8 20 12 20 20 M8 8 C8 16 12 20 20 20' fill='none' stroke='%23c49e58' stroke-width='1.4' stroke-linecap='round' stroke-opacity='0.85'/%3E%3Ccircle cx='10' cy='10' r='1.5' fill='%23c49e58'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
}

.corner-top-left {
  top: 12px;
  left: 12px;
}

.corner-top-right {
  top: 12px;
  right: 12px;
  transform: scaleX(-1);
}

.corner-bottom-left {
  bottom: 12px;
  left: 12px;
  transform: scaleY(-1);
}

.corner-bottom-right {
  bottom: 12px;
  right: 12px;
  transform: scale(-1);
}

.invite-section {
  position: relative;
  padding: 2.8rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Section Dividers */
.section-divider {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2.2rem;
  opacity: 0.6;
}

.divider-line {
  flex: 1;
  max-width: 100px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--rose-gold), transparent);
}

.divider-icon {
  color: var(--rose-gold);
  font-size: 0.9rem;
}

/* ═════════════════════════════════════════════════════════════════════
   SECTION 1: COVER (HERO CELEBRANT PHOTO)
   ═════════════════════════════════════════════════════════════════════ */
.cover-section {
  padding-top: 2rem;
  padding-bottom: 2.5rem;
}

/* Top Crown Flourish */
.top-crown-container {
  width: 100%;
  max-width: 260px;
  margin: 0 auto 0.6rem;
  display: flex;
  justify-content: center;
}

.crown-flourish-img {
  width: 100%;
  height: auto;
  display: block;
}

/* Celebrant Photo Centerpiece (Clean & Unobstructed) */
.photo-stage {
  position: relative;
  width: 100%;
  max-width: 480px;
  margin: 0.8rem auto 2.2rem;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 12px 35px rgba(180, 115, 99, 0.16);
}

.photo-viewport {
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  position: relative;
  background: #fdfaf8;
}

.celebrant-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

/* Invitation Typography Matching Flyer */
.invitation-body-content {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.parents-line {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--text-dark);
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

.invite-preamble {
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--text-charcoal);
  text-transform: uppercase;
  margin-bottom: 0.2rem;
}

.quince-script-title {
  font-family: var(--font-script);
  font-size: clamp(4rem, 11vw, 5.2rem);
  font-weight: 400;
  line-height: 0.95;
  color: #1a1a1a;
  margin: 0.25rem 0;
}

.daughter-subtitle {
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--text-charcoal);
  text-transform: uppercase;
  margin-bottom: 0.15rem;
}

.celebrant-name {
  font-family: var(--font-script);
  font-size: clamp(3.8rem, 10vw, 4.8rem);
  font-weight: 400;
  line-height: 1;
  color: #111111;
  margin-bottom: 1.2rem;
}

/* Editorial Date & Time Box */
.editorial-date-box {
  width: 100%;
  max-width: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0.5rem auto 1.5rem;
}

.date-month {
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--text-dark);
  margin-bottom: 0.3rem;
}

.date-middle-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #1a1a1a;
  border-bottom: 1px solid #1a1a1a;
  padding: 0.4rem 0.4rem;
}

.date-day-name {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--text-dark);
  text-transform: uppercase;
  flex: 1;
  text-align: left;
}

.date-day-num {
  font-family: var(--font-editorial-num);
  font-size: 3.6rem;
  font-weight: 600;
  line-height: 0.9;
  color: #111111;
  padding: 0 1rem;
}

.date-time {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--text-dark);
  text-transform: uppercase;
  flex: 1;
  text-align: right;
}

.date-year {
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--text-dark);
  margin-top: 0.4rem;
}

/* ═════════════════════════════════════════════════════════════════════
   PURE TYPOGRAPHIC COUNTDOWN (NO BOXES, NO BORDERS, NO CONTAINERS)
   Pure editorial typography with grand numerals directly on the paper
   ═════════════════════════════════════════════════════════════════════ */
.pure-countdown-section {
  width: 100%;
  max-width: 480px;
  margin: 0.8rem auto 1.8rem;
  padding: 0 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: none;
  border: none;
  box-shadow: none;
}


.pt-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  margin-bottom: 0.85rem;
}

.pt-fleuron {
  font-size: 0.68rem;
  letter-spacing: 0.25em;
  color: var(--gold-accent);
  opacity: 0.85;
}

.pt-caption {
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--text-charcoal);
  text-transform: uppercase;
}

/* Numbers Row - Pure Text Grid */
.pt-numbers-row {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: clamp(0.4rem, 2.5vw, 1.1rem);
  width: 100%;
  background: none;
  border: none;
  box-shadow: none;
}

.pt-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: clamp(55px, 18vw, 78px);
  background: none;
  border: none;
  box-shadow: none;
  padding: 0;
}

/* Massive, statuesque, elegant numerals */
.pt-big-num {
  font-family: var(--font-editorial-num), 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  font-size: clamp(2.8rem, 9.2vw, 4.2rem);
  font-weight: 500;
  line-height: 0.92;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  color: #1a1614;
  user-select: none;
  background: none;
  border: none;
  box-shadow: none;
}

/* Micro-tracked small caps label */
.pt-sublabel {
  font-family: var(--font-sans);
  font-size: clamp(0.56rem, 1.8vw, 0.65rem);
  font-weight: 700;
  letter-spacing: 0.26em;
  color: var(--rose-gold-dark);
  text-transform: uppercase;
  margin-top: 0.5rem;
  background: none;
  border: none;
  box-shadow: none;
}

/* Hairline Colon Separators */
.pt-colon {
  font-family: var(--font-editorial-num), Georgia, serif;
  font-size: clamp(2rem, 6.5vw, 3rem);
  font-weight: 400;
  line-height: 0.95;
  color: var(--gold-accent);
  opacity: 0.6;
  align-self: flex-start;
  margin-top: 0.15rem;
  user-select: none;
  animation: ptColonPulse 2s infinite ease-in-out;
}

@keyframes ptColonPulse {

  0%,
  100% {
    opacity: 0.65;
    transform: scale(1);
  }

  50% {
    opacity: 0.25;
    transform: scale(0.9);
  }
}

/* ─────────────────────────────────────────────────────────────
   TYPOGRAPHIC COUNTDOWN: ROMANTIC CALLIGRAPHIC ITALIC (STYLE 3)
   Graceful slanted serif numerals with warm fleuron ornaments
   ───────────────────────────────────────────────────────────── */
.pt-style-italic .pt-big-num {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 600;
  color: #2e1c17;
  letter-spacing: 0.02em;
}

.pt-style-italic .italic-fleuron {
  font-size: 0.95rem;
  margin-top: 0.8rem;
  color: var(--rose-gold);
  opacity: 0.75;
}

.pt-style-italic .pt-sublabel {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--rose-gold-dark);
  text-transform: capitalize;
}

/* ── INVITATION VENUE HINT ── */
.venue-location-hint {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  color: var(--text-dark);
  font-weight: 600;
  margin: 0.4rem auto 1.4rem;
  text-align: center;
}

.scroll-down-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(211, 149, 133, 0.4);
  color: var(--rose-gold-dark);
  text-decoration: none;
  font-size: 1.2rem;
  transition: var(--transition-smooth);
}

.scroll-down-btn:hover {
  background: var(--ribbon-blush);
  color: #1a1a1a;
  transform: translateY(3px);
}

/* ═════════════════════════════════════════════════════════════════════
   SECTION 2: PROGRAM / TIMELINE
   ═════════════════════════════════════════════════════════════════════ */
.program-section {
  border-top: 1px solid rgba(211, 149, 133, 0.18);
  background: #ffffff;
}

.program-header {
  margin-bottom: 2.5rem;
  text-align: center;
}

.program-title {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--text-dark);
  text-transform: uppercase;
}

.title-accent-line {
  width: 45px;
  height: 2px;
  background: var(--rose-gold);
  margin: 0.5rem auto 0;
}

.program-timeline {
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  position: relative;
  margin: 0.5rem auto 1.5rem;
}

.timeline-row {
  display: grid;
  grid-template-columns: 1fr 48px 1fr;
  align-items: center;
  position: relative;
  min-height: 74px;
  padding: 0.35rem 0;
}

.time-block {
  display: flex;
  flex-direction: column;
}

.row-left .time-block {
  text-align: right;
  padding-right: 0.95rem;
}

.row-right .time-block {
  text-align: left;
  padding-left: 0.95rem;
}

.time-stamp {
  font-family: var(--font-serif);
  font-size: 1.08rem;
  font-weight: 600;
  color: var(--text-dark);
  letter-spacing: 0.04em;
  line-height: 1.2;
}

.event-title {
  font-family: var(--font-sans);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--text-dark);
  text-transform: uppercase;
  margin: 0.12rem 0;
}

.event-desc {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  line-height: 1.35;
}

/* ── TIMELINE LOCATION PILL BUTTON ── */
.timeline-loc-wrap {
  display: flex;
  margin-top: 0.35rem;
}

.row-left .timeline-loc-wrap {
  justify-content: flex-end;
}

.row-right .timeline-loc-wrap {
  justify-content: flex-start;
}

.timeline-loc-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  padding: 0.24rem 0.58rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(200, 134, 118, 0.4);
  color: var(--rose-gold-dark);
  font-family: var(--font-sans);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(180, 115, 99, 0.08);
  transition: all 0.22s cubic-bezier(0.25, 1, 0.5, 1);
  cursor: pointer;
}

.timeline-loc-btn:hover {
  background: var(--rose-gold);
  color: #ffffff;
  border-color: var(--rose-gold);
  box-shadow: 0 4px 12px rgba(180, 115, 99, 0.28);
  transform: translateY(-1.5px);
}

.timeline-loc-btn:active {
  transform: translateY(0);
}

.tl-loc-icon {
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.timeline-loc-btn:hover .tl-loc-icon {
  transform: scale(1.18);
}

/* Center connector line & icons */
.timeline-connector {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.timeline-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1.5px;
  background: linear-gradient(to bottom, rgba(200, 134, 118, 0.4), var(--rose-gold) 20%, var(--rose-gold) 80%, rgba(200, 134, 118, 0.4));
  transform: translateX(-50%);
  z-index: 1;
}

/* First item line starts at its node center; last item line stops at its node center */
.timeline-row:first-child .timeline-line {
  top: 50%;
}

.timeline-row:last-child .timeline-line {
  bottom: 50%;
}

.timeline-node {
  position: relative;
  z-index: 2;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #ffffff;
  border: 1.5px solid var(--rose-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--rose-gold-dark);
  box-shadow: 0 2px 8px rgba(200, 134, 118, 0.16);
  transition: all 0.25s ease;
}

.timeline-row:hover .timeline-node {
  transform: scale(1.1);
  border-color: var(--gold-accent);
  color: #2e1c17;
  box-shadow: 0 4px 14px rgba(200, 134, 118, 0.28);
}

.tl-icon {
  width: 19px;
  height: 19px;
}

/* ═════════════════════════════════════════════════════════════════════
   SECTION: COURT OF HONOR (CORTE DE HONOR)
   ═════════════════════════════════════════════════════════════════════ */
.court-section {
  border-top: 1px solid rgba(211, 149, 133, 0.18);
  background: #ffffff;
  padding-bottom: 2.8rem;
  text-align: center;
}

.court-header {
  margin-bottom: 1.8rem;
  text-align: center;
}

.court-title {
  font-family: var(--font-serif);
  font-size: 2.1rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--text-dark);
  text-transform: uppercase;
}

/* Main Focus: Chambelán de Honor */
.court-honor-centerpiece {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 auto 2.2rem;
  max-width: 320px;
}

.court-role-badge {
  font-family: var(--font-sans);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  color: var(--rose-gold-dark);
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}

.court-avatar-wrapper {
  position: relative;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fcf9f8;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease;
}

.avatar-main {
  width: 128px;
  height: 128px;
  border: 2.5px solid var(--rose-gold);
  box-shadow: 0 8px 24px rgba(200, 134, 118, 0.22);
  margin-bottom: 0.65rem;
}

.court-honor-centerpiece:hover .avatar-main {
  transform: scale(1.04);
  border-color: var(--gold-accent);
  box-shadow: 0 12px 30px rgba(200, 134, 118, 0.32);
}

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

.court-member-name {
  font-family: var(--font-serif);
  font-weight: 600;
  color: var(--text-dark);
  line-height: 1.25;
}

.name-main {
  font-size: 1.28rem;
  letter-spacing: 0.05em;
  color: #2e1c17;
}

/* Roster Stage: Damas & Chambelanes */
.court-roster-stage {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
  padding: 0 0.8rem;
}

.court-subgroup-title {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.24em;
  color: var(--rose-gold-dark);
  text-transform: uppercase;
  margin-bottom: 0.95rem;
  position: relative;
  display: inline-block;
}

.court-subgroup-title::after {
  content: '';
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--rose-gold);
  margin: 0.35rem auto 0;
  opacity: 0.7;
}

.court-members-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.9rem;
  align-items: start;
}

.court-member-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.avatar-small {
  width: 76px;
  height: 76px;
  border: 1.5px solid rgba(200, 134, 118, 0.45);
  box-shadow: 0 3px 10px rgba(200, 134, 118, 0.12);
  margin-bottom: 0.45rem;
}

.court-member-card:hover .avatar-small {
  transform: scale(1.08);
  border-color: var(--gold-accent);
  box-shadow: 0 6px 16px rgba(200, 134, 118, 0.26);
}

.court-member-card .court-member-name {
  font-size: 0.84rem;
  letter-spacing: 0.02em;
  color: #382520;
}

/* Elegant Wax-Seal Monogram Badges (echoes the envelope wax seal — replaces generic bordered-circle placeholders) */
.monogram-avatar {
  background: radial-gradient(circle at 34% 30%, #fbe7e0 0%, #eec7bb 38%, #d3a291 72%, #b17f6f 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  border: none !important;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.4),
    inset 0 -6px 10px rgba(120, 65, 52, 0.18),
    0 6px 16px rgba(160, 80, 65, 0.22);
}

.monogram-letter {
  font-family: var(--font-script);
  font-weight: 400;
  line-height: 1;
  color: #ffffff;
  text-shadow: 0 1.5px 3px rgba(110, 50, 40, 0.35);
  user-select: none;
}

.avatar-small .monogram-letter {
  font-size: 2.3rem;
}

.avatar-main.monogram-avatar .monogram-letter {
  font-size: 3.8rem;
}

/* Mobile Responsiveness for Court Grid */
@media (max-width: 520px) {
  .avatar-main {
    width: 110px;
    height: 110px;
  }

  .name-main {
    font-size: 1.15rem;
  }

  .court-members-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.1rem 0.8rem;
  }

  .avatar-small {
    width: 68px;
    height: 68px;
  }

  .court-member-card .court-member-name {
    font-size: 0.8rem;
  }
}

/* ═════════════════════════════════════════════════════════════════════
   SECTION: A MESSAGE FROM THE CELEBRANT
   ═════════════════════════════════════════════════════════════════════ */
.message-section {
  border-top: 1px solid rgba(211, 149, 133, 0.18);
  background: #ffffff;
  padding-bottom: 3rem;
}

.message-stage {
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.4rem;
  text-align: center;
}

.message-portrait-wrap {
  width: 132px;
  height: 164px;
  flex-shrink: 0;
  border-radius: 66px 66px 14px 14px;
  overflow: hidden;
  box-shadow: 0 16px 32px rgba(180, 115, 99, 0.22), 0 2px 8px rgba(0, 0, 0, 0.06);
}

.message-portrait-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.message-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.message-quote-mark {
  font-family: var(--font-serif);
  font-size: 2.6rem;
  line-height: 1;
  color: var(--rose-gold);
  opacity: 0.55;
  margin-bottom: -0.3rem;
}

.message-quote-text {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.65;
  color: var(--text-charcoal);
  max-width: 380px;
  margin-bottom: 1rem;
}

.message-signature {
  font-family: var(--font-script);
  font-size: 2.2rem;
  color: var(--rose-gold-dark);
  line-height: 1;
}

@media (min-width: 640px) {
  .message-stage {
    flex-direction: row;
    align-items: center;
    text-align: left;
    gap: 2.2rem;
  }

  .message-copy {
    align-items: flex-start;
    text-align: left;
  }
}

@media (max-width: 480px) {
  .message-portrait-wrap {
    width: 112px;
    height: 140px;
    border-radius: 56px 56px 12px 12px;
  }

  .message-quote-text {
    font-size: 0.96rem;
  }
}

/* ═════════════════════════════════════════════════════════════════════
   SECTION 3: RSVP & DETAILS
   ═════════════════════════════════════════════════════════════════════ */
.rsvp-section {
  border-top: 1px solid rgba(211, 149, 133, 0.18);
  background: #ffffff;
  padding-bottom: 3.5rem;
}

/* Giant Floral Intertwined RSVP Letters */
.giant-rsvp-stage {
  width: 100%;
  max-width: 320px;
  margin: 1.5rem auto 1.2rem;
}

.rsvp-letters-grid {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.rsvp-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 1.5rem;
}

.rsvp-char-box {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 110px;
  height: 110px;
}

.rsvp-char {
  font-family: var(--font-serif);
  font-size: 7.5rem;
  font-weight: 700;
  line-height: 1;
  background: linear-gradient(135deg, #d39585 0%, #b87a6a 45%, #f5cfc4 75%, #c08070 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: block;
  user-select: none;
}

.letter-floral {
  position: absolute;
  mix-blend-mode: multiply;
  pointer-events: none;
}

.floral-s {
  width: 130px;
  top: -18px;
  right: -28px;
  transform: rotate(15deg);
}

.floral-v {
  width: 110px;
  bottom: -18px;
  left: -24px;
  transform: rotate(-25deg);
}

.floral-p {
  width: 125px;
  top: -12px;
  right: -24px;
  transform: rotate(5deg);
}

/* RSVP Phrasing */
.rsvp-callout-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-top: 1.5rem;
  width: 100%;
}

.rsvp-deadline-text {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--text-dark);
  text-transform: uppercase;
  margin-bottom: 1.2rem;
}

/* Blush Ribbon Banner Button */
.ribbon-btn-wrapper {
  margin-bottom: 1.6rem;
}

.blush-ribbon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  background: var(--ribbon-blush);
  border: none;
  cursor: pointer;
  padding: 0 2.2rem;
  box-shadow: 0 4px 18px rgba(211, 149, 133, 0.25);
  transition: var(--transition-smooth);
}

.blush-ribbon-btn:hover {
  background: #f1cac0;
  transform: scale(1.04);
}

.ribbon-center {
  font-family: var(--font-serif);
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--text-dark);
}

.ribbon-tail {
  position: absolute;
  top: 0;
  width: 22px;
  height: 48px;
  background: var(--ribbon-blush);
}

.ribbon-tail.left {
  left: -22px;
  clip-path: polygon(100% 0, 100% 100%, 0 50%);
}

.ribbon-tail.right {
  right: -22px;
  clip-path: polygon(0 0, 0 100%, 100% 50%);
}

.rsvp-instruction-text {
  font-family: var(--font-sans);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--text-charcoal);
  line-height: 1.65;
  text-transform: uppercase;
  margin-bottom: 1.8rem;
}

.rsvp-thank-you {
  font-family: var(--font-script);
  font-size: 4.8rem;
  font-weight: 400;
  color: #1a1a1a;
  line-height: 1;
}

/* ═════════════════════════════════════════════════════════════════════
   INTERACTIVE RSVP MODAL
   ═════════════════════════════════════════════════════════════════════ */
.rsvp-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(45, 25, 20, 0.45);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-smooth);
}

.rsvp-modal-overlay.modal-open {
  opacity: 1;
  visibility: visible;
}

.modal-card {
  position: relative;
  background: #ffffff;
  border-radius: 28px;
  width: 100%;
  max-width: 460px;
  padding: 2.4rem 2rem;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25);
  transform: translateY(20px);
  transition: var(--transition-smooth);
}

.rsvp-modal-overlay.modal-open .modal-card {
  transform: translateY(0);
}

.close-modal {
  position: absolute;
  top: 1rem;
  right: 1.2rem;
  background: none;
  border: none;
  font-size: 2rem;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
}

.modal-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.modal-title {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  color: var(--text-dark);
  margin-bottom: 0.3rem;
}

.modal-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.modal-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  text-align: left;
}

.form-group label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--text-charcoal);
  text-transform: uppercase;
}

.form-group input,
.form-group select,
.form-group textarea {
  border: 1px solid rgba(211, 149, 133, 0.4);
  background: #fdfaf9;
  padding: 0.7rem 0.9rem;
  border-radius: 10px;
  font-family: var(--font-sans);
  font-size: 0.92rem;
  color: var(--text-dark);
  transition: var(--transition-smooth);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--rose-gold);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(211, 149, 133, 0.2);
}

.btn-submit-rsvp {
  background: var(--ribbon-blush);
  border: 1px solid rgba(211, 149, 133, 0.4);
  color: var(--text-dark);
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 0.9rem;
  border-radius: 25px;
  cursor: pointer;
  margin-top: 0.5rem;
  box-shadow: 0 4px 15px rgba(211, 149, 133, 0.2);
  transition: var(--transition-smooth);
}

.btn-submit-rsvp:hover {
  background: #edd6ce;
  transform: translateY(-1px);
}

.modal-success {
  text-align: center;
  padding: 1.5rem 1rem;
  background: #f8faf8;
  border: 1px solid #48c78e;
  border-radius: 16px;
  margin-top: 1rem;
}

.modal-success .success-icon {
  font-size: 1.8rem;
  margin-bottom: 0.4rem;
}

.modal-success h4 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: #276749;
  margin-bottom: 0.2rem;
}

.modal-success p {
  font-size: 0.85rem;
  color: #2f855a;
}

/* ── SITE FOOTER ── */
.site-footer {
  position: relative;
  z-index: 5;
  text-align: center;
  padding: 2rem 1rem 3rem;
  color: var(--text-muted);
}

.footer-names {
  font-family: var(--font-serif);
  font-size: 1rem;
  letter-spacing: 0.12em;
  color: var(--text-charcoal);
  margin-bottom: 0.2rem;
}

.footer-date {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
}

/* ═════════════════════════════════════════════════════════════════════
   MOBILE & RESPONSIVE ADJUSTMENTS
   ═════════════════════════════════════════════════════════════════════ */
@media (max-width: 600px) {
  body {
    background: #ffffff;
    padding: 0;
  }

  .invitation-wrapper {
    margin: 0;
    border-radius: 0;
    box-shadow: none;
    max-width: 100%;
  }

  .invite-section {
    padding: 2.2rem 1.2rem;
  }

  .photo-stage {
    width: 100%;
    max-width: 100%;
    margin: 0.5rem auto 1.8rem;
    border-radius: 8px;
  }

  .lang-control-bar {
    top: 0.8rem;
    left: 0.8rem;
  }

  .audio-control-bar {
    top: 0.8rem;
    right: 0.8rem;
  }
}

/* ═════════════════════════════════════════════════════════════════════
   BESPOKE LUXURY ENVELOPE ENTRY POPUP STYLES (EXACT REFERENCE MATCH)
   ═════════════════════════════════════════════════════════════════════ */
.entry-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-color: #f7f4ec;
  background-image:
    radial-gradient(circle at 50% 45%, #ffffff 0%, #f7f3eb 55%, #ece5d8 100%);
  transition: opacity 0.85s cubic-bezier(0.2, 0.9, 0.3, 1), transform 0.85s cubic-bezier(0.2, 0.9, 0.3, 1), visibility 0.85s;
}

.entry-overlay.fade-out {
  opacity: 0;
  transform: scale(1.05);
  pointer-events: none;
  visibility: hidden;
}

.entry-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1050;
}

.entry-stage-mount {
  position: relative;
  z-index: 10;
  perspective: 1200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1.5rem;
  width: 100%;
  max-width: 500px;
}

/* Diagonal Corner Floral Sprays Framing the Envelope (Overlapping in Front) */
.envelope-floral-frame {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 420px;
  height: 290px;
  max-width: 95vw;
  pointer-events: none;
  z-index: 25;
  /* Overlap in front of envelope */
}

.envelope-flower-spray {
  position: absolute;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 12px 24px rgba(70, 45, 30, 0.16));
}

.flower-top-right {
  top: -55px;
  right: -48px;
  width: 275px;
  height: 275px;
  z-index: 25;
}

.flower-bottom-left {
  bottom: -55px;
  left: -48px;
  width: 275px;
  height: 275px;
  z-index: 25;
}

/* 3D Envelope Container (Natural Golden Kraft Paper) */
.luxury-envelope-container {
  position: relative;
  width: 370px;
  height: 250px;
  max-width: 88vw;
  cursor: pointer;
  user-select: none;
  transform-style: preserve-3d;
  border-radius: 4px;
  background: #c89e6c;
  box-shadow:
    0 25px 50px rgba(90, 60, 45, 0.22),
    0 8px 20px rgba(0, 0, 0, 0.08);
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  z-index: 10;
}

.luxury-envelope-container:hover {
  transform: translateY(-4px) scale(1.015);
  box-shadow:
    0 30px 60px rgba(90, 60, 45, 0.26),
    0 10px 24px rgba(0, 0, 0, 0.1);
}

/* Envelope Interior Back Wall */
.env-back {
  position: absolute;
  inset: 0;
  background: #be9463;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: inset 0 0 35px rgba(80, 50, 30, 0.25);
}

.env-interior-pattern {
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.08) 0, rgba(255, 255, 255, 0.08) 1px, transparent 0, transparent 20px),
    repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.08) 0, rgba(255, 255, 255, 0.08) 1px, transparent 0, transparent 20px);
}

/* Inside Invitation Card (STRICTLY HIDDEN WHEN CLOSED, Glides Up Upon Opening) */
.env-invitation-card {
  position: absolute;
  top: 15px;
  left: 50%;
  transform: translateX(-50%) translateY(20px) translateZ(4px) scale(0.96);
  width: 335px;
  max-width: 84vw;
  background: #ffffff;
  border-radius: 8px;
  padding: 16px 18px;
  z-index: 10;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease 0.1s, transform 0.6s cubic-bezier(0.18, 0.89, 0.32, 1.1) 0.1s, visibility 0.4s ease 0.1s;
  pointer-events: none;
}

.luxury-envelope-container.is-opened .env-invitation-card {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(-120px) translateZ(12px) scale(1.02);
  z-index: 35;
  pointer-events: auto;
}

.card-gold-frame {
  border: 1px solid rgba(196, 158, 88, 0.35);
  border-radius: 6px;
  padding: 14px 12px 16px;
  text-align: center;
  background: radial-gradient(circle at 50% 10%, rgba(255, 255, 255, 1) 0%, rgba(253, 248, 245, 0.85) 100%);
}

.card-crown-flourish {
  color: var(--gold-accent);
  margin-bottom: 8px;
}

.card-portrait-ring {
  width: 82px;
  height: 82px;
  margin: 0 auto 10px;
  border-radius: 50%;
  border: 2.5px solid var(--gold-accent);
  box-shadow:
    0 0 0 3px rgba(255, 255, 255, 0.9),
    0 6px 18px rgba(189, 120, 107, 0.28);
  overflow: hidden;
}

.card-portrait-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.card-quince-script {
  font-family: var(--font-script);
  font-size: 2.4rem;
  line-height: 1.05;
  color: var(--rose-gold);
}

.card-celebrant-name {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dark);
  margin-top: 2px;
  margin-bottom: 6px;
}

.card-flourish-accent {
  font-size: 0.72rem;
  color: var(--gold-accent);
  letter-spacing: 0.25em;
  opacity: 0.85;
}

/* Envelope Front Pocket (Full-Height Natural Fold with Elegant V-Cut Opening) */
.env-pocket {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(175deg, #caa170 0%, #be9463 60%, #b28857 100%);
  border-radius: 4px;
  z-index: 12;
  /* Reaches top corners (0,0) and (100%,0) to completely eliminate corner gaps, dipping to 125px in center */
  clip-path: polygon(0 0, 0 100%, 100% 100%, 100% 0, 50% 125px);
  box-shadow: inset 0 -4px 15px rgba(60, 35, 20, 0.15);
}

/* Subtle Realistic Seam Lines on Kraft Envelope Pocket */
.env-pocket::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(135deg, rgba(255, 255, 255, 0.14) 0%, transparent 45%),
    linear-gradient(-135deg, rgba(0, 0, 0, 0.08) 0%, transparent 45%);
  pointer-events: none;
}

/* Envelope 3D Triangular Top Flap (Overlaps pocket completely with zero gaps) */
.env-flap {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 155px;
  transform-origin: top center;
  transform-style: preserve-3d;
  z-index: 15;
  transition: transform 0.52s cubic-bezier(0.25, 1, 0.4, 1);
  filter: drop-shadow(0 6px 12px rgba(60, 35, 20, 0.22));
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  background: linear-gradient(160deg, #caa170 0%, #bd9362 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.3);
}

.luxury-envelope-container.is-opened .env-flap {
  transform: rotateX(180deg);
  z-index: 15;
  filter: drop-shadow(0 -4px 10px rgba(60, 35, 20, 0.16));
}

/* ── LUMINOUS GLOWING WAX SEAL / STAMP ANIMATION (NO WORDS NEEDED) ── */
.env-wax-seal-wrapper {
  position: absolute;
  top: 118px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 22;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.luxury-envelope-container.is-opened .env-wax-seal-wrapper {
  opacity: 0;
  transform: translateX(-50%) scale(0.65);
  pointer-events: none;
}

/* Radiant Ambient Candlelight Glow Aura */
.seal-glow-halo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 200, 185, 0.8) 0%, rgba(217, 160, 140, 0.45) 42%, rgba(212, 175, 55, 0.2) 62%, transparent 75%);
  filter: blur(10px);
  animation: sealHaloBreathe 3s infinite ease-in-out;
  pointer-events: none;
}

/* Ripple Waves Expanding from Behind the Stamp */
.seal-pulse-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 74px;
  height: 74px;
  border-radius: 50%;
  border: 2px solid rgba(235, 180, 160, 0.75);
  pointer-events: none;
  animation: sealRingRipple 3s infinite cubic-bezier(0.15, 0.85, 0.35, 1);
}

.seal-pulse-ring.ring-delayed {
  animation-delay: 1.5s;
}

@keyframes sealHaloBreathe {

  0%,
  100% {
    opacity: 0.55;
    transform: translate(-50%, -50%) scale(0.92);
  }

  50% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.22);
  }
}

@keyframes sealRingRipple {
  0% {
    transform: translate(-50%, -50%) scale(0.85);
    opacity: 0.95;
    border-color: rgba(235, 180, 160, 0.85);
    box-shadow: 0 0 15px rgba(235, 180, 160, 0.6);
  }

  60% {
    opacity: 0.4;
  }

  100% {
    transform: translate(-50%, -50%) scale(1.7);
    opacity: 0;
    border-color: rgba(217, 175, 55, 0);
    box-shadow: 0 0 25px rgba(217, 175, 55, 0);
  }
}

/* Stamp Button with Ambient Pulsing Glow */
.wax-seal-btn {
  position: relative;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  outline: none;
  border-radius: 50%;
  animation: stampPulseGlow 3s infinite ease-in-out;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.wax-seal-svg {
  display: block;
  user-select: none;
  pointer-events: none;
}

@keyframes stampPulseGlow {

  0%,
  100% {
    transform: scale(1);
    filter: drop-shadow(0 4px 12px rgba(160, 80, 65, 0.35)) drop-shadow(0 0 10px rgba(245, 200, 190, 0.45));
  }

  50% {
    transform: scale(1.05);
    filter: drop-shadow(0 6px 18px rgba(160, 80, 65, 0.55)) drop-shadow(0 0 22px rgba(250, 215, 205, 0.85)) drop-shadow(0 0 32px rgba(217, 175, 55, 0.4));
  }
}

.wax-seal-btn:hover {
  transform: scale(1.12) !important;
  filter: drop-shadow(0 8px 24px rgba(160, 80, 65, 0.65)) drop-shadow(0 0 28px rgba(255, 225, 215, 0.95)) !important;
}

.wax-seal-btn:active {
  transform: scale(0.96) !important;
}

@media (max-width: 480px) {
  .envelope-floral-frame {
    width: 360px;
    height: 280px;
  }

  .flower-top-right {
    top: -45px;
    right: -35px;
    width: 190px;
    height: 190px;
  }

  .flower-bottom-left {
    bottom: -45px;
    left: -35px;
    width: 190px;
    height: 190px;
  }

  .luxury-envelope-container {
    width: 320px;
    height: 220px;
  }

  .env-pocket {
    inset: 0;
    width: 100%;
    height: 100%;
    clip-path: polygon(0 0, 0 100%, 100% 100%, 100% 0, 50% 112px);
  }

  .env-flap {
    height: 138px;
  }

  .env-wax-seal-wrapper {
    top: 104px;
  }

  .flower-card-top-right {
    top: -38px;
    right: -25px;
    width: 180px;
    height: 180px;
  }

  .flower-card-bottom-left {
    bottom: -38px;
    left: -25px;
    width: 180px;
    height: 180px;
  }

  /* Mobile Floating Utility Controls (Language Left, Music Right) */
  .lang-control-bar {
    top: calc(0.7rem + env(safe-area-inset-top, 0px));
    left: calc(0.7rem + env(safe-area-inset-left, 0px));
    padding: 3px 4px;
  }

  .lang-control-bar .lang-pill-btn {
    padding: 0.5rem 0.7rem;
    min-height: 40px;
    font-size: 0.72rem;
  }

  .audio-control-bar {
    top: calc(0.7rem + env(safe-area-inset-top, 0px));
    right: calc(0.7rem + env(safe-area-inset-right, 0px));
    padding: 4px 6px 4px 4px;
    gap: 0.4rem;
  }

  .audio-volume-panel {
    padding-left: 0.35rem;
    gap: 0.15rem;
  }

  .volume-slider {
    width: 58px;
  }

  /* Mobile Invitation Card & Hero Photo Centerpiece Focus */
  .invitation-wrapper {
    margin: 3.2rem auto 2rem;
    width: calc(100% - 20px);
    border-radius: 20px;
  }

  .cover-section {
    padding-top: 1.5rem;
    padding-bottom: 2rem;
  }

  .photo-stage {
    margin: 0.6rem auto 1.5rem;
  }

  .quince-script-title {
    font-size: 3.5rem;
  }

  .celebrant-name {
    font-size: 1.75rem;
  }

  /* Mobile Program Timeline Refinement */
  .program-timeline {
    max-width: 100%;
    padding: 0 0.5rem;
  }

  .timeline-row {
    grid-template-columns: 1fr 42px 1fr;
    min-height: 70px;
    padding: 0.25rem 0;
  }

  .row-left .time-block {
    padding-right: 0.65rem;
  }

  .row-right .time-block {
    padding-left: 0.65rem;
  }

  .timeline-node {
    width: 32px;
    height: 32px;
  }

  .tl-icon {
    width: 16px;
    height: 16px;
  }

  .time-stamp {
    font-size: 0.96rem;
  }

  .event-title {
    font-size: 0.78rem;
  }

  .event-desc {
    font-size: 0.64rem;
  }

  .timeline-loc-btn {
    padding: 0.2rem 0.48rem;
    font-size: 0.56rem;
  }
}

@media (max-width: 480px) {
  /* Tighter countdown sizing so it never spills past the edge of narrow phones */
  .pure-countdown-section {
    padding: 0 0.25rem;
  }

  .pt-numbers-row {
    gap: 0.3rem;
  }

  .pt-item {
    min-width: 46px;
  }

  .pt-big-num {
    font-size: 2rem;
  }

  .pt-sublabel {
    font-size: 0.5rem;
    letter-spacing: 0.16em;
    margin-top: 0.35rem;
  }

  .pt-colon {
    font-size: 1.5rem;
    margin-top: 0.1rem;
  }
}

@media (max-width: 360px) {
  .pt-numbers-row {
    gap: 0.18rem;
  }

  .pt-item {
    min-width: 40px;
  }

  .pt-big-num {
    font-size: 1.7rem;
  }

  .pt-sublabel {
    font-size: 0.44rem;
    letter-spacing: 0.1em;
  }

  .pt-colon {
    font-size: 1.3rem;
  }
}

/* ═════════════════════════════════════════════════════════════════════
   SCROLL-TRIGGERED FADE-IN SYSTEM
   Starting with the countdown, all subsequent sections, text, and images
   fade in gracefully with soft upward float as the user scrolls down.
   ═════════════════════════════════════════════════════════════════════ */
.scroll-fade-in {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1), transform 0.85s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.scroll-fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.scroll-fade-scale {
  opacity: 0;
  transform: translateY(24px) scale(0.96);
  transition: opacity 0.95s cubic-bezier(0.16, 1, 0.3, 1), transform 0.95s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.scroll-fade-scale.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Graceful staggered delays for clustered items */
.delay-1 {
  transition-delay: 0.12s;
}

.delay-2 {
  transition-delay: 0.22s;
}

.delay-3 {
  transition-delay: 0.32s;
}

@media (prefers-reduced-motion: reduce) {

  .scroll-fade-in,
  .scroll-fade-scale {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}