/* ===================================================
   선하키즈풀빌라 — ULTRA LUXURY ROYAL RESORT DESIGN SYSTEM
   Cashmere Sand Silk (#F6F2EB), Deep Brown Charcoal (#2D2A26),
   Champagne Gold (#D4AF37, #C5A880, #9E7A53), Soft Oatmeal Stone (#EDE7DE)
=================================================== */

/* Smooth Scrolling & Font Smoothing */
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  background-color: #FAF7F2;
}

body {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: #FAF7F2;
  background-image: 
    radial-gradient(at 15% 10%, rgba(212, 175, 55, 0.08) 0px, transparent 45%),
    radial-gradient(at 85% 20%, rgba(197, 168, 128, 0.09) 0px, transparent 45%),
    radial-gradient(at 50% 50%, rgba(245, 235, 220, 0.6) 0px, transparent 65%),
    radial-gradient(at 20% 80%, rgba(212, 175, 55, 0.07) 0px, transparent 45%),
    radial-gradient(at 85% 90%, rgba(197, 168, 128, 0.08) 0px, transparent 45%);
  background-attachment: fixed;
  color: #2D2A26;
  letter-spacing: -0.015em;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

/* 👑 Bespoke Luxury Monogram & Diamond Lattice Wallpaper (Prestigious 5-Star Hotel Wallpaper) */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  background-image: url('../images/luxury-monogram-pattern.svg');
  background-repeat: repeat;
  background-size: 180px 180px;
  background-position: center top;
  opacity: 0.28; /* Clearly visible, prestigious, authentic royal hotel wallpaper */
  pointer-events: none;
  z-index: 0;
}

/* Elegant translucent bleed-through for sections to showcase the luxury wallpaper */
section {
  position: relative;
  z-index: 1;
  border-color: rgba(212, 175, 55, 0.22) !important;
}

