@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700;900&family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,400&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
  --font-serif: 'Cinzel', serif;
  --font-editorial: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Dark Emerald & Sage Green Palette */
  --color-bg: #09120a;
  --color-surface: rgba(14, 26, 17, 0.85);
  --color-sage-light: #e6ede5;
  --color-sage-soft: #7c9880;
  --color-sage: #5d7a62;
  --color-sage-deep: #3c5440;
  --color-forest-dark: #e6ede5;
  --color-text-muted: #a3b8a6;
  --color-border: rgba(124, 175, 135, 0.22);
}

body {
  font-family: var(--font-sans);
  background-color: #09120a;
  color: #e6ede5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.font-serif-title {
  font-family: var(--font-serif);
  letter-spacing: 0.15em;
}

.font-editorial {
  font-family: var(--font-editorial);
}

/* Film Grain Texture Overlay */
.film-grain {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 999;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* Ambient Glow - Soft Sage Green */
.ambient-glow {
  background: radial-gradient(circle at 50% 30%, rgba(124, 152, 128, 0.14) 0%, rgba(249, 250, 248, 0) 70%);
}

/* Glassmorphism Cards for Dark Forest Sanctuary Background */
.glass-panel {
  background: rgba(14, 26, 17, 0.82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(124, 175, 135, 0.22);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  color: #e6ede5;
}

.glass-panel-sage,
.glass-panel-gold {
  background: rgba(20, 38, 25, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(167, 243, 208, 0.25);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  color: #f0fdf4;
}

/* Intro Editorial Entrance (Rock-solid, zero shrink, zero jitter) */
@keyframes pianoHitEnter {
  0% {
    opacity: 0;
    transform: scale(0.98) translateZ(0);
  }
  100% {
    opacity: 1;
    transform: scale(1.0) translateZ(0);
  }
}

.animate-piano-hit {
  animation: pianoHitEnter 0.18s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  will-change: transform, opacity;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: translateZ(0);
  -webkit-font-smoothing: antialiased;
}

@keyframes flashSage {
  0% { opacity: 0.65; }
  100% { opacity: 0; }
}

.screen-flash {
  position: fixed;
  inset: 0;
  background-color: #f2f7f1;
  pointer-events: none;
  z-index: 70 !important;
  animation: flashSage 0.32s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Shimmer Effect for Sage Buttons */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.sage-shimmer,
.gold-shimmer {
  background: linear-gradient(135deg, #537057 0%, #76957a 50%, #537057 100%);
  background-size: 200% auto;
  color: #ffffff;
  box-shadow: 0 10px 25px rgba(83, 112, 87, 0.28);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.sage-shimmer:hover,
.gold-shimmer:hover {
  background-position: right center;
  box-shadow: 0 14px 32px rgba(83, 112, 87, 0.38);
  transform: translateY(-2px);
}

.sage-shimmer:active,
.gold-shimmer:active {
  transform: translateY(1px);
}

/* ======================================================== */
/* LUXURY EDITORIAL IMMERSION BUTTON & WAVE SHOCKWAVE */
/* ======================================================== */

.btn-immersion {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 2.2rem;
  background-color: #5d7a62;
  color: #ffffff;
  font-family: var(--font-serif);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-indent: 0.22em;
  text-transform: uppercase;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 4px 16px -2px rgba(93, 122, 98, 0.25);
  cursor: pointer;
  overflow: hidden;
  transition: all 0.25s ease;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.btn-immersion:hover {
  background-color: #69886e;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px -2px rgba(93, 122, 98, 0.32);
}

.btn-immersion:active {
  background-color: #526c57;
  transform: scale(0.98) translateY(0);
  box-shadow: 0 2px 8px -1px rgba(93, 122, 98, 0.2);
}

/* Internal wave ripple */
.btn-wave-ripple {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.65) 0%, rgba(167, 243, 208, 0.35) 45%, transparent 75%);
  transform: translate(-50%, -50%) scale(0);
  animation: btnRippleAnim 0.75s cubic-bezier(0.12, 0.8, 0.25, 1) forwards;
}

@keyframes btnRippleAnim {
  0% {
    width: 0;
    height: 0;
    opacity: 0.95;
    transform: translate(-50%, -50%) scale(0);
  }
  100% {
    width: 420px;
    height: 420px;
    opacity: 0;
    transform: translate(-50%, -50%) scale(1);
  }
}

/* Ambient shockwave rings radiating out through startScreen */
.start-wave-ring {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  border: 1.5px solid rgba(93, 122, 98, 0.55);
  box-shadow: 0 0 25px rgba(93, 122, 98, 0.25);
  transform: translate(-50%, -50%) scale(0.1);
  opacity: 0.9;
  z-index: 45;
  animation: startWaveExpand 1.25s cubic-bezier(0.1, 0.8, 0.2, 1) forwards;
}

@keyframes startWaveExpand {
  0% {
    width: 100px;
    height: 100px;
    opacity: 0.85;
    transform: translate(-50%, -50%) scale(0.3);
    border-width: 2px;
  }
  50% {
    opacity: 0.5;
  }
  100% {
    width: 1400px;
    height: 1400px;
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.5);
    border-width: 0.5px;
  }
}
/* ======================================================== */
/* PIANO PRELUDE CINEMATIC STAGE */
/* ======================================================== */
#startScreen {
  z-index: 55 !important;
}

#pianoPreludeStage {
  z-index: 50 !important;
  background-color: #000000 !important;
}

#pianoVideo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#pianoSkipBtn {
  transition: opacity 0.4s ease, transform 0.2s ease, background-color 0.2s ease;
}

#pianoSkipBtn:active {
  transform: scale(0.96);
}

