/**
 * ==========================================================================
 * Wedliy Design 5 — Kerala Backwaters Watercolor & Modern Romance
 * Stylesheet & Aesthetic Tokens
 * ==========================================================================
 */

:root {
  --color-ivory: #FBF8F3;
  --color-ivory-light: #FDFCF9;
  --color-ivory-subtle: #F5EFE6;
  --color-forest: #1A3C2B;
  --color-forest-dark: #122B1E;
  --color-forest-light: #2D5840;
  --color-gold: #C29645;
  --color-gold-light: #ECD9B0;
  --color-gold-soft: #F9F4E8;
  --color-ink: #2C2621;
  --color-ink-muted: #6E665D;
  --color-border: #E8E1D5;
  --color-border-card: #ECE6DC;
  
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-script: 'Great Vibes', cursive;
  --font-sans: 'Jost', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-cinzel: 'Cinzel', serif;

  --shadow-card: 0 10px 30px -5px rgba(44, 38, 33, 0.05), 0 4px 12px -2px rgba(44, 38, 33, 0.03);
  --shadow-hover: 0 20px 40px -10px rgba(26, 60, 43, 0.12), 0 8px 16px -4px rgba(44, 38, 33, 0.05);
  --shadow-spotlight: 0 20px 50px -12px rgba(26, 60, 43, 0.15), 0 0 0 1px rgba(194, 150, 69, 0.25);
}

html {
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  max-width: 100%;
  width: 100%;
}

body {
  background-color: var(--color-ivory);
  color: var(--color-ink);
  font-family: var(--font-sans);
  overflow-x: hidden;
  max-width: 100%;
  width: 100%;
  margin: 0;
  padding: 0;
  position: relative;
}

/* Custom Selection */
::selection {
  background-color: #2D5840;
  color: #FFFFFF;
}

/* Typography Helpers */
.font-serif-display {
  font-family: var(--font-serif);
}

.font-script-romantic {
  font-family: var(--font-script);
}