section.bg-white,
section.bg-\[\#FAF9F6\],
section.bg-\[\#FDFBF7\],
section.bg-\[\#FAF8F5\],
section.bg-\[\#F7F4EE\],
section.bg-\[\#F6F2EB\] {
  background-color: rgba(251, 248, 242, 0.82) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* Luxury Cards & Elements */
.rest-card {
  background: linear-gradient(180deg, #FFFFFF 0%, #FAF8F5 100%) !important;
  border: 1px solid rgba(212, 175, 55, 0.35) !important;
  box-shadow: 0 16px 36px -6px rgba(158, 122, 83, 0.12) !important;
}

/* Serif font for elegant pension headings & English accents */
.font-serif {
  font-family: 'Noto Serif KR', 'Gowun Batang', 'Playfair Display', 'Cormorant Garamond', 'Cinzel', Georgia, serif;
}
.font-noto {
  font-family: 'Noto Serif KR', serif;
}
.font-nanum {
  font-family: 'Nanum Myeongjo', serif;
}
.font-gowun {
  font-family: 'Gowun Batang', serif;
}
.font-cinzel {
  font-family: 'Cinzel', serif;
}
.font-cormorant {
  font-family: 'Cormorant Garamond', serif;
}

/* 🌟 Radiant Light Bloom Glow for Hero Title */
.radiant-text-glow {
  text-shadow: 
    0 0 3px rgba(255, 255, 255, 0.85),
    0 0 7px rgba(255, 225, 150, 0.35),
    0 0 14px rgba(212, 175, 55, 0.25);
  animation: radiantPulse 4s ease-in-out infinite alternate;
}

.radiant-sub-glow {
  text-shadow: 
    0 0 2px rgba(255, 255, 255, 0.6),
    0 0 6px rgba(255, 230, 160, 0.2);
}

@keyframes radiantPulse {
  0% {
    text-shadow: 
      0 0 2px rgba(255, 255, 255, 0.75),
      0 0 6px rgba(255, 225, 150, 0.25),
      0 0 12px rgba(212, 175, 55, 0.2);
  }
  100% {
    text-shadow: 
      0 0 4px rgba(255, 255, 255, 0.9),
      0 0 10px rgba(255, 235, 170, 0.35),
      0 0 18px rgba(212, 175, 55, 0.28);
  }
}

/* Serif font for elegant pension headings & English accents */
.font-serif {
  font-family: 'Noto Serif KR', 'Gowun Batang', 'Playfair Display', 'Cormorant Garamond', 'Cinzel', Georgia, serif;
}
.font-noto {
  font-family: 'Noto Serif KR', serif;
}
.font-nanum {
  font-family: 'Nanum Myeongjo', serif;
}
.font-gowun {
  font-family: 'Gowun Batang', serif;
}
.font-cinzel {
  font-family: 'Cinzel', serif;
}
.font-cormorant {
  font-family: 'Cormorant Garamond', serif;
}

/* 🌟 Radiant Light Bloom Glow for Hero Title (빛퍼짐 50% 추가 축소 - 매우 은은하고 맑은 선명 광채) */
.radiant-text-glow {
  text-shadow: 
    0 0 3px rgba(255, 255, 255, 0.85),
    0 0 7px rgba(255, 225, 150, 0.35),
    0 0 14px rgba(212, 175, 55, 0.25);
  animation: radiantPulse 4s ease-in-out infinite alternate;
}

.radiant-sub-glow {
  text-shadow: 
    0 0 2px rgba(255, 255, 255, 0.6),
    0 0 6px rgba(255, 230, 160, 0.2);
}

@keyframes radiantPulse {
  0% {
    text-shadow: 
      0 0 2px rgba(255, 255, 255, 0.75),
      0 0 6px rgba(255, 225, 150, 0.25),
      0 0 12px rgba(212, 175, 55, 0.2);
  }
  100% {
    text-shadow: 
      0 0 4px rgba(255, 255, 255, 0.9),
      0 0 10px rgba(255, 235, 170, 0.35),
      0 0 18px rgba(212, 175, 55, 0.28);
  }
}

/* 📡 Real-time Hero Adaptive Live Stream Ticker */
@keyframes marqueeScroll {
  0% { transform: translateX(0%); }
  100% { transform: translateX(-50%); }
}

.animate-marquee-stream {
  display: flex;
  width: max-content;
  animation: marqueeScroll 32s linear infinite;
}

.animate-marquee-stream:hover {
  animation-play-state: paused;
}

.ticker-fade-mask {
  mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
}

/* High-res crisp rendering for real villa photos */
.sharp-crisp-image,
.sharp-image,
.hero-slide-img,
img {
  image-rendering: -webkit-optimize-contrast;
  image-rendering: high-quality;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  filter: contrast(1.02) brightness(1.01);
}

/* REST Pension Header Glassmorphism */
.rest-header-blur {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid #EFECE6;
}

/* REST Luxury Cards */
.rest-card {
  background: #FFFFFF;
  border-radius: 16px;
  border: 1px solid #EFECE6;
  box-shadow: 0 4px 20px -2px rgba(45, 42, 38, 0.03);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.rest-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px -6px rgba(45, 42, 38, 0.08);
  border-color: rgba(212, 175, 55, 0.5);
}

/* Gold Shimmer Button Animation */
@keyframes goldShimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(200%); }
}

.btn-gold-shimmer {
  position: relative;
  overflow: hidden;
}
.btn-gold-shimmer::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.35) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: translateX(-100%);
  transition: none;
}
.btn-gold-shimmer:hover::after {
  animation: goldShimmer 1.5s infinite;
}

/* Ambient Radial Gold Glow */
.ambient-gold-glow {
  background: radial-gradient(circle, rgba(212, 175, 55, 0.08) 0%, rgba(253, 251, 247, 0) 70%);
}
.ambient-gold-glow-card {
  box-shadow: 0 10px 40px -10px rgba(212, 175, 55, 0.15);
}

/* 0.5px Hairline Gold Border */
.border-gold-hairline {
  border: 0.5px solid rgba(212, 175, 55, 0.45);
}

/* Cinematic Zoom on Hover */
.cinematic-zoom-card img {
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.cinematic-zoom-card:hover img {
  transform: scale(1.05);
}

/* Scroll Reveal Fade-up Motion */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}
.reveal-on-scroll.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* 3D Glassmorphic Card Flip Utilities */
.perspective-1200 {
  perspective: 1200px;
  -webkit-perspective: 1200px;
}
.perspective-1400 {
  perspective: 1400px;
  -webkit-perspective: 1400px;
}
.transform-style-3d {
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
}
.backface-hidden {
  backface-visibility: hidden !important;
  -webkit-backface-visibility: hidden !important;
}
.rotate-y-180 {
  transform: rotateY(180deg) !important;
  -webkit-transform: rotateY(180deg) !important;
}
.gift-card-inner {
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
  transition: transform 0.75s cubic-bezier(0.34, 1.3, 0.64, 1);
  will-change: transform;
}
.gift-card-inner.flipped,
.gift-card-inner.is-flipped {
  transform: rotateY(180deg) !important;
  -webkit-transform: rotateY(180deg) !important;
}
.gift-card-front,
.gift-card-back {
  backface-visibility: hidden !important;
  -webkit-backface-visibility: hidden !important;
}

/* Custom Selection Highlight in Champagne Gold */
::selection {
  background-color: #9E7A53;
  color: #FFFFFF;
}

/* Luxury Secret Gift Box Subtle Float & Glow */
@keyframes luxuryBoxFloat {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-8px);
  }
}

