/* ==========================================================================
   ATILA CENTRO MÉDICO — Sistema Visual Editorial & Animaciones (v2 Pulido)
   Paleta Oficial Atila + Mecánicas Interactivas (Antes/Después, Rack, Pill)
   ========================================================================== */

:root {
  /* Paleta Oficial Atila (extraída de logo e interfaz) */
  --atila-cyan: #159BD6;
  --atila-cyan-light: #38BDF8;
  --atila-blue: #1A7EC2;
  --atila-navy: #1D67B1;
  --atila-deep: #091526;
  --atila-darker: #050C17;
  --atila-cta: #155DFC;
  --atila-cta-hover: #1447E6;
  --atila-focus: #2B7FFF;
  --atila-bg-soft: #EFF6FF;
  --atila-bg-tint: #DBEAFE;
  --atila-star: #F6B704;
  --atila-white: #FFFFFF;
  --atila-paper: #F8FAFC;
  --atila-ink: #0F172A;
  --atila-muted: #62748E;
  --atila-border-dark: rgba(56, 189, 248, 0.18);
  --atila-border-light: #E2E8F0;

  /* Tipografías */
  --font-sans: 'Lato', system-ui, -apple-system, sans-serif;
  --font-serif: 'Instrument Serif', Georgia, serif;

  /* Curvas de animación editorial */
  --ease: cubic-bezier(0.83, 0, 0.17, 1);
  --ease-out: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
  background-color: var(--atila-darker);
  color: var(--atila-white);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}
html.lenis, html.lenis body {
  height: auto;
}
.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

/* Velo de transición instantánea al saltar de capítulo (.veil) */
.veil {
  position: fixed;
  inset: 0;
  z-index: 270;
  background: var(--atila-darker);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.38s cubic-bezier(0.16, 1, 0.3, 1), visibility 0s 0.38s;
}
.veil.on {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.14s ease-out;
}
html.is-jump main *,
html.is-jump main *::before,
html.is-jump main *::after {
  transition: none !important;
}

body {
  background-color: var(--atila-darker);
  overflow-x: clip;
  line-height: 1.55;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ==========================================================================
   1. PRELOADER / INTRO ANIMADA (.intro) - Rápido y Alto Contraste
   ========================================================================== */
.intro {
  position: fixed;
  inset: 0;
  z-index: 600;
  background: radial-gradient(circle at 50% 50%, #0D2546 0%, #050C17 75%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transition: opacity 0.45s var(--ease-out), visibility 0.45s;
}
.intro.is-done {
  opacity: 0;
  visibility: hidden;
}
.intro__curves {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.5;
}
.intro__curves path {
  stroke-dasharray: 1 1;
  stroke-dashoffset: 1;
  animation: intro-curve 0.9s var(--ease) forwards;
}
@keyframes intro-curve {
  0% { stroke-dashoffset: 1; }
  100% { stroke-dashoffset: 0; }
}
.intro__logo {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 30px;
  border-radius: 999px;
  background: #ffffff;
  border: 2px solid var(--atila-cyan);
  box-shadow: 0 0 64px rgba(21, 155, 214, 0.7);
  animation: intro-pop 0.65s var(--ease-spring) forwards;
}
.intro__logo img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}
.intro__logo span {
  color: var(--atila-navy);
  font-weight: 900;
  letter-spacing: 0.14em;
  font-size: 15px;
  text-transform: uppercase;
}
@keyframes intro-pop {
  0% { opacity: 0; transform: scale(0.88); }
  100% { opacity: 1; transform: scale(1); }
}

/* ==========================================================================
   2. HEADER SUPERIOR (.top) Y SWITCHER DE LAS 3 ESPECIALIDADES
   ========================================================================== */
.top {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px clamp(18px, 4vw, 52px);
  background: rgba(5, 12, 23, 0.78);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--atila-border-dark);
  transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

html.on-light .top {
  background: rgba(255, 255, 255, 0.94);
  border-bottom-color: rgba(29, 103, 177, 0.18);
  color: var(--atila-ink);
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
}

.top__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
  font-size: 16px;
  letter-spacing: 0.03em;
}
.top__brand-badge {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #ffffff;
  padding: 3px;
  box-shadow: 0 4px 16px rgba(21, 155, 214, 0.38);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}