.font-cinzel-caps {
  font-family: var(--font-cinzel);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

/* Botanical Corner Element */
.botanical-corner {
  position: absolute;
  top: 0;
  left: 0;
  width: 240px;
  max-width: 35vw;
  pointer-events: none;
  z-index: 20;
  mix-blend-mode: multiply;
  opacity: 0.9;
}

/* Card Styling */
.elegant-card {
  background: #FFFFFF;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-card);
  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;
}

.elegant-card:hover {
  box-shadow: var(--shadow-hover);
  border-color: #D8CEBE;
}

/* ==========================================================================
 * Watercolor Paint Blend Effect for Hero Illustration
 * ========================================================================== */
.hero-watercolor-canvas {
  position: relative;
  width: 100%;
  max-width: 1220px;
  margin: 0 auto;
  overflow: hidden;
  background-color: var(--color-ivory);
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border: none;
  outline: none;
}

.hero-watercolor-img {
  width: 100%;
  height: auto;
  max-height: 580px;
  object-fit: cover;
  object-position: center;
  display: block;
  /* Dual-axis feathered watercolor mask */
  -webkit-mask-image: radial-gradient(ellipse 96% 90% at 50% 50%, #000 68%, rgba(0,0,0,0.85) 80%, rgba(0,0,0,0.15) 94%, transparent 100%);
  mask-image: radial-gradient(ellipse 96% 90% at 50% 50%, #000 68%, rgba(0,0,0,0.85) 80%, rgba(0,0,0,0.15) 94%, transparent 100%);
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-watercolor-canvas:hover .hero-watercolor-img {
  transform: none;
}

/* Gradient Paint Feathering Overlays for natural paper immersion */
.paint-edge-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 65px;
  background: linear-gradient(180deg, #FBF8F3 0%, rgba(251, 248, 243, 0.8) 40%, rgba(251, 248, 243, 0) 100%);
  pointer-events: none;
  z-index: 10;
}

.paint-edge-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 95px;
  background: linear-gradient(0deg, #FBF8F3 0%, rgba(251, 248, 243, 0.85) 45%, rgba(251, 248, 243, 0) 100%);
  pointer-events: none;
  z-index: 10;
}

.paint-edge-left {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 65px;
  background: linear-gradient(90deg, #FBF8F3 0%, rgba(251, 248, 243, 0.85) 40%, rgba(251, 248, 243, 0) 100%);
  pointer-events: none;
  z-index: 10;
}

.paint-edge-right {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  width: 65px;
  background: linear-gradient(270deg, #FBF8F3 0%, rgba(251, 248, 243, 0.85) 40%, rgba(251, 248, 243, 0) 100%);
  pointer-events: none;
  z-index: 10;
}

@media (max-width: 640px) {
  .paint-edge-top { height: 35px; }
  .paint-edge-bottom { height: 55px; }
  .paint-edge-left { width: 30px; }
  .paint-edge-right { width: 30px; }
}

/* Footer Watercolor Blend */
.footer-watercolor-canvas {
  position: relative;
  width: 100%;
  max-width: 460px;
  margin: 0 auto 2rem auto;
  overflow: hidden;
  background-color: var(--color-ivory);
}

.footer-watercolor-canvas img {
  width: 100%;
  height: auto;
  display: block;
  -webkit-mask-image: radial-gradient(ellipse 95% 90% at 50% 50%, #000 65%, rgba(0,0,0,0.7) 82%, rgba(0,0,0,0.1) 96%, transparent 100%);
  mask-image: radial-gradient(ellipse 95% 90% at 50% 50%, #000 65%, rgba(0,0,0,0.7) 82%, rgba(0,0,0,0.1) 96%, transparent 100%);
}

/* Continuous Story Timeline Stem */
.story-timeline-stem {
  position: absolute;
  top: 40px;
  bottom: 40px;
  left: 50%;
  width: 2px;
  background: linear-gradient(180deg, rgba(194, 150, 69, 0.1) 0%, rgba(194, 150, 69, 0.45) 15%, rgba(26, 60, 43, 0.35) 85%, rgba(194, 150, 69, 0.1) 100%);
  transform: translateX(-50%);
}

@media (max-width: 768px) {
  .story-timeline-stem {
    left: 24px;
    transform: none;
  }
}

/* Story Chapter Card */
.story-chapter-card {
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid #ECE4D6;
  border-radius: 1.5rem;
  padding: 2rem;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 8px 24px -4px rgba(44, 38, 33, 0.04);
}

.story-chapter-card:hover {
  background: #FFFFFF;
  border-color: #C29645;
  box-shadow: 0 16px 36px -8px rgba(26, 60, 43, 0.09);
  transform: translateY(-2px);
}

.story-chapter-card.highlight {
  background: #FFFFFF;
  border: 1.5px solid #C29645;
  box-shadow: 0 12px 32px -4px rgba(194, 150, 69, 0.18);
}

/* Card Botanical Leaf Watermark Accent */
.card-leaf-accent {
  position: absolute;
  pointer-events: none;
  mix-blend-mode: multiply;
  opacity: 0.22;
  transition: opacity 0.4s ease, transform 0.5s ease;
  z-index: 1;
}

.story-chapter-card:hover .card-leaf-accent {
  opacity: 0.36;
}

.card-leaf-left {
  top: -15px;
  left: -15px;
  width: 140px;
  max-width: 38%;
  height: auto;
  transform: rotate(-6deg);
}

.story-chapter-card:hover .card-leaf-left {
  transform: rotate(0deg) scale(1.05);
}

.card-leaf-right {
  top: -15px;
  right: -15px;
  width: 140px;
  max-width: 38%;
  height: auto;
  transform: scaleX(-1) rotate(-6deg);
}

.story-chapter-card:hover .card-leaf-right {
  transform: scaleX(-1) rotate(0deg) scale(1.05);
}

/* Chapter Milestone Node */
.chapter-node {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 2px solid #C29645;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(194, 150, 69, 0.25);
  z-index: 10;
  transition: transform 0.3s ease;
}

.story-chapter-card:hover .chapter-node {
  transform: scale(1.1);
  background: #FAF5EA;
}

/* ==========================================================================
 * 1 2 3 Celebration Grid Layout (Aesthetic 3-Column Editorial Design)
 * ========================================================================== */
.celebration-grid-card {
  position: relative;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid #ECE4D6;
  border-radius: 2rem;
  box-shadow: 0 10px 30px -5px rgba(44, 38, 33, 0.05);
  overflow: hidden;
  transition: box-shadow 0.4s ease, border-color 0.4s ease;
}

.celebration-grid-card:hover {
  border-color: #D9CEBE;
  box-shadow: 0 16px 40px -8px rgba(26, 60, 43, 0.08);
}

.celebration-col {
  position: relative;
  overflow: hidden;
  padding: 3rem 1.75rem;
  transition: background-color 0.4s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.celebration-col:hover {
  background-color: rgba(255, 255, 255, 0.95);
}

.celebration-col.is-highlight {
  background-color: rgba(253, 250, 245, 0.85);
}

.celebration-col.is-highlight:hover {
  background-color: #FFFFFF;
}

.column-leaf-accent {
  position: absolute;
  width: 140px;
  max-width: 42%;
  height: auto;
  pointer-events: none;
  mix-blend-mode: multiply;
  opacity: 0.16;
  transition: opacity 0.5s ease, transform 0.5s ease;
  z-index: 0;
}

.celebration-col:hover .column-leaf-accent {
  opacity: 0.32;
  transform: scale(1.06);
}

.celebration-icon-wrap {
  width: 52px;
  height: 52px;
  margin: 0 auto 1.25rem auto;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #FAF6EF;
  border: 1px solid #EBE3D5;
  color: var(--color-forest);
  transition: all 0.4s ease;
}

.celebration-col:hover .celebration-icon-wrap {
  background: var(--color-forest);
  color: #FFFFFF;
  border-color: var(--color-forest);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(26, 60, 43, 0.2);
}

.celebration-col.is-highlight .celebration-icon-wrap {
  background: #1A3C2B;
  color: #ECD9B0;
  border-color: #C29645;
}

.celebration-col.is-highlight:hover .celebration-icon-wrap {
  background: #C29645;
  color: #FFFFFF;
  border-color: #C29645;
}

/* Image Hover Zoom */
.image-zoom-container {
  overflow: hidden;
}

.image-zoom-container img {
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.image-zoom-container:hover img {
  transform: scale(1.05);
}

/* Audio Visualizer Waves */
.sound-bars {
  display: flex;
  align-items: flex-end;
  gap: 2.5px;
  height: 14px;
}

.sound-bar {
  width: 2.5px;
  background-color: currentColor;
  border-radius: 2px;
  height: 4px;
  transition: height 0.2s ease;
}

.sound-bars.playing .sound-bar:nth-child(1) {
  animation: barBounce 1s infinite ease-in-out;
}
.sound-bars.playing .sound-bar:nth-child(2) {
  animation: barBounce 1.2s infinite ease-in-out 0.2s;
}
.sound-bars.playing .sound-bar:nth-child(3) {
  animation: barBounce 0.8s infinite ease-in-out 0.4s;
}
.sound-bars.playing .sound-bar:nth-child(4) {
  animation: barBounce 1.1s infinite ease-in-out 0.1s;
}

@keyframes barBounce {
  0%, 100% { height: 4px; }
  50% { height: 14px; }
}

/* Illuminated Wishes Showcase */
.wishes-parchment-spotlight {
  background: linear-gradient(135deg, #FFFFFF 0%, #FDFBF7 50%, #FAF5EC 100%);
  border: 1px solid #E5DCCB;
  box-shadow: var(--shadow-spotlight);
  position: relative;
  overflow: hidden;
}

.wishes-parchment-spotlight::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #E5DCCB 0%, #C29645 50%, #E5DCCB 100%);
}

.guest-stream-track {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 0.5rem 0.25rem;
  scrollbar-width: thin;
}

.guest-stream-track::-webkit-scrollbar {
  height: 4px;
}

.guest-stream-track::-webkit-scrollbar-thumb {
  background: #E5DCCB;
  border-radius: 9999px;
}

.guest-stream-pill {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.85rem;
  border-radius: 9999px;
  border: 1px solid #E8E1D5;
  background: #FFFFFF;
  font-size: 0.8125rem;
  color: #5C554E;
  cursor: pointer;
  transition: all 0.25s ease;
  user-select: none;
}

.guest-stream-pill:hover {
  border-color: #C29645;
  background: #FAF7F2;
  transform: translateY(-1px);
}

.guest-stream-pill.is-active {
  background: #1A3C2B;
  color: #FFFFFF;
  border-color: #1A3C2B;
  box-shadow: 0 4px 12px rgba(26, 60, 43, 0.25);
  transform: translateY(-2px);
}

.guest-stream-pill.is-active .pill-avatar {
  background: #C29645;
  color: #FFFFFF;
}

/* Gallery Lightbox */
#lightbox-modal {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

#lightbox-modal.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #F5EFE6;
}

::-webkit-scrollbar-thumb {
  background: #C8BDB0;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #1A3C2B;
}

/* ==========================================================================
 * Subtle Editorial Animations & Scroll Entrance System
 * ========================================================================== */

/* Hero Entrance Animations (Automatic Initial Load) */
@keyframes heroFadeUp {
  0% {
    opacity: 0;
    transform: translateY(22px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes heroFadeSoft {
  0% {
    opacity: 0;
    transform: scale(0.985);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.hero-fade-up {
  opacity: 0;
  animation: heroFadeUp 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  will-change: opacity, transform;
}

.hero-fade-soft {
  opacity: 0;
  animation: heroFadeSoft 1.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  will-change: opacity, transform;
}

.hero-delay-1 { animation-delay: 0.12s; }
.hero-delay-2 { animation-delay: 0.28s; }
.hero-delay-3 { animation-delay: 0.44s; }
.hero-delay-4 { animation-delay: 0.60s; }
.hero-delay-5 { animation-delay: 0.78s; }

/* Scroll-Triggered Reveal Animations */
.reveal,
.reveal-up {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 1.1s cubic-bezier(0.16, 1, 0.3, 1), transform 1.1s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-soft {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1), transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-left {
  opacity: 0;
  transform: translateX(-24px);
  transition: opacity 1.1s cubic-bezier(0.16, 1, 0.3, 1), transform 1.1s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-right {
  opacity: 0;
  transform: translateX(24px);
  transition: opacity 1.1s cubic-bezier(0.16, 1, 0.3, 1), transform 1.1s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.96) translateY(14px);
  transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1), transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

/* Revealed State */
.reveal.revealed,
.reveal-up.revealed,
.reveal-soft.revealed,
.reveal-left.revealed,
.reveal-right.revealed,
.reveal-scale.revealed,
.reveal.in,
.reveal-up.in,
.reveal-soft.in,
.reveal-left.in,
.reveal-right.in,
.reveal-scale.in {
  opacity: 1;
  transform: translateY(0) translateX(0) scale(1);
}

/* Stagger Delays */
.delay-75 { transition-delay: 75ms; }
.delay-100 { transition-delay: 100ms; }
.delay-150 { transition-delay: 150ms; }
.delay-200 { transition-delay: 200ms; }
.delay-250 { transition-delay: 250ms; }
.delay-300 { transition-delay: 300ms; }
.delay-400 { transition-delay: 400ms; }
.delay-500 { transition-delay: 500ms; }

/* Micro-interaction: Elegant Fade on Hover */
@keyframes fadeInSlide {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fadeInSlide 0.4s ease-out forwards;
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .botanical-corner {
    width: 140px;
  }
}

/* Accessibility: Respect Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal-up,
  .reveal-soft,
  .reveal-left,
  .reveal-right,
  .reveal-scale,
  .hero-fade-up,
  .hero-fade-soft {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
    animation: none !important;
  }
}
