/* =====================================================================
   DVKA — estilosDVK.css  (rediseño v2)
   ---------------------------------------------------------------------
   Capa de marca sobre CSS_FRAMEWORK/estilos.css (Grid Framework v7).
   El framework aporta layout, componentes y movimiento; este archivo
   solo define la identidad de DVKA, la escena 3D y las piezas propias
   de la portada (mockups, escenario IA-First, carrusel del blog).

   Orden de carga:
     1. CSS_FRAMEWORK/estilos.css
     2. CSS_FRAMEWORK/icons.css
     3. jcIcons.css
     4. swiper-bundle.min.css
     5. estilosDVK.css   <- este archivo (siempre al final)

   Contenido
     01. Tokens de marca (dark forzado)
     02. Base, Lenis y escena 3D
     03. Ajustes de componentes del framework
     04. Header y menú móvil
     05. Hero
     06. Marquee de aliados
     07. Servicios (bento) y mockups
     08. Proceso y métricas
     09. Escenario IA-First
     10. Testimonios y FAQ
     11. Carrusel del blog (Swiper)
     12. Contacto y footer
     13. Preloader del GLB
   ===================================================================== */


/* =====================================================================
   01. TOKENS DE MARCA
   El sitio es siempre oscuro (la escena 3D vive detrás del contenido),
   por eso se fijan valores planos en lugar de light-dark().
   ===================================================================== */

:root {
  color-scheme: dark;

  /* Marca */
  --brand: #00f0ff;
  --brand-2: #8b5cf6;
  --brand-contrast: #0d0e12;
  --primary-text: var(--brand);

  /* Forma y layout */
  --radius: 10px;
  --header-height: 72px;
  --container-max: 1160px;

  /* Superficies */
  --bg: #0d0e12;
  --bg-subtle: #11131a;
  --surface: #14161d;
  --surface-2: #1a1d26;
  --surface-3: #242833;
  --surface-glass: rgb(16 18 24 / 0.74);
  --border: rgb(255 255 255 / 0.09);
  --border-strong: rgb(255 255 255 / 0.17);
  --border-glass: rgb(255 255 255 / 0.1);
  --footer-bg: rgb(10 11 15 / 0.92);

  /* Texto */
  --text-strong: #f8fafc;
  --text: #dbe2ec;
  --text-muted: #9aa8bd;
  --text-subtle: #66748b;

  /* Alias v6: cualquier include/CMS que use los nombres viejos sigue funcionando */
  --bg-color: var(--bg);
  --accent-glow: var(--brand);
  --accent-purple: var(--brand-2);
  --text-main: var(--text-strong);
}


/* =====================================================================
   02. BASE, LENIS Y ESCENA 3D
   ===================================================================== */

html.lenis,
html.lenis body {
  height: auto;
}

/* El framework activa scroll-behavior: smooth; con Lenis debe ser auto */
html.lenis {
  scroll-behavior: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

.lenis.lenis-stopped {
  overflow: hidden;
}

/* Canvas Three.js fijo detrás del contenido */
#canvas-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 104lvh;
  z-index: -1;
  pointer-events: none;
}

section {
  scroll-margin-top: 80px;
}

.celeste,
.iconColor1 {
  color: var(--brand);
}

/* Imágenes insertadas por el CMS */
.chatEdit {
  width: 100%;
  height: auto;
}

.scroll-progress {
  background-image: linear-gradient(90deg, var(--brand), var(--brand-2));
}


/* =====================================================================
   03. AJUSTES DE COMPONENTES DEL FRAMEWORK
   El cian de marca es muy claro: los elementos con degradado o relleno
   de marca llevan texto oscuro para mantener el contraste.
   ===================================================================== */

.section-title {
  font-weight: 800;
  letter-spacing: -0.04em;
}

.eyebrow {
  font-weight: 700;
  letter-spacing: 0.16em;
}

.badge-gradient,
.icon-box-gradient,
.avatar {
  color: #0d0e12;
}

.avatar {
  font-weight: 700;
}

.icon-box-gradient {
  box-shadow: 0 8px 24px -8px rgb(0 240 255 / 0.55);
}

.btn-primary {
  box-shadow: 0 6px 24px -6px rgb(0 240 255 / 0.55), inset 0 1px 0 rgb(255 255 255 / 0.25);
}

.btn-primary:hover {
  --btn-hover-bg: #ffffff;
  transform: translateY(-2px);
}

.btn-wrap {
  white-space: normal;
  text-align: left;
  justify-content: space-between;
  gap: 12px;
}

.card-glass {
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  backdrop-filter: blur(14px) saturate(1.3);
}

.card-hover:hover {
  border-color: var(--primary);
  box-shadow: 0 18px 44px -16px rgb(0 240 255 / 0.35);
}

.card-text {
  font-size: 0.95rem;
  line-height: 1.65;
}

.card-featured {
  background-image: linear-gradient(160deg, rgb(0 240 255 / 0.07), rgb(139 92 246 / 0.09) 70%);
}