.top__brand-badge img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
}
.top__brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.top__brand-text small {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--atila-cyan-light);
}
html.on-light .top__brand-text small {
  color: var(--atila-navy);
}

/* Switcher de las 3 Rutas SEO independientes */
.top__routes {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px;
  border-radius: 999px;
  background: rgba(9, 21, 38, 0.92);
  border: 1px solid var(--atila-border-dark);
}
html.on-light .top__routes {
  background: var(--atila-bg-soft);
  border-color: rgba(29, 103, 177, 0.25);
}
.top__route {
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #e2e8f0;
  transition: all 0.25s var(--ease-out);
  white-space: nowrap;
}
html.on-light .top__route {
  color: var(--atila-navy);
}
.top__route:hover {
  color: #ffffff;
  background: rgba(21, 155, 214, 0.22);
}
html.on-light .top__route:hover {
  color: var(--atila-navy);
  background: var(--atila-bg-tint);
}
.top__route.is-active {
  background: linear-gradient(135deg, var(--atila-cyan) 0%, var(--atila-cta) 100%);
  color: #ffffff !important;
  box-shadow: 0 4px 16px rgba(21, 93, 252, 0.4);
}

.top__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ==========================================================================
   3. BOTÓN .pill CON HALO MAGNÉTICO, DESTELLO Y SLOT-MACHINE
   ========================================================================== */
.pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 26px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #ffffff;
  background: linear-gradient(135deg, var(--atila-cyan) 0%, var(--atila-cta) 100%);
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 8px 28px -6px rgba(21, 93, 252, 0.55);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s var(--ease-out), box-shadow 0.35s var(--ease-out), border-color 0.3s;
}
.pill--outline {
  background: rgba(12, 30, 56, 0.65);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(56, 189, 248, 0.48);
  color: #ffffff;
  box-shadow: none;
}
.proof .pill--outline {
  background: #ffffff;
  color: var(--atila-navy);
  border: 2px solid var(--atila-navy);
  box-shadow: 0 4px 12px rgba(29, 103, 177, 0.12);
}
.proof .pill--outline:hover {
  background: var(--atila-navy);
  color: #ffffff;
}
.pill::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.35), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.pill:hover::before {
  opacity: 1;
}
.pill::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -60%;
  width: 45%;
  height: 200%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  transform: rotate(25deg);
  animation: pill-glint 7s infinite;
  pointer-events: none;
}
@keyframes pill-glint {
  0%, 82%, 100% { left: -60%; }
  92% { left: 130%; }
}
.pill:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 0 1px #ffffff, 0 0 22px 2px rgba(21, 155, 214, 0.6), 0 14px 34px -8px rgba(21, 93, 252, 0.75);
}
.pill__slot {
  position: relative;
  display: inline-block;
  overflow: hidden;
  height: 1.25em;
  line-height: 1.25em;
}
.pill__slot b {
  display: block;
  font-weight: 800;
  text-shadow: 0 1.25em 0 currentColor;
  transition: transform 0.42s cubic-bezier(0.65, 0, 0.35, 1);
}
.pill:hover .pill__slot b {
  transform: translateY(-1.25em);
}

/* ==========================================================================
   4. HERO ASIMÉTRICO CON CLIP-PATH REVEAL Y 3 MÉTRICAS (.cover)
   ========================================================================== */
.cover {
  position: relative;
  min-height: 100svh;
  padding: 104px clamp(18px, 4vw, 52px) 44px;
  display: grid;
  grid-template-columns: 60fr 40fr;
  gap: 24px;
  align-items: stretch;
  background:
    radial-gradient(circle at 15% 20%, rgba(21, 155, 214, 0.18), transparent 45%),
    radial-gradient(circle at 85% 75%, rgba(21, 93, 252, 0.16), transparent 50%),
    var(--atila-darker);
}

.cover__stage {
  position: relative;
  border-radius: 26px;
  overflow: hidden;
  border: 1px solid var(--atila-border-dark);
  background: var(--atila-deep);
  min-height: 540px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(28px, 4vw, 52px);
  clip-path: inset(0 0 100% 0 round 26px);
  transition: clip-path 1.1s var(--ease);
}
body.is-in .cover__stage {
  clip-path: inset(0 0 0% 0 round 26px);
}

