/* ==========================================================================
   LAGO DEI CIGNI — PITTURA FINE-ART EDITORIAL STYLESHEET
   Palette:
     - Warm Alabaster Canvas: #FAF8F5
     - Soft Ivory Surface:    #F2ECE4
     - Champagne Gold Accent: #C5A059
     - Deep Charcoal Ink:     #232120
     - Muted Slate Ink:       #6B6560
     - Crimson Velvet Seal:   #8B1E24
   ========================================================================== */

:root {
  --alabaster: #FAF8F5;
  --ivory: #F2ECE4;
  --ivory-deep: #E8DFD3;
  --champagne: #C5A059;
  --champagne-soft: rgba(197, 160, 89, 0.35);
  --charcoal: #232120;
  --slate: #5E5853;
  --crimson: #8B1E24;
  --crimson-dark: #5E1116;
  --crimson-light: #B33239;
  --shadow-editorial: 0 22px 48px -18px rgba(35, 33, 32, 0.16);
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  background-color: var(--alabaster);
  color: var(--charcoal);
  overflow-x: hidden;
  min-height: 100dvh;
  position: relative;
}

body.is-locked {
  overflow: hidden;
  height: 100dvh;
}

/* ==========================================================================
   WHOLE-PAGE RESPONSIVE PHOTOGRAPHIC BACKGROUND
   Fixed viewport container avoids iOS background-attachment:fixed zoom bugs.
   ========================================================================== */
.page-bg-stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background-color: #EAE1D5;
}

.page-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 1.8s ease-in-out, transform 10s ease-out;
}

.page-bg-img.is-active {
  opacity: 1;
  transform: scale(1);
}

/* Balanced alabaster wash: keeps couple photo clearly visible while guaranteeing text clarity */
.page-bg-veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(250, 248, 245, 0.48) 0%,
    rgba(250, 248, 245, 0.56) 45%,
    rgba(250, 248, 245, 0.62) 100%
  );
}

/* ==========================================================================
   SUBTLE COTTON PAPER-GRAIN TEXTURE OVERLAY
   ========================================================================== */
.paper-grain-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  opacity: 0.036;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 220 220' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='paperNoise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23paperNoise)'/%3E%3C/svg%3E");
}

/* ==========================================================================
   PERSISTENT LANGUAGE TOGGLE BUTTON (EN / አማርኛ)
   ========================================================================== */
