/* ==========================================================
   SISTEMA DE DISEÑO / BEM / WPO
   Proyecto: Nova Studio JH
========================================================== */

/* 0. FONT METRIC OVERRIDE — FOUT/CLS ZERO
----------------------------------------------------------
   Fuente puente calibrada matemáticamente para que Arial
   ocupe exactamente el mismo espacio métrico que Inter.
   Valores derivados de análisis de fuente Inter v18:
     UPM:         2048
     Ascender:    1984  → ascent-override:  1984/2048 = 96.875% (ajustado con size-adjust)
     Descender:  -492   → descent-override: 492/2048  = 24.023% (ajustado con size-adjust)
     Line Gap:    0     → line-gap-override: 0%
     size-adjust: 107.40% (escala Arial para igualar el x-height de Inter)
   Resultado: CLS tipográfico = 0.00
---------------------------------------------------------- */
@font-face {
  font-family: 'Inter-fallback';
  src: local('Arial'), local('Helvetica Neue'), local('Helvetica'), local('sans-serif');
  ascent-override: 90.20%;
  descent-override: 22.48%;
  line-gap-override: 0%;
  size-adjust: 107.40%;
}

/* 1. VARIABLES GLOBALES (:root)
---------------------------------------------------------- */
:root {
  /* Paleta cromática corporativa */
  --color-base-white: #ffffff;
  --color-base-light: #f8f9fa;
  /* Gris ultra suave para fondos divisorios */
  --color-base-gray: #e9ecef;

  --color-text-main: #09090b;
  /* Negro profundo para jerarquía principal */
  --color-text-muted: #52525b;
  /* Gris plomo para textos descriptivos */

  --color-accent-dark: #0f172a;
  /* Azul oscuro premium corporativo */
  --color-accent-hover: #1e293b;
  --color-border: #e4e4e7;

  /* Tipografía fluida y robusta */
  --font-sans: 'Inter', 'Inter-fallback', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Sistema de espaciado modular */
  --space-2xs: 0.25rem;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 6rem;
  --space-2xl: 8rem;

  /* Geometría y Profundidad */
  --radius-sm: 0.5rem;
  --radius-md: 1rem;
  --radius-lg: 1.5rem;

  --shadow-base: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-hover: 0 15px 35px -5px rgba(0, 0, 0, 0.08);
  /* Sombra elegante, no agresiva */

  /* Micro-interacciones de alto rendimiento */
  --ease-out: 300ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* 2. RESET TÉCNICO
---------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--color-base-white);
  color: var(--color-text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

/* 3. LAYOUT BASE
---------------------------------------------------------- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-sm);
}

@media (min-width: 768px) {
  .container {
    padding: 0 var(--space-md);
  }
}

.section {
  padding: var(--space-xl) 0;
}

.section--dark {
  background-color: var(--color-accent-dark);
  color: var(--color-base-white);
}

/* 4. COMPONENTES: BOTONES
---------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 1.75rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  border: border-box;
  cursor: pointer;
  transition: transform var(--ease-out), opacity var(--ease-out);
  /* WPO: Forzar aceleración por hardware exclusivamente en variables transformadas */
  will-change: transform, opacity;
}

.btn--primary {
  background-color: var(--color-accent-dark);
  color: var(--color-base-white);
  border: 1px solid transparent;
}