.cover__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.56;
  transform: scale(1.08);
  transition: transform 2.2s var(--ease-spring), opacity 1s ease;
}
body.is-in .cover__bg {
  transform: scale(1);
}
.cover__stage::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(5, 12, 23, 0.15) 0%, rgba(5, 12, 23, 0.72) 55%, rgba(5, 12, 23, 0.96) 100%);
  pointer-events: none;
}

.cover__content {
  position: relative;
  z-index: 2;
  max-width: 720px;
}

.cover__kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(56, 189, 248, 0.45);
  color: var(--atila-cyan-light);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 18px;
  backdrop-filter: blur(8px);
}
.cover__kicker-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--atila-cyan-light);
  box-shadow: 0 0 10px var(--atila-cyan-light);
}

.cover__h1 {
  font-size: clamp(36px, 5vw, 70px);
  font-weight: 900;
  line-height: 0.96;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.cover__ln {
  display: block;
  overflow: hidden;
}
.cover__ln > span {
  display: block;
  transform: translateY(108%);
  transition: transform 0.95s var(--ease);
}
body.is-in .cover__ln:nth-child(1) > span { transition-delay: 0.15s; transform: translateY(0); }
body.is-in .cover__ln:nth-child(2) > span { transition-delay: 0.27s; transform: translateY(0); }
body.is-in .cover__ln:nth-child(3) > span { transition-delay: 0.39s; transform: translateY(0); }

.cover__highlight {
  background: linear-gradient(90deg, #38BDF8 0%, #159BD6 45%, #60A5FA 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.cover__serif {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--atila-bg-tint);
}

.cover__rule {
  display: block;
  height: 2px;
  width: 110px;
  background: linear-gradient(90deg, var(--atila-cyan), transparent);
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 1s var(--ease) 0.5s;
  margin-bottom: 16px;
}
body.is-in .cover__rule {
  transform: scaleX(1);
}

.cover__sub {
  font-size: clamp(16px, 1.3vw, 18.5px);
  color: rgba(248, 250, 252, 0.9);
  max-width: 60ch;
}

.cover__side {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 22px;
  padding: clamp(26px, 3.2vw, 42px);
  border-radius: 26px;
  background: linear-gradient(165deg, rgba(15, 33, 62, 0.9) 0%, rgba(7, 17, 33, 0.98) 100%);
  border: 1px solid var(--atila-border-dark);
  clip-path: inset(0 0 100% 0 round 26px);
  transition: clip-path 1.1s var(--ease) 0.1s;
}
body.is-in .cover__side {
  clip-path: inset(0 0 0% 0 round 26px);
}

.cover__rating {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  width: fit-content;
}
.cover__stars {
  color: var(--atila-star);
  letter-spacing: 2px;
  font-size: 16px;
}
.cover__rating strong {
  font-size: 16px;
  color: #ffffff;
}
.cover__rating span {
  font-size: 13px;
  color: var(--atila-cyan-light);
  text-decoration: underline;
}

.cover__bio {
  font-size: 15.5px;
  color: rgba(241, 245, 249, 0.86);
  line-height: 1.65;
}
.cover__bio strong {
  color: #ffffff;
}

.cover__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.cover__facts {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid rgba(56, 189, 248, 0.18);
}
.cover__facts li {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.65s ease, transform 0.65s var(--ease-out);
}
body.is-in .cover__facts li:nth-child(1) { transition-delay: 0.55s; opacity: 1; transform: translateY(0); }
body.is-in .cover__facts li:nth-child(2) { transition-delay: 0.67s; opacity: 1; transform: translateY(0); }
body.is-in .cover__facts li:nth-child(3) { transition-delay: 0.79s; opacity: 1; transform: translateY(0); }

.cover__num {
  display: block;
  font-size: clamp(22px, 2.3vw, 32px);
  font-weight: 900;
  color: var(--atila-cyan-light);
  line-height: 1.05;
  margin-bottom: 4px;
}
.cover__label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(241, 245, 249, 0.7);
}

/* ==========================================================================
   5. TARJETAS DE ESPECIALIDADES / HUB DE 3 RUTAS (.srv) - Sin colisión de texto
   ========================================================================== */
.section {
  padding: clamp(64px, 8vw, 112px) clamp(18px, 4vw, 52px);
  position: relative;
}
.section__head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 48px;
}
.section__kicker {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--atila-cyan-light);
  margin-bottom: 10px;
}
.section__title {
  font-size: clamp(30px, 4vw, 54px);
  font-weight: 900;
  line-height: 1.04;
  letter-spacing: -0.02em;
}
.section__title em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--atila-cyan-light);
}
.section__lead {
  max-width: 48ch;
  color: rgba(241, 245, 249, 0.78);
  font-size: 16px;
}

