:root {
  /* Colors */
  --primary: #002d1c;
  --primary-container: #00452e;
  --on-primary: #ffffff;
  --secondary: #2b694d;
  --secondary-container: #b0f1cc;
  --on-secondary-container: #002113;
  --background: #f8f9fa;
  --surface: #ffffff;
  --surface-container-low: #f3f4f5;
  --surface-container: #edeeef;
  --surface-container-high: #e7e8e9;
  --iracema-gold: #D4AF37;
  --outline-variant: rgba(0, 45, 28, 0.05);
  
  /* Motion */
  --ease-premium: cubic-bezier(0.16, 1, 0.3, 1);
  --spring: cubic-bezier(0.32, 0.72, 0, 1);
  
  /* Spacing */
  --section-gap: clamp(5rem, 10vw, 10rem);
}

html {
  scroll-behavior: smooth;
}

/* Base Styles */
body {
  background-color: var(--background);
  color: var(--on-surface);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

section[id] {
  scroll-margin-top: 100px;
}

/* Double-Bezel Architecture */
.bezel-shell {
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(0, 0, 0, 0.05);
  padding: 0.5rem;
  border-radius: 2.5rem;
  transition: all 0.5s var(--ease-premium);
  will-change: transform, opacity;
}

.bezel-core {
  background: var(--surface);
  border-radius: calc(2.5rem - 0.5rem);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.8), 0 12px 40px rgba(25, 28, 29, 0.04);
  height: 100%;
  overflow: hidden;
}

.glass-card {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 2rem;
  transition: all 0.5s var(--ease-premium);
  will-change: transform, opacity, filter;
}

/* Anime.js Motion Optimization */
.reveal, .reveal-item, .reveal-hero > * {
  will-change: transform, opacity, filter;
}

/* Hero Section: Majestic Media Container */
.hero-spline {
  width: 100%;
  height: 100%;
  z-index: 10;
}

@keyframes pulse-slow {
  0%, 100% { opacity: 0.5; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 0.8; transform: translate(-50%, -50%) scale(1.1); }
}

.animate-pulse-slow {
  animation: pulse-slow 8s ease-in-out infinite;
}

/* Button Refinement */
.btn-premium {
  position: relative;
  overflow: hidden;
  border-radius: 9999px;
  padding: 0.65rem 1.75rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: all 0.35s var(--ease-premium);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.btn-premium:active {
  transform: scale(0.97);
}

.btn-icon-wrapper {
  background: rgba(255, 255, 255, 0.15);
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s var(--ease-premium);
}

.btn-premium:hover .btn-icon-wrapper {
  transform: translateX(3px) translateY(-1px) scale(1.1);
}

/* FAQ Accordion */
.faq-item {
  transition: all 0.4s var(--ease-premium);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: all 0.5s var(--ease-premium);
  opacity: 0;
  padding-top: 0;
}

.faq-item.active .faq-answer {
  max-height: 500px;
  opacity: 1;
  padding-top: 1.5rem;
  margin-top: 1rem;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.faq-item.active .faq-toggle-icon {
  transform: rotate(45deg);
}

/* Aesthetic Utilities */
.text-balance {
  text-wrap: balance;
}

.clinical-mint-glow {
  box-shadow: 0 0 100px rgba(176, 241, 204, 0.3);
}

/* Premium Unified Card Architecture */
.premium-card {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(0, 45, 28, 0.08);
  border-radius: 2.5rem;
  padding: 2.5rem;
  transition: all 0.4s var(--ease-premium);
  box-shadow: 0 4px 24px -1px rgba(0, 0, 0, 0.02);
  will-change: transform, opacity, box-shadow;
}

.premium-card:hover {
  transform: translateY(-8px);
  background: #ffffff;
  border-color: rgba(0, 45, 28, 0.15);
  box-shadow: 0 32px 64px -16px rgba(0, 45, 28, 0.08);
}

@media (max-width: 768px) {
  .premium-card {
    padding: 1.5rem;
    border-radius: 2rem;
  }
}

/* Membership Card Hover Effect (Updated) */
#categorias .bezel-shell:hover {
  transform: translateY(-10px) scale(1.02);
  border-color: var(--iracema-gold);
}

/* Testimonial Quote Styling */
#depoimentos .glass-card:hover {
  background: white;
  transform: scale(1.05);
  box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.1);
}

