/* =========================================================================
   LegalData.pro — Capa de impacto visual (rediseño 2026-06)
   Añade IMAGEN/atmósfera y diagramas sobre el sistema premium existente.
   Aislado de styles.css para mantenibilidad. Cargado después de styles.css.
   ========================================================================= */

/* -------------------------------------------------------------------------
   Hero: capa atmosférica (red de datos + escudo) en SVG nítido.
   Se compone con la rejilla y los gradientes existentes; el lado izquierdo
   queda oscuro para que el titular blanco mantenga el contraste.
   ------------------------------------------------------------------------- */
/* (Fondos de hero CONSOLIDADOS en conversion.css: impact-*.webp por página.
   Las reglas .hero/.hero-home que había aquí estaban 100% sobrescritas.) */

/* Velo izquierdo extra para blindar la legibilidad del H1. */
.hero-home .hero-content {
  position: relative;
}

/* -------------------------------------------------------------------------
   Capa atmosférica global (imagen generada con IA, muy oscura). Fija y a baja
   opacidad bajo todo el contenido: da profundidad a las secciones y, como los
   paneles son semi-transparentes (--panel ~0.82), se entrevé también en ellos.
   Es un <element> fijo (no background-attachment:fixed) para no romper en móvil.
   ------------------------------------------------------------------------- */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -3;
  /* La imagen y la opacidad las define conversion.css (impact-hero.webp, 0.24);
     aquí solo aportamos la ESTRUCTURA (capa fija a pantalla completa). */
  opacity: 0.26;
  pointer-events: none;
}

/* (Banda CTA final CONSOLIDADA en conversion.css: cta-ai.webp + overlay.) */

/* -------------------------------------------------------------------------
   Diagrama-firma: convergencia 3 disciplinas -> 360º
   Reutilizable como patrón para pirámide AI Act, madurez ENS/ISO, etc.
   ------------------------------------------------------------------------- */
.signature-visual {
  margin: clamp(1.75rem, 3.5vw, 3rem) auto 0;
  max-width: 820px;
  padding: clamp(1rem, 2.5vw, 1.75rem);
  border-radius: var(--radius-xl);
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}
.signature-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 78% 50%, rgba(75, 209, 255, 0.12), transparent 60%);
  pointer-events: none;
}
.signature-visual img,
.signature-visual svg {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
}
.signature-caption {
  margin-top: 0.85rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.92rem;
  letter-spacing: 0.01em;
}

/* -------------------------------------------------------------------------
   Diagrama-firma: convergencia 3 disciplinas -> 360º  (HTML/CSS responsive).
   Escritorio: 3 pilares a la izquierda -> flecha -> hub. Móvil: apilado
   vertical con la flecha rotada. Acrónimos universales (sin i18n).
   ------------------------------------------------------------------------- */
.convergence {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: clamp(0.85rem, 3vw, 2.25rem);
  max-width: 900px;
  margin: clamp(1.75rem, 3.5vw, 2.75rem) auto 0;
  padding: clamp(1.25rem, 3vw, 2rem);
  border-radius: var(--radius-xl);
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}
.convergence::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 82% 50%, rgba(75, 209, 255, 0.13), transparent 58%);
  pointer-events: none;
}
.conv-pillars {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  position: relative;
}
.conv-pillar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  border: 1px solid var(--line);
}
.conv-ico {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  background: linear-gradient(135deg, rgba(75, 209, 255, 0.16), rgba(166, 121, 255, 0.16));
  border: 1px solid rgba(75, 209, 255, 0.26);
  color: var(--accent);
}
.conv-ico svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.conv-txt { display: flex; flex-direction: column; line-height: 1.18; }
.conv-txt small { font-size: 0.64rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.conv-txt b { font-family: var(--font-heading); font-size: 0.98rem; color: var(--text); }
.conv-link {
  align-self: center;
  font-family: var(--font-heading);
  font-size: 1.7rem;
  line-height: 1;
  color: var(--accent);
  filter: drop-shadow(0 0 8px rgba(75, 209, 255, 0.5));
}
.conv-link::before { content: "\2192"; } /* → */
.conv-hub {
  flex: 0 0 auto;
  width: clamp(116px, 17vw, 164px);
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 38%, #10283f, #0a1626);
  border: 1px solid rgba(75, 209, 255, 0.5);
  box-shadow: 0 0 0 8px rgba(75, 209, 255, 0.06), var(--glow-accent);
  position: relative;
}
.conv-hub::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 50%;
  border: 1.4px dashed rgba(215, 196, 139, 0.45);
  pointer-events: none;
}
.conv-hub b { font-family: var(--font-heading); font-size: clamp(1.9rem, 4.5vw, 2.5rem); color: var(--text); line-height: 1; }
.conv-hub small { margin-top: 0.25rem; font-size: 0.66rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); }