.accordion-item {
  background-color: var(--surface-glass);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

/* Reveal: tras mostrarse, el hover de .card-hover vuelve a ser inmediato
   (sin esto el delay del escalonado se aplicaría también al hover) */
html.js [data-reveal].reveal-done {
  transition: none;
}

html.js [data-reveal].reveal-done.card-hover {
  transition: transform var(--duration) var(--ease-out),
              box-shadow var(--duration) var(--ease-out),
              border-color var(--duration) ease;
}

/* En móvil la entrada lateral genera desbordes: se hace vertical */
@media (max-width: 768px) {
  html.js [data-reveal="left"]:not(.is-visible),
  html.js [data-reveal="right"]:not(.is-visible) {
    transform: translateY(28px);
  }
}


/* =====================================================================
   04. HEADER Y MENÚ MÓVIL
   Fijo y transparente sobre el hero; al hacer scroll (framework.js
   agrega .is-scrolled) pasa a vidrio con sombra.
   ===================================================================== */

.site-header {
  --surface-glass: rgb(13 14 18 / 0.72);
}

.nav-logo {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: #ffffff;
}

.nav-logo .custom-icon {
  width: 1.55rem;
  height: 1.55rem;
  color: var(--primary);
}

.nav-logo-text span {
  color: var(--primary);
}

.desktop-menu {
  gap: 4px;
}

.mobile-menu-drawer {
  background-color: rgb(13 14 18 / 0.96);
  -webkit-backdrop-filter: blur(25px);
  backdrop-filter: blur(25px);
}

.mobile-links a {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.mobile-menu-btn .custom-icon,
.mobile-close-btn .custom-icon {
  width: 1.2rem;
  height: 1.2rem;
  margin: 0;
}


/* =====================================================================
   05. HERO
   ===================================================================== */

.hero-full {
  min-height: 100vh;
  display: grid;
  align-items: center;
  padding-top: calc(var(--header-height) + 2rem);
}

.hero-title {
  margin-bottom: var(--space-6);
  font-size: clamp(2.6rem, 1.3rem + 4.4vw, 4.9rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.hero-copy .lead {
  max-width: 56ch;
  color: var(--text-strong);
}

.hero-copy p {
  max-width: 56ch;
}

/* Solo móvil: se oculta el texto secundario del hero pero conserva su espacio
   (visibility, no display), para que ahí se luzca la escena 3D */
@media (max-width: 768px) {
  .hero-copy .hero-mobile-hide {
    visibility: hidden;
  }
}

/* Etiqueta del hero: barra de acento + texto en dos niveles (sin forma de píldora) */
.hero-tag {
  position: relative;
  display: grid;
  gap: 4px;
  max-width: 44ch;
  margin: 0 0 var(--space-6);
  padding: 2px 0 2px 16px;
}

.hero-tag::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  border-radius: 3px;
  background: linear-gradient(to bottom, var(--brand), var(--brand-2));
  box-shadow: 0 0 14px rgb(0 240 255 / 0.55);
}

.hero-tag-label {
  color: var(--primary-text);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.hero-tag-text {
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.45;
}

/* Columna vacía: el robot 3D ocupa ese espacio */
.hero-stage {
  min-height: 420px;
}

.scroll-cue {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: var(--space-10);
  color: var(--text-subtle);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
}

.scroll-cue::before {
  content: "";
  width: 22px;
  height: 36px;
  border: 1.5px solid var(--border-strong);
  border-radius: 12px;
  background:
    radial-gradient(circle, var(--brand) 0 2px, transparent 3px) 50% 8px / 6px 6px no-repeat;
  animation: gf-bounce 1.6s var(--ease-in-out) infinite;
}


/* =====================================================================
   06. MARQUEE DE ALIADOS
   ===================================================================== */

/* Franja en teal oscuro (#005c62, derivado del cian de marca) con vidrio:
   rompe visualmente con el resto de la página */
.partners {
  border-block: 1px solid rgb(32 241 255 / 0.28);
  background-color: rgb(0 92 98 / 0.82);
  -webkit-backdrop-filter: blur(10px) saturate(1.3);
  backdrop-filter: blur(10px) saturate(1.3);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.06);
}

.partners p {
  color: rgb(230 253 255 / 0.78);
}

.partners .logo-item {
  color: #e6fdff;
  font-size: 1.15rem;
  font-weight: 700;
}

.partners .logo-item:hover {
  color: #ffffff;
}

.partners .logo-item .icon {
  color: #20f1ff;
}

/* Franja con título centrado (en lugar del marquee) */
.partners.band-heading {
  padding-block: clamp(2.5rem, 1.5rem + 3vw, 4.5rem);
  text-align: center;
}

.band-heading .eyebrow {
  display: block;
  margin-bottom: var(--space-3);
  color: #20f1ff;
}

.band-heading .section-title {
  max-width: 22ch;
  margin: 0 auto;
  color: #ffffff;
  font-size: var(--text-4xl);
  text-wrap: balance;
}


/* =====================================================================
   07. SERVICIOS (BENTO) Y MOCKUPS
   ===================================================================== */

.bento-services {
  --bento-row: 120px;
}

.service-card {
  --card-pad: 30px;
  overflow: hidden;
}

.service-card > h3 {
  font-size: var(--text-2xl);
  letter-spacing: -0.03em;
}

/* El visual y el botón van al fondo de la tarjeta cuando sobra espacio */
.service-card > .mockup-browser,
.service-card > .thumb-row,
.service-card > .agent-list {
  margin-top: auto;
  padding-top: 0;
}

.service-card > .thumb-row,
.service-card > .agent-list {
  padding-top: var(--space-6);
}

.service-card > .btn {
  margin-top: var(--space-6);
}

/* Tarjeta ancha: texto + navegador lado a lado */
.service-card-wide {
  --card-pad: 40px;
}

.service-split {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(2rem, 1rem + 3vw, 3.5rem);
  align-items: center;
}

.service-copy > :last-child {
  margin-bottom: 0;
}

/* Panel con resplandor detrás del navegador: llena la mitad derecha */
.service-visual {
  position: relative;
  display: grid;
  align-items: center;
  align-self: stretch;
  padding: clamp(1.25rem, 0.5rem + 2.5vw, 2.5rem);
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(70% 60% at 85% 10%, rgb(139 92 246 / 0.28), transparent 70%),
    radial-gradient(70% 70% at 10% 90%, rgb(0 240 255 / 0.22), transparent 70%),
    rgb(255 255 255 / 0.02);
}

.service-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgb(255 255 255 / 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgb(255 255 255 / 0.05) 1px, transparent 1px);
  background-size: 32px 32px;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 80%);
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 80%);
  pointer-events: none;
}

.service-visual .mockup-browser {
  position: relative;
}

/* Variante con video: el video llena el recuadro sin márgenes */
.service-visual.service-video {
  padding: 0;
  background: var(--bg-subtle);
}

.service-visual.service-video::before {
  display: none;
}

.service-video video {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

@media (max-width: 768px) {
  .service-card-wide { --card-pad: 28px; }
  .service-split { grid-template-columns: minmax(0, 1fr); }
}

/* Chat del sitio (mockup) */
.mock-chat {
  display: grid;
  gap: 10px;
  margin-top: auto;
  padding: 16px;
}

/* Indicador "escribiendo…" */
.mock-typing {
  display: inline-flex;
  gap: 5px;
  width: max-content;
  padding: 12px 14px;
}

.mock-typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--primary);
  animation: gf-bounce 1s var(--ease-in-out) infinite;
}

.mock-typing span:nth-child(2) { animation-delay: 0.15s; }
.mock-typing span:nth-child(3) { animation-delay: 0.3s; }

.mock-msg {
  max-width: 88%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: var(--text-sm);
  line-height: 1.45;
}

.mock-msg-user {
  justify-self: end;
  border-bottom-right-radius: 4px;
  background-color: var(--surface-3);
  color: var(--text-strong);
}