.srv__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 24px;
}
.srv__card {
  position: relative;
  min-height: 440px;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--atila-border-dark);
  background: var(--atila-deep);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 30px;
}
.srv__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.65;
  transition: transform 1.1s var(--ease-out), opacity 0.45s ease, filter 0.45s ease;
}
.srv__card:hover .srv__img,
.srv__card:focus-within .srv__img {
  transform: scale(1.08);
  opacity: 0.22;
  filter: blur(4px);
}
.srv__card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(5, 12, 23, 0.12) 0%, rgba(5, 12, 23, 0.85) 68%, rgba(5, 12, 23, 0.98) 100%);
  z-index: 1;
}

.srv__num {
  position: absolute;
  top: 22px;
  left: 26px;
  z-index: 4;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 30px;
  color: var(--atila-cyan-light);
}
.srv__badge {
  position: absolute;
  top: 24px;
  right: 24px;
  z-index: 4;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: rgba(9, 21, 38, 0.82);
  border: 1px solid rgba(56, 189, 248, 0.5);
  color: #ffffff;
  backdrop-filter: blur(8px);
}

.srv__base {
  position: relative;
  z-index: 2;
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
}
.srv__card:hover .srv__base,
.srv__card:focus-within .srv__base {
  opacity: 0;
  visibility: hidden;
  transform: translateY(-14px);
  pointer-events: none;
}
.srv__h {
  font-size: 25px;
  font-weight: 900;
  margin-bottom: 8px;
  color: #ffffff;
}
.srv__more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--atila-cyan-light);
}

/* Overlay Glassmorphism en Hover (.srv__fly) - Opaco y súper legible */
.srv__fly {
  position: absolute;
  inset: 0;
  z-index: 3;
  padding: 74px 28px 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: linear-gradient(180deg, rgba(8, 22, 44, 0.94) 0%, rgba(5, 12, 23, 0.98) 60%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: opacity 0.32s var(--ease-out), transform 0.32s var(--ease-out), visibility 0.32s;
}
.srv__card:hover .srv__fly,
.srv__card:focus-within .srv__fly {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.srv__desc {
  font-size: 14.5px;
  color: rgba(241, 245, 249, 0.92);
  margin-bottom: 14px;
}
.srv__list {
  list-style: none;
  margin-bottom: 18px;
}
.srv__list li {
  position: relative;
  padding-left: 16px;
  font-size: 14px;
  color: var(--atila-bg-tint);
  margin-bottom: 7px;
}
.srv__list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--atila-cyan-light);
  font-weight: 900;
}

/* ==========================================================================
   6. SECCIÓN "ANTES Y DESPUÉS" PINNED EN SCROLL CON DOBLE IRIS Y DECK (.proof & .cmp)
   ========================================================================== */
.proof {
  position: relative;
  background: var(--atila-darker);
  color: var(--atila-ink);
  z-index: 1;
}
.proof__pin {
  position: relative;
  padding: clamp(72px, 9vw, 120px) clamp(18px, 4vw, 52px);
  background: var(--atila-bg-soft);
}
.proof__iris {
  display: none;
}

/* Barra divisoria vertical animada de ida y vuelta (scaleY) */
.proof__text {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding-right: 28px;
  border-right: none;
}
.proof__text::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--atila-cyan), var(--atila-navy));
  transform-origin: top;
  transform: scaleY(var(--bar-s, 0));
  transition: transform 0.85s var(--ease);
}
.proof.in .proof__text::after {
  --bar-s: 1;
}

/* Líneas curvas SVG luminosas que se dibujan de ida y vuelta con el scroll (.scroll-lines) */
.scroll-lines {
  --l1: 0;
  --l2: 0;
  position: relative;
  width: 100%;
  height: clamp(70px, 11vh, 120px);
  margin: -20px 0;
  overflow: visible;
  pointer-events: none;
  z-index: 2;
}
.scroll-lines svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}
.scroll-lines path {
  fill: none;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 1 1;
}
.scroll-lines__p1 {
  stroke: var(--atila-cyan-light);
  stroke-width: 1.8;
  stroke-dashoffset: calc(1 - var(--l1));
  filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.55));
}
.scroll-lines__p2 {
  stroke: var(--atila-cta);
  stroke-width: 1.3;
  opacity: 0.7;
  stroke-dashoffset: calc(1 - var(--l2));
}