/* Pulsing Sound Indicator */
@keyframes soundWave {
  0%, 100% { height: 6px; }
  50% { height: 22px; }
}

.bar-1 { animation: soundWave 0.8s ease-in-out infinite; }
.bar-2 { animation: soundWave 0.9s ease-in-out infinite 0.2s; }
.bar-3 { animation: soundWave 0.7s ease-in-out infinite 0.4s; }
.bar-4 { animation: soundWave 1.0s ease-in-out infinite 0.1s; }

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: #09120a;
}
::-webkit-scrollbar-thumb {
  background: #2b4530;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: #5d7a62;
}

/* Bass Shake & Impact Shockwave */
@keyframes bassShake {
  0% { transform: translate(0, 0) scale(1); }
  20% { transform: translate(-4px, 4px) scale(1.018); }
  40% { transform: translate(4px, -3px) scale(1.012); }
  60% { transform: translate(-2px, -2px) scale(1.008); }
  80% { transform: translate(2px, 1px) scale(1.004); }
  100% { transform: translate(0, 0) scale(1); }
}

.bass-shake {
  animation: bassShake 0.42s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

/* ======================================================== */
/* DIGITAL FLORAL MEADOW ENGINE (ЦВЕТОЧНАЯ ТРАВЯНАЯ ПОЛЯНА)  */
/* ======================================================== */

.meadow-stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
  perspective: 1400px;
  perspective-origin: center center;
  background: radial-gradient(circle at 50% 60%, #152b1b 0%, #0d1910 60%, #060e08 100%);
  z-index: 30;
}

/* Deep Floral Carpet Backdrop with Camera Dive Motion */
.meadow-backdrop {
  position: absolute;
  inset: -20%;
  width: 140%;
  height: 140%;
  background-image: url('assets/images/wildflower_carpet.jpg');
  background-size: cover;
  background-position: center;
  opacity: 0.55;
  filter: saturate(1.25) brightness(0.85);
  transform: scale(1.0) translateZ(0);
  transition: transform 7.5s cubic-bezier(0.1, 0.9, 0.2, 1), filter 7.5s ease;
  will-change: transform, filter;
  pointer-events: none;
}

.meadow-dive-active .meadow-backdrop {
  transform: scale(1.35) translateZ(80px);
  filter: saturate(1.4) brightness(1.05);
}

/* Atmospheric Sunbeams / Light Rays through Grass */
.meadow-light-rays {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 15%, rgba(200, 240, 210, 0.35) 0%, rgba(124, 152, 128, 0.12) 45%, transparent 75%);
  mix-blend-mode: screen;
  pointer-events: none;
  z-index: 15;
}

/* Canvas for Real-time Procedural Swaying Grass & Blooming Wildflowers */
.meadow-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 20;
  pointer-events: none;
}

/* 3D Photo Container Emerging from the Wildflower Clearing */
.meadow-cards-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 25;
}

.meadow-card-3d {
  position: absolute;
  width: 86vw;
  max-width: 480px;
  height: 60vh;
  max-height: 620px;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 30px 90px rgba(10, 24, 13, 0.6), 
              0 0 50px rgba(124, 175, 135, 0.4),
              inset 0 0 0 1px rgba(255, 255, 255, 0.9);
  background: #ffffff;
  will-change: transform, opacity, filter;
  transform-style: preserve-3d;
  transition: transform 0.45s cubic-bezier(0.18, 0.89, 0.32, 1.15), opacity 0.35s ease, filter 0.35s ease;
}