.lang-toggle-btn {
  position: fixed;
  top: max(0.85rem, env(safe-area-inset-top));
  right: max(0.85rem, env(safe-area-inset-right));
  z-index: 80;
  min-height: 44px;
  min-width: 44px;
  padding: 0 0.9rem;
  border-radius: 9999px;
  background-color: rgba(250, 248, 245, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(197, 160, 89, 0.6);
  box-shadow: 0 8px 20px rgba(35, 33, 32, 0.12);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
  color: var(--charcoal);
  transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.lang-toggle-btn:hover {
  transform: translateY(-1px);
  background-color: #FFFFFF;
  border-color: var(--champagne);
}

.lang-pill-options {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: 'Plus Jakarta Sans', 'Noto Sans Ethiopic', sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.06em;
}

.lang-opt {
  color: var(--slate);
  transition: color 0.2s ease, font-weight 0.2s ease;
}

.lang-opt.is-active {
  color: var(--charcoal);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--champagne);
  text-underline-offset: 4px;
}

.lang-sep {
  color: rgba(197, 160, 89, 0.65);
}

/* ==========================================================================
   EDITORIAL TYPOGRAPHY & FROSTED SURFACE PANELS
   ========================================================================== */
.editorial-label {
  font-family: 'Plus Jakarta Sans', 'Noto Sans Ethiopic', system-ui, sans-serif;
  font-size: clamp(0.6875rem, 1.8vw, 0.75rem);
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  line-height: 1.5;
}

.hero-names {
  font-size: clamp(2.35rem, 8.2vw, 4.35rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
}

/* Refined Amharic (Ethiopic script) spacing & typography rules */
html[lang="am"] .editorial-label {
  letter-spacing: 0.02em;
  text-transform: none;
  font-size: clamp(0.8125rem, 2.2vw, 0.9rem);
}

html[lang="am"] .hero-names {
  letter-spacing: 0;
  line-height: 1.25;
  font-size: clamp(2rem, 7vw, 3.6rem);
}

html[lang="am"] .font-script {
  font-family: 'Noto Serif Ethiopic', 'Cormorant Garamond', serif;
  font-style: normal;
  font-weight: 500;
}

html[lang="am"] .seal-hint-text,
html[lang="am"] .envelope-eyebrow,
html[lang="am"] .countdown-unit,
html[lang="am"] .btn-editorial-primary,
html[lang="am"] .btn-editorial-outline,
html[lang="am"] .copy-btn {
  letter-spacing: 0.02em;
  text-transform: none;
}

/* Frosted editorial cards so whole-page photo stays visible & text stays ultra-clear */
.editorial-hero-panel {
  background: radial-gradient(
    ellipse at center,
    rgba(250, 248, 245, 0.76) 0%,
    rgba(250, 248, 245, 0.56) 70%,
    rgba(250, 248, 245, 0.25) 100%
  );
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  border: 1px solid rgba(197, 160, 89, 0.28);
  border-radius: 6px;
  padding: clamp(1.5rem, 4.5vw, 3rem) clamp(1rem, 4vw, 2.5rem);
  box-shadow: 0 24px 50px -24px rgba(35, 33, 32, 0.22);
}

.editorial-glass-card {
  background-color: rgba(250, 248, 245, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(197, 160, 89, 0.35);
  border-radius: 4px;
  box-shadow: var(--shadow-editorial);
}

.editorial-glass-band {
  background-color: rgba(242, 236, 228, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.editorial-solid-card {
  background-color: rgba(250, 248, 245, 0.93);
  border: 1px solid rgba(197, 160, 89, 0.32);
}

.editorial-heading-pill {
  max-width: 520px;
  background-color: rgba(250, 248, 245, 0.84);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(197, 160, 89, 0.3);
  border-radius: 4px;
  padding: 1.25rem 1.5rem;
}

.hairline-divider {
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(197, 160, 89, 0.55) 50%,
    transparent 100%
  );
}

.shadow-editorial {
  box-shadow: var(--shadow-editorial);
}

/* ==========================================================================
   INTERACTIVE ENTRY: WAX-SEALED ENVELOPE ("BUSTA SEMPLICE")
   ========================================================================== */
.envelope-stage {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 4vw, 2rem);
  background-color: rgba(239, 233, 224, 0.22);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  transition: opacity 0.85s cubic-bezier(0.22, 1, 0.36, 1),
              visibility 0.85s ease,
              transform 0.85s cubic-bezier(0.22, 1, 0.36, 1);
}

.envelope-stage.is-fading-out {
  opacity: 0;
  visibility: hidden;
  transform: scale(1.03);
  pointer-events: none;
}

.envelope-container {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(1.1rem, 3.2vw, 1.75rem);
}

@media (min-width: 768px) {
  .envelope-container {
    max-width: 520px;
  }
}

.envelope-eyebrow {
  font-family: 'Plus Jakarta Sans', 'Noto Sans Ethiopic', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--charcoal);
  text-align: center;
  background-color: rgba(250, 248, 245, 0.84);
  padding: 0.4rem 1rem;
  border-radius: 9999px;
  border: 1px solid rgba(197, 160, 89, 0.4);
}

/* 3D Envelope Shell */
.envelope-wrapper {
  position: relative;
  width: min(92vw, 440px);
  aspect-ratio: 1.46 / 1;
  perspective: 1400px;
  transform-style: preserve-3d;
  filter: drop-shadow(0 28px 46px rgba(35, 33, 32, 0.22))
          drop-shadow(0 6px 14px rgba(35, 33, 32, 0.1));
}

@media (min-width: 768px) {
  .envelope-wrapper {
    width: 100%;
    max-width: 520px;
  }
}

.envelope-back {
  position: absolute;
  inset: 0;
  background: linear-gradient(170deg, #EDE5DA 0%, #E3D9CB 100%);
  border-radius: 4px;
  border: 1px solid rgba(197, 160, 89, 0.34);
  z-index: 1;
}

.envelope-card-insert {
  position: absolute;
  left: 6%;
  right: 6%;
  bottom: 6%;
  height: 86%;
  z-index: 2;
  background-color: var(--alabaster);
  border: 1px solid rgba(197, 160, 89, 0.45);
  border-radius: 3px;
  padding: clamp(0.75rem, 2.5vw, 1.25rem);
  box-shadow: 0 4px 18px rgba(35, 33, 32, 0.08);
  transition: transform 0.95s cubic-bezier(0.22, 1, 0.36, 1) 0.42s,
              box-shadow 0.95s ease 0.42s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-insert-inner {
  width: 100%;
  height: 100%;
  border: 1px solid rgba(197, 160, 89, 0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0.75rem;
}

.card-insert-script {
  font-family: 'Pinyon Script', 'Noto Serif Ethiopic', cursive;
  font-size: clamp(1.2rem, 4vw, 1.75rem);
  color: var(--champagne);
  margin-bottom: 0.25rem;
}

.card-insert-names {
  font-family: 'Cormorant Garamond', 'Noto Serif Ethiopic', serif;
  font-size: clamp(1.25rem, 4.3vw, 2.05rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--charcoal);
  margin-bottom: 0.4rem;
}

.card-insert-meta {
  font-family: 'Plus Jakarta Sans', 'Noto Sans Ethiopic', sans-serif;
  font-size: clamp(0.5625rem, 1.6vw, 0.6875rem);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--slate);
}

/* Front Pocket Flaps */
.envelope-pocket {
  position: absolute;
  inset: 0;
  z-index: 3;
  overflow: hidden;
  border-radius: 4px;
  pointer-events: none;
}

.pocket-left {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #F5EFE7 0%, #EAE1D5 100%);
  clip-path: polygon(0 0, 52% 52%, 0 100%);
  filter: drop-shadow(1px 0 2px rgba(35, 33, 32, 0.05));
}

.pocket-right {
  position: absolute;
  inset: 0;
  background: linear-gradient(225deg, #F5EFE7 0%, #E8DFD2 100%);
  clip-path: polygon(100% 0, 48% 52%, 100% 100%);
  filter: drop-shadow(-1px 0 2px rgba(35, 33, 32, 0.05));
}

.pocket-bottom {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #F7F2EB 0%, #ECE3D7 100%);
  clip-path: polygon(0 100%, 50% 46%, 100% 100%);
  filter: drop-shadow(0 -2px 4px rgba(35, 33, 32, 0.06));
}

.envelope-watermark {
  position: absolute;
  left: 50%;
  bottom: 9%;
  transform: translateX(-50%);
  width: 48%;
  height: auto;
  opacity: 0.75;
  z-index: 4;
}

/* Triangular 3D Top Flap */
.envelope-top-flap {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 58%;
  z-index: 4;
  transform-origin: top center;
  transform-style: preserve-3d;
  transition: transform 0.78s cubic-bezier(0.32, 0.08, 0.24, 1),
              z-index 0s linear 0.35s;
  filter: drop-shadow(0 8px 14px rgba(35, 33, 32, 0.14));
  pointer-events: none;
}

.flap-inner {
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, #FAF6F0 0%, #EFE7DC 100%);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.7);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 10%;
}

.flap-botanical {
  width: 30%;
  height: auto;
}

/* Centered 3D Crimson Velvet Wax Seal */
.wax-seal-btn {
  position: absolute;
  top: 56%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 6;
  width: clamp(72px, 18vw, 90px);
  height: clamp(72px, 18vw, 90px);
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              opacity 0.35s ease;
  -webkit-tap-highlight-color: transparent;
}

.wax-seal-btn:hover,
.wax-seal-btn:focus-visible {
  transform: translate(-50%, -50%) scale(1.06);
  outline: none;
}

.wax-seal-btn:focus-visible .wax-seal-outer {
  box-shadow: 0 0 0 3px var(--champagne), 0 12px 24px rgba(94, 17, 22, 0.45);
}

.wax-seal-outer {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 47% 53% 49% 51% / 51% 48% 52% 49%;
  background: radial-gradient(
    circle at 32% 28%,
    var(--crimson-light) 0%,
    var(--crimson) 45%,
    var(--crimson-dark) 92%
  );
  box-shadow:
    inset 2px 3px 6px rgba(255, 210, 210, 0.35),
    inset -3px -4px 8px rgba(42, 4, 7, 0.65),
    0 10px 20px -4px rgba(35, 16, 17, 0.45),
    0 3px 6px rgba(35, 16, 17, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
}

.wax-seal-rim {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 218, 215, 0.24);
  box-shadow:
    inset 0 2px 4px rgba(40, 4, 8, 0.55),
    0 1px 1px rgba(255, 220, 220, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
}

.wax-seal-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(
    circle at 65% 70%,
    #9C262D 0%,
    #7A181E 60%,
    #631116 100%
  );
  box-shadow: inset 1px 2px 5px rgba(38, 4, 7, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
}

.wax-seal-monogram {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 500;
  font-size: clamp(0.95rem, 2.8vw, 1.2rem);
  letter-spacing: 0.04em;
  color: rgba(247, 228, 214, 0.88);
  text-shadow:
    0 1px 1px rgba(45, 5, 8, 0.85),
    0 -0.5px 0 rgba(255, 228, 220, 0.32);
  user-select: none;
}

/* Envelope Opening State Transitions */
.envelope-wrapper.is-opening .wax-seal-btn {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.75);
  pointer-events: none;
}

.envelope-wrapper.is-opening .envelope-top-flap {
  transform: rotateX(180deg);
  z-index: 1;
}

.envelope-wrapper.is-opening .envelope-card-insert {
  transform: translateY(-64%);
  box-shadow: 0 24px 44px rgba(35, 33, 32, 0.16);
}

/* Pulsing Tap Hint */
.seal-hint-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background-color: rgba(250, 248, 245, 0.88);
  padding: 0.45rem 1.1rem;
  border-radius: 9999px;
  border: 1px solid rgba(197, 160, 89, 0.4);
  box-shadow: 0 6px 16px rgba(35, 33, 32, 0.08);
}

.seal-hint-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--crimson);
  animation: pulseSealHint 2s ease-in-out infinite;
}

.seal-hint-text {
  font-family: 'Plus Jakarta Sans', 'Noto Sans Ethiopic', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--charcoal);
}

@keyframes pulseSealHint {
  0%, 100% {
    transform: scale(0.9);
    opacity: 0.55;
    box-shadow: 0 0 0 0 rgba(139, 30, 36, 0.35);
  }
  50% {
    transform: scale(1.15);
    opacity: 1;
    box-shadow: 0 0 0 7px rgba(139, 30, 36, 0);
  }
}

/* ==========================================================================
   PERSISTENT FLOATING MUSIC TOGGLE BUTTON
   ========================================================================== */
.music-toggle-btn {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1.15rem, env(safe-area-inset-bottom));
  z-index: 75;
  width: 48px;
  height: 48px;
  border-radius: 9999px;
  background-color: rgba(250, 248, 245, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(197, 160, 89, 0.6);
  box-shadow: 0 10px 24px rgba(35, 33, 32, 0.16);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  transition: transform 0.25s ease, opacity 0.45s ease, background-color 0.25s ease;
}

.music-toggle-btn.is-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
}

