/* ==========================================================================
   8TH HEAVEN BEAUTY — ATMOSPHERIC LUXURY DESIGN SYSTEM
   Aesthetic: Ethereal Sanctuary, High-Fashion Editorial Rigor, Tactile Warmth
   Engine: Lenis Smooth Scroll, GSAP Motion Choreography, Vanta Sky Canvas
   Palette: Deep Night Sky (#08090e), Velvet Card (#0f1018), Cashmere & Gold (#c5a880)
   ========================================================================== */



:root {
  /* 8pt Baseline Spacing Scale */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;
  --space-32: 128px;

  /* Color System: Deep Atmospheric Sanctuary */
  --color-black: #08090e;
  --color-black-pure: #040406;
  --color-black-card: #0f1018;
  --color-black-elevated: #161824;
  
  --color-white: #ffffff;
  --color-white-soft: #fcfcfc;
  --color-gold: #c5a880;
  --color-gold-light: #dfcaa8;
  --color-gold-muted: rgba(197, 168, 128, 0.2);
  --color-cashmere: #f3efe6;
  --color-gray-100: #f4f4f5;
  --color-gray-400: #a1a1aa;
  --color-gray-500: #8c8c98;
  --color-gray-600: #5b5b66;
  --color-gray-800: #27272a;
  
  /* Monochrome & Warm Accents */
  --color-accent: #ffffff;
  --color-accent-gold: #c5a880;
  --color-accent-muted: #a1a1aa;
  --color-accent-border: rgba(255, 255, 255, 0.12);

  /* Unified Typography Stacks: Cormorant Garamond for Editorial Luxury + Jost for Clean UI */
  --font-grotesque: 'Jost', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-editorial: 'Cormorant Garamond', Garamond, Georgia, serif;
  --font-serif: 'Cormorant Garamond', Garamond, Georgia, serif;
  --font-display: 'Cormorant Garamond', Garamond, Georgia, serif;
  --font-sans: 'Jost', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'Space Mono', monospace;

  /* Motion Curves (Refined Exponential Ease, No Disorienting Bounces) */
  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring-snappy: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-spring-bounce: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Accessibility: Visually hidden screen-reader utility */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border-width: 0 !important;
}

.sr-only:focus,
.focus\:not-sr-only:focus {
  position: fixed !important;
  width: auto !important;
  height: auto !important;
  padding: 0.5rem 1rem !important;
  margin: 0 !important;
  overflow: visible !important;
  clip: auto !important;
  white-space: normal !important;
}

/* Smooth Scrolling with Lenis */
html.lenis, html.lenis body {
  height: auto;
}
.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}
.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}
.lenis.lenis-stopped {
  overflow: hidden;
}
.lenis.lenis-scrolling iframe {
  pointer-events: none;
}

/* Vanta Clouds Ambient Sky Canvas in Hero Stage */
#vanta-sky-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 1;
  background: 
    radial-gradient(circle 420px at 78% 22%, rgba(245, 158, 11, 0.32) 0%, rgba(212, 175, 55, 0.18) 32%, transparent 70%),
    radial-gradient(ellipse 70% 48% at 72% 30%, rgba(110, 132, 168, 0.52) 0%, rgba(90, 109, 140, 0.32) 45%, transparent 75%),
    radial-gradient(ellipse 60% 42% at 28% 26%, rgba(90, 109, 140, 0.38) 0%, rgba(45, 60, 88, 0.22) 48%, transparent 72%),
    linear-gradient(180deg, #10192b 0%, #142036 32%, #0d1424 68%, #08090e 100%);
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

#vanta-sky-canvas canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
  animation: vantaFadeIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes vantaFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Global Reset & Base */
html {
  scroll-behavior: smooth;
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--color-black);
  color: #f4f4f5;
  font-family: var(--font-editorial);
  overflow-x: hidden;
  letter-spacing: -0.01em;
  position: relative;
}

/* Editorial Tactile Grain Texture Overlay */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  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.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.022'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 20;
}