.luxury-box-animated {
  animation: luxuryBoxFloat 4s ease-in-out infinite;
}
.luxury-box-animated-2 {
  animation: luxuryBoxFloat 4s ease-in-out 1.3s infinite;
}
.luxury-box-animated-3 {
  animation: luxuryBoxFloat 4s ease-in-out 2.6s infinite;
}

/* Luxury Card Glow Effect */
.luxury-gold-border-glow {
  box-shadow: 0 10px 30px rgba(197, 168, 128, 0.15), inset 0 0 0 1px rgba(212, 175, 55, 0.35);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.luxury-gold-border-glow:hover {
  box-shadow: 0 20px 50px rgba(212, 175, 55, 0.3), inset 0 0 0 1.5px rgba(212, 175, 55, 0.85);
  transform: translateY(-6px);
}

/* Matter.js Hero Interactive Canvas */
#hero-physics-canvas {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  z-index: 15 !important;
  touch-action: none;
}

/* =======================================
   🎬 MOTION HERO VIDEO SWITCHER & SPRING
======================================= */
:root {
  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes dotPulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.45;
    transform: scale(1.45);
  }
}

.status-dot-pulse {
  animation: dotPulse 1.6s infinite ease-in-out;
}

.hero-scene-btn {
  position: relative;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease, color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hero-scene-btn:hover {
  transform: translateX(4px);
}

.hero-video-layer {
  transition: opacity 1200ms ease-in-out !important;
}

/* ===================================================
   🌟 HERO INTERACTIVE TOUCH & HOVER MICRO-INTERACTIONS (LUXURY GOLD)
=================================================== */
.hero-touch-item {
  display: inline-block;
  cursor: pointer;
  position: relative;
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.22s ease, text-shadow 0.22s ease, background-color 0.22s ease;
  user-select: none;
  -webkit-user-select: none;
  padding: 2px 10px;
  border-radius: 12px;
  pointer-events: auto;
}

.hero-touch-item:hover {
  transform: scale(1.08) translateY(-3px);
  color: #FFFFFF !important;
  text-shadow: 
    0 0 25px rgba(212, 175, 55, 0.95),
    0 0 45px rgba(245, 231, 196, 0.85),
    0 6px 18px rgba(0, 0, 0, 0.95);
  background-color: rgba(212, 175, 55, 0.15);
}

.hero-touch-highlight:hover {
  transform: scale(1.1) translateY(-4px);
  color: #FFF5D6 !important;
  text-shadow: 
    0 0 30px rgba(212, 175, 55, 1),
    0 0 60px rgba(245, 216, 144, 0.9),
    0 8px 24px rgba(0, 0, 0, 0.98);
  background-color: rgba(212, 175, 55, 0.2);
}

.hero-touch-item:active {
  transform: scale(0.95) translateY(2px) !important;
  transition: transform 0.08s ease;
}

@keyframes heroPopJelly {
  0% { transform: scale(1); }
  25% { transform: scale(1.22) rotate(2deg); }
  50% { transform: scale(0.94) rotate(-1deg); }
  75% { transform: scale(1.08) rotate(1deg); }
  100% { transform: scale(1); }
}

.animate-hero-pop {
  animation: heroPopJelly 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards !important;
}

/* Floating Burst Particles */
.hero-particle {
  position: fixed !important;
  pointer-events: none !important;
  z-index: 10000030 !important;
  font-size: 28px;
  line-height: 1;
  will-change: transform, opacity;
  animation: floatUpAndFade 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes floatUpAndFade {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(0.4) rotate(0deg);
  }
  30% {
    opacity: 1;
    transform: translate(calc(-50% + var(--vx, 0px)), calc(-50% + var(--vy, -40px))) scale(1.4) rotate(var(--rot, 15deg));
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--vx, 0px) * 1.7), calc(-50% + var(--vy, -100px))) scale(0.6) rotate(var(--rot, 35deg));
  }
}