.mock-msg-ai {
  border-bottom-left-radius: 4px;
  background-color: var(--primary-soft);
  border: 1px solid var(--primary-border);
  color: var(--text-strong);
}

.service-card .mockup-browser {
  margin-bottom: 0;
}

/* Miniaturas de contenido creativo (mockup) */
.thumb-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: var(--space-6);
}

.thumb-row .ph {
  min-height: 0;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-md);
  font-size: 22px;
}

/* Lista de agentes (mockup) */
.agent-list {
  display: grid;
  gap: 8px;
  margin: var(--space-6) 0 0;
  padding: 0;
  list-style: none;
}

.agent-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background-color: rgb(255 255 255 / 0.03);
  color: var(--text-strong);
  font-size: var(--text-sm);
  font-weight: 500;
}

.agent-list .badge {
  margin-left: auto;
}


/* =====================================================================
   08. PROCESO Y MÉTRICAS
   ===================================================================== */

/* Pasos: tarjeta con ilustración SVG y número grande.
   El hover (elevación, borde y resplandor) lo da la clase .card-hover del
   framework, igual que las tarjetas de "¿Qué hacemos?"; .spotlight agrega
   el brillo que sigue al cursor. */
.process-steps {
  gap: 20px;
}

.process-step {
  --step-delay: 0ms;
  position: relative;
  display: flex;
  flex-direction: column;
  padding: var(--space-6);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background-color: var(--surface-glass);
  background-image: radial-gradient(120% 80% at 0% 0%, rgb(0 240 255 / 0.07), transparent 60%);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

/* El framework dibuja un círculo con el contador en .step::before; aquí ese
   pseudo-elemento es el brillo del spotlight (sigue al cursor), así que se
   neutralizan los estilos del círculo. */
.process-step.spotlight::before {
  content: "";
  display: block;
  width: auto;
  height: auto;
  margin: 0;
  border: 0;
  border-radius: inherit;
  box-shadow: none;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), color-mix(in oklab, var(--brand) 16%, transparent), transparent 45%);
}

/* Número grande en contorno (01, 02…).
   Va en ::after porque .spotlight usa ::before para el brillo. */
.process-step::after {
  content: counter(gf-step, decimal-leading-zero);
  position: absolute;
  top: 14px;
  right: 20px;
  display: block;
  color: transparent;
  font-size: 3rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  -webkit-text-stroke: 1px var(--border-strong);
  pointer-events: none;
}

.step-art {
  display: grid;
  place-items: center start;
  height: 96px;
  margin-bottom: var(--space-4);
}

.step-art svg {
  width: 132px;
  height: auto;
  overflow: visible;
  filter: drop-shadow(0 0 10px rgb(0 240 255 / 0.25));
  transition: transform 0.45s var(--ease-spring), filter 0.35s ease;
}

.process-step h3 {
  margin-bottom: 0.4em;
  font-size: var(--text-xl);
}

.process-step p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Entrada escalonada: la tarjeta, luego la ilustración se "dibuja",
   luego el título y el texto (el delay base lo pone framework.js) */
html.js .process-step .step-art,
html.js .process-step h3,
html.js .process-step p {
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

html.js .process-step:not(.is-visible) .step-art,
html.js .process-step:not(.is-visible) h3,
html.js .process-step:not(.is-visible) p {
  opacity: 0;
  transform: translateY(14px);
}

html.js .process-step .step-art { transition-delay: calc(var(--delay, 0ms) + 120ms); }
html.js .process-step h3        { transition-delay: calc(var(--delay, 0ms) + 380ms); }
html.js .process-step p         { transition-delay: calc(var(--delay, 0ms) + 500ms); }

/* Trazos que se dibujan al entrar */
.step-art .draw {
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1.1s var(--ease-out);
  transition-delay: calc(var(--delay, 0ms) + 250ms);
}

.step-art .draw.d1 { transition-delay: calc(var(--delay, 0ms) + 330ms); }
.step-art .draw.d2 { transition-delay: calc(var(--delay, 0ms) + 410ms); }
.step-art .draw.d3 { transition-delay: calc(var(--delay, 0ms) + 490ms); }
.step-art .draw.d4 { transition-delay: calc(var(--delay, 0ms) + 570ms); }
.step-art .draw.d5 { transition-delay: calc(var(--delay, 0ms) + 650ms); }

html.js .process-step:not(.is-visible) .draw {
  stroke-dashoffset: 1.05;
}

.step-art .pulse-dot {
  animation: gf-pulse 2s ease-in-out infinite;
}

/* Al pasar el mouse: la ilustración se eleva, los trazos se "redibujan" en
   cascada y los puntos laten más rápido */
.process-step:hover .step-art svg {
  transform: translateY(-4px) scale(1.06);
  filter: drop-shadow(0 0 16px rgb(0 240 255 / 0.5));
}

.process-step:hover .step-art .draw {
  animation: dvk-redraw 0.9s var(--ease-out) both;
}

.process-step:hover .step-art .draw.d1 { animation-delay: 0.05s; }
.process-step:hover .step-art .draw.d2 { animation-delay: 0.1s; }
.process-step:hover .step-art .draw.d3 { animation-delay: 0.15s; }
.process-step:hover .step-art .draw.d4 { animation-delay: 0.2s; }
.process-step:hover .step-art .draw.d5 { animation-delay: 0.25s; }

.process-step:hover .step-art .pulse-dot {
  transform-box: fill-box;
  transform-origin: center;
  animation: dvk-dot 0.7s ease-in-out infinite;
}

@keyframes dvk-redraw {
  from { stroke-dashoffset: 1.05; }
  to   { stroke-dashoffset: 0; }
}

@keyframes dvk-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(1.9); opacity: 0.7; }
}

.stats-band {
  --card-pad: 36px;
}

.stats-band .stat-value {
  font-size: var(--text-5xl);
}

.stats-band .stat + .stat {
  padding-left: var(--space-8);
  border-left: 1px solid var(--border);
}

@media (max-width: 768px) {
  .stats-band .stat + .stat {
    padding-left: 0;
    border-left: 0;
  }
}


/* =====================================================================
   09. ESCENARIO IA-FIRST
   Tramo vacío a propósito: aquí la escena 3D es la protagonista y
   aparecen sus textos. index.php sincroniza la animación con este
   bloque (ver initScrollAnimations).
   ===================================================================== */

.stage {
  position: relative;
  min-height: 270vh;
}