::selection {
  background-color: #ffffff;
  color: #000000;
}

/* Custom Scrollbar - Ultra Slim Minimalist */
::-webkit-scrollbar {
  width: 4px;
}
::-webkit-scrollbar-track {
  background: var(--color-black);
}
::-webkit-scrollbar-thumb {
  background: var(--color-gray-800);
}
::-webkit-scrollbar-thumb:hover {
  background: #ffffff;
}

/* ==================== TYPOGRAPHY HELPERS ==================== */
.font-grotesque {
  font-family: var(--font-grotesque);
  letter-spacing: -0.025em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.font-editorial {
  font-family: var(--font-editorial);
  font-feature-settings: "kern" 1, "liga" 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.font-italic-serif {
  font-family: var(--font-editorial);
  font-style: normal;
  font-weight: 300;
}

/* Brand Numeral Optical Balancing: ensures digit 8 matches exact cap-height and baseline of text */
.brand-num {
  display: inline-block;
  transform: scale(0.925);
  transform-origin: bottom center;
}
body.font-style-architectural .brand-num {
  transform: scale(0.96);
}

.font-display {
  font-family: var(--font-display);
  letter-spacing: 0.08em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.font-serif {
  font-family: var(--font-serif);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Editorial Text Enhancements */
.text-pink-gradient {
  color: #ffffff;
}

.text-editorial-white {
  color: #ffffff;
}

.text-gold {
  color: var(--color-gold);
}

/* Hairline Editorial Borders */
.hairline-b {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.hairline-t {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.hairline-x {
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

/* ==================== 1. SUBTLE AMBIENT MESH ==================== */
.bg-mesh {
  position: relative;
  overflow: hidden;
}

.bg-mesh::after {
  content: '';
  position: absolute;
  inset: -20%;
  background: 
    radial-gradient(circle at 50% 20%, rgba(255, 255, 255, 0.02) 0%, transparent 50%),
    radial-gradient(circle at 15% 75%, rgba(255, 255, 255, 0.015) 0%, transparent 45%);
  pointer-events: none;
  z-index: 1;
}

/* ==================== 2. CURATED BRAND & ACCOLADE STRIP ==================== */
.marquee-wrapper {
  overflow: hidden;
  user-select: none;
  display: flex;
  position: relative;
  white-space: nowrap;
}

.marquee-content {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 2.5rem;
}

/* ==================== 3. SCROLL-TRIGGERED STAGGER CASCADE ==================== */

/* ==================== FAQ ACCORDION ==================== */
.faq-item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: border-color 0.3s ease;
}

.faq-item:hover {
  border-color: rgba(255, 255, 255, 0.22);
}

.faq-icon {
  transition: transform 0.4s var(--ease-spring);
}

.faq-item.open .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.45s var(--ease-spring), opacity 0.3s ease;
  opacity: 0;
}

.faq-item.open .faq-answer {
  max-height: 400px;
  opacity: 1;
}

/* Toast Notification */
#toast-notification {
  transform: translateY(100px);
  opacity: 0;
  transition: transform 0.4s var(--ease-spring), opacity 0.3s ease;
}

#toast-notification.show {
  transform: translateY(0);
  opacity: 1;
}

/* Custom Modal */
.modal-backdrop {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  transform: scale(0.95) translateY(20px);
  transition: transform 0.35s var(--ease-spring);
}

.modal-backdrop.open .modal-content {
  transform: scale(1) translateY(0);
}

/* ==========================================================================
   ACCESSIBILITY: PREFERS-REDUCED-MOTION SUPPORT
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  }

/* Mobile Hero Slide 2 Centering (keeps all 3 staff faces visible) */
@media (max-width: 767px) {
  #hero-img-2 {
    object-position: 66% 25% !important;
  }
}


/* ==================== SINGLE STAGE SPATIAL VIEWPORT (DESKTOP) ==================== */
@media (min-width: 769px) {
  html.single-stage,
  html.single-stage body {
    width: 100%;
    height: 100%;
    height: 100dvh;
    overflow: hidden !important;
    margin: 0;
    padding: 0;
    position: fixed;
    background-color: #08090e;
  }

  #sky-stage {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100dvh;
    overflow: hidden;
    z-index: 1;
  }

  #vanta-sky-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    background: radial-gradient(ellipse 75% 60% at 75% 35%, rgba(68, 88, 128, 0.45) 0%, rgba(20, 32, 54, 0.6) 45%, rgba(8, 9, 14, 0.95) 100%),
                radial-gradient(circle at 80% 25%, rgba(212, 175, 55, 0.28) 0%, transparent 50%),
                #08090e;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  }

  #vanta-sky-canvas canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
  }

  #sky-ambient-vignette {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    background: radial-gradient(ellipse 90% 80% at 50% 45%, rgba(8, 9, 14, 0.20) 0%, rgba(8, 9, 14, 0.62) 65%, rgba(6, 7, 10, 0.92) 100%);
  }

  #scenes-container {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    pointer-events: none;
  }

  .sky-scene {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5.5rem 1.5rem 4.5rem;
    box-sizing: border-box;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    transition: opacity 0.5s ease;
  }

  .sky-scene.active-scene {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  #mobile-bottom-nav {
    display: none !important;
  }
}