@media (max-width: 680px) {
  .convergence {
    grid-template-columns: 1fr;
    justify-items: stretch;
    gap: 0.6rem;
    text-align: center;
  }
  .conv-pillars { width: 100%; }
  .conv-pillar { text-align: left; }
  .conv-link { justify-self: center; }
  .conv-link::before { content: "\2193"; } /* ↓ */
  .conv-hub { justify-self: center; margin-top: 0.2rem; }
}

/* -------------------------------------------------------------------------
   Sellos / credenciales oficiales como banda de confianza premium.
   ------------------------------------------------------------------------- */
.trust-seals {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: clamp(1.25rem, 4vw, 2.75rem);
  margin: clamp(1.5rem, 3vw, 2.25rem) auto 0;
}
.trust-seal {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-align: center;
}
.trust-seal img {
  height: clamp(72px, 9vw, 104px);
  width: auto;
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.45));
  transition: transform 0.45s var(--ease, ease);
}
.trust-seal:hover img {
  transform: translateY(-4px) scale(1.03);
}
.trust-seal span {
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* -------------------------------------------------------------------------
   Bloque "el profesional que firma": más presencia de la foto real.
   ------------------------------------------------------------------------- */
.home-author-photo img {
  border-radius: var(--radius-lg);
  box-shadow:
    0 0 0 1px rgba(75, 209, 255, 0.28),
    var(--shadow-lg);
}

@media (max-width: 720px) {
  .hero-home {
    background-position: center top, -1px -1px, -1px -1px;
    background-size: 160% auto, 56px 56px, 56px 56px;
  }
}

/* =========================================================================
   IMPACTO MÓVIL — los primeros 3 segundos.
   Above-the-fold: línea de autoridad (eyebrow) + titular potente + métricas
   de prueba + CTA principal. El resto, bajo el primer scroll. Sin perder
   texto: solo se compacta y se reordena para móvil.
   ========================================================================= */
@media (max-width: 700px) {
  .hero-home {
    padding-top: clamp(2rem, 7vw, 3rem);
    padding-bottom: clamp(2rem, 6vw, 3rem);
  }

  /* Línea de autoridad compacta y nítida */
  .hero-home .eyebrow {
    font-size: 0.62rem;
    letter-spacing: 0.1em;
    padding: 0.45rem 0.8rem;
  }

  /* Titular: protagonista absoluto, entra completo */
  .hero-home h1 {
    margin-top: 0.9rem;
    font-size: clamp(2rem, 8.6vw, 2.9rem);
    line-height: 1.04;
  }

  /* Lead: compacto, no se come la pantalla (texto íntegro en el DOM para SEO) */
  .hero-home .hero-lead {
    margin-top: 0.85rem;
    font-size: 0.96rem;
    line-height: 1.5;
  }

  /* Métricas de prueba ARRIBA del fold: se muestran antes que el lead largo */
  .hero-home .hero-content { display: flex; flex-direction: column; }
  .hero-home .eyebrow      { order: 1; }
  .hero-home h1            { order: 2; }
  .hero-home .hero-metrics { order: 3; margin-top: 1.1rem; }
  .hero-home .hero-actions { order: 4; }
  .hero-home .hero-lead    { order: 5; }
  .hero-home .hero-trust-list { order: 6; }

  /* Métricas: tres columnas compactas con número grande dorado/cian */
  .hero-home .hero-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
  }
  .hero-home .hero-metrics .metric strong {
    font-size: clamp(1.5rem, 7vw, 2rem);
  }
  .hero-home .hero-metrics .metric span {
    font-size: 0.66rem;
    line-height: 1.25;
  }

  /* CTAs: el primario manda a todo el ancho; el terciario se oculta en móvil */
  .hero-home .hero-actions {
    gap: 0.55rem;
    margin-top: 1.2rem;
  }
  .hero-home .hero-actions .btn-primary {
    width: 100%;
    justify-content: center;
    text-align: center;
    padding-block: 0.95rem;
    font-size: 1.02rem;
  }
  .hero-home .hero-actions .btn-secondary { width: 100%; justify-content: center; }
  .hero-home .hero-actions .btn-ghost { display: none; }

  /* La tarjeta de prueba (VALOR DPD) respira menos en móvil */
  .hero-home .hero-proof-card { margin-top: 0.5rem; }
}

/* =========================================================================
   Menú móvil premium — overlay full-screen inmersivo (sustituye el dropdown
   plano y soso). Jerarquía fuerte, barra de acento + chevron por enlace,
   entrada escalonada, CTA e idioma destacados, blur de fondo.
   ========================================================================= */