.music-toggle-btn:hover {
  transform: translateY(-2px);
  background-color: #FFFFFF;
}

.vinyl-disc {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, #232120 0deg, #4B4643 90deg, #232120 180deg, #4B4643 270deg, #232120 360deg);
  border: 1px solid var(--champagne);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: spinVinyl 5.5s linear infinite;
}

.vinyl-center {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background-color: var(--champagne);
}

.soundwave-bars {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 12px;
}

.soundwave-bars .bar {
  width: 2px;
  background-color: var(--charcoal);
  border-radius: 2px;
  animation: soundBar 0.9s ease-in-out infinite;
}

.soundwave-bars .bar-1 { height: 6px; animation-delay: 0s; }
.soundwave-bars .bar-2 { height: 11px; animation-delay: 0.2s; }
.soundwave-bars .bar-3 { height: 7px; animation-delay: 0.4s; }

.music-toggle-btn.is-muted .vinyl-disc {
  animation-play-state: paused;
  opacity: 0.5;
}

.music-toggle-btn.is-muted .soundwave-bars .bar {
  animation: none;
  height: 3px;
  opacity: 0.45;
}

@keyframes spinVinyl {
  to { transform: rotate(360deg); }
}

@keyframes soundBar {
  0%, 100% { transform: scaleY(0.45); }
  50% { transform: scaleY(1); }
}