.meadow-card-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, transparent 35%, rgba(14, 28, 17, 0.75) 100%),
              linear-gradient(to top, rgba(14, 28, 17, 0.9) 0%, transparent 55%, rgba(14, 28, 17, 0.3) 100%);
  pointer-events: none;
}

.meadow-caption-tag {
  position: absolute;
  bottom: 2rem;
  left: 2rem;
  right: 2rem;
  text-align: left;
  z-index: 10;
  pointer-events: none;
}

/* Floral Bloom Animations */
.meadow-bloom-ready {
  transform: scale(0.65) translateY(40px) rotate(-3deg) !important;
  opacity: 0 !important;
  filter: blur(14px) brightness(1.3) !important;
  transition: none !important;
}

.meadow-bloom-in {
  transform: scale(1.0) translateY(0) rotate(0deg) !important;
  opacity: 1 !important;
  filter: blur(0px) brightness(1.0) !important;
  transition: transform 0.48s cubic-bezier(0.175, 0.885, 0.32, 1.15), opacity 0.32s ease-out, filter 0.42s ease-out !important;
}

.meadow-bloom-out {
  transform: scale(1.18) translateY(-35px) rotate(2.5deg) !important;
  opacity: 0 !important;
  filter: blur(16px) brightness(0.85) !important;
  transition: transform 0.38s cubic-bezier(0.55, 0.085, 0.68, 0.53), opacity 0.3s ease-in, filter 0.38s ease-in !important;
}

/* Rapid Countdown Tumble */
.meadow-rapid-pulse {
  animation: meadowPulse 0.18s cubic-bezier(0.1, 0.9, 0.2, 1) forwards;
}

@keyframes meadowPulse {
  0% { transform: scale(1.05) translateY(-6px); filter: brightness(1.3) blur(2px); }
  100% { transform: scale(1.0) translateY(0); filter: brightness(1.0) blur(0); }
}

/* Final Drum Drop Plunge into the Site Hero */
.meadow-final-drop {
  transform: scale(1.4) translateY(120vh) !important;
  opacity: 0 !important;
  filter: blur(25px) brightness(1.6) !important;
  transition: transform 0.78s cubic-bezier(0.55, 0.085, 0.68, 0.53), opacity 0.65s ease-in, filter 0.78s ease-in !important;
}

/* Hyper-Drive Portal Dive through Ceremony Arch */
.meadow-portal-dive {
  transform: scale(3.8) translateZ(250px) !important;
  opacity: 0 !important;
  filter: blur(22px) brightness(2.2) !important;
  transition: transform 0.82s cubic-bezier(0.12, 0.9, 0.18, 1), opacity 0.72s ease-in, filter 0.8s ease-in !important;
}

/* Shutter Flash with Botanical Light */
.shutter-flash {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.98) 0%, rgba(185, 228, 195, 0.7) 45%, rgba(124, 152, 128, 0.3) 75%, transparent 100%);
  pointer-events: none;
  opacity: 0;
  z-index: 50;
}

.shutter-flash-active {
  animation: shutterFlashAnim 0.26s cubic-bezier(0.1, 0.9, 0.2, 1) forwards;
}

@keyframes shutterFlashAnim {
  0% { opacity: 0.98; transform: scaleY(0.2); }
  35% { opacity: 0.9; transform: scaleY(1.0); }
  100% { opacity: 0; transform: scaleY(1.3); }
}

/* Persistent Gentle Floating Petals Overlay (for Hero & Site) */
.hero-petals-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 10;
  overflow: hidden;
}

/* Ethereal Ambient Ceremony Backdrop Layer */
.ceremony-ambient-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 130vh;
  background-image: url('assets/images/enchanted_ceremony_arch.jpg');
  background-size: cover;
  background-position: center 25%;
  opacity: 0.10;
  filter: saturate(1.2) blur(3px);
  mask-image: radial-gradient(ellipse at 50% 32%, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.35) 55%, transparent 82%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 32%, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.35) 55%, transparent 82%);
  pointer-events: none;
  z-index: 0;
}

@media (orientation: portrait), (max-width: 768px) {
  .ceremony-ambient-backdrop {
    background-image: url('assets/images/enchanted_ceremony_arch_portrait.jpg');
  }
}