.btn--primary:hover {
  background-color: var(--color-accent-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.btn--secondary {
  background-color: var(--color-base-white);
  color: var(--color-text-main);
  border: 1px solid var(--color-border);
}

.btn--secondary:hover {
  background-color: var(--color-base-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-base);
}

.btn--light {
  background-color: var(--color-base-white);
  color: var(--color-accent-dark);
}

.btn--light:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

/* 5. BLOQUES ESTRUCTURALES (BEM)
---------------------------------------------------------- */

/* Header */
.header {
  padding: var(--space-sm) 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header__logo {
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.03em;
  z-index: 101;
  position: relative;
}

.header__toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 101;
  position: relative;
}

.header__toggle-icon,
.header__toggle-icon::before,
.header__toggle-icon::after {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--color-text-main);
  transition: transform 0.3s var(--ease-out), opacity 0.3s;
  will-change: transform, opacity;
}

.header__toggle-icon {
  position: relative;
}

.header__toggle-icon::before,
.header__toggle-icon::after {
  content: '';
  position: absolute;
  left: 0;
}

.header__toggle-icon::before {
  top: -8px;
}

.header__toggle-icon::after {
  bottom: -8px;
}

.header__toggle[aria-expanded="true"] .header__toggle-icon {
  background-color: transparent;
}

.header__toggle[aria-expanded="true"] .header__toggle-icon::before {
  transform: translateY(8px) rotate(45deg);
}

.header__toggle[aria-expanded="true"] .header__toggle-icon::after {
  transform: translateY(-8px) rotate(-45deg);
}

.header__nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: var(--color-base-white);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: var(--space-lg);
  transform: translateY(-100%);
  opacity: 0;
  transition: transform 0.4s var(--ease-out), opacity 0.4s var(--ease-out);
  will-change: transform, opacity;
  z-index: 100;
  pointer-events: none;
}

.header__nav--is-active {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* Hide header CTA in mobile inside nav if needed, but original keeps it in header.
   Using CSS Grid/Flex in header makes it easier to manage. 
   We hide the primary header CTA on mobile to fit the burger. */
.header__cta {
  display: none;
}

@media (min-width: 768px) {
  .header__toggle {
    display: none;
  }

  .header__nav {
    position: static;
    height: auto;
    width: auto;
    flex-direction: row;
    background-color: transparent;
    transform: none;
    opacity: 1;
    pointer-events: auto;
    transition: none;
    z-index: auto;
    gap: var(--space-md);
  }

  .header__cta {
    display: block;
  }

  .header__link {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text-muted);
    transition: opacity var(--ease-out);
  }

  .header__link:hover {
    color: var(--color-text-main);
  }
}

/* =========================================
   13. VIDEO PLAYER LAZY LOAD
   ========================================= */
.video-wrapper {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
  aspect-ratio: 16/9;
  background-color: #0a0a0a;
  background-size: cover;
  background-position: center;
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  border: 1px solid var(--color-border);
}

.btn-play {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: transform var(--ease-out), opacity var(--ease-out);
  will-change: transform, opacity;
}

.video-wrapper:hover .btn-play {
  transform: scale(1.05);
  background: rgba(0, 0, 0, 0.8);
}

/* Hero Section */
.hero {
  padding: calc(var(--space-2xl) * 1.2) 0 var(--space-xl);
  text-align: center;
}

.hero__title {
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.04em;
  max-width: 950px;
  margin: 0 auto var(--space-md);
}

.hero__subtitle {
  font-size: clamp(1.1rem, 2vw, 1.25rem);
  color: var(--color-text-muted);
  max-width: 750px;
  margin: 0 auto var(--space-lg);
  line-height: 1.6;
}

.hero__actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  justify-content: center;
}

@media (min-width: 640px) {
  .hero__actions {
    flex-direction: row;
  }
}

/* Problema */
.problem {
  background-color: var(--color-base-light);
  text-align: center;
}

.problem__title {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 700;
  margin-bottom: var(--space-md);
  letter-spacing: -0.02em;
}

.problem__text {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--color-text-muted);
  max-width: 800px;
  margin: 0 auto;
}

/* Servicios (Bento Grid Asimétrico con CSS Grid) */
.services__header {
  margin-bottom: var(--space-lg);
}

.services__title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.services__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-sm);
}

/* Transición fluida a Bento Grid en resoluciones mayores */
@media (min-width: 860px) {
  .services__grid {
    grid-template-columns: repeat(3, 1fr);
    /* Mantener alturas uniformes fluidas */
    grid-auto-rows: minmax(300px, auto);
    gap: var(--space-md);
  }

  .service-card--large {
    grid-column: span 2;
  }
}

.service-card {
  background-color: var(--color-base-light);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  border: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  transition: transform var(--ease-out), opacity var(--ease-out);
  will-change: transform, opacity;
}

.service-card:hover {
  transform: translateY(-5px);
  background-color: var(--color-base-white);
  box-shadow: var(--shadow-hover);
}

.service-card__header-flex {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--space-md);
}

.service-card__icon {
  font-size: 2.5rem;
}