@media (max-width: 1240px) {
  /* Botón hamburguesa con identidad (cian/violeta) en vez de cajita gris. */
  .nav-toggle {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(75, 209, 255, 0.12), rgba(166, 121, 255, 0.12));
    border-color: rgba(75, 209, 255, 0.30);
  }
  .nav-toggle span { width: 20px; background: var(--accent); }
  body.nav-open .nav-toggle { background: rgba(75, 209, 255, 0.18); border-color: var(--line-strong); }

  /* Panel = overlay a pantalla completa bajo la barra superior. */
  .nav-panel {
    top: var(--nav-height, 86px);
    left: 0;
    right: 0;
    bottom: auto;
    /* El header tiene backdrop-filter -> es el bloque contenedor del fixed, así
       que bottom:0 no estira. Fijamos la altura con dvh (relativo al viewport). */
    height: calc(100dvh - var(--nav-height, 86px));
    padding: clamp(1.4rem, 5vw, 2.2rem) clamp(1.35rem, 7vw, 2.25rem) 2rem;
    gap: 1.25rem;
    background:
      radial-gradient(circle at 100% 0%, rgba(75, 209, 255, 0.15), transparent 46%),
      radial-gradient(circle at 0% 100%, rgba(166, 121, 255, 0.12), transparent 42%),
      linear-gradient(180deg, rgba(5, 9, 15, 0.995), rgba(8, 17, 30, 1));
    -webkit-backdrop-filter: blur(22px) saturate(140%);
    backdrop-filter: blur(22px) saturate(140%);
    border: 0;
    border-radius: 0;
    box-shadow: none;
    max-height: none;
    transform: translateY(-8px);
  }

  /* Enlaces grandes, con barra de acento a la izquierda y chevron a la derecha. */
  .nav-links { gap: 0; }
  .nav-links a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.02rem 0.3rem 1.02rem 1rem;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-soft);
    border-radius: 12px;
    border-bottom: 1px solid rgba(135, 168, 210, 0.10);
  }
  .nav-links a::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 3px;
    height: 0;
    border-radius: 3px;
    background: var(--accent);
    transform: translateY(-50%);
    opacity: 1;
    transition: height var(--transition);
  }
  .nav-links a::after {
    content: "\203A"; /* chevron › */
    position: static;
    width: auto;
    height: auto;
    left: auto;
    right: auto;
    bottom: auto;
    background: none;
    transform: none;
    opacity: 0.4;
    font-family: var(--font-heading);
    font-size: 1.4rem;
    line-height: 1;
    color: var(--accent);
    margin-left: auto;
    transition: opacity var(--transition), transform var(--transition);
  }
  .nav-links a:hover,
  .nav-links a:focus-visible,
  .nav-links a.active {
    background: rgba(75, 209, 255, 0.07);
    color: var(--text);
  }
  .nav-links a.active::before,
  .nav-links a:hover::before { height: 58%; }
  .nav-links a.active::after,
  .nav-links a:hover::after { opacity: 1; transform: translateX(2px); }

  /* Entrada escalonada de los enlaces al abrir el menú. */
  body.nav-open .nav-links a { animation: navItemIn 0.5s var(--ease, ease) both; }
  .nav-links li:nth-child(1) a { animation-delay: 0.03s; }
  .nav-links li:nth-child(2) a { animation-delay: 0.06s; }
  .nav-links li:nth-child(3) a { animation-delay: 0.09s; }
  .nav-links li:nth-child(4) a { animation-delay: 0.12s; }
  .nav-links li:nth-child(5) a { animation-delay: 0.15s; }
  .nav-links li:nth-child(6) a { animation-delay: 0.18s; }
  .nav-links li:nth-child(7) a { animation-delay: 0.21s; }
  .nav-links li:nth-child(8) a { animation-delay: 0.24s; }
  .nav-links li:nth-child(9) a { animation-delay: 0.27s; }
  .nav-links li:nth-child(10) a { animation-delay: 0.30s; }
  .nav-links li:nth-child(11) a { animation-delay: 0.33s; }
  @keyframes navItemIn {
    from { opacity: 0; transform: translateX(-14px); }
    to   { opacity: 1; transform: none; }
  }
  @media (prefers-reduced-motion: reduce) {
    body.nav-open .nav-links a { animation: none; }
  }

  /* Acciones: CTA, teléfono e idioma con presencia. */
  .nav-actions {
    margin-top: 0.4rem;
    gap: 0.85rem;
    padding-top: 1.1rem;
    border-top: 1px solid rgba(135, 168, 210, 0.14);
  }
  .nav-actions .btn-nav {
    width: 100%;
    min-height: 56px;
    font-size: 1.05rem;
    border-radius: 16px;
  }
  .nav-actions .nav-link-muted {
    text-align: center;
    padding: 0.8rem 0;
    font-size: 1.02rem;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.02);
  }
  .nav-lang {
    align-self: stretch;
    justify-content: center;
    gap: 0.3rem;
    padding: 0.35rem;
    border-radius: 16px;
  }
  .nav-lang a { flex: 1; min-width: 0; padding: 0.62rem 0; font-size: 0.92rem; }
}