/* Modo Pinned en Desktop (>=1024px) activado por GSAP ScrollTrigger (.is-live) */
@media (min-width: 1024px) {
  .proof.is-live {
    height: 380vh;
  }
  .proof.is-live:has(.proof__card--c) {
    height: 480vh;
  }
  .proof.is-live .proof__pin {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
    padding: 0;
    background: var(--atila-darker);
    display: flex;
    align-items: center;
  }
  .proof.is-live .proof__panel {
    width: 100%;
    height: 100%;
    max-width: none;
    padding: 96px clamp(32px, 5vw, 72px) 76px;
    background: var(--atila-bg-soft);
    clip-path: circle(0% at 50% 55%);
    will-change: clip-path;
  }
  .proof.is-live .proof__iris {
    display: block;
    position: absolute;
    inset: 0;
    z-index: 250;
    background: var(--atila-darker);
    pointer-events: none;
    clip-path: circle(0% at 50% 50%);
    will-change: clip-path;
  }
  .proof.is-live .proof__track {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 3 / 2;
    max-height: 470px;
  }
  .proof.is-live .proof__card {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    will-change: transform, opacity;
  }
  .proof.is-live .proof__card[hidden] {
    display: block !important;
  }
}

.proof__panel {
  max-width: 1360px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 38fr 62fr;
  gap: clamp(28px, 4vw, 52px);
  align-items: center;
}

.proof__text {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding-right: 24px;
  border-right: 2px solid rgba(29, 103, 177, 0.22);
}

.proof__kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--atila-navy);
}

.proof__h {
  font-size: clamp(32px, 4vw, 54px);
  font-weight: 900;
  line-height: 0.98;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--atila-ink);
}
.proof__shine {
  background: linear-gradient(90deg, var(--atila-navy) 0%, var(--atila-cyan) 50%, var(--atila-cta) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: proof-shine 4s linear infinite;
}
@keyframes proof-shine {
  to { background-position: 200% center; }
}

.proof__place {
  font-size: 15.5px;
  color: #334155;
  line-height: 1.65;
}
.proof__place b {
  color: var(--atila-navy);
}

.proof__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.proof__images {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.proof__hint {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--atila-navy);
}
.proof__tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.proof__tab {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid rgba(29, 103, 177, 0.35);
  background: #ffffff;
  color: var(--atila-navy);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.25s ease;
}
.proof__tab:hover {
  background: var(--atila-bg-tint);
}
.proof__tab.is-active {
  background: var(--atila-cta);
  color: #ffffff;
  border-color: var(--atila-cta);
  box-shadow: 0 4px 14px rgba(21, 93, 252, 0.35);
}

.proof__track {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

/* Componente Comparador Antes y Después (.cmp) con 2 fotografías reales distintas */
.cmp {
  position: relative;
  aspect-ratio: 3 / 2;
  max-height: 500px;
  width: 100%;
  overflow: hidden;
  border-radius: 22px;
  box-shadow: 0 24px 50px -12px rgba(15, 23, 42, 0.25);
  border: 3px solid #ffffff;
  touch-action: pan-y;
  -webkit-user-select: none;
  user-select: none;
  background: #1e293b;
  --x: 50%;
}
.cmp[hidden] {
  display: none !important;
}
.cmp img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.cmp__before {
  clip-path: inset(0 calc(100% - var(--x)) 0 0);
  z-index: 1;
}

.cmp__line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--x);
  width: 2px;
  background: #ffffff;
  box-shadow: 0 0 12px rgba(21, 93, 252, 0.85);
  z-index: 2;
  pointer-events: none;
}
.cmp__line::after {
  content: "‹ ›";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 48px;
  height: 48px;
  translate: -50% -50%;
  border-radius: 50%;
  border: 2px solid #ffffff;
  background: rgba(21, 93, 252, 0.88);
  color: #ffffff;
  font-weight: 900;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.cmp__tag {
  position: absolute;
  top: 16px;
  z-index: 2;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 8px 15px;
  border-radius: 999px;
  background: #ffffff;
  color: var(--atila-ink);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
  pointer-events: none;
}
.cmp__tag--a { left: 16px; }
.cmp__tag--b {
  right: 16px;
  background: var(--atila-cta);
  color: #ffffff;
}

.cmp__range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
  z-index: 4;
  touch-action: pan-y;
}
.cmp:has(.cmp__range:focus-visible) {
  outline: 3px solid var(--atila-cta);
  outline-offset: 4px;
}