.service-card__micro {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.2rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.7rem;
}

.micro-tag {
  color: #64748b;
  /* gris sobrio */
  font-weight: 600;
  letter-spacing: -0.02em;
}

.micro-metric {
  color: #14532d;
  /* verde oscuro sobrio */
  font-weight: 700;
  background-color: rgba(20, 83, 45, 0.05);
  padding: 0.1rem 0.3rem;
  border-radius: 2px;
}

.service-card__title {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-xs);
}

.service-card--large .service-card__title {
  font-size: 1.5rem;
}

.service-card__desc {
  color: var(--color-text-muted);
  margin-top: auto;
  line-height: 1.5;
}

/* Diferencial (Manifiesto) */
.differential {
  text-align: center;
}

.differential__title {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 800;
  margin-bottom: var(--space-md);
  letter-spacing: -0.03em;
}

.differential__text {
  font-size: clamp(1.1rem, 2vw, 1.25rem);
  opacity: 0.9;
  max-width: 850px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Proceso (Flexbox y Grid) */
.process__header {
  text-align: center;
  margin-bottom: var(--space-lg);
}

.process__title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.process__list {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}

@media (min-width: 1024px) {
  .process__list {
    grid-template-columns: repeat(4, 1fr);
  }
}

.process-item {
  padding: var(--space-md);
  background: var(--color-base-white);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}

.process-item__number {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-accent-dark);
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: var(--color-base-light);
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-sm);
}

.process-item__title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: var(--space-xs);
}

.process-item__desc {
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

/* Casos de Estudio */
.cases {
  background-color: var(--color-base-light);
}

.cases__header {
  margin-bottom: var(--space-lg);
}

.cases__title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.cases__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}

@media (min-width: 768px) {
  .cases__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.case-card {
  background-color: var(--color-base-white);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  border: 1px solid var(--color-border);
  transition: transform var(--ease-out), opacity var(--ease-out);
  will-change: transform, opacity;
}

.case-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.case-card__header {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--color-base-gray);
  padding-bottom: var(--space-sm);
  margin-bottom: var(--space-md);
}

.case-card__name {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.case-card__tag {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--color-text-main);
  background: var(--color-base-gray);
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
}

.case-attr {
  margin-bottom: var(--space-sm);
}

.case-attr:last-child {
  margin-bottom: 0;
}

.case-attr__label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  font-weight: 700;
  margin-bottom: 0.2rem;
  display: block;
}

.case-attr__value {
  font-size: 0.95rem;
  color: var(--color-text-main);
}

.case-attr__value--highlight {
  color: var(--color-accent-dark);
  font-weight: 800;
  font-size: 1.15rem;
  margin-top: 0.25rem;
}

/* CTA Final */
.cta-final {
  padding: var(--space-xl) 0;
  text-align: center;
}

.cta-final__title {
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-lg);
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

/* Footer */
.footer {
  background-color: var(--color-base-white);
  padding: var(--space-xl) 0 var(--space-md);
  border-top: 1px solid var(--color-border);
}

.footer__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
  text-align: left;
}

@media (min-width: 768px) {
  .footer__inner {
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--space-lg);
  }
}

.footer__logo {
  margin-bottom: var(--space-xs);
}