/* Ripple Glow Ring (Luxury Champagne Gold) */
.hero-touch-ripple {
  position: fixed !important;
  border-radius: 50% !important;
  pointer-events: none !important;
  z-index: 10000025 !important;
  border: 2.5px solid rgba(212, 175, 55, 0.95) !important;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.4) 0%, rgba(255, 248, 220, 0.2) 45%, transparent 75%) !important;
  transform: translate(-50%, -50%) scale(0);
  animation: touchRippleBurst 0.75s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes touchRippleBurst {
  0% {
    width: 16px;
    height: 16px;
    opacity: 1;
    transform: translate(-50%, -50%) scale(0.3);
  }
  100% {
    width: 180px;
    height: 180px;
    opacity: 0;
    transform: translate(-50%, -50%) scale(2.0);
  }
}

/* ===================================================
   🎁 IN-BOX LOCAL BURST PARTICLES & RIPPLE (Attached directly to box)
=================================================== */
.box-local-particle {
  position: absolute !important;
  pointer-events: none !important;
  z-index: 60 !important;
  font-size: 32px;
  line-height: 1;
  left: 50% !important;
  top: 45% !important;
  transform: translate(-50%, -50%) scale(0.3);
  will-change: transform, opacity;
  animation: boxParticleBurst 1.25s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}

@keyframes boxParticleBurst {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(0.3) rotate(0deg);
  }
  30% {
    opacity: 1;
    transform: translate(calc(-50% + var(--vx, 0px)), calc(-50% + var(--vy, -30px))) scale(1.4) rotate(var(--rot, 15deg));
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--vx, 0px) * 1.8), calc(-50% + var(--vy, -80px))) scale(0.6) rotate(var(--rot, 35deg));
  }
}

.box-local-ripple {
  position: absolute !important;
  pointer-events: none !important;
  z-index: 55 !important;
  left: 50% !important;
  top: 45% !important;
  border-radius: 50% !important;
  border: 3px solid rgba(212, 175, 55, 0.95) !important;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.5) 0%, rgba(255, 248, 220, 0.25) 45%, transparent 75%) !important;
  transform: translate(-50%, -50%) scale(0);
  animation: boxRippleBurst 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}

@keyframes boxRippleBurst {
  0% {
    width: 20px;
    height: 20px;
    opacity: 1;
    transform: translate(-50%, -50%) scale(0.2);
  }
  100% {
    width: 320px;
    height: 320px;
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.6);
  }
}

/* ===================================================
   🔒 GUARANTEED VIEWPORT-FIXED MODAL & LIGHTBOX SYSTEM
=================================================== */
#gift-celebration-modal,
#image-lightbox {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 9999999 !important;
  margin: 0 !important;
  padding: 16px !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  transform: none !important;
}

#gift-celebration-modal.is-open,
#image-lightbox.is-open {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

#gift-celebration-modal .modal-card {
  position: relative !important;
  max-width: 520px !important;
  width: 92% !important;
  max-height: 88vh !important;
  overflow-y: auto !important;
  background-color: #FFFFFF !important;
  color: #2D2A26 !important;
  border: 2.5px solid #D4AF37 !important;
  border-radius: 28px !important;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.6) !important;
  margin: auto !important;
  transform: none !important;
}