#chat2sticky {
  position: relative;
  width: max-content;
  max-width: 100%;
}

#chat2sticky .pill {
  background-color: var(--surface-glass);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}


/* =====================================================================
   10. TESTIMONIOS Y FAQ
   ===================================================================== */

.testimonial blockquote {
  font-size: 1rem;
}

/* El framework estiliza `.testimonial-author span` y pisaba al avatar */
.testimonial-author .avatar {
  display: inline-grid;
  color: #0d0e12;
  font-size: 0.95rem;
}


/* =====================================================================
   11. CARRUSEL DEL BLOG (Swiper)
   ===================================================================== */

#carrusel_ {
  position: relative;
  display: block;
  padding: 0 56px;
}

.blogSwiper {
  width: 100%;
  padding-bottom: 56px;
  --swiper-theme-color: var(--brand);
}

#carrusel_ .swiper,
#carrusel_ .swiper-wrapper,
#carrusel_ .swiper-slide {
  height: auto;
}

#carrusel_ .swiper-wrapper {
  align-items: stretch;
}

#carrusel_ .swiper-slide {
  display: flex;
}

#carrusel_ .swiper-slide > .card {
  flex: 1;
  min-width: 0;
}

#carrusel_ .swiper-button-next,
#carrusel_ .swiper-button-prev {
  position: absolute;
  top: calc(50% - 28px);
  z-index: 10;
  width: 44px;
  height: 44px;
  margin-top: 0;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  background-color: var(--surface-glass);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: var(--text-strong);
  transition: background-color var(--duration-fast) ease, border-color var(--duration-fast) ease, color var(--duration-fast) ease;
}

/* Swiper 12 inyecta un <svg> que ocupa el 100% del botón: se reduce
   para que la flecha quede centrada y con aire dentro del círculo */
#carrusel_ .swiper-button-next .swiper-navigation-icon,
#carrusel_ .swiper-button-prev .swiper-navigation-icon {
  width: 8px;
  height: 14px;
}

#carrusel_ .swiper-button-next .swiper-navigation-icon path,
#carrusel_ .swiper-button-prev .swiper-navigation-icon path {
  fill: currentColor;
  stroke: currentColor;
  stroke-width: 0.6;
}

#carrusel_ .swiper-button-next,
#carrusel_ .swiper-button-prev {
  display: flex;
  align-items: center;
  justify-content: center;
}

#carrusel_ .swiper-button-next:hover,
#carrusel_ .swiper-button-prev:hover {
  border-color: var(--primary);
  background-color: var(--primary);
  color: var(--primary-contrast);
}

#carrusel_ .swiper-button-prev { left: 0; }
#carrusel_ .swiper-button-next { right: 0; }

.blogSwiper .swiper-pagination-bullet {
  background: rgb(255 255 255 / 0.35);
  opacity: 1;
}

.blogSwiper .swiper-pagination-bullet-active {
  width: 22px;
  border-radius: 4px;
  background: var(--brand);
}

.blog-card {
  --card-pad: 20px;
}

.blog-card .card-media {
  aspect-ratio: 16 / 10;
}

.blog-card .card-title {
  font-size: 1.1rem;
  line-height: 1.3;
}

.blog-card > .btn {
  align-self: flex-start;
}

@media (max-width: 768px) {
  #carrusel_ { padding: 0 8px; }
  #carrusel_ .swiper-button-prev { left: -4px; }
  #carrusel_ .swiper-button-next { right: -4px; }
}


/* =====================================================================
   12. CONTACTO Y FOOTER
   ===================================================================== */

/* El resplandor de .bg-glow se extiende fuera de la sección: se recorta
   para que no genere scroll horizontal en móvil */
#contact {
  overflow-x: clip;
}

.contact-info {
  display: grid;
  gap: var(--space-4);
  margin-top: var(--space-8);
}

.input,
.textarea,
.select {
  background-color: rgb(255 255 255 / 0.05);
  box-shadow: none;
}

.textarea {
  resize: none;
}

.site-footer .footer-top {
  padding-block: 72px 56px;
}

.site-footer .brand {
  font-size: 1.2rem;
}

.footer-note {
  max-width: 34ch;
  margin-top: var(--space-4);
  color: var(--text-muted);
  font-size: var(--text-sm);
}


/* =====================================================================
   13. PRELOADER DEL GLB (lo controla el JS de index.php)
   ===================================================================== */

#status-panel {
  display: none !important;
}

#glb-preloader {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 1;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

#glb-preloader.glb-preloader-hidden {
  opacity: 0;
}

.glb-preloader-track {
  width: 90px;
  height: 4px;
  border-radius: 2px;
  background: rgb(255 255 255 / 0.15);
  overflow: hidden;
}

.glb-preloader-bar {
  height: 100%;
  width: 0%;
  background: var(--brand);
  transition: width 0.2s linear;
}

.glb-preloader-bar.indeterminate {
  width: 40% !important;
  animation: glb-indeterminate 1.2s ease-in-out infinite;
}

@keyframes glb-indeterminate {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(250%); }
}

#glb-preloader-text {
  font-size: 0.7rem;
  color: var(--text-muted);
}


/* =====================================================================
   14. PÁGINAS INTERIORES (servicios, blog y artículos)
   Comparten _partials/ (head, header, footer, scene).
   ===================================================================== */

/* Migas de pan + cabecera de página */
.page-hero {
  padding-top: calc(var(--header-height) + clamp(2.5rem, 1.5rem + 4vw, 5rem));
  padding-bottom: 0; /* el aire hacia la primera sección lo pone esa sección (igual que entre el resto de filas) */
}

.page-hero .breadcrumb {
  margin-bottom: var(--space-6);
}

.page-hero .hero-tag {
  max-width: 62ch;
}

.page-title {
  max-width: 20ch;
  margin-bottom: var(--space-6);
  font-size: clamp(2.2rem, 1.2rem + 3.8vw, 4.2rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.page-title-wide {
  max-width: 24ch;
}

.page-hero .lead {
  max-width: 62ch;
  color: var(--text-strong);
  font-size: var(--text-lg);
}

.page-hero .hero-actions {
  margin-top: var(--space-8);
}

/* Bloques de lectura sobre la escena 3D */
.read-panel {
  padding: clamp(1.5rem, 1rem + 2vw, 2.5rem);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-xl);
  background-color: var(--surface-glass);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  backdrop-filter: blur(14px) saturate(1.3);
}

.read-panel > :last-child {
  margin-bottom: 0;
}

.read-text {
  margin: 0;
  color: var(--text);
  font-size: 1.0625rem;
  line-height: 1.8;
}

.read-text + .read-text {
  margin-top: 1.25em;
}

.read-text i.celeste {
  font-style: normal;
  font-weight: 600;
}

/* Encabezado a la izquierda + texto a la derecha */
.editorial-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr);
  gap: clamp(2rem, 1rem + 4vw, 5rem);
  align-items: start;
}