.footer__slogan {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.footer__title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-text-main);
  margin-bottom: var(--space-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer__list {
  list-style: none;
  padding: 0;
}

.footer__item {
  margin-bottom: var(--space-xs);
}

.footer__link {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  transition: transform var(--ease-out), opacity var(--ease-out);
}

.footer__link:hover {
  color: var(--color-text-main);
}

.footer__copy {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  border-top: 1px solid var(--color-border);
  padding-top: var(--space-sm);
  margin-top: var(--space-lg);
  text-align: center;
}

/* 6. ANIMACIONES WPO (Intersection Observer)
---------------------------------------------------------- */
.service-card,
.process-item,
.case-card {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.service-card.is-visible,
.process-item.is-visible,
.case-card.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger Effect (Retraso en Cascada para Alta Retención Visual) */
.services__grid> :nth-child(1),
.process__list> :nth-child(1),
.cases__grid> :nth-child(1) {
  transition-delay: 50ms;
}

.services__grid> :nth-child(2),
.process__list> :nth-child(2),
.cases__grid> :nth-child(2) {
  transition-delay: 150ms;
}

.services__grid> :nth-child(3),
.process__list> :nth-child(3),
.cases__grid> :nth-child(3) {
  transition-delay: 250ms;
}

.services__grid> :nth-child(4),
.process__list> :nth-child(4),
.cases__grid> :nth-child(4) {
  transition-delay: 350ms;
}

/* 7. FORMULARIO HIGH-END APLICANDO BEM
---------------------------------------------------------- */
.container--narrow {
  max-width: 700px;
}

.cta-final__header {
  margin-bottom: var(--space-xl);
}

.cta-final__subtitle {
  font-size: 1.1rem;
  color: #a1a1aa;
  /* Muted light gray */
  margin-top: var(--space-sm);
}

.form {
  text-align: left;
  background-color: var(--color-accent-hover);
  padding: var(--space-md);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

@media (min-width: 768px) {
  .form {
    padding: var(--space-lg);
  }
}

.form__group {
  margin-bottom: var(--space-md);
}

.form__label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #e4e4e7;
  margin-bottom: var(--space-xs);
}

.form__input {
  width: 100%;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.15);
  background-color: rgba(0, 0, 0, 0.2);
  color: var(--color-base-white);
  font-family: inherit;
  font-size: 1rem;
  transition: opacity var(--ease-out), transform var(--ease-out);
  will-change: transform, opacity;
}

.form__input::placeholder {
  color: #71717a;
}

.form__input:focus {
  outline: none;
  border-color: var(--color-base-white);
  background-color: rgba(0, 0, 0, 0.3);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1);
}

.form__input--textarea {
  resize: vertical;
  min-height: 120px;
}

.form__input--select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2371717a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1.2rem;
  padding-right: 2.5rem;
}

.form__radio-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.form__radio-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--color-base-white);
  font-size: 0.95rem;
  cursor: pointer;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-sm);
  background-color: rgba(0, 0, 0, 0.2);
  transition: transform var(--ease-out), opacity var(--ease-out);
  will-change: transform, opacity;
}

.form__radio-label:hover {
  background-color: rgba(0, 0, 0, 0.3);
  border-color: rgba(255, 255, 255, 0.3);
}

.form__radio-label input[type="radio"] {
  accent-color: var(--color-base-white);
  width: 1.1rem;
  height: 1.1rem;
}

.form__step-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-base-white);
  margin-bottom: var(--space-md);
  letter-spacing: -0.01em;
}

.multi-step-wrapper {
  position: relative;
}

.progress-bar-container {
  width: 100%;
  height: 4px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  margin-bottom: var(--space-lg);
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background-color: #3b82f6;
  /* azul oscuro / vibrante para progreso corporativo */
  transition: transform 0.4s var(--ease-out), opacity 0.4s var(--ease-out);
}

.form__actions {
  margin-top: var(--space-lg);
  display: flex;
  justify-content: flex-end;
}

.form__actions--between {
  justify-content: space-between;
}

.form__submit {
  width: 100%;
}

@media (min-width: 640px) {
  .form__submit {
    width: auto;
  }
}

.form__submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.form__message {
  margin-top: var(--space-md);
  padding: 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  display: none;
}

.form__message--success {
  display: block;
  background-color: rgba(16, 185, 129, 0.1);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.form__message--error {
  display: block;
  background-color: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.form__microcopy {
  margin-top: var(--space-md);
  font-size: 0.8rem;
  color: #8a8a9a;
  text-align: center;
}

/* 8. BOTONES FLOTANTES
---------------------------------------------------------- */
.fab-container {
  position: fixed;
  bottom: var(--space-md);
  right: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  z-index: 99;
}

.fab {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-base-white);
  border: none;
  cursor: pointer;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15);
  transition: transform var(--ease-out), opacity var(--ease-out);
  will-change: transform, opacity;
}

.fab:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
}

.fab--top {
  background-color: var(--color-accent-hover);
  border: 1px solid rgba(255, 255, 255, 0.1);
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
}

.fab--top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.fab--top.is-visible:hover {
  transform: translateY(-3px) scale(1.05);
}