/* Ceremony Sanctuary Showcase Card */
.ceremony-glow-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, transparent 35%, rgba(14, 28, 17, 0.5) 100%),
              linear-gradient(to top, rgba(14, 28, 17, 0.88) 0%, rgba(14, 28, 17, 0.1) 45%, rgba(14, 28, 17, 0.45) 100%);
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.ceremony-showcase-card {
  box-shadow: 0 20px 50px rgba(43, 59, 46, 0.15), 0 0 35px rgba(93, 122, 98, 0.12);
  transition: transform 0.5s cubic-bezier(0.18, 0.89, 0.32, 1.15), box-shadow 0.5s ease;
}

.ceremony-showcase-card:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 25px 60px rgba(43, 59, 46, 0.22), 0 0 50px rgba(93, 122, 98, 0.25);
}

.ceremony-showcase-card:hover .ceremony-glow-vignette {
  opacity: 0.8;
}

.glass-panel-dark {
  background: rgba(14, 28, 17, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

/* Persistent Forest Backdrop & Atmospheric Overlays */
.site-forest-backdrop {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.site-forest-backdrop video,
#portalVideo,
#frozenAltarFrame {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  will-change: transform;
}

.backdrop-reading-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 40%, rgba(8, 16, 10, 0.45) 0%, rgba(8, 16, 10, 0.8) 100%),
              linear-gradient(to bottom, rgba(8, 16, 10, 0.6) 0%, transparent 35%, rgba(8, 16, 10, 0.9) 100%);
  pointer-events: none;
  transition: opacity 1.2s ease;
}

/* ============================================================= */
/* OPTION 5: STORY / SWIPE RSVP CARDS                            */
/* ============================================================= */

.story-bar-segment {
  height: 3.5px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.18);
  position: relative;
  overflow: hidden;
  transition: all 0.35s ease;
}

.story-bar-segment.active {
  background: #34d399; /* emerald-400 */
  box-shadow: 0 0 10px rgba(52, 211, 153, 0.7);
}

.story-bar-segment.passed {
  background: rgba(52, 211, 153, 0.65);
}

.story-card-slide {
  animation: storySlideIn 0.26s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes storySlideIn {
  0% {
    opacity: 0;
    transform: translateX(18px) scale(0.98);
  }
  100% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

.story-card-slide-back {
  animation: storySlideInBack 0.26s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes storySlideInBack {
  0% {
    opacity: 0;
    transform: translateX(-18px) scale(0.98);
  }
  100% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

/* ======================================================== */
/* WHITE EDITORIAL STATIONERY RSVP STYLES (Matching Intro Cues) */
/* ======================================================== */
.editorial-stationery-bg {
  background-color: #f9faf8;
}

.editorial-input {
  background: #ffffff;
  border: 1px solid rgba(93, 122, 98, 0.35);
  color: #1b271d;
  transition: all 0.25s ease;
}

.editorial-input:focus {
  border-color: #1b271d;
  outline: none;
  box-shadow: 0 0 0 3px rgba(93, 122, 98, 0.15);
}

.editorial-choice {
  background: #ffffff;
  border: 1px solid rgba(93, 122, 98, 0.25);
  color: #1b271d;
  transition: all 0.2s ease;
}

.editorial-choice:hover {
  border-color: rgba(93, 122, 98, 0.6);
  background: #fdfefe;
}

.editorial-choice:has(:checked) {
  border-color: #1b271d;
  background: rgba(93, 122, 98, 0.08);
  font-weight: 600;
}

/* Dive bloom animation */
@keyframes diveBloom {
  0% {
    opacity: 0;
    transform: scale(0.96);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.animate-dive-bloom {
  animation: diveBloom 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.editorial-page-slide {
  animation: editorialPageIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes editorialPageIn {
  0% {
    opacity: 0;
    transform: translateY(12px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Cinematic Outro Photo Credits Stage */
#outroCreditsStage {
  transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Hide scrollbar for credits roll while maintaining touch and wheel scrolling */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.credits-photo-card {
  position: relative;
  box-shadow: 0 25px 60px -12px rgba(0, 0, 0, 0.85), 0 0 35px rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: radial-gradient(circle at center, rgba(30, 42, 33, 0.7) 0%, rgba(8, 14, 9, 0.95) 100%);
}

.credits-photo-card img {
  max-height: 45vh;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  display: block;
}

@media (min-height: 700px) {
  .credits-photo-card img {
    max-height: 48vh;
  }
}

@media (min-height: 850px) {
  .credits-photo-card img {
    max-height: 52vh;
  }
}