.editorial-split .section-title {
  margin-bottom: 0;
  font-size: var(--text-3xl);
}

@media (max-width: 768px) {
  .editorial-split { grid-template-columns: minmax(0, 1fr); }
}

/* Video con marco */
.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  background-color: var(--surface);
  box-shadow: var(--shadow-xl), 0 0 60px -20px rgb(0 240 255 / 0.35);
}

.video-frame iframe,
.video-frame video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
}

/* ---------------------------------------------------------------------
   Sección estándar: video + (título, subtítulo, texto)
   Estructura:
     .media-split            → texto a la izquierda | video a la derecha
     .media-split.is-media-left → video a la izquierda | texto a la derecha
   El video se centra verticalmente respecto al bloque de texto, así que si
   el texto crece el video se mantiene al centro. En móvil: una columna.
   --------------------------------------------------------------------- */
.media-split {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(2rem, 1rem + 4vw, 5rem);
  align-items: center;
}

.media-split.is-media-left {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
}

.media-split.is-media-left > .media-split-media {
  order: -1;
}

/* Variante: encabezado centrado arriba de ambos bloques */
.media-split-head {
  margin: 0 auto var(--space-10);
  max-width: 48rem;
  text-align: center;
}

.media-split-head .media-split-sub {
  margin-bottom: 0;
}

/* Variante: título + subtítulo dentro del bloque de texto */
.media-split-copy.read-panel .media-split-title {
  margin-bottom: var(--space-2);
}

.media-split-copy.read-panel .media-split-sub {
  margin-bottom: var(--space-5);
}

.media-split-title {
  margin: 0 0 var(--space-3);
  font-size: var(--text-3xl);
  text-wrap: balance;
}

.media-split-sub {
  margin: 0 0 var(--space-6);
  color: var(--primary);
  font-family: var(--dvk-heading);
  font-size: var(--text-lg);
  font-weight: 600;
  line-height: 1.35;
}

@media (max-width: 768px) {
  .media-split,
  .media-split.is-media-left { grid-template-columns: minmax(0, 1fr); }
}

/* Etiquetas de la página de referencia (_REFERENCIA/layouts-media-split.php) */
.ref-label {
  margin: 0 0 var(--space-6);
  color: var(--text-muted);
  font-family: var(--dvk-label);
  font-size: var(--text-sm);
  line-height: 1.9;
}

.ref-label b {
  display: inline-block;
  margin-right: 0.5em;
  padding: 0.1em 0.6em;
  border-radius: var(--radius-sm);
  background-color: var(--primary-soft);
  color: var(--primary);
}

.ref-label code {
  padding: 0.1em 0.4em;
  border-radius: var(--radius-sm);
  background-color: var(--surface-3);
  color: var(--text-strong);
  font-size: 0.92em;
}

.ref-tag {
  display: inline-block;
  margin-left: 0.5em;
  padding: 0.1em 0.7em;
  border: 1px solid var(--primary-border);
  border-radius: 999px;
  color: var(--primary);
  font-size: 0.85em;
}

.ref-tag-alt {
  border-color: var(--border-strong);
  color: var(--text-muted);
}

/* SVG animado como "media" del layout (mismo tamaño que un video cuadrado) */
.media-split-media.visual-panel {
  aspect-ratio: 1 / 1;
  min-height: 0;
}

/* Franja de cita entre dos secciones: sin padding propio, así el espacio de
   arriba y de abajo es el mismo (lo aportan las secciones vecinas) */
.quote-band {
  padding-block: 0;
}

/* Ritmo vertical de las páginas interiores: entre dos filas consecutivas
   el espacio es UNO solo (el padding inferior de la de arriba). Antes se sumaban
   el padding inferior + el superior de la siguiente (~200px). */
.page-hero ~ :is(.section, .row-lg, .quote-band-end) + :is(.section, .row-lg) {
  padding-top: 0;
}

/* Cuando la franja de cita NO tiene una sección con padding debajo
   (p. ej. le sigue una franja a todo el ancho), se le devuelve el padding inferior estándar */
.quote-band.quote-band-end {
  padding-bottom: var(--section-space);
}

/* Variante para videos cuadrados (1:1) */
.video-frame.video-frame-square {
  aspect-ratio: 1 / 1;
}

/* Imagen con marco */
.media-frame {
  position: relative;
  overflow: hidden;
  margin: 0;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  background-color: var(--surface);
  box-shadow: var(--shadow-lg);
}

.media-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-frame-wide img {
  max-height: 520px;
}

.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgb(0 240 255 / 0.12), transparent 40%, rgb(139 92 246 / 0.16));
  mix-blend-mode: soft-light;
  pointer-events: none;
}

/* Tarjetas de características */
.feature-card {
  --card-pad: 28px;
}

.feature-card h3 {
  font-size: var(--text-xl);
}