.fab--wa {
  background-color: #25D366;
  /* Verde WhatsApp oficial */
}

/* 8. DOCUMENTACIÓN LEGAL E INSTITUCIONAL
---------------------------------------------------------- */
.legal-doc {
  max-width: 800px;
  margin: 0 auto;
  color: var(--color-text-muted);
  padding: 0 var(--space-sm);
}

.legal-doc h2 {
  color: var(--color-text-main);
  font-size: 1.5rem;
  margin: var(--space-md) 0 var(--space-xs);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.legal-doc p {
  margin-bottom: var(--space-sm);
  line-height: 1.8;
}

.legal-doc ul {
  margin-bottom: var(--space-sm);
  padding-left: var(--space-md);
}

.legal-doc li {
  margin-bottom: var(--space-xs);
  line-height: 1.6;
}

/* ==========================================================================
   MODULE: PROTOCOLO DE CANDIDATURA (FILTRO TAKEAWAY B2B)
   ========================================================================== */

/* Estructura Base y WPO */
.protocol {
  padding: var(--space-xl) 0;
  background-color: #ffffff;
  position: relative;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.protocol__header {
  text-align: center;
  margin-bottom: var(--space-lg);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.protocol__title {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 800;
  color: #111111;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

/* Grilla Asimétrica Funcional */
.protocol__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
  max-width: 1000px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .protocol__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
  }
}

/* Tarjetas de Filtrado (Comportamiento Físico) */
.protocol__col {
  background-color: #fcfcfc;
  border: 1px solid #eaeaea;
  padding: var(--space-lg);
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity;
}

.protocol__col:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.04);
}

/* Acentos Psicológicos (Micro-Diferenciación) */
.protocol__col--approved {
  border-top: 3px solid #059669;
  /* Verde corporativo / Aprobación */
}

.protocol__col--rejected {
  border-top: 3px solid #dc2626;
  /* Rojo alerta / Rechazo clínico */
}

.protocol__col-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.protocol__col-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #111111;
  margin: 0;
  letter-spacing: -0.01em;
}

.protocol__icon {
  flex-shrink: 0;
}

.protocol__icon--check {
  color: #059669;
}

.protocol__icon--cross {
  color: #dc2626;
}

/* Tipografía de Condicionamiento */
.protocol__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  flex-grow: 1;
}

.protocol__item {
  font-size: 0.95rem;
  line-height: 1.65;
  color: #444444;
  position: relative;
  padding-left: 1.25rem;
}

/* Bullets Custom Inline */
.protocol__col--approved .protocol__item::before {
  content: "+";
  position: absolute;
  left: 0;
  color: #059669;
  font-weight: 700;
  font-family: monospace;
}

.protocol__col--rejected .protocol__item::before {
  content: "-";
  position: absolute;
  left: 0;
  color: #dc2626;
  font-weight: 700;
  font-family: monospace;
}

/* ==========================================================================
   MODULE: LA TESIS WPO (MANIFIESTO DE RENDIMIENTO)
   ========================================================================== */
.wpo-thesis {
  background-color: #0a0a0a;
  color: #ffffff;
  padding: var(--space-xl) 0;
}

.wpo-thesis__header {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.wpo-thesis__title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
  color: #ffffff;
}

.wpo-thesis__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
  max-width: 1100px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .wpo-thesis__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl);
  }
}

.wpo-thesis__axiom {
  background-color: transparent;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: var(--space-md);
}

.wpo-thesis__number {
  display: block;
  font-family: monospace, ui-monospace, SFMono-Regular, Menlo, Monaco;
  font-size: 0.9rem;
  color: #e2e8f0;
  margin-bottom: var(--space-md);
  font-weight: 700;
  letter-spacing: 0.05em;
}

.wpo-thesis__axiom-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: var(--space-sm);
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.wpo-thesis__axiom-text {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #cccccc;
  margin: 0;
}

/* ==========================================================================
   MODULE: DEEP-DIVE OPERACIONAL (CASO DE ESTUDIO B2B)
   ========================================================================== */
.deep-dive {
  background-color: #f8f9fa;
  /* Gris técnico ultra claro para separar del video */
  padding: var(--space-xl) 0;
}