.cmp figcaption {
  position: absolute;
  left: 16px;
  bottom: 16px;
  z-index: 2;
  padding: 9px 15px;
  border-radius: 12px;
  background: rgba(5, 12, 23, 0.84);
  backdrop-filter: blur(8px);
  color: #ffffff;
  font-size: 13px;
  pointer-events: none;
}
.cmp figcaption b {
  color: var(--atila-cyan-light);
}

/* Cursor circular magnético en Desktop */
.cmp__cursor {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 3;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 96px;
  height: 96px;
  margin: -48px 0 0 -48px;
  border-radius: 50%;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.96);
  color: var(--atila-navy);
  border: 2px solid var(--atila-cyan);
  box-shadow: 0 10px 30px rgba(21, 93, 252, 0.35);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  translate: var(--cx, 0px) var(--cy, 0px);
  scale: var(--cs, 0);
  transition: scale 0.32s var(--ease-out);
}
.cmp__cursor i {
  font-weight: 400;
  font-size: 17px;
  font-style: normal;
  color: var(--atila-cta);
}

@media (hover: hover) and (pointer: fine) {
  .cmp__cursor { display: flex; }
  .cmp, .cmp__range { cursor: none; }
  .cmp.is-hover .cmp__cursor {
    --cs: 1;
    transition-duration: 0.18s;
  }
  .cmp.is-hover .cmp__line::after {
    opacity: 0;
    transform: scale(0.5);
  }
}

/* ==========================================================================
   7. ACORDEÓN HORIZONTAL DE 5 PANELES (.equip__rack)
   ========================================================================== */
.equip__rack {
  display: flex;
  gap: 14px;
  height: 430px;
}
.equip__item {
  position: relative;
  flex: 1 1 0%;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--atila-border-dark);
  background: var(--atila-deep);
  cursor: pointer;
  transition: flex-grow 0.55s var(--ease-out), border-color 0.35s ease;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
}
.equip__item.is-on {
  flex-grow: 3.6;
  border-color: var(--atila-cyan);
  box-shadow: 0 16px 40px -10px rgba(21, 155, 214, 0.25);
}
.equip__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.45);
  transform: scale(1.06);
  transition: filter 0.55s ease, transform 0.55s var(--ease-out);
}
.equip__item.is-on .equip__bg {
  filter: brightness(0.75);
  transform: scale(1);
}
.equip__item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(5, 12, 23, 0.15) 10%, rgba(5, 12, 23, 0.94) 100%);
  pointer-events: none;
}
.equip__idx {
  position: absolute;
  top: 20px;
  left: 22px;
  z-index: 2;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 26px;
  color: var(--atila-cyan-light);
}
.equip__meta {
  position: relative;
  z-index: 2;
}
.equip__title {
  font-size: 20px;
  font-weight: 900;
  margin-bottom: 6px;
  color: #ffffff;
}
.equip__desc {
  font-size: 14px;
  color: rgba(241, 245, 249, 0.88);
  max-width: 44ch;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transform: translateY(10px);
  transition: opacity 0.35s ease, transform 0.35s var(--ease-out), max-height 0.35s ease;
}
.equip__item.is-on .equip__desc {
  opacity: 1;
  max-height: 140px;
  transform: translateY(0);
}

/* ==========================================================================
   8. CARRUSEL DE RESEÑAS DE GOOGLE CON BARRAS DE 7S (.voices)
   ========================================================================== */