/* Cita destacada */
.quote-panel {
  position: relative;
  overflow: hidden;
  margin: 0;
  padding: clamp(3.25rem, 2.25rem + 3vw, 4.5rem) clamp(1.5rem, 1rem + 3vw, 3.5rem);
  border: 1px solid transparent;
  border-radius: var(--radius-2xl);
  background:
    linear-gradient(rgb(13 14 18 / 0.88), rgb(13 14 18 / 0.88)) padding-box,
    linear-gradient(135deg, var(--brand), var(--brand-2)) border-box;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

/* Comillas decorativas de apertura y cierre: dentro del panel (no se salen) */
.quote-panel::before,
.quote-panel::after {
  position: absolute;
  color: rgb(0 240 255 / 0.35);
  font-family: var(--dvk-display);
  font-size: clamp(3.5rem, 2.5rem + 3vw, 5.5rem);
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
}

.quote-panel::before {
  content: "\201C";
  top: clamp(0.5rem, 0.25rem + 0.8vw, 1rem);
  left: clamp(1rem, 0.5rem + 1.5vw, 1.75rem);
}

.quote-panel::after {
  content: "\201D";
  right: clamp(1rem, 0.5rem + 1.5vw, 1.75rem);
  bottom: calc(clamp(0.5rem, 0.25rem + 0.8vw, 1rem) - 0.4em);
  color: rgb(139 92 246 / 0.45);
}

.quote-panel p {
  position: relative;
  margin: 0;
  color: var(--text-strong);
  font-size: var(--text-2xl);
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.quote-panel p + p {
  margin-top: 1em;
  color: var(--text);
  font-size: var(--text-lg);
  font-weight: 400;
}

/* Imagen + texto */
.split-card {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.5rem, 1rem + 3vw, 4rem);
  align-items: center;
}

.split-card.is-reverse > :first-child {
  order: 2;
}

.split-card h3 {
  font-size: var(--text-2xl);
  letter-spacing: -0.03em;
}

.split-card .media-frame {
  aspect-ratio: 4 / 3;
}

@media (max-width: 768px) {
  .split-card { grid-template-columns: minmax(0, 1fr); }
  .split-card.is-reverse > :first-child { order: 0; }
}

/* Llamada destacada */
.callout {
  position: relative;
  padding: clamp(1.5rem, 1rem + 2vw, 2.5rem) clamp(1.5rem, 1rem + 2vw, 2.5rem) clamp(1.5rem, 1rem + 2vw, 2.5rem) clamp(2rem, 1.5rem + 2.5vw, 3rem);
  overflow: hidden;
  border: 1px solid var(--primary-border);
  border-radius: var(--radius-xl);
  background-color: var(--surface-glass);
  background-image: linear-gradient(135deg, rgb(0 240 255 / 0.07), rgb(139 92 246 / 0.07));
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.callout::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(to bottom, var(--brand), var(--brand-2));
}

.callout p {
  margin: 0;
  color: var(--text-strong);
  font-size: 1.0625rem;
  line-height: 1.75;
}

.callout strong {
  color: var(--primary-text);
}

/* Fuentes de las métricas */
.stat-source {
  display: inline-block;
  margin-top: var(--space-2);
  color: var(--text-subtle);
  font-size: var(--text-xs);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.stat-source:hover {
  color: var(--primary-text);
}

.stats-band .stat-label {
  max-width: 30ch;
}

/* Ilustración en panel */
.visual-panel {
  display: grid;
  place-items: center;
  min-height: 300px;
  padding: var(--space-8);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(70% 60% at 85% 10%, rgb(139 92 246 / 0.28), transparent 70%),
    radial-gradient(70% 70% at 10% 90%, rgb(0 240 255 / 0.22), transparent 70%),
    var(--surface-glass);
}

.visual-panel svg {
  width: min(100%, 360px);
  height: auto;
  overflow: visible;
  filter: drop-shadow(0 0 14px rgb(0 240 255 / 0.3));
}

/* Los trazos se dibujan cuando el bloque (.split-card) entra en pantalla */
.visual-panel .draw {
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1.4s var(--ease-out);
  transition-delay: 250ms;
}

.visual-panel .draw.d1 { transition-delay: 400ms; }
.visual-panel .draw.d2 { transition-delay: 550ms; }
.visual-panel .draw.d3 { transition-delay: 700ms; }
.visual-panel .draw.d4 { transition-delay: 850ms; }

html.js .split-card:not(.is-visible) .visual-panel .draw,
html.js .visual-panel[data-reveal]:not(.is-visible) .draw {
  stroke-dashoffset: 1.05;
}

.visual-panel .pulse-dot {
  animation: gf-pulse 2s ease-in-out infinite;
}

/* Ilustraciones anchas (panel de lectura y tarjeta de IA Creativa):
   los trazos se dibujan al entrar, las líneas "fluyen" y los puntos laten */
.read-art,
.service-art {
  display: block;
}

.read-art {
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-6);
  border-bottom: 1px solid var(--border);
}

.read-art svg,
.service-art svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  filter: drop-shadow(0 0 12px rgb(0 240 255 / 0.22));
}

.service-card > .service-art {
  margin-top: auto;
  padding-top: var(--space-6);
}

.read-art .draw,
.service-art .draw {
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1.3s var(--ease-out);
  transition-delay: calc(var(--delay, 0ms) + 200ms);
}

.read-art .draw.d1, .service-art .draw.d1 { transition-delay: calc(var(--delay, 0ms) + 320ms); }
.read-art .draw.d2, .service-art .draw.d2 { transition-delay: calc(var(--delay, 0ms) + 440ms); }
.read-art .draw.d3, .service-art .draw.d3 { transition-delay: calc(var(--delay, 0ms) + 560ms); }
.read-art .draw.d4, .service-art .draw.d4 { transition-delay: calc(var(--delay, 0ms) + 680ms); }

html.js .read-panel:not(.is-visible) .read-art .draw,
html.js .service-card:not(.is-visible) .service-art .draw {
  stroke-dashoffset: 1.05;
}

.read-art .pulse-dot,
.service-art .pulse-dot {
  animation: gf-pulse 2s ease-in-out infinite;
}

/* Línea punteada que "fluye" de un nodo al siguiente */
.read-art .flow,
.service-art .flow {
  stroke-dasharray: 4 7;
  animation: dvk-flow 1.1s linear infinite;
}

@keyframes dvk-flow {
  to { stroke-dashoffset: -22; }
}

/* Cabezal de la línea de tiempo (IA Creativa) */
.service-art .playhead {
  animation: dvk-playhead 4.5s var(--ease-in-out) infinite alternate;
}

@keyframes dvk-playhead {
  from { transform: translateX(0); }
  to   { transform: translateX(320px); }
}

/* Cierre con llamada a la acción */
.cta-panel {
  position: relative;
  overflow: hidden;
  padding: clamp(2.5rem, 1.5rem + 4vw, 5rem);
  border: 1px solid transparent;
  border-radius: var(--radius-2xl);
  /* Capas (de arriba a abajo): tinte suave · fondo sólido oscuro · borde en degradado.
     El fondo sólido evita que el degradado del borde se transparente y
     le reste contraste al texto. */
  background:
    linear-gradient(135deg, rgb(0 240 255 / 0.08), rgb(139 92 246 / 0.14)) padding-box,
    linear-gradient(var(--bg-subtle), var(--bg-subtle)) padding-box,
    linear-gradient(135deg, var(--brand), var(--brand-2)) border-box;
  text-align: center;
  box-shadow: 0 30px 80px -40px rgb(139 92 246 / 0.55);
}

.cta-panel .section-title {
  color: var(--text-strong);
}

