/* Liquid Glass — capa visual sobre el sistema clínico.
   Vidrio, refracción, orbes y movimiento. */

:root {
  --radius: 22px;
  --radius-sm: 14px;
  --radius-pill: 999px;
  --glass: rgba(255, 252, 247, 0.46);
  --glass-2: rgba(255, 252, 247, 0.28);
  --glass-3: rgba(246, 241, 232, 0.38);
  --glass-ink: rgba(26, 58, 74, 0.42);
  --glass-line: rgba(255, 255, 255, 0.62);
  --glass-line-2: rgba(255, 255, 255, 0.28);
  --glass-shadow: 0 18px 50px rgba(26, 22, 18, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.72);
  --glass-shadow-dark: 0 18px 50px rgba(8, 18, 24, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.16);
  --blur: 28px;
  --sat: 1.65;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.22, 1.2, 0.36, 1);
}

html { background: #efe8dc; }

body {
  background:
    radial-gradient(70% 55% at 8% -10%, rgba(184, 154, 108, 0.34), transparent 58%),
    radial-gradient(55% 45% at 92% 0%, rgba(26, 58, 74, 0.16), transparent 52%),
    radial-gradient(50% 40% at 50% 110%, rgba(232, 213, 200, 0.55), transparent 58%),
    #f3eee4;
  isolation: isolate;
}

.lg-orbs {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.lg-orbs i {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.72;
  will-change: transform;
}
.lg-orbs i:nth-child(1) {
  width: 42vw;
  height: 42vw;
  min-width: 280px;
  background: #c4a574;
  top: -12%;
  left: -8%;
  animation: lg-drift-a 28s ease-in-out infinite alternate;
}
.lg-orbs i:nth-child(2) {
  width: 36vw;
  height: 36vw;
  min-width: 240px;
  background: #1a3a4a;
  opacity: 0.28;
  top: 35%;
  right: -12%;
  animation: lg-drift-b 34s ease-in-out infinite alternate;
}
.lg-orbs i:nth-child(3) {
  width: 28vw;
  height: 28vw;
  min-width: 200px;
  background: #e8d5c8;
  bottom: -10%;
  left: 30%;
  animation: lg-drift-c 22s ease-in-out infinite alternate;
}

@keyframes lg-drift-a {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(12%, 18%, 0) scale(1.12); }
}
@keyframes lg-drift-b {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(-16%, -10%, 0) scale(1.18); }
}
@keyframes lg-drift-c {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(10%, -16%, 0) scale(1.08); }
}

.site-header,
main,
.site-footer { position: relative; z-index: 1; }
.site-header { z-index: 80; }

/* Header — barra flotante de vidrio */
.site-header {
  background: transparent !important;
  border-bottom: 0 !important;
  height: auto;
  padding: 0.7rem 0 0.2rem;
  box-shadow: none !important;
}
.header-inner {
  background: var(--glass);
  backdrop-filter: blur(var(--blur)) saturate(var(--sat));
  -webkit-backdrop-filter: blur(var(--blur)) saturate(var(--sat));
  border: 1px solid var(--glass-line);
  border-radius: var(--radius-pill);
  box-shadow: var(--glass-shadow);
  min-height: 58px;
  padding: 0.28rem 0.45rem 0.28rem 1.15rem;
  position: relative;
  overflow: visible;
}
.header-inner::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255,255,255,0.45), transparent 42%);
  pointer-events: none;
  z-index: 0;
}
.header-inner > * {
  position: relative;
  z-index: 1;
}
.site-header.is-scrolled .header-inner {
  background: rgba(255, 252, 247, 0.62);
  box-shadow: 0 14px 40px rgba(26, 22, 18, 0.1), inset 0 1px 0 rgba(255,255,255,0.8);
}

.nav-drop,
.menu-item-has-children {
  z-index: 30;
}
.nav-drop-menu,
.nav-list .sub-menu {
  background: var(--glass) !important;
  backdrop-filter: blur(24px) saturate(1.7);
  -webkit-backdrop-filter: blur(24px) saturate(1.7);
  border: 1px solid var(--glass-line) !important;
  border-radius: 18px;
  box-shadow: var(--glass-shadow);
  top: calc(100% + 0.2rem) !important;
  overflow: visible;
  z-index: 140 !important;
}
.nav-drop-menu::before,
.nav-list .sub-menu::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  height: 22px;
}
.nav-drop-menu a:hover,
.nav-list .sub-menu a:hover {
  background: rgba(255,255,255,0.45) !important;
}

/* Superficies de sección translúcidas */
.bg-paper { background: rgba(251, 248, 243, 0.28) !important; }
.bg-cream { background: rgba(246, 241, 232, 0.22) !important; }
.bg-white { background: rgba(255, 252, 247, 0.18) !important; }
.hero { background: transparent !important; }