/* ==========================================================================
   MAIN INVITATION & FRAMED WEDDING PHOTOGRAPHY
   ========================================================================== */
.invitation-main {
  opacity: 1;
  transition: opacity 0.8s ease;
}

.invitation-main.is-hidden {
  display: none;
  opacity: 0;
}

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

/* Custom focal points calibrated for the 3 couple portraits so faces never crop */
.photo-focus-right {
  object-position: 78% 18%;
}

.photo-focus-far-right {
  object-position: 88% 18%;
}

.photo-focus-left {
  object-position: 24% 18%;
}

/* Centerpiece & Secondary Vertical Oval Cameo Frames (3:4 Aspect Ratio) */
.oval-frame-wrap {
  position: relative;
  width: 100%;
}

.oval-hero {
  max-width: clamp(248px, 70vw, 350px);
}

.oval-secondary {
  max-width: clamp(230px, 66vw, 310px);
}

.oval-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 50% / 50%;
  overflow: hidden;
  background-color: var(--ivory);
  box-shadow:
    0 24px 52px -18px rgba(35, 33, 32, 0.28),
    0 0 0 1px rgba(197, 160, 89, 0.45);
}

.oval-inner-hairline {
  position: absolute;
  inset: 9px;
  border-radius: 50% / 50%;
  border: 1px solid rgba(197, 160, 89, 0.78);
  pointer-events: none;
  z-index: 2;
}