.deep-dive__header {
  margin-bottom: var(--space-xl);
  text-align: center;
}

.deep-dive__title {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 800;
  color: #111111;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.deep-dive__grid {
  display: grid;
  grid-template-columns: 1fr;
  max-width: 1200px;
  margin: 0 auto;
  border: 1px solid #eaeaea;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.03);
}

@media (min-width: 768px) {
  .deep-dive__grid {
    grid-template-columns: 1fr 1fr;
  }
}

.deep-dive__challenge {
  background-color: #171717;
  /* Lado A: Fondo oscuro */
  color: #ffffff;
  padding: clamp(var(--space-md), 5vw, var(--space-xl));
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.deep-dive__challenge .deep-dive__subtitle {
  color: #ffffff;
}

.deep-dive__challenge .deep-dive__text {
  color: #a3a3a3;
}

.deep-dive__architecture {
  background-color: #ffffff;
  /* Lado B: Fondo blanco limpio */
  color: #111111;
  padding: clamp(var(--space-md), 5vw, var(--space-xl));
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.deep-dive__subtitle {
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-sm);
}

.deep-dive__text {
  font-size: 1.05rem;
  line-height: 1.7;
  margin: 0;
}

/* ==========================================================================
   MODULE: TRUST BAR (BARRA DE AUTORIDAD B2B)
   ========================================================================== */
.trust-bar {
  background-color: #0a0a0a;
  color: #ffffff;
  padding: var(--space-md) 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.trust-bar__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
  text-align: center;
}

@media (min-width: 768px) {
  .trust-bar__grid {
    grid-template-columns: repeat(3, 1fr);
    text-align: left;
    gap: var(--space-lg);
  }
}

.trust-bar__item {
  padding: var(--space-sm);
}

.trust-bar__title {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #a3a3a3;
  margin-bottom: var(--space-xs);
}

.trust-bar__desc {
  font-size: 1.05rem;
  font-weight: 600;
  color: #ffffff;
  margin: 0;
  line-height: 1.4;
}

/* ==========================================================================
   MODULE: FOOTER CORPORATIVO Y HEADER BTN
   ========================================================================== */
.footer--corporate {
  background-color: #050505;
  color: #e5e5e5;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer--corporate .footer__title {
  color: #ffffff;
}

.footer--corporate .footer__link {
  color: #a3a3a3;
}

.footer--corporate .footer__link:hover {
  color: #ffffff;
}

.footer--corporate .footer__slogan {
  color: #a3a3a3;
}

.footer--corporate .footer__copy {
  border-top-color: rgba(255, 255, 255, 0.1);
  color: #a3a3a3;
}

.footer__inner--grid3 {
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .footer__inner--grid3 {
    grid-template-columns: 2fr 1fr 1fr;
  }
}

/* Botón Nav Deploy */
.header__cta .nav__btn-deploy {
  background-color: #0f172a !important;
  border-color: #0f172a !important;
  color: #ffffff !important;
}

.header__cta .nav__btn-deploy:hover {
  background-color: #000000 !important;
  /* Negro para el hover */
  border-color: #000000 !important;
}

/* HTML5 Semantic Resets */
fieldset.form__step {
  border: none;
  padding: 0;
  margin: 0;
  min-width: 0;
}

legend.form__step-title {
  padding: 0;
}

.diag-modal {
  padding: 0;
  border: none;
  border-radius: var(--radius-md);
  background: transparent;
  width: 90%;
  max-width: 450px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}
.diag-modal::backdrop {
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* -------------------------------
   RADIO BUTTONS (FORM)
---------------------------------- */
.form__radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
}
.form__radio-input {
    display: none;
}
.form__radio-label {
    display: inline-block;
    padding: 0.75rem 1.25rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 500;
    transition: background-color var(--ease-out), color var(--ease-out), border-color var(--ease-out), box-shadow var(--ease-out);
    background-color: var(--color-base-white);
    color: var(--color-text-main);
    user-select: none;
}
.form__radio-input:checked + .form__radio-label {
    background-color: var(--color-accent-dark);
    color: var(--color-base-white);
    border-color: var(--color-accent-dark);
    box-shadow: var(--shadow-hover);
}
.form__radio-label:hover {
    background-color: var(--color-base-light);
    border-color: #cbd5e1;
}
.form__radio-input:checked + .form__radio-label:hover {
    background-color: var(--color-accent-hover);
    border-color: var(--color-accent-hover);
}

/* -------------------------------
   CHATBOT (MODAL DIAGNOSTICO)
---------------------------------- */
.chatbot {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 400px;
    max-height: 80vh;
    background: var(--color-base-white);
    border-radius: var(--radius-md);
    overflow: hidden;
}
.chatbot__header {
    background: var(--color-accent-dark);
    color: var(--color-base-white);
    padding: var(--space-sm) var(--space-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.chatbot__title {
    font-weight: 700;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.chatbot__title::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 5px #10b981;
}
.chatbot__close {
    background: transparent;
    border: none;
    color: var(--color-base-white);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    transition: opacity var(--ease-out);
}
.chatbot__close:hover {
    opacity: 0.7;
}
.chatbot__body {
    flex: 1;
    padding: var(--space-md);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    background: var(--color-base-light);
}
.chat-msg {
    max-width: 85%;
    padding: 0.8rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    line-height: 1.5;
    animation: fadeInBot 0.3s ease-out forwards;
}
@keyframes fadeInBot {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.chat-msg--bot {
    background: var(--color-base-white);
    color: var(--color-text-main);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-base);
}
.chat-msg--user {
    background: var(--color-accent-dark);
    color: var(--color-base-white);
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}
.chatbot__options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.5rem;
    align-self: flex-start;
    width: 100%;
}
.chatbot__option-btn {
    background: var(--color-base-white);
    border: 1px solid var(--color-accent-dark);
    color: var(--color-accent-dark);
    padding: 0.6rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color var(--ease-out), color var(--ease-out);
    text-align: left;
}
.chatbot__option-btn:hover {
    background: var(--color-accent-dark);
    color: var(--color-base-white);
}
.chatbot__footer {
    padding: var(--space-sm);
    background: var(--color-base-white);
    border-top: 1px solid var(--color-border);
    display: flex;
    gap: 0.5rem;
    align-items: center;
}
.chatbot__input {
    flex: 1;
    padding: 0.8rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: 20px;
    outline: none;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    transition: border-color var(--ease-out);
}
.chatbot__input:focus {
    border-color: var(--color-accent-dark);
}
.chatbot__send {
    background: var(--color-accent-dark);
    color: var(--color-base-white);
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background var(--ease-out), transform var(--ease-out);
}
.chatbot__send:hover {
    background: var(--color-accent-hover);
    transform: scale(1.05);
}
.chatbot__send svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
    margin-left: 2px;
}
.chatbot__wp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #128C7E;
    color: var(--color-base-white);
    border: none;
    padding: 0.8rem 1.2rem;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    margin-top: 0.5rem;
    cursor: pointer;
    transition: background var(--ease-out);
}
.chatbot__wp-btn:hover {
    background: #075E54;
}

/* ==========================================================================
   MODULE: COOKIE CONSENT BANNER (GDPR/CCPA)
   ========================================================================== */
.consent-banner {
    position: fixed;
    bottom: var(--space-md);
    left: 50%;
    transform: translateX(-50%) translateY(150%);
    width: calc(100% - var(--space-md) * 2);
    max-width: 800px;
    background: var(--color-base-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    padding: var(--space-md);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    transition: opacity var(--ease-out), visibility var(--ease-out);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.consent-banner--active {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
.consent-banner__title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: var(--space-2xs);
    color: var(--color-accent-dark);
}
.consent-banner__text {
    font-size: 0.95rem;
    color: var(--color-text-muted);
    line-height: 1.5;
    margin: 0;
}
.consent-banner__link {
    color: var(--color-accent-dark);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.consent-banner__link:hover {
    color: var(--color-text-main);
}
.consent-banner__actions {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}
.consent-banner__btn {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
}
@media (min-width: 640px) {
    .consent-banner {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
    .consent-banner__content {
        flex: 1;
    }
    .consent-banner__actions {
        flex-direction: row;
        flex-shrink: 0;
    }
    .consent-banner__btn {
        width: auto;
    }
}