.cta-panel .lead {
  color: var(--text);
}

.cta-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgb(255 255 255 / 0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgb(255 255 255 / 0.06) 1px, transparent 1px);
  background-size: 40px 40px;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse at center, #000 20%, transparent 75%);
  pointer-events: none;
}

.cta-panel > * {
  position: relative;
}

.cta-panel .section-title {
  margin-bottom: var(--space-4);
}

.cta-panel .lead {
  max-width: 52ch;
  margin-inline: auto;
}

/* Fondo de vértices luminosos (js/vertexBg.js) dentro de la pleca:
   texto a la izquierda, modelo a la derecha */
.vertex-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  /* atenúa la zona del texto y deja el modelo nítido hacia la derecha */
  -webkit-mask-image: radial-gradient(ellipse 55% 90% at 25% 50%, rgb(0 0 0 / 0.22), #000 85%);
  mask-image: radial-gradient(ellipse 55% 90% at 25% 50%, rgb(0 0 0 / 0.22), #000 85%);
}

.vertex-bg canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.cta-panel.has-vertex-bg {
  display: grid;
  align-content: center;
  justify-items: start;
  min-height: clamp(420px, 34vw, 560px);
  padding-inline: clamp(1.5rem, 1rem + 4vw, 5rem);
  text-align: left;
}

.cta-panel.has-vertex-bg > .vertex-bg {
  position: absolute;
}

.cta-panel.has-vertex-bg > :not(.vertex-bg) {
  z-index: 1;
  max-width: min(560px, 100%);
}

.cta-panel.has-vertex-bg .lead {
  margin-inline: 0;
}

.cta-panel.has-vertex-bg .hero-actions {
  justify-content: flex-start;
}

.cta-panel.has-vertex-bg .section-title,
.cta-panel.has-vertex-bg .lead {
  text-shadow: 0 2px 22px rgb(13 14 18 / 0.95), 0 0 6px rgb(13 14 18 / 0.7);
}

@media (max-width: 768px) {
  .vertex-bg {
    -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, rgb(0 0 0 / 0.3), #000 90%);
    mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, rgb(0 0 0 / 0.3), #000 90%);
  }
}

/* Otros servicios */
.related-card .card-text {
  margin-bottom: var(--space-4);
}


/* ---------- Blog: listado ---------- */

.blog-featured {
  --card-pad: 0px;
}

.blog-featured .card-media {
  margin: 0;
  aspect-ratio: 16 / 10;
}

.blog-featured .blog-featured-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--space-3);
  padding: clamp(1.5rem, 1rem + 2vw, 2.75rem);
}

.blog-featured .card-title {
  font-size: var(--text-3xl);
  letter-spacing: -0.035em;
}

.blog-featured .btn {
  align-self: flex-start;
}

@container (min-width: 560px) {
  .blog-featured.card-adaptive > .card-media {
    margin: 0;
    flex-basis: 52%;
    min-height: 340px;
    border-radius: calc(var(--radius-lg) - 1px) 0 0 calc(var(--radius-lg) - 1px);
  }

  .blog-featured.card-adaptive {
    gap: 0;
  }

  .blog-featured.card-adaptive > .blog-featured-body {
    flex: 1;
  }
}

.blog-grid-card {
  --card-pad: 20px;
}

.blog-grid-card .card-media {
  aspect-ratio: 16 / 10;
}

.blog-grid-card .card-title {
  font-size: 1.1rem;
  line-height: 1.3;
}

.blog-grid-card > .btn {
  align-self: flex-start;
}


/* ---------- Blog: artículo ----------
   Todo el artículo vive en UNA tarjeta (.article-shell) del ancho del contenedor: ruta, etiquetas, título,
   entrada, foto principal y texto. Los tres comparten el mismo margen lateral (--shell-px), y solo la foto
   principal llega de borde a borde. Debajo de la foto, el texto va a la izquierda y a la derecha queda una
   barra lateral pegajosa con el índice del artículo y las acciones. Lo que se inserta en el texto (imágenes,
   videos, embeds, gráficas) mide exactamente lo mismo que el texto. */

.article-hero {
  padding-top: calc(var(--header-height) + clamp(1.5rem, 1rem + 2vw, 3rem));
  padding-bottom: clamp(2rem, 1rem + 3vw, 4rem);
}

.article-shell {
  --shell-px: clamp(1.25rem, 0.5rem + 5vw, 4.5rem);
  padding: clamp(1.5rem, 1rem + 2vw, 2.5rem) var(--shell-px) clamp(1.75rem, 1rem + 3vw, 3.5rem);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-2xl);
  background-color: var(--surface-glass);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  backdrop-filter: blur(16px) saturate(1.3);
  box-shadow: var(--shadow-xl);
}

/* La foto principal: de borde a borde de la tarjeta, entre la cabecera y el texto */
.article-cover {
  position: relative;
  overflow: hidden;
  /* <figure> trae 40px de margen lateral por defecto; aquí se usa para llegar a los bordes */
  margin: var(--space-8) calc(var(--shell-px) * -1) 0;
  aspect-ratio: 21 / 9;
  border-block: 1px solid var(--border-glass);
}

.article-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 768px) {
  .article-cover { aspect-ratio: 16 / 10; }
}

.article-title {
  max-width: 22ch;
  margin-bottom: var(--space-5);
  font-size: clamp(2.1rem, 1.3rem + 3vw, 3.8rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.045em;
}

.article-lead {
  max-width: 60ch;
  margin-bottom: 0;
  color: var(--text);
  font-size: var(--text-lg);
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}

/* Texto + barra lateral */
.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 16rem;
  gap: clamp(2rem, 4vw, 4rem);
  align-items: start;
  margin-top: var(--space-8);
}

/* El texto del artículo (.prose del framework limita a 65ch: aquí el ancho lo manda la columna) */
.article-text {
  min-width: 0;
  font-size: 1.125rem;
}

.article-text.prose { max-width: none; }

.article-text :where(h2) {
  color: var(--text-strong);
  letter-spacing: -0.03em;
}

.article-text :where(img, figure, iframe, video) {
  max-width: 100%;
}

/* Imágenes, videos y embeds que se insertan desde el editor del panel (ver __ADMIN/): ni más
   anchos ni más angostos que el texto */
.article-text figure:where(.imagen, .video, .embed) {
  margin-inline: 0;
  margin-block: var(--space-8, 2rem);
}