/* Asymmetric Rectangular Photo Frame with Double-Matting Ivory Border */
.rect-mat-frame {
  position: relative;
}

.rect-mat-outer {
  background-color: var(--ivory);
  padding: clamp(10px, 2.5vw, 14px);
  border: 1px solid rgba(197, 160, 89, 0.42);
  border-radius: 4px;
  box-shadow: var(--shadow-editorial);
}

.rect-mat-inner {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 2px;
  border: 1px solid rgba(250, 248, 245, 0.9);
  outline: 1px solid rgba(197, 160, 89, 0.45);
  background-color: var(--ivory-deep);
}

/* ==========================================================================
   LIVE COUNTDOWN TIMER
   ========================================================================== */
.countdown-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  align-items: center;
  max-width: 640px;
  margin-inline: auto;
  gap: clamp(0.25rem, 2vw, 1rem);
}

.countdown-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.25rem;
}

.countdown-number {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2rem, 8vw, 3.6rem);
  font-weight: 400;
  line-height: 1;
  color: var(--charcoal);
  font-variant-numeric: tabular-nums;
}

.countdown-unit {
  font-family: 'Plus Jakarta Sans', 'Noto Sans Ethiopic', sans-serif;
  font-size: clamp(0.6rem, 1.7vw, 0.72rem);
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--slate);
  margin-top: 0.5rem;
}

.countdown-divider {
  width: 1px;
  height: clamp(2rem, 6vw, 3.25rem);
  background-color: rgba(197, 160, 89, 0.5);
}

/* ==========================================================================
   WEDDING DAY TIMELINE ("GIORNATA MINIATURE")
   ========================================================================== */
.timeline-track {
  position: relative;
  padding-left: 2.65rem;
}

@media (min-width: 640px) {
  .timeline-track {
    padding-left: 3.75rem;
  }
}

.timeline-track::before {
  content: '';
  position: absolute;
  left: 17px;
  top: 22px;
  bottom: 22px;
  width: 1px;
  background: linear-gradient(
    180deg,
    rgba(197, 160, 89, 0.2) 0%,
    rgba(197, 160, 89, 0.7) 15%,
    rgba(197, 160, 89, 0.7) 85%,
    rgba(197, 160, 89, 0.2) 100%
  );
}

@media (min-width: 640px) {
  .timeline-track::before {
    left: 21px;
  }
}

.timeline-card {
  position: relative;
}