/* Hero Molecules - Animated Background Elements */
.hero-molecules {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

.molecule {
    position: absolute;
    will-change: transform;
    animation: molecule-float 25s infinite ease-in-out;
}

.molecule svg {
    width: 100%;
    height: 100%;
    filter: blur(0.5px);
}

/* Variações de animação para cada molécula */
.mol-1 {
    animation-duration: 32s;
    animation-delay: 0s;
}

.mol-2 {
    animation-duration: 38s;
    animation-delay: -10s;
    filter: blur(0.5px);
}

.mol-2 svg {
    filter: blur(0.5px);
}

.mol-3 {
    animation-duration: 26s;
    animation-delay: -18s;
}

.mol-4 {
    animation-duration: 34s;
    animation-delay: -6s;
    filter: blur(1px);
}

.mol-4 svg {
    filter: blur(1px);
}

.mol-5 {
    animation-duration: 40s;
    animation-delay: -12s;
    filter: blur(0.8px);
}

.mol-5 svg {
    filter: blur(0.8px);
}

.mol-6 {
    animation-duration: 24s;
    animation-delay: -20s;
    filter: blur(1.2px);
}

.mol-6 svg {
    filter: blur(1.2px);
}

.mol-7 {
    animation-duration: 30s;
    animation-delay: -8s;
    filter: blur(0.6px);
}

.mol-7 svg {
    filter: blur(0.6px);
}

.mol-8 {
    animation-duration: 36s;
    animation-delay: -14s;
    filter: blur(0.4px);
}

.mol-8 svg {
    filter: blur(0.4px);
}

/* Animação de flutuação suave */
@keyframes molecule-float {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    25% {
        transform: translate(12px, -18px) rotate(3deg);
    }
    50% {
        transform: translate(-8px, 10px) rotate(-2deg);
    }
    75% {
        transform: translate(15px, 8px) rotate(2deg);
    }
}

/* Parallax effect on mouse move - applied via JS */
.molecule.parallax-active {
    transition: transform 0.3s ease-out;
}

@media (max-width: 768px) {
  h1 { 
    font-size: clamp(1.75rem, 7vw, 2.5rem) !important; 
    line-height: 1.1 !important; 
    text-wrap: balance; 
    word-break: break-word; 
  }
  body { 
    padding-bottom: 5rem; 
    overflow-x: hidden; 
    position: relative;
    width: 100%;
  }
  html { 
    overflow-x: hidden; 
    width: 100%;
  }

  .hero-spline {
    height: auto;
    opacity: 1;
  }
  
  /* Compact buttons for mobile header/hero */
  .btn-premium {
    padding: 0.5rem 1.25rem;
    gap: 0.5rem;
  }

  .btn-icon-wrapper {
    width: 1.75rem;
    height: 1.75rem;
  }

  /* Hide all molecules on small mobile to prevent overflow */
  .molecule {
    display: none !important;
  }
}

/* Specific fix for ultra-small devices */
@media (max-width: 380px) {
  h1 { font-size: 1.5rem !important; }
}

/* Custom Scrollbar for Modal */
.custom-scrollbar::-webkit-scrollbar {
  width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.03);
  border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background: rgba(27, 64, 46, 0.2);
  border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: rgba(27, 64, 46, 0.4);
}

/* Privacy Consent (LGPD) Banner */
#privacy-banner {
  box-shadow: 0 20px 80px -20px rgba(0, 45, 28, 0.15), 0 10px 40px -10px rgba(0, 0, 0, 0.1);
  transform: translateY(20px) scale(0.95);
  transition: all 0.8s var(--ease-premium);
}

#privacy-banner.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.btn-accept {
  background: #8cc6a5;
  color: white;
  box-shadow: 0 10px 20px -5px rgba(140, 198, 165, 0.4);
  transition: all 0.3s var(--ease-premium);
}

.btn-accept:hover {
  background: #7bb594;
  transform: translateY(-2px);
  box-shadow: 0 15px 25px -5px rgba(140, 198, 165, 0.5);
}

.btn-accept:active {
  transform: scale(0.98);
}

@media (max-width: 640px) {
  #privacy-banner {
    left: 1.5rem;
    right: 1.5rem;
    bottom: 1.5rem;
    max-width: none !important;
  }
}

/* Scrolled Navbar Style - Floating Pill */
#main-nav.scrolled {
  background-color: rgba(255, 255, 255, 0.85) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  margin-top: 1rem !important; /* mt-4 (16px) detached look */
  padding-top: 0.75rem !important;
  padding-bottom: 0.75rem !important;
  border-radius: 9999px !important;
  border-color: rgba(27, 64, 46, 0.08) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.4) !important;
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.1) !important;
  width: 95% !important;
  max-width: 80rem !important; /* max-w-7xl */
}