.voices {
  background: linear-gradient(180deg, var(--atila-darker) 0%, #091931 100%);
  border-top: 1px solid var(--atila-border-dark);
  border-bottom: 1px solid var(--atila-border-dark);
}
.voices__box {
  max-width: 960px;
  margin: 0 auto;
  padding: clamp(28px, 4vw, 48px);
  border-radius: 26px;
  background: rgba(12, 30, 56, 0.65);
  border: 1px solid var(--atila-border-dark);
  position: relative;
}
.voices__bars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 28px;
}
.voices__bar {
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  overflow: hidden;
  cursor: pointer;
  border: none;
  padding: 0;
}
.voices__bar-fill {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--atila-cyan), var(--atila-cta));
  transition: width 0.1s linear;
}
.voices__bar.is-active .voices__bar-fill {
  width: var(--p, 0%);
}
.voices__bar.is-done .voices__bar-fill {
  width: 100%;
}
.voices__slide {
  display: none;
  animation: fade-slide 0.45s var(--ease-out);
}
.voices__slide.is-active {
  display: block;
}
@keyframes fade-slide {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.voices__stars {
  color: var(--atila-star);
  font-size: 18px;
  letter-spacing: 3px;
  margin-bottom: 14px;
}
.voices__quote {
  font-size: clamp(18px, 2.2vw, 26px);
  font-weight: 400;
  line-height: 1.48;
  color: #ffffff;
  margin-bottom: 20px;
}
.voices__author {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  color: var(--atila-cyan-light);
  font-weight: 700;
}

/* ==========================================================================
   9. CIERRE / CONTACTO CON RAYOS LUMINOSOS (.end) Y BARRA DE CAPÍTULOS (#chap)
   ========================================================================== */
.end {
  position: relative;
  padding: clamp(72px, 9vw, 120px) clamp(18px, 4vw, 52px) 120px;
  text-align: center;
  background: radial-gradient(circle at 50% 0%, rgba(21, 155, 214, 0.22), transparent 60%), var(--atila-darker);
  overflow: hidden;
}
.end__h {
  font-size: clamp(36px, 5.8vw, 80px);
  font-weight: 900;
  line-height: 0.95;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, #ffffff 0%, #38BDF8 50%, #155DFC 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 18px;
}
.end__sub {
  max-width: 56ch;
  margin: 0 auto 32px;
  color: rgba(241, 245, 249, 0.8);
  font-size: 17px;
}
.end__cta-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-bottom: 56px;
}
.end__ray {
  flex: 1;
  max-width: 240px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--atila-cyan), transparent);
  position: relative;
  overflow: hidden;
}
.end__ray::after {
  content: "";
  position: absolute;
  top: 0;
  left: -30%;
  width: 30%;
  height: 100%;
  background: #ffffff;
  box-shadow: 0 0 12px #ffffff;
  animation: ray-spark 3.5s infinite ease-in-out;
}
@keyframes ray-spark {
  0% { left: -30%; }
  100% { left: 130%; }
}

.end__grid {
  max-width: 1200px;
  margin: 0 auto 36px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  text-align: left;
}
.end__card {
  padding: 24px;
  border-radius: 18px;
  background: rgba(12, 30, 56, 0.55);
  border: 1px solid var(--atila-border-dark);
}
.end__card small {
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--atila-cyan-light);
  margin-bottom: 8px;
}
.end__card strong, .end__card a {
  font-size: 16px;
  color: #ffffff;
  font-weight: 700;
}