.article-text figure:where(.imagen, .video) :where(img, video) {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  margin-inline: auto;
  border-radius: var(--radius-lg, 16px);
}

.article-text figure.video video {
  width: 100%;
  background: #000;
}

.article-text figure.embed iframe {
  display: block;
  width: 100%;
  border: 0;
  border-radius: var(--radius-lg, 16px);
}

/* Los videos se ven en 16:9 sea cual sea el tamaño que traía el código */
.article-text figure.embed:where([data-embed="youtube"], [data-embed="vimeo"], [data-embed="twitch"]) iframe {
  aspect-ratio: 16 / 9;
  height: auto;
}

/* HTML libre (gráficas, embeds, código propio): del ancho del texto, sin recortarlo */
.article-text > .html-libre {
  max-width: 100%;
  margin-block: var(--space-8, 2rem);
}

.article-text .html-libre :where(iframe, video, canvas, svg, img) {
  max-width: 100%;
}

/* Las citas de Instagram, TikTok y X se centran; su script las convierte en la publicación */
.article-text figure.embed blockquote {
  max-width: 540px;
  margin-inline: auto;
}

/* Barra lateral: índice del artículo (lo arma el script de la página con los h2 y h3) y acciones */
.article-aside {
  position: sticky;
  top: calc(var(--header-height) + 1.5rem);
  padding-left: clamp(1rem, 2vw, 2rem);
  border-left: 1px solid var(--border);
  font-size: 0.92rem;
}

.article-aside-title {
  margin: 0 0 var(--space-3);
  font-family: var(--dvk-label);
  font-size: var(--label-size);
  letter-spacing: var(--label-tracking);
  text-transform: uppercase;
  color: var(--text-muted);
}

.article-toc ol { list-style: none; margin: 0 0 var(--space-6); padding: 0; display: grid; gap: var(--space-2); }
.article-toc li.es-sub { padding-left: var(--space-3); }
.article-toc a { color: var(--text-muted); text-decoration: none; line-height: 1.4; }
.article-toc a:hover { color: var(--text-strong); }
.article-aside-acciones { display: grid; gap: var(--space-2); justify-items: start; }

/* Las acciones del final del texto solo se ven cuando la barra lateral baja debajo del texto */
.article-share {
  display: none;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  margin: var(--space-10) 0 0;
  padding-top: var(--space-6);
  border-top: 1px solid var(--border);
}

@media (max-width: 960px) {
  .article-layout { grid-template-columns: minmax(0, 1fr); }
  .article-aside { position: static; padding: var(--space-5) 0 0; border-left: 0; border-top: 1px solid var(--border); }
  .article-aside-acciones { display: none; }
  /* Sin índice, la barra lateral no tiene nada que mostrar en pantallas angostas */
  .article-aside:not(.con-indice) { display: none; }
  .article-share { display: flex; }
}


/* Páginas legales (privacidad, términos): el texto va en su propia tarjeta */
.article-body {
  padding: clamp(1.5rem, 1rem + 3vw, 3.5rem);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-2xl);
  background-color: var(--surface-glass);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  backdrop-filter: blur(16px) saturate(1.3);
}

.article-body.prose {
  max-width: none;
  font-size: 1.125rem;
}

.article-body.prose > * {
  max-width: 70ch;
  margin-inline: auto;
}

.article-body.prose :where(h2) {
  color: var(--text-strong);
  letter-spacing: -0.03em;
}

.article-body.prose :where(img, figure, iframe, video) {
  max-width: 100%;
}


/* =====================================================================
   15. TIPOGRAFÍA
   ---------------------------------------------------------------------
   Space Grotesk  → títulos (display), subtítulos y tarjetas (heading)
   Inter          → texto y botones (la trae CSS_FRAMEWORK/estilos.css)
   JetBrains Mono → etiquetas pequeñas (eyebrow, badges, métricas, footer)
   Space Grotesk se carga con un <link> en cada página (ver _partials/head.php).
   ===================================================================== */

:root {
  --dvk-display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --dvk-heading: "Space Grotesk", "Inter", system-ui, sans-serif;
  --dvk-body:    "Inter", system-ui, sans-serif;
  --dvk-label:   "JetBrains Mono", ui-monospace, monospace;

  --display-weight: 700;
  --display-tracking: -0.045em;
  --heading-weight: 600;
  --label-tracking: 0.12em;
  --label-size: 0.76rem;

  /* el framework toma estos tres */
  --font-sans: var(--dvk-body);
  --font-heading: var(--dvk-heading);
  --font-mono: var(--dvk-label);
}

/* ---- display ------------------------------------------------------- */
.hero-title,
.page-title,
.article-title,
.section-title,
.stat-value,
.nav-logo,
.process-step::after {
  font-family: var(--dvk-display);
  font-weight: var(--display-weight);
  letter-spacing: var(--display-tracking);
}

.nav-logo {
  letter-spacing: -0.03em;
}

/* ---- heading -------------------------------------------------------- */
h3,
h4,
.card-title {
  font-weight: var(--heading-weight);
}

/* ---- label ---------------------------------------------------------- */
.eyebrow,
.hero-tag-label,
.badge,
.stat-label,
.stat-source,
.scroll-cue,
.mockup-url,
.site-footer h4,
.footer-title,
.legal-copy {
  font-family: var(--dvk-label);
}

.eyebrow,
.hero-tag-label,
.scroll-cue,
.site-footer h4 {
  letter-spacing: var(--label-tracking);
}

.eyebrow {
  font-size: var(--label-size);
}

.hero-tag-label {
  font-size: calc(var(--label-size) - 0.02rem);
}

.stat-label {
  letter-spacing: 0.02em;
}


/* =====================================================================
   FORMULARIO DE CONTACTO: reCAPTCHA v3
   Google permite ocultar su insignia flotante si la página muestra el
   aviso de privacidad/términos (.recaptcha-aviso, en el formulario).
   ===================================================================== */
.grecaptcha-badge { visibility: hidden; }

.recaptcha-aviso {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.5;
}

.recaptcha-aviso a { text-decoration: underline; }


/* =====================================================================
   PÁGINAS LEGALES (privacidad/, terminos_y_condiciones/)
   El recuadro "En pocas palabras" va dentro del texto: su primer título
   no necesita el margen superior que .prose le pone a los h2.
   ===================================================================== */
.article-body .card {
  margin-block: var(--space-6);
}

.article-body .card > :first-child {
  margin-top: 0;
}

.article-body .card > :last-child {
  margin-bottom: 0;
}