/* Hero copy en placa de vidrio */
.hero-copy {
  position: relative;
  z-index: 1;
}
.hero-copy > * { position: relative; z-index: 1; }
.hero-copy::before {
  content: "";
  position: absolute;
  inset: 6% 5% 8% 2%;
  background: var(--glass-2);
  backdrop-filter: blur(22px) saturate(1.45);
  -webkit-backdrop-filter: blur(22px) saturate(1.45);
  border: 1px solid var(--glass-line);
  border-radius: 32px;
  box-shadow: var(--glass-shadow);
  z-index: 0;
  pointer-events: none;
}
.hero-visual {
  border-radius: 0 0 0 48px;
  overflow: hidden;
}
.hero-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(243,238,228,0.28), transparent 42%);
  pointer-events: none;
}

.hero-page {
  border-radius: 0 0 36px 36px;
  overflow: hidden;
}
.hero-page img,
.hero-banner-img {
  object-fit: cover;
  object-position: center center;
  transform: none !important;
}
.hero-page::after {
  content: "";
  position: absolute;
  inset: 0;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  background: linear-gradient(180deg, rgba(16, 32, 40, 0.15), rgba(16, 32, 40, 0.42));
  pointer-events: none;
  z-index: 0;
}
.hero-page .wrap { z-index: 2; }

/* Media con marco de vidrio */
.media {
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--glass-shadow);
  background: rgba(255,255,255,0.2);
}
.media::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.5);
  pointer-events: none;
}

/* Botones de vidrio */
.btn {
  border-radius: var(--radius-pill) !important;
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  transition: transform 0.45s var(--ease-spring), background 0.3s, box-shadow 0.45s, border-color 0.3s !important;
}
.btn-primary {
  background: linear-gradient(180deg, rgba(36, 72, 90, 0.92), rgba(18, 44, 56, 0.92)) !important;
  border: 1px solid rgba(255,255,255,0.22) !important;
  box-shadow: 0 10px 28px rgba(18, 44, 56, 0.28), inset 0 1px 0 rgba(255,255,255,0.22);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(18, 44, 56, 0.34), inset 0 1px 0 rgba(255,255,255,0.3);
}
.btn-ghost,
.btn-light,
.btn-line {
  background: rgba(255,255,255,0.38) !important;
  border: 1px solid var(--glass-line) !important;
  color: var(--ink) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.7);
}
.btn-ghost:hover,
.btn-light:hover {
  background: rgba(255,255,255,0.62) !important;
  transform: translateY(-2px);
}
.btn-line { color: var(--cream) !important; background: rgba(255,255,255,0.1) !important; }

/* Tarjetas y bloques de vidrio */
.pillars {
  gap: 0.8rem !important;
  background: transparent !important;
  border: 0 !important;
}
.pillar,
.card,
.treat,
.chip,
.equip-card,
.panel,
.t-item,
.value,
.axis,
.flow span,
.field input,
.field select,
.field textarea {
  background: var(--glass) !important;
  backdrop-filter: blur(20px) saturate(1.5);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  border: 1px solid var(--glass-line) !important;
  box-shadow: var(--glass-shadow);
}
.pillar,
.card,
.equip-card,
.panel,
.treat {
  border-radius: 22px;
  overflow: hidden;
  position: relative;
}
.t-item,
.value,
.axis {
  border-radius: 20px;
  padding: 1.4rem 1.2rem !important;
  border-top: 1px solid var(--glass-line) !important;
}
.chip,
.flow span {
  border-radius: var(--radius-pill) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.7);
}
.card:hover {
  border-color: rgba(255,255,255,0.9) !important;
  transform: translateY(-8px);
  box-shadow: 0 24px 50px rgba(26, 22, 18, 0.12), inset 0 1px 0 rgba(255,255,255,0.85);
}
.card-img { border-radius: 22px 22px 0 0; }
.axis-ico {
  background: rgba(255,255,255,0.35);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-line) !important;
}

.lg-spec::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(480px 200px at var(--mx, 50%) var(--my, 0%), rgba(255,255,255,0.5), transparent 58%);
  mix-blend-mode: overlay;
  opacity: 0;
  transition: opacity 0.45s var(--ease-out);
  z-index: 2;
}
.lg-spec:hover::after { opacity: 1; }