/* Bloque de Mapa Interactivo en el Cierre / Contacto (.end__map) */
.end__map-wrap {
  max-width: 1200px;
  margin: 0 auto 40px;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--atila-border-dark);
  background: rgba(12, 30, 56, 0.55);
  box-shadow: 0 20px 45px -15px rgba(0, 0, 0, 0.55);
}
.end__map-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--atila-border-dark);
  text-align: left;
}
.end__map-info {
  display: flex;
  align-items: center;
  gap: 12px;
}
.end__map-pin {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(21, 155, 214, 0.18);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: var(--atila-cyan-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.end__map-pin svg {
  width: 20px;
  height: 20px;
}
.end__map-info div small {
  display: block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--atila-cyan-light);
}
.end__map-info div strong {
  font-size: 15px;
  color: #ffffff;
}
.end__map-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(21, 93, 252, 0.22);
  border: 1px solid rgba(56, 189, 248, 0.4);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #ffffff;
  transition: all 0.25s ease;
}
.end__map-link:hover {
  background: var(--atila-cta);
  border-color: #ffffff;
}
.end__map {
  width: 100%;
  height: 360px;
  background: #091526;
}
.end__map iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* Barra inferior editorial de capítulos (#chap) — Idéntica a drleonardofigueroa.com con colores Atila */
.chap {
  position: fixed;
  left: clamp(20px, 4vw, 52px);
  right: clamp(20px, 4vw, 52px);
  bottom: 18px;
  z-index: 280;
  display: flex;
  gap: clamp(12px, 1.4vw, 26px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s var(--ease);
}
.chap.show {
  opacity: 1;
  pointer-events: auto;
}
.chap::before {
  content: "";
  position: fixed;
  inset: auto 0 0;
  height: clamp(86px, 13vh, 140px);
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(rgba(5, 12, 23, 0), rgba(5, 12, 23, 0.88));
  transition: opacity 0.35s ease;
}
html.on-light .chap::before {
  opacity: 0;
}
.chap a {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  padding: 0 0 10px;
  color: rgba(241, 245, 249, 0.52);
  text-decoration: none;
  white-space: nowrap;
  font-size: clamp(11px, 0.78vw, 14px);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: flex-grow 1s var(--ease), color 0.6s var(--ease);
}
.chap a span {
  display: block;
  overflow: hidden;
  padding-right: 18px;
}
/* Cuadrado indicador derecho de cada capítulo */
.chap a::after {
  content: "";
  position: absolute;
  right: 0;
  top: calc(0.68em - 4px);
  width: 8px;
  height: 8px;
  background: rgba(241, 245, 249, 0.32);
  transition: background 0.6s var(--ease), box-shadow 0.6s var(--ease);
}
/* Línea inferior y barra de progreso interna (--p) */
.chap a i {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: rgba(241, 245, 249, 0.22);
}
.chap a i::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.5px;
  height: 2.5px;
  background: linear-gradient(90deg, var(--atila-cyan-light), var(--atila-cta));
  transform: scaleX(var(--p, 0));
  transform-origin: left;
}
.chap a.on,
.chap a.is-on {
  flex-grow: 4;
  color: #ffffff;
}
.chap a.on::after,
.chap a.is-on::after {
  background: transparent;
  box-shadow: inset 0 0 0 1.5px var(--atila-cyan-light);
}
.chap a:hover {
  color: #ffffff;
}

/* Inversión de colores de #chap cuando está sobre la sección clara .proof */
html.on-light .chap a {
  color: rgba(15, 23, 42, 0.58);
}
html.on-light .chap a.on,
html.on-light .chap a.is-on,
html.on-light .chap a:hover {
  color: var(--atila-navy);
}
html.on-light .chap a::after {
  background: rgba(29, 103, 177, 0.28);
}
html.on-light .chap a.on::after,
html.on-light .chap a.is-on::after {
  background: transparent;
  box-shadow: inset 0 0 0 1.5px var(--atila-navy);
}
html.on-light .chap a i {
  background: rgba(29, 103, 177, 0.22);
}

@media (max-width: 760px), (max-width: 1100px) and (orientation: portrait) {
  .chap { gap: 8px; }
  .chap a { flex-grow: 0.4; }
  .chap a.on, .chap a.is-on { flex-grow: 8; }
  .chap a:not(.on):not(.is-on) span { visibility: hidden; }
}

/* Toggle discreto para ver Ficha Técnica SEO de la POC */
.seo-toggle {
  max-width: 1200px;
  margin: 0 auto;
  text-align: left;
}
.seo-toggle summary {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(21, 155, 214, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--atila-cyan-light);
  list-style: none;
}
.seo-toggle summary::-webkit-details-marker {
  display: none;
}
.seo-badge {
  margin-top: 14px;
  padding: 20px 26px;
  border-radius: 18px;
  background: rgba(12, 30, 56, 0.72);
  border: 1px dashed rgba(56, 189, 248, 0.45);
  text-align: left;
  font-size: 13px;
  color: rgba(241, 245, 249, 0.9);
}
.seo-badge__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}
.seo-badge code {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 12px;
  color: #38BDF8;
  background: rgba(5, 12, 23, 0.65);
  padding: 2px 6px;
  border-radius: 6px;
}

/* Responsivo */
@media (max-width: 1024px) {
  .cover { grid-template-columns: 1fr; }
  .proof__panel { grid-template-columns: 1fr; }
  .proof__text { border-right: none; border-bottom: 1px solid rgba(29, 103, 177, 0.22); padding-right: 0; padding-bottom: 24px; }
  .equip__rack { flex-direction: column; height: auto; }
  .equip__item { min-height: 190px; }
  .top__routes { display: none; }
}
