@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Playfair+Display:ital,wght@0,500;0,600;0,700;1,400;1,600&display=swap');

:root {
  --color-dark: #553a2b;       /* Café profundo / Contraste y tipografía */
  --color-sage: #8da3a6;       /* Azul grisáceo / Serenidad y salud mental */
  --color-sage-light: #eef3f4; /* Tinte suave de salvia */
  --color-cream: #eed3ba;      /* Marfil suave / Fondos cálidos */
  --color-cream-light: #faf5ef;/* Fondo base cálido */
  --color-rose: #ba8469;       /* Terracota suave / Rosa viejo empático */
  --color-coral: #e6896b;      /* Terracota vivo / CTA y conversiones */
  --color-coral-hover: #d27557;
  --color-sand: #ffd68d;       /* Ocre trigo cálido / Badges y destaques */
  --color-bg: #fcfbf9;         /* Blanco roto limpio */
  --color-text-main: #342217;  /* Lectura óptima */
  --color-text-muted: #6e5e54; /* Textos secundarios */
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--color-bg);
  color: var(--color-text-main);
  overflow-x: hidden;
}

h1, h2, h3, .font-serif {
  font-family: var(--font-serif);
}

/* Custom Utilities for Brand Colors */
.bg-brand-dark { background-color: var(--color-dark); }
.text-brand-dark { color: var(--color-dark); }
.border-brand-dark { border-color: var(--color-dark); }

.bg-brand-sage { background-color: var(--color-sage); }
.text-brand-sage { color: var(--color-sage); }
.border-brand-sage { border-color: var(--color-sage); }
.bg-brand-sage-light { background-color: var(--color-sage-light); }

.bg-brand-cream { background-color: var(--color-cream); }
.text-brand-cream { color: var(--color-cream); }
.bg-brand-cream-light { background-color: var(--color-cream-light); }

.bg-brand-rose { background-color: var(--color-rose); }
.text-brand-rose { color: var(--color-rose); }
.border-brand-rose { border-color: var(--color-rose); }

.bg-brand-coral { background-color: var(--color-coral); }
.bg-brand-coral:hover { background-color: var(--color-coral-hover); }
.text-brand-coral { color: var(--color-coral); }
.border-brand-coral { border-color: var(--color-coral); }

.bg-brand-sand { background-color: var(--color-sand); }
.text-brand-sand { color: #875a13; }

/* Custom Badges */
.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.9rem;
  border-radius: 9999px;
  font-size: 0.825rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* Glassmorphism & Soft Shadows */
.glass-card {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(238, 211, 186, 0.5);
  box-shadow: 0 10px 30px -10px rgba(85, 58, 43, 0.07);
}

.hover-lift {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px -12px rgba(85, 58, 43, 0.12);
}

/* Gradient backgrounds */
.hero-gradient {
  background: radial-gradient(circle at 10% 20%, rgba(238, 211, 186, 0.45) 0%, transparent 40%),
              radial-gradient(circle at 90% 80%, rgba(141, 163, 166, 0.25) 0%, transparent 45%),
              #fdfbf7;
}

.warm-mesh {
  background: linear-gradient(135deg, rgba(238, 211, 186, 0.3) 0%, rgba(253, 251, 247, 0.9) 50%, rgba(141, 163, 166, 0.15) 100%);
}

/* Custom scrollbars */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #f1ece6;
}
::-webkit-scrollbar-thumb {
  background: #c7b3a4;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #8da3a6;
}

/* Modal and Float Transitions */
.modal-backdrop {
  background: rgba(40, 25, 17, 0.5);
  backdrop-filter: blur(4px);
}

/* Subtle animation pulses */
@keyframes pulseGently {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}

.pulse-gentle {
  animation: pulseGently 3s infinite ease-in-out;
}

/* Custom Brand Icon Squircle Badges */
.brand-squircle {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 1.15rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.brand-squircle svg {
  width: 1.5rem;
  height: 1.5rem;
}

.brand-squircle-cream {
  background-color: #faf5ef;
  border: 1px solid #eed3ba;
  color: #ba8469;
}

.brand-squircle-sage {
  background-color: #eef3f4;
  border: 1px solid rgba(141, 163, 166, 0.4);
  color: #8da3a6;
}

.brand-squircle-dark {
  background-color: #faf5ef;
  border: 1px solid rgba(85, 58, 43, 0.2);
  color: #553a2b;
}

/* MegaMenu Dropdown Engine & Dark Overlay */
header > div:first-child {
  position: relative;
  z-index: 50;
}

header nav {
  height: 100%;
}

.megamenu-wrapper {
  position: static;
  height: 100%;
  display: flex;
  align-items: center;
}

/* 100% Solid Pure White MegaMenu Panel (zero bleed-through) */
.megamenu-panel {
  z-index: 55 !important;
}

/* Invisible bridge: covers the physical space between header and dropdown panel */
.megamenu-panel::before {
  content: '';
  position: absolute;
  top: -24px;
  left: 0;
  right: 0;
  height: 28px;
  background: transparent;
  pointer-events: auto;
}

.megamenu-panel > div {
  background-color: #ffffff !important;
  box-shadow: 0 30px 70px -15px rgba(25, 14, 8, 0.5), 0 0 0 1px #eed3ba !important;
}

/* Full Viewport Dark Backdrop Overlay Behind Megamenu */
.megamenu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(22, 13, 8, 0.72); /* Deep dark espresso backdrop */
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.25s;
  z-index: 45;
}

/* Activate Overlay on Hover (CSS :has) or via JS body.megamenu-open */
header:has(.megamenu-wrapper:hover) .megamenu-overlay,
body.megamenu-open .megamenu-overlay {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

@media (min-width: 1024px) {
  .megamenu-panel {
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1), transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.22s;
    pointer-events: none;
  }

  .megamenu-wrapper:hover .megamenu-panel,
  .megamenu-wrapper:focus-within .megamenu-panel,
  .megamenu-panel.is-open,
  body.megamenu-open .megamenu-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
  }

  .megamenu-wrapper:hover .megamenu-chevron,
  .megamenu-wrapper:focus-within .megamenu-chevron,
  .megamenu-chevron.is-open,
  body.megamenu-open .megamenu-chevron {
    transform: rotate(180deg);
  }
}

.megamenu-card {
  transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.megamenu-card:hover {
  transform: translateX(4px);
  background-color: #faf5ef !important;
}