/* CTA y footer */
.cta-band {
  position: relative;
  overflow: hidden;
  border-radius: 36px 36px 0 0;
  margin-top: 1rem;
  background:
    radial-gradient(80% 80% at 20% -20%, rgba(196, 165, 116, 0.28), transparent 50%),
    var(--blue) !important;
}
.cta-band::before {
  content: "";
  position: absolute;
  width: 50%;
  height: 80%;
  right: -10%;
  top: -20%;
  background: rgba(255,255,255,0.08);
  filter: blur(40px);
  border-radius: 50%;
  pointer-events: none;
}
.cta-band .wrap {
  position: relative;
  z-index: 1;
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 28px;
  padding: 3.2rem 1.6rem;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.18);
}

.site-footer {
  background: linear-gradient(180deg, rgba(26, 22, 18, 0.88), #1a1612) !important;
  backdrop-filter: blur(24px);
}

.wa-float {
  position: fixed !important;
  right: max(1.1rem, env(safe-area-inset-right));
  bottom: max(1.4rem, env(safe-area-inset-bottom));
  z-index: 9999 !important;
  background: var(--glass-ink) !important;
  backdrop-filter: blur(18px) saturate(1.6);
  -webkit-backdrop-filter: blur(18px) saturate(1.6);
  border: 1px solid rgba(255,255,255,0.28);
  box-shadow: var(--glass-shadow-dark);
}
.form-success {
  background: var(--glass) !important;
  backdrop-filter: blur(16px);
}

.map-wrap {
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid var(--glass-line);
}

/* Animaciones de entrada */
@media (prefers-reduced-motion: no-preference) {
  .hero-copy .eyebrow,
  .hero-copy h1,
  .hero-copy .lead,
  .hero-copy .btn-row {
    animation: lg-rise 1.05s var(--ease-out) both;
  }
  .hero-copy h1 { animation-delay: 0.12s; }
  .hero-copy .lead { animation-delay: 0.22s; }
  .hero-copy .btn-row { animation-delay: 0.38s; }

  .hero-visual img,
  .hero-visual video {
    animation: lg-ken 24s ease-in-out infinite alternate;
  }

  .hero-page h1,
  .hero-page .lead,
  .hero-page .eyebrow {
    animation: lg-rise 1s var(--ease-out) both;
  }
  .hero-page h1 { animation-delay: 0.1s; }

  .lg-reveal {
    opacity: 0;
    transform: translateY(40px) scale(0.98);
    filter: blur(12px);
    transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out), filter 0.9s var(--ease-out);
  }
  .lg-reveal.is-in {
    opacity: 1;
    transform: none;
    filter: blur(0);
  }

  .pillar, .card, .treat, .panel, .equip-card, .t-item, .value, .axis, .chip {
    transition: transform 0.55s var(--ease-spring), box-shadow 0.55s, border-color 0.35s, background 0.35s;
  }
  .pillar:hover, .treat:hover, .panel:hover, .equip-card:hover, .t-item:hover, .value:hover, .axis:hover {
    transform: translateY(-6px);
  }

  .media img,
  .card-img img {
    transition: transform 1.2s var(--ease-out);
  }
  .media:hover img,
  .card:hover .card-img img {
    transform: scale(1.06);
  }
}

@keyframes lg-rise {
  from { opacity: 0; transform: translateY(28px); filter: blur(8px); }
  to { opacity: 1; transform: none; filter: blur(0); }
}
@keyframes lg-ken {
  from { transform: scale(1) translate3d(0,0,0); }
  to { transform: scale(1.08) translate3d(-1.5%, 1%, 0); }
}

.lg-stagger > *:nth-child(1) { transition-delay: 0.04s; }
.lg-stagger > *:nth-child(2) { transition-delay: 0.1s; }
.lg-stagger > *:nth-child(3) { transition-delay: 0.16s; }
.lg-stagger > *:nth-child(4) { transition-delay: 0.22s; }
.lg-stagger > *:nth-child(5) { transition-delay: 0.28s; }
.lg-stagger > *:nth-child(6) { transition-delay: 0.34s; }

@media (max-width: 1100px) {
  .header-inner { border-radius: 22px; padding-right: 0.35rem; }
  .hero-copy::before { inset: 0; border-radius: 24px; }
  .hero-visual { border-radius: 0; }
  .nav {
    background: rgba(251, 248, 243, 0.72) !important;
    backdrop-filter: blur(28px) saturate(1.5);
    -webkit-backdrop-filter: blur(28px) saturate(1.5);
  }
}

@media (prefers-reduced-motion: reduce) {
  .lg-orbs i, .hero-visual img, .hero-copy *, .hero-page * { animation: none !important; }
  .lg-reveal { opacity: 1; transform: none; filter: none; }
}

@media (prefers-reduced-transparency: reduce) {
  .header-inner, .card, .pillar, .panel, .equip-card, .treat, .chip, .cta-band .wrap {
    backdrop-filter: none;
    background: var(--paper);
  }
}