/* Glassmorphism Floating Cards */
.floating-glass-card {
  background: rgba(14, 16, 25, 0.76);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 1.5rem;
  box-shadow: 0 30px 70px -15px rgba(0, 0, 0, 0.8), 0 0 1px 1px rgba(255, 255, 255, 0.08);
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s var(--ease-spring);
}

.floating-glass-card:hover {
  border-color: rgba(197, 168, 128, 0.4);
  box-shadow: 0 36px 80px -15px rgba(0, 0, 0, 0.85);
}

/* HUD Tracker: Vertical Navigation on Desktop */
#hud-nav-tracker {
  position: fixed;
  right: 2rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.hud-dot-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-direction: row-reverse;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.35rem;
  outline: none;
}

.hud-dot-pill {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.3);
  transition: all 0.35s var(--ease-spring);
}

.hud-dot-label {
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  opacity: 0;
  transform: translateX(8px);
  transition: all 0.3s ease;
  pointer-events: none;
  white-space: nowrap;
}

.hud-dot-btn:hover .hud-dot-label,
.hud-dot-btn.active .hud-dot-label {
  opacity: 1;
  transform: translateX(0);
}

.hud-dot-btn.active .hud-dot-pill {
  width: 10px;
  height: 28px;
  border-radius: 999px;
  background-color: var(--color-gold);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.hud-dot-btn.active .hud-dot-label {
  color: #ffffff;
  font-weight: 600;
}

/* Bottom Hint */
#hud-scroll-cue {
  position: fixed;
  bottom: 1.75rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-sans);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.55);
  pointer-events: none;
  transition: opacity 0.5s ease;
}

/* Hide desktop HUD elements on mobile */
@media (max-width: 768px) {
  #hud-nav-tracker,
  #hud-scroll-cue {
    display: none !important;
  }
}

/* Stage Scene Content - unnested, airy layout */
.stage-scene-content {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  width: 100%;
}


/* Cennik Scrollable Accordion Styling */
#cennik-accordion {
  scrollbar-width: thin;
  scrollbar-color: rgba(197, 168, 128, 0.45) rgba(255, 255, 255, 0.05);
  overscroll-behavior: contain;
}

#cennik-accordion::-webkit-scrollbar {
  width: 6px;
}

#cennik-accordion::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 9999px;
}

#cennik-accordion::-webkit-scrollbar-thumb {
  background: rgba(197, 168, 128, 0.45);
  border-radius: 9999px;
}

#cennik-accordion::-webkit-scrollbar-thumb:hover {
  background: rgba(197, 168, 128, 0.75);
}


/* ==================== FULL SERVICES MODAL & BOOKING MODAL ==================== */
#services-menu-modal, #booking-modal {
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