.timeline-node {
  position: absolute;
  left: -2.65rem;
  top: 1.25rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: rgba(250, 248, 245, 0.96);
  border: 1px solid var(--champagne);
  box-shadow: 0 4px 12px rgba(35, 33, 32, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

@media (min-width: 640px) {
  .timeline-node {
    left: -3.75rem;
    width: 44px;
    height: 44px;
  }
}

.timeline-card-body {
  background-color: rgba(255, 255, 255, 0.93);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(197, 160, 89, 0.35);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: var(--shadow-editorial);
}

.timeline-thumb-wrap {
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background-color: var(--ivory);
  border-bottom: 1px solid rgba(197, 160, 89, 0.25);
}

/* ==========================================================================
   BUTTONS, SWATCHES, FORM CONTROLS (44px+ Tap Targets & 16px+ Inputs)
   ========================================================================== */
.btn-editorial-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 46px;
  padding: 0.75rem 1.75rem;
  background-color: var(--charcoal);
  color: var(--alabaster);
  border: 1px solid var(--charcoal);
  border-radius: 3px;
  font-family: 'Plus Jakarta Sans', 'Noto Sans Ethiopic', sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.25s ease, border-color 0.25s ease, transform 0.2s ease;
}

.btn-editorial-primary:hover {
  background-color: #363230;
  border-color: #363230;
}

.btn-editorial-primary:active {
  transform: translateY(1px);
}

.btn-editorial-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  min-width: 44px;
  padding: 0.625rem 1.35rem;
  background-color: rgba(250, 248, 245, 0.85);
  color: var(--charcoal);
  border: 1px solid rgba(197, 160, 89, 0.7);
  border-radius: 3px;
  font-family: 'Plus Jakarta Sans', 'Noto Sans Ethiopic', sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

.btn-editorial-outline:hover {
  background-color: rgba(197, 160, 89, 0.14);
  border-color: var(--champagne);
}

.swatch-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid rgba(35, 33, 32, 0.18);
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.4);
  display: inline-block;
}

/* Minimum 16px font-size prevents iOS Safari auto-zoom */
.editorial-input {
  width: 100%;
  min-height: 46px;
  padding: 0.75rem 0.95rem;
  font-family: 'Plus Jakarta Sans', 'Noto Sans Ethiopic', sans-serif;
  font-size: 1rem;
  line-height: 1.45;
  color: var(--charcoal);
  background-color: var(--alabaster);
  border: 1px solid rgba(197, 160, 89, 0.5);
  border-radius: 3px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.editorial-input::placeholder {
  color: rgba(94, 88, 83, 0.68);
}

.editorial-input:focus {
  outline: none;
  border-color: var(--champagne);
  box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.18);
}

/* Attendance Toggle Pills */
.attendance-option {
  display: block;
  cursor: pointer;
}

.attendance-pill {
  min-height: 48px;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(197, 160, 89, 0.5);
  border-radius: 3px;
  background-color: var(--alabaster);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-family: 'Plus Jakarta Sans', 'Noto Sans Ethiopic', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--charcoal);
  transition: all 0.22s ease;
}

.attendance-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1.5px solid var(--champagne);
  transition: background-color 0.2s ease;
}

.attendance-option input:checked + .attendance-pill {
  background-color: var(--charcoal);
  border-color: var(--charcoal);
  color: var(--alabaster);
}

.attendance-option input:checked + .attendance-pill .attendance-dot {
  background-color: var(--champagne);
  border-color: var(--champagne);
}

.attendance-option input:focus-visible + .attendance-pill {
  outline: 2px solid var(--champagne);
  outline-offset: 2px;
}

/* One-Tap Copy Button */
.copy-btn {
  min-height: 44px;
  min-width: 96px;
  padding: 0.5rem 0.9rem;
  border: 1px solid rgba(197, 160, 89, 0.6);
  background-color: var(--alabaster);
  color: var(--charcoal);
  border-radius: 3px;
  font-family: 'Plus Jakarta Sans', 'Noto Sans Ethiopic', sans-serif;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
  flex-shrink: 0;
}

.copy-btn:hover {
  background-color: rgba(197, 160, 89, 0.14);
}

.copy-btn.is-copied {
  background-color: var(--charcoal);
  border-color: var(--charcoal);
  color: var(--alabaster);
}

/* ==========================================================================
   60FPS SCROLL-TRIGGERED FADE-UP ANIMATIONS
   ========================================================================== */
.reveal-up {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.72s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.72s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}

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

@media (prefers-reduced-motion: reduce) {
  .reveal-up,
  .envelope-top-flap,
  .envelope-card-insert,
  .envelope-stage,
  .page-bg-img {
    transition: none !important;
    animation: none !important;
  }
  .reveal-up {
    opacity: 1;
    transform: none;
  }
}