#services-menu-modal.hidden, #booking-modal.hidden {
  display: none !important;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

#services-menu-modal:not(.hidden), #booking-modal:not(.hidden) {
  display: flex !important;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

#cennik-modal-accordion {
  scrollbar-width: thin;
  scrollbar-color: rgba(197, 168, 128, 0.45) rgba(255, 255, 255, 0.05);
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

#cennik-modal-accordion::-webkit-scrollbar {
  width: 6px;
}

#cennik-modal-accordion::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 9999px;
}

#cennik-modal-accordion::-webkit-scrollbar-thumb {
  background: rgba(197, 168, 128, 0.45);
  border-radius: 9999px;
}

#cennik-modal-accordion::-webkit-scrollbar-thumb:hover {
  background: rgba(197, 168, 128, 0.75);
}

.overscroll-contain {
  overscroll-behavior: contain !important;
}


/* ==========================================================================
   DEDICATED FLUID MOBILE ARCHITECTURE (MOBILE & TABLET <= 768px)
   Native thumb scrolling, zero element cutoff, isolated modals
   ========================================================================== */

@media (max-width: 768px) {
  html.single-stage,
  html.single-stage body {
    position: static !important;
    width: 100% !important;
    height: auto !important;
    min-height: 100% !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior-y: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    background-color: #08090e !important;
  }

  body.modal-open,
  body.menu-open {
    overflow: hidden !important;
    overscroll-behavior: none !important;
  }

  #sky-stage {
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    height: auto !important;
    min-height: 100% !important;
    overflow: visible !important;
  }

  #vanta-sky-canvas,
  #sky-ambient-vignette {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    z-index: 0 !important;
    pointer-events: none !important;
  }

  #sky-ambient-vignette {
    z-index: 1 !important;
  }

  #scenes-container {
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    height: auto !important;
    display: flex !important;
    flex-direction: column !important;
    pointer-events: auto !important;
    z-index: 10 !important;
  }

  .sky-scene {
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    height: auto !important;
    min-height: auto !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    opacity: 1 !important;
    transform: none !important;
    pointer-events: auto !important;
    visibility: visible !important;
    overflow: visible !important;
    box-sizing: border-box !important;
    padding: 3.5rem 1rem 3rem !important;
    scroll-margin-top: 3.5rem;
  }

  /* Scene 0 (Hero): fills first screen gracefully */
  .sky-scene[data-scene="0"] {
    min-height: calc(100dvh - 3.5rem) !important;
    justify-content: center !important;
    padding-top: calc(4.5rem + env(safe-area-inset-top, 0px)) !important;
    padding-bottom: calc(4rem + env(safe-area-inset-bottom, 0px)) !important;
  }

  /* Scene 5 (Contact): bottom padding to clear the bottom nav */
  .sky-scene[data-scene="5"] {
    padding-bottom: calc(6.5rem + env(safe-area-inset-bottom, 0px)) !important;
  }

  /* Mobile Bottom Navigator Dock */
  #mobile-bottom-nav {
    display: flex !important;
    padding-bottom: calc(0.35rem + env(safe-area-inset-bottom, 0px)) !important;
    transition: opacity 0.25s ease, transform 0.25s ease;
  }

  body.modal-open #mobile-bottom-nav,
  body.menu-open #mobile-bottom-nav {
    opacity: 0 !important;
    pointer-events: none !important;
    visibility: hidden !important;
    transform: translateY(100%);
  }
}

.mobile-nav-dot {
  min-width: 8px;
}

/* Hard scroll containment for modal cennik */
#cennik-modal-accordion,
.cennik-scroll-zone {
  overscroll-behavior: contain !important;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y !important;
}

.mobile-master-slide {
  transition: opacity 0.25s ease-out;
}

.mobile-master-slide.hidden {
  display: none !important;
}

#mobile-masters-slider,
#mobile-reviews-slider,
#mobile-cennik-slider {
  touch-action: pan-y !important;
  user-select: none;
  -webkit-user-select: none;
}
