/**
 * @file workers/web/src/styles/site.css
 * @description LegalCloud Web — capa de diseño común (se carga la última, sobrescribe lo antiguo):
 * hero compartido, secciones alternas, cifras, pestañas de funcionalidades, logos en movimiento,
 * precios, CTA, FAQs, contacto, pie y documentación. Sin estilos inline (CSP): todo son clases.
 */

/* ============================================================
   0. Tokens de la capa
   ============================================================ */

:root {
  --text-muted: #334155;
  --brand-tint: #eaf3fb;
  --brand-tint-2: #dfeefa;
  --navy: #0f2252;
  --navy-2: #12296a;
  --ring: 0 0 0 3px rgba(128, 220, 255, 0.45);
  --card-radius: 20px;
  --soft-shadow: 0 1px 2px rgba(15, 34, 82, 0.04), 0 8px 24px rgba(15, 34, 82, 0.06);
  --soft-shadow-hover: 0 2px 4px rgba(15, 34, 82, 0.05), 0 18px 40px rgba(15, 34, 82, 0.12);
}

[data-theme="dark"] {
  --text-muted: #94a3b8;
  --brand-tint: #111f38;
  --brand-tint-2: #15264a;
  --soft-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
  --soft-shadow-hover: 0 2px 4px rgba(0, 0, 0, 0.35), 0 18px 40px rgba(0, 0, 0, 0.4);
}

html { scroll-behavior: smooth; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* ============================================================
   1. Hero compartido
   ============================================================ */

.page-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: #fff;
  padding: clamp(64px, 9vw, 120px) var(--section-pad-x) clamp(56px, 8vw, 104px);
  background: linear-gradient(135deg, var(--navy-2) 0%, var(--blue) 48%, #3b8fd6 100%);
}

.page-hero--home { background: linear-gradient(135deg, var(--navy-2) 0%, var(--blue) 46%, #4aa8e0 100%); }
.page-hero--news { background: linear-gradient(180deg, var(--navy) 0%, var(--blue) 58%, #2a6fb8 100%); }
.page-hero--faqs { background: linear-gradient(90deg, var(--navy) 0%, var(--blue) 52%, #4aa8e0 100%); }
.page-hero--contact { background: linear-gradient(225deg, #2a6fb8 0%, var(--blue) 40%, var(--navy) 100%); }
.page-hero--docs { background: linear-gradient(160deg, var(--navy) 0%, var(--blue) 55%, #3b8fd6 100%); }
.page-hero--legal { background: linear-gradient(120deg, var(--navy) 0%, var(--blue) 70%, #2a6fb8 100%); }

[data-theme="dark"] .page-hero--home { background: linear-gradient(135deg, #0a1633 0%, #12296a 50%, #1c3d86 100%); }
[data-theme="dark"] .page-hero--news { background: linear-gradient(180deg, #0a1633 0%, #12296a 60%, #1c3d86 100%); }
[data-theme="dark"] .page-hero--faqs { background: linear-gradient(90deg, #0a1633 0%, #12296a 55%, #1c3d86 100%); }
[data-theme="dark"] .page-hero--contact { background: linear-gradient(225deg, #1c3d86 0%, #12296a 45%, #0a1633 100%); }
[data-theme="dark"] .page-hero--docs { background: linear-gradient(160deg, #0a1633 0%, #12296a 60%, #1c3d86 100%); }
[data-theme="dark"] .page-hero--legal { background: linear-gradient(120deg, #0a1633 0%, #12296a 75%, #1c3d86 100%); }

.page-hero-inner {
  position: relative;
  z-index: 1;
  max-width: var(--container-max);
  margin: 0 auto;
  display: grid;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}
.page-hero-inner.has-visual { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); }

.page-hero-content { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; max-width: 760px; }

.page-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(6px);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}
.page-hero-eyebrow .material-icons-round { font-size: 16px; }

.page-hero-title {
  margin: 0;
  color: #fff;
  font-size: clamp(32px, 4.6vw, 54px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.page-hero-accent { color: var(--blue-light); }

.page-hero-subtitle {
  margin: 0;
  max-width: 62ch;
  color: rgba(255, 255, 255, 0.92);
  font-size: clamp(16px, 1.7vw, 19px);
  line-height: 1.6;
}

.page-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; }
.page-hero-secondary { color: #fff; border-color: rgba(255, 255, 255, 0.5); background: transparent; }
.page-hero-secondary:hover { background: rgba(255, 255, 255, 0.14); color: #fff; border-color: #fff; }

.page-hero-trust { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: 13px; color: rgba(255, 255, 255, 0.85); }
.page-hero-trust .material-icons-round { font-size: 16px; }

.page-hero-visual { display: flex; justify-content: center; }
.page-hero-visual .hero-svg { width: 100%; max-width: 460px; height: auto; filter: drop-shadow(0 24px 40px rgba(6, 16, 48, 0.35)); animation: fx-bob 7s ease-in-out infinite; }

/* Movimiento decorativo (aria-hidden, sin interacción) */
.page-hero-fx { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }

.fx-orb, .fx-ring, .fx-square { position: absolute; display: block; }

.fx-orb { border-radius: 50%; background: radial-gradient(circle at 30% 30%, rgba(128, 220, 255, 0.55), rgba(128, 220, 255, 0) 70%); }
.fx-orb--a { width: 460px; height: 460px; right: -120px; top: -140px; animation: fx-pulse 7s ease-in-out infinite; }
.fx-orb--b { width: 360px; height: 360px; left: -110px; bottom: -150px; animation: fx-pulse 9s ease-in-out -3s infinite; }

.fx-ring { border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, 0.28); }
.fx-ring--a { width: 320px; height: 320px; right: 8%; top: 12%; animation: fx-ripple 6s ease-out infinite; }
.fx-ring--b { width: 220px; height: 220px; left: 6%; bottom: 8%; animation: fx-ripple 6s ease-out -2.5s infinite; }

.fx-square { border-radius: 28px; border: 1.5px solid rgba(255, 255, 255, 0.26); background: rgba(255, 255, 255, 0.05); }
.fx-square--a { width: 150px; height: 150px; right: 12%; top: 14%; animation: fx-float 9s ease-in-out infinite; }
.fx-square--b { width: 96px; height: 96px; right: 30%; bottom: 12%; animation: fx-float 7s ease-in-out -2s infinite reverse; }
.fx-square--c { width: 210px; height: 210px; left: -50px; top: 16%; animation: fx-float 11s ease-in-out -4s infinite; }
.fx-square--pulse { width: 240px; height: 240px; right: 9%; top: 18%; animation: fx-square-pulse 5s ease-in-out infinite; }

.fx-lines { position: absolute; inset: 0; width: 100%; height: 100%; }
.fx-line { fill: none; stroke: rgba(255, 255, 255, 0.34); stroke-width: 1.6; stroke-dasharray: 10 18; animation: fx-flow 18s linear infinite; }
.fx-line--b { stroke: rgba(128, 220, 255, 0.5); animation-duration: 24s; animation-direction: reverse; }
.fx-line--c { stroke: rgba(255, 255, 255, 0.2); animation-duration: 30s; }

@keyframes fx-pulse { 0%, 100% { transform: scale(1); opacity: 0.85; } 50% { transform: scale(1.14); opacity: 0.5; } }
@keyframes fx-ripple { 0% { transform: scale(0.8); opacity: 0.7; } 100% { transform: scale(1.35); opacity: 0; } }
@keyframes fx-float { 0%, 100% { transform: translateY(0) rotate(8deg); } 50% { transform: translateY(-18px) rotate(14deg); } }
@keyframes fx-square-pulse { 0%, 100% { transform: scale(1) rotate(10deg); opacity: 0.9; } 50% { transform: scale(1.12) rotate(16deg); opacity: 0.45; } }
@keyframes fx-flow { to { stroke-dashoffset: -560; } }
@keyframes fx-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

@media (prefers-reduced-motion: reduce) {
  .fx-orb, .fx-ring, .fx-square, .fx-line, .page-hero-visual .hero-svg, .btn-pulse { animation: none !important; }
  /* El carrusel de logos NO se detiene (decisión del humano 2026-10-31): va el doble de lento y se para al pasar el ratón. */
  /* `!important` porque base.css fuerza 0.01ms a todo (`*`) en este modo; la especificidad de la clase gana a `*`. */
  .logo-track { animation-duration: 120s !important; animation-iteration-count: infinite !important; }
  .logo-row--s2 .logo-track { animation-duration: 150s !important; }
  .logo-row--s3 .logo-track { animation-duration: 180s !important; }
}

@media (max-width: 899px) {
  .page-hero-inner.has-visual { grid-template-columns: 1fr; }
  .page-hero-visual { order: -1; }
  .page-hero-visual .hero-svg { max-width: 300px; }
  .fx-orb--a { width: 300px; height: 300px; }
  .fx-square--c, .fx-square--b { display: none; }
}

/* ============================================================
   2. Secciones alternas (corporativo / blanco) y cabeceras
   ============================================================ */

.section { position: relative; }
.section--white { background: var(--white); }
.section--brand { background: linear-gradient(180deg, var(--brand-tint) 0%, var(--brand-tint-2) 100%); }
.section--alt { background: var(--white); }

.section-header { max-width: 760px; margin-bottom: clamp(32px, 5vw, 56px); }
.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: var(--blue-lighter);
  border: 1px solid var(--blue-border);
  color: var(--blue);
  font-size: 11px;
  letter-spacing: 0.9px;
}
.section--brand .section-eyebrow { background: #fff; }
[data-theme="dark"] .section--brand .section-eyebrow { background: rgba(255, 255, 255, 0.06); color: var(--blue-light); }
[data-theme="dark"] .section-eyebrow { color: var(--blue-light); }
.section-eyebrow .material-icons-round { font-size: 15px; }
.section-title { font-size: clamp(26px, 3.6vw, 40px); font-weight: 800; }
.section-subtitle { font-size: clamp(15px, 1.6vw, 18px); }

/* Llamada a registrarse (al final de cada bloque) */
.section-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px 24px;
  margin: clamp(36px, 5vw, 56px) auto 0;
  padding: 18px 24px;
  max-width: 820px;
  border-radius: var(--radius-full);
  background: #fff;
  border: 1px dashed var(--blue-border);
}
[data-theme="dark"] .section-cta { background: rgba(255, 255, 255, 0.04); }
.section--white .section-cta { background: var(--brand-tint); }
[data-theme="dark"] .section--white .section-cta { background: rgba(255, 255, 255, 0.04); }
.section-cta-text { display: inline-flex; align-items: center; gap: 10px; margin: 0; font-weight: 600; font-size: 15px; color: var(--text); }
.section-cta-text .material-icons-round { color: var(--green); font-size: 22px; }
.section-cta-btn { padding: 10px 20px; }
@media (max-width: 639px) { .section-cta { border-radius: var(--radius-2xl); text-align: center; } .section-cta-text { justify-content: center; } }

/* Botones */
.btn-xl { padding: 18px 40px; font-size: 18px; border-radius: 14px; }
.btn-success { box-shadow: 0 6px 16px rgba(40, 167, 69, 0.28); }
.btn-success:hover { box-shadow: 0 10px 24px rgba(40, 167, 69, 0.38); transform: translateY(-1px); }
.btn-pulse { animation: btn-pulse 3.2s ease-in-out infinite; }
@keyframes btn-pulse {
  0%, 100% { box-shadow: 0 8px 20px rgba(40, 167, 69, 0.35), 0 0 0 0 rgba(40, 167, 69, 0.35); transform: scale(1); }
  50% { box-shadow: 0 10px 26px rgba(40, 167, 69, 0.45), 0 0 0 12px rgba(40, 167, 69, 0); transform: scale(1.025); }
}
.btn-pulse:hover { animation-play-state: paused; }

/* ============================================================
   3. Cifras
   ============================================================ */

.stat-grid { display: grid; gap: 20px; grid-template-columns: 1fr; max-width: 1040px; margin: 0 auto; }
@media (min-width: 760px) { .stat-grid { grid-template-columns: repeat(3, 1fr); } }

.stat-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 26px 24px;
  background: var(--bg-card);
  border: 1px solid rgba(28, 61, 134, 0.08);
  border-radius: var(--card-radius);
  box-shadow: var(--soft-shadow);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}
.stat-card:hover { transform: translateY(-4px); box-shadow: var(--soft-shadow-hover); }
[data-theme="dark"] .stat-card { border-color: rgba(255, 255, 255, 0.08); }

.stat-card-icon {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 18px;
  background: var(--blue-lighter);
  color: var(--blue);
}
.stat-card-icon .material-icons-round { font-size: 30px; }
.stat-card--cyan .stat-card-icon { background: #e1f6fe; color: #0e86b4; }
.stat-card--green .stat-card-icon { background: var(--green-light); color: var(--green-hover); }
[data-theme="dark"] .stat-card-icon { background: rgba(128, 220, 255, 0.12); color: var(--blue-light); }
[data-theme="dark"] .stat-card--cyan .stat-card-icon { background: rgba(128, 220, 255, 0.12); color: var(--blue-light); }
[data-theme="dark"] .stat-card--green .stat-card-icon { background: var(--green-light); color: #86efac; }

.stat-card-body { min-width: 0; }
.stat-card-value { margin: 0; font-size: clamp(34px, 4.4vw, 46px); font-weight: 800; line-height: 1; color: var(--blue); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
[data-theme="dark"] .stat-card-value { color: #fff; }
.stat-card-label { margin: 8px 0 0; font-size: 14px; line-height: 1.4; color: var(--text-muted); font-weight: 500; }

/* ============================================================
   4. Funcionalidades: pestañas verticales + capturas
   ============================================================ */

.ftabs { display: grid; gap: 28px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 960px) { .ftabs { grid-template-columns: 290px minmax(0, 1fr); gap: 40px; } }

.ftabs-list { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 10px; scrollbar-width: thin; }
@media (min-width: 960px) { .ftabs-list { flex-direction: column; overflow: visible; padding: 0; position: sticky; top: 96px; } }

.ftab {
  appearance: none;
  flex: none;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  min-width: 200px;
  text-align: left;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  cursor: pointer;
  transition: background var(--transition-base), color var(--transition-base), border-color var(--transition-base), transform var(--transition-base), box-shadow var(--transition-base);
}
@media (min-width: 960px) { .ftab { min-width: 0; } }
.ftab:hover { border-color: var(--blue-border); transform: translateX(3px); }
.ftab:focus-visible { outline: none; box-shadow: var(--ring); }
.ftab-icon { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 12px; background: var(--blue-lighter); color: var(--blue); flex: none; transition: inherit; }
.ftab-label { flex: 1; }
.ftab-chevron { font-size: 20px; opacity: 0; transform: translateX(-4px); transition: opacity var(--transition-base), transform var(--transition-base); }
.ftab.is-active {
  background: linear-gradient(135deg, var(--blue) 0%, #2a5fb8 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 10px 24px rgba(28, 61, 134, 0.32);
}
.ftab.is-active .ftab-icon { background: rgba(255, 255, 255, 0.18); color: #fff; }
.ftab.is-active .ftab-chevron { opacity: 1; transform: none; }
.ftab.is-active:hover { transform: none; }
[data-theme="dark"] .ftab-icon { background: rgba(128, 220, 255, 0.12); color: var(--blue-light); }

.fpanel { display: grid; gap: 28px; padding: clamp(20px, 3vw, 32px); background: var(--brand-tint); border: 1px solid var(--blue-border); border-radius: 24px; animation: fpanel-in 0.35s ease both; }
.fpanel[hidden] { display: none; }
@keyframes fpanel-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .fpanel { animation: none; } }
.fpanel-title { margin: 0 0 10px; font-size: clamp(22px, 2.6vw, 28px); font-weight: 800; letter-spacing: -0.01em; }
.fpanel-text { margin: 0; font-size: 16px; line-height: 1.7; color: var(--text-muted); max-width: 70ch; }
.fpanel-list { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 10px 24px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.fpanel-list li { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; font-weight: 600; color: var(--text); }
.fpanel-list .material-icons-round { color: var(--green); font-size: 20px; flex: none; margin-top: 1px; }

.shots { display: flex; flex-direction: column; gap: 14px; }
.shots-stage { position: relative; }
.shot { display: none; margin: 0; }
.shot.is-current { display: block; animation: fpanel-in 0.4s ease both; }
.shot-frame { border-radius: 14px; overflow: hidden; background: var(--bg-card); border: 1px solid var(--border-strong); box-shadow: 0 24px 56px rgba(15, 34, 82, 0.2); }
.shot-bar { display: flex; gap: 6px; padding: 10px 14px; background: linear-gradient(180deg, #f1f5f9, #e5ebf2); border-bottom: 1px solid var(--border); }
.shot-bar span { width: 10px; height: 10px; border-radius: 50%; background: #cbd5e1; }
.shot-bar span:nth-child(1) { background: #ff6058; }
.shot-bar span:nth-child(2) { background: #ffbd2e; }
.shot-bar span:nth-child(3) { background: #28c93f; }
[data-theme="dark"] .shot-bar { background: linear-gradient(180deg, #1e293b, #172033); border-color: #334155; }
.shot-img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top left; background: var(--bg); }
.shot-img--dark { display: none; }
[data-theme="dark"] .shot-img--light { display: none; }
[data-theme="dark"] .shot-img--dark { display: block; }

.shots-nav { display: flex; align-items: center; justify-content: center; gap: 14px; }
.shots-arrow { appearance: none; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--blue-border); background: var(--bg-card); color: var(--blue); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: background var(--transition-fast), transform var(--transition-fast); }
.shots-arrow:hover { background: var(--blue); color: #fff; transform: scale(1.06); }
.shots-arrow:focus-visible { outline: none; box-shadow: var(--ring); }
.shots-dots { display: flex; gap: 8px; }
.shots-dot { appearance: none; width: 9px; height: 9px; padding: 0; border-radius: 50%; border: 0; background: var(--border-strong); cursor: pointer; transition: width var(--transition-base), background var(--transition-base); }
.shots-dot.is-active { width: 26px; border-radius: 6px; background: var(--blue); }

/* ============================================================
   5. Clientes: logos en movimiento
   ============================================================ */

.section--clients { padding-bottom: clamp(40px, 6vw, 72px); overflow: hidden; }
.section--clients .section-header { margin-bottom: 32px; }
.logo-rows { display: flex; flex-direction: column; gap: 20px; width: 100%; }
.logo-row {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 8%, #000 92%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 8%, #000 92%, transparent 100%);
}
.logo-track { display: flex; align-items: center; gap: 20px; width: max-content; margin: 0; padding: 18px 0; list-style: none; animation: logo-scroll 60s linear infinite; }
.logo-row--s2 .logo-track { animation-duration: 74s; }
.logo-row--s3 .logo-track { animation-duration: 88s; }
.logo-row--reverse .logo-track { animation-direction: reverse; }
.logo-track:has(.logo-item:hover) { animation-play-state: paused; }
.logo-row--static { -webkit-mask-image: none; mask-image: none; }
.logo-row--static .logo-track { animation: none; width: auto; flex-wrap: wrap; justify-content: center; }
@keyframes logo-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.logo-item { flex: none; display: flex; align-items: center; justify-content: center; width: 180px; height: 84px; padding: 14px 22px; background: #fff; border: 1px solid rgba(28, 61, 134, 0.08); border-radius: 16px; box-shadow: var(--soft-shadow); transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease; }
[data-theme="dark"] .logo-item { background: #f8fafc; }
.logo-item img { max-width: 100%; max-height: 44px; width: auto; height: auto; object-fit: contain; filter: grayscale(1); opacity: 0.7; transition: filter 0.35s ease, opacity 0.35s ease, transform 0.35s ease; }
.logo-item:hover { transform: scale(1.03); border-color: rgba(15, 34, 82, 0.35); box-shadow: 0 10px 26px rgba(15, 34, 82, 0.45), 0 2px 6px rgba(15, 34, 82, 0.3); }
.logo-item:hover img { filter: none; opacity: 1; }
/* Tablet y móvil (< 1024 px): sin movimiento automático ni en «reducir movimiento»; cada fila se desliza con el dedo
   y se ocultan los duplicados de la pista. Va DESPUÉS del bloque reduced-motion para ganarle a igual especificidad. */
@media (max-width: 1023px) {
  .logo-row { overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .logo-row::-webkit-scrollbar { display: none; }
  .logo-track { animation: none !important; transform: none !important; padding-left: 20px; padding-right: 20px; }
  .logo-item[aria-hidden="true"] { display: none; }
}

/* ============================================================
   6. Precios
   ============================================================ */

.pricing-tabs {
  position: relative;
  left: auto;
  transform: none;
  display: flex;
  width: max-content;
  max-width: 100%;
  gap: 6px;
  padding: 6px;
  margin: 0 auto clamp(36px, 5vw, 52px);
  background: var(--brand-tint);
  border: 1px solid var(--blue-border);
  border-radius: var(--radius-full);
  box-shadow: inset 0 1px 2px rgba(15, 34, 82, 0.06);
}
.pricing-tab { gap: 8px; padding: 13px 30px; font-size: 15px; font-weight: 700; letter-spacing: 0.1px; border: 0; color: var(--text-muted); }
.pricing-tab .material-icons-round { font-size: 20px; }
.pricing-tab:hover { background: rgba(255, 255, 255, 0.7); }
.pricing-tab.is-active, [data-theme="dark"] .pricing-tab.is-active {
  background: linear-gradient(135deg, var(--blue) 0%, #2a5fb8 100%);
  color: #fff;
  border: 0;
  box-shadow: 0 8px 18px rgba(28, 61, 134, 0.35);
}
.pricing-tab.is-active:hover { background: linear-gradient(135deg, var(--blue-hover) 0%, var(--blue) 100%); color: #fff; }
[data-theme="dark"] .pricing-tabs { background: rgba(255, 255, 255, 0.05); }
[data-theme="dark"] .pricing-tab:hover { background: rgba(255, 255, 255, 0.08); }

.pricing-grid { padding-top: 14px; }
.price-note { margin: 18px 0 0; text-align: center; font-size: 0.85rem; color: var(--text-muted, #5b6b86); }
.plan-card { border-radius: var(--card-radius); box-shadow: var(--soft-shadow); transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease; min-height: 0; }
.plan-card:hover, .plan-card.is-popular:hover { transform: scale(1.035); box-shadow: var(--soft-shadow-hover); border-color: var(--blue-border); z-index: 2; }
.plan-card.is-popular { transform: none; border-width: 2px; }
.plan-card-features { flex: 1; }
.plan-card-cta { display: none; }
@media (prefers-reduced-motion: reduce) { .plan-card:hover, .plan-card.is-popular:hover { transform: none; } }

@media (min-width: 640px) and (max-width: 1023px) {
  .pricing-grid--lifetime { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 760px; }
}
@media (min-width: 1024px) {
  .pricing-grid--lifetime { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 1020px; margin-left: auto; margin-right: auto; }
}

/* ============================================================
   7. CTA principal
   ============================================================ */

.section--cta { background: var(--white); padding-top: clamp(24px, 4vw, 48px); padding-bottom: clamp(48px, 7vw, 88px); }
.cta-banner--main { margin: 0 auto; padding: clamp(48px, 7vw, 88px) var(--section-pad-x); background: linear-gradient(135deg, var(--navy-2) 0%, var(--blue) 55%, #2a6fb8 100%); box-shadow: 0 24px 60px rgba(15, 34, 82, 0.28); }
.cta-banner--main::after { content: ""; position: absolute; width: 420px; height: 420px; right: -120px; top: -160px; border-radius: 50%; background: radial-gradient(circle, rgba(128, 220, 255, 0.4), rgba(128, 220, 255, 0) 70%); z-index: -1; animation: fx-pulse 8s ease-in-out infinite; }
.cta-banner--main .cta-banner-actions { margin-top: 8px; }

/* ============================================================
   8. Noticias (home) y bloques existentes sobre fondos nuevos
   ============================================================ */

.news-section.section { padding-top: var(--section-pad-y); padding-bottom: var(--section-pad-y); }
.home-news-cta { display: flex; justify-content: center; margin-top: 32px; }
.section--brand .addon-card, .section--brand .news-card { background: var(--bg-card); }

/* ============================================================
   9. FAQs
   ============================================================ */

.faq-page { padding: clamp(40px, 6vw, 72px) var(--section-pad-x) clamp(48px, 7vw, 88px); max-width: var(--container-max); margin: 0 auto; }
.faq-layout { display: grid; gap: 40px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 900px) { .faq-layout { grid-template-columns: 240px minmax(0, 1fr); } }

.faq-toc { position: sticky; top: 96px; padding: 18px; background: var(--brand-tint); border: 1px solid var(--blue-border); border-radius: 18px; }
.faq-toc-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.faq-toc-link { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; font-size: 14px; font-weight: 600; color: var(--text); text-decoration: none; transition: background var(--transition-fast), color var(--transition-fast); }
.faq-toc-link:hover, .faq-toc-link.is-active { background: var(--bg-card); color: var(--blue); text-decoration: none; }
@media (max-width: 899px) { .faq-toc { position: static; } .faq-toc-list { grid-auto-flow: column; overflow-x: auto; } .faq-toc-link { white-space: nowrap; } }

.faq-content { display: flex; flex-direction: column; gap: 44px; }
.faq-category { scroll-margin-top: 96px; }
.faq-category-title { display: flex; align-items: center; gap: 12px; margin: 0 0 18px; padding-bottom: 12px; border-bottom: 2px solid var(--blue-border); font-size: 22px; font-weight: 800; }
.faq-category-title .material-icons-round { color: var(--blue); background: var(--blue-lighter); border-radius: 12px; padding: 8px; font-size: 22px; }
.faq-list { display: flex; flex-direction: column; gap: 12px; }

.faq-item { background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px; transition: border-color var(--transition-base), box-shadow var(--transition-base); }
.faq-item:hover { border-color: var(--blue-border); }
.faq-item[open] { border-color: var(--blue-border); box-shadow: var(--soft-shadow); }
.faq-question { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px; font-size: 16px; font-weight: 700; cursor: pointer; list-style: none; }
.faq-question::-webkit-details-marker { display: none; }
.faq-chevron { color: var(--blue); transition: transform var(--transition-base); }
.faq-item[open] .faq-chevron { transform: rotate(180deg); }
.faq-answer { padding: 0 14px 20px 30px; color: var(--text-muted); font-size: 15px; line-height: 1.75; }
.faq-answer p { margin: 0 0 12px; }
.faq-answer p:last-child { margin-bottom: 0; }
.faq-empty { padding: 40px 24px; text-align: center; border: 1px dashed var(--border-strong); border-radius: 16px; color: var(--text-muted); }

/* ============================================================
   10. Contacto
   ============================================================ */


/* ============================================================
   11. Pie
   ============================================================ */

.footer { background: linear-gradient(180deg, var(--navy) 0%, #0a1633 100%); color: rgba(255, 255, 255, 0.78); border-top: 0; }
.footer-top { max-width: var(--container-max); margin: 0 auto; padding: clamp(40px, 6vw, 72px) var(--section-pad-x) 32px; display: grid; gap: 40px; grid-template-columns: 1fr; }
@media (min-width: 1024px) { .footer-top { grid-template-columns: 300px minmax(0, 1fr); gap: 56px; } }
.footer-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.footer-logo { display: inline-flex; padding: 10px 16px; background: #fff; border-radius: 14px; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25); }
.footer-logo img { height: 40px; width: auto; display: block; }
.footer-slogan { margin: 0; max-width: 30ch; font-size: 15px; line-height: 1.6; color: rgba(255, 255, 255, 0.82); }
.footer-cta { margin-top: 4px; }
.footer-grid { padding: 0; max-width: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 24px; }
@media (min-width: 900px) { .footer-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.footer-col-title { margin: 0 0 14px; color: #fff; font-size: 12px; letter-spacing: 1px; }
.footer-list { gap: 10px; }
.footer-link { display: inline-flex; align-items: center; gap: 8px; color: rgba(255, 255, 255, 0.72); font-size: 14px; transition: color var(--transition-fast), transform var(--transition-fast); }
.footer-link:hover { color: #fff; transform: translateX(3px); }
.footer-link-icon { font-size: 17px; color: var(--blue-light); opacity: 0.85; }
.footer-bottom { background: rgba(0, 0, 0, 0.22); border-top: 1px solid rgba(255, 255, 255, 0.08); padding: 18px 0; }
.footer-bottom-inner { color: rgba(255, 255, 255, 0.6); font-size: 12px; }
.footer-legal-link { color: rgba(255, 255, 255, 0.7); font-size: 12px; }
.footer-legal-link:hover { color: #fff; }
.footer-legal-item + .footer-legal-item::before { color: rgba(255, 255, 255, 0.3); }

/* ============================================================
   12. Documentación
   ============================================================ */

.docs-layout { display: grid; gap: 32px; grid-template-columns: 1fr; max-width: var(--container-max); margin: 0 auto; padding: clamp(32px, 5vw, 56px) var(--section-pad-x) clamp(48px, 7vw, 88px); }
@media (min-width: 960px) { .docs-layout { grid-template-columns: 280px minmax(0, 1fr); gap: 48px; } }
.docs-nav { position: sticky; top: 96px; align-self: start; max-height: calc(100vh - 120px); overflow-y: auto; padding: 18px; background: var(--brand-tint); border: 1px solid var(--blue-border); border-radius: 18px; }
@media (max-width: 959px) { .docs-nav { position: static; max-height: none; } }
.docs-nav-group { margin: 0 0 16px; }
.docs-nav-title { margin: 0 0 8px; padding: 0 10px; font-size: 11px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--blue); }
[data-theme="dark"] .docs-nav-title { color: var(--blue-light); }
.docs-nav-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
.docs-nav-link { display: block; padding: 8px 10px; border-radius: 9px; font-size: 14px; font-weight: 500; color: var(--text); text-decoration: none; }
.docs-nav-link:hover { background: var(--bg-card); text-decoration: none; }
.docs-nav-link.is-active { background: var(--blue); color: #fff; font-weight: 700; }
.docs-nav-api { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; padding: 12px; border-radius: 12px; background: linear-gradient(135deg, var(--blue), #2a5fb8); color: #fff; font-weight: 700; font-size: 14px; text-decoration: none; }
.docs-nav-api:hover { color: #fff; text-decoration: none; filter: brightness(1.08); }

.docs-cards { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.docs-card { display: flex; flex-direction: column; gap: 8px; padding: 22px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 18px; text-decoration: none; color: var(--text); transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base); }
.docs-card:hover { transform: translateY(-4px); box-shadow: var(--soft-shadow-hover); border-color: var(--blue-border); text-decoration: none; }
.docs-card .material-icons-round { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; background: var(--blue-lighter); color: var(--blue); border-radius: 12px; font-size: 24px; }
.docs-card-title { margin: 6px 0 0; font-size: 16px; font-weight: 700; }
.docs-card-section { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.6px; }
.docs-section-title { margin: 36px 0 16px; font-size: 20px; font-weight: 800; }
.docs-section-title:first-child { margin-top: 0; }

.doc-prose { min-width: 0; font-size: 16px; line-height: 1.75; color: var(--text); }
.doc-prose h1 { font-size: clamp(28px, 3.4vw, 38px); font-weight: 800; letter-spacing: -0.02em; margin: 0 0 20px; }
.doc-prose h2 { font-size: 26px; font-weight: 800; margin: 44px 0 14px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.doc-prose h3 { font-size: 20px; font-weight: 700; margin: 32px 0 10px; }
.doc-prose h4 { font-size: 16px; font-weight: 700; margin: 24px 0 8px; }
.doc-prose p { margin: 0 0 16px; }
.doc-prose ul, .doc-prose ol { margin: 0 0 18px; padding-left: 24px; }
.doc-prose li { margin: 4px 0; }
.doc-prose a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
[data-theme="dark"] .doc-prose a { color: var(--blue-light); }
.doc-prose code { padding: 2px 6px; border-radius: 6px; background: var(--blue-lighter); font-family: var(--font-mono); font-size: 0.88em; }
.doc-prose pre { margin: 0 0 20px; padding: 16px 18px; overflow-x: auto; border-radius: 14px; background: #0f172a; color: #e2e8f0; font-size: 13.5px; line-height: 1.6; }
.doc-prose pre code { padding: 0; background: transparent; color: inherit; font-size: inherit; }
.doc-prose blockquote { margin: 0 0 18px; padding: 12px 18px; border-left: 4px solid var(--blue-light); background: var(--brand-tint); border-radius: 0 12px 12px 0; color: var(--text-muted); }
.doc-prose table { width: 100%; border-collapse: collapse; margin: 0 0 20px; font-size: 14px; display: block; overflow-x: auto; }
.doc-prose th, .doc-prose td { padding: 10px 14px; border: 1px solid var(--border); text-align: left; }
.doc-prose th { background: var(--brand-tint); font-weight: 700; }
.doc-prose hr { border: 0; border-top: 1px solid var(--border); margin: 32px 0; }
.doc-note { display: flex; align-items: center; gap: 10px; margin: 0 0 24px; padding: 12px 16px; border-radius: 12px; background: var(--amber-light); color: var(--amber-dark); font-size: 14px; font-weight: 600; }
.doc-meta { margin: 36px 0 0; padding-top: 16px; border-top: 1px solid var(--border); font-size: 13px; color: var(--text-muted); }
.docs-empty { padding: 48px 24px; text-align: center; border: 1px dashed var(--border-strong); border-radius: 18px; color: var(--text-muted); }

.section--tight { padding-top: 0; padding-bottom: 0; }

/* Consola de la API */
.api-console { max-width: var(--container-max); margin: 0 auto; padding: clamp(24px, 4vw, 40px) var(--section-pad-x) clamp(48px, 7vw, 88px); }
.api-console-bar { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; padding: 16px 20px; margin-bottom: 24px; background: var(--brand-tint); border: 1px solid var(--blue-border); border-radius: 16px; }
.api-console-bar label { font-weight: 700; font-size: 14px; display: inline-flex; align-items: center; gap: 8px; }
.api-console-bar .material-icons-round { color: var(--blue); }
.api-token { flex: 1; min-width: 220px; padding: 10px 14px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--bg-card); color: var(--text); font-family: var(--font-mono); font-size: 13px; }
.api-token:focus { outline: none; box-shadow: var(--ring); border-color: var(--blue); }
.api-console-hint { flex-basis: 100%; margin: 0; font-size: 13px; color: var(--text-muted); }
.api-docs-root { min-height: 320px; }
.api-docs-state { padding: 40px 24px; text-align: center; border: 1px dashed var(--border-strong); border-radius: 16px; color: var(--text-muted); }

/* Utilidades */

/* Burger: un solo icono a la vez (abrir / cerrar) */
.header-burger-icon--close { display: none; }
.header-burger[aria-expanded="true"] .header-burger-icon--open { display: none; }
.header-burger[aria-expanded="true"] .header-burger-icon--close { display: block; }

/* Listas dentro de la documentación */
.doc-prose ul { list-style: disc; }
.doc-prose ol { list-style: decimal; }
.doc-prose li::marker { color: var(--blue); }

/* Cabecera: el menú de 6 entradas pasa a burger por debajo de 900 px */
.header-drawer-nav { display: flex; flex-direction: column; gap: 2px; }
.header-drawer-link { padding: 14px 4px; font-size: 17px; }
.header-drawer-cta { margin-top: 16px; padding: 14px 20px; font-size: 16px; }
@media (min-width: 640px) and (max-width: 899px) {
  .header-nav { display: none; }
  .header-burger { display: inline-flex; }
  .header-drawer { display: flex !important; }
  .header-drawer-backdrop { display: block !important; }
}
.header-logo { flex: none; }
@media (max-width: 479px) {
  .header-signup-cta { display: none; }
  .header-logo-img { height: 34px; width: auto; }
}

/* Contraste AA: verde de botón más profundo y gris de texto sobre fondos corporativos */
.btn-success { background: #1e7e34; border-color: #1e7e34; box-shadow: 0 6px 16px rgba(30, 126, 52, 0.28); }
.btn-success:hover { background: #186a2c; border-color: #186a2c; box-shadow: 0 10px 24px rgba(30, 126, 52, 0.38); }
.section--brand, .fpanel, .pricing-tabs, .faq-toc, .docs-nav, .api-console-bar { --text-muted: #334155; }
[data-theme="dark"] .section--brand, [data-theme="dark"] .fpanel, [data-theme="dark"] .pricing-tabs,
[data-theme="dark"] .faq-toc, [data-theme="dark"] .docs-nav, [data-theme="dark"] .api-console-bar { --text-muted: #94a3b8; }
@keyframes btn-pulse {
  0%, 100% { box-shadow: 0 8px 20px rgba(30, 126, 52, 0.35), 0 0 0 0 rgba(30, 126, 52, 0.35); transform: scale(1); }
  50% { box-shadow: 0 10px 26px rgba(30, 126, 52, 0.45), 0 0 0 12px rgba(30, 126, 52, 0); transform: scale(1.025); }
}
.header-signup-cta, .header-signup-cta .header-signup-label, .header-signup-cta .header-signup-arrow { color: #fff; }
[data-theme="dark"] .form-policy-link { color: var(--blue-light); }
[data-theme="dark"] .contact-form .form-policy-link, [data-theme="dark"] .legal-page .legal-back-link, [data-theme="dark"] .legal-back-link span { color: var(--blue-light); }

.section--tight-bottom { padding-top: clamp(24px, 4vw, 40px); padding-bottom: clamp(32px, 5vw, 56px); }
.section--tight-bottom .section-cta { margin-top: 0; }

.footer-link.is-soon { cursor: default; opacity: 0.7; }
.footer-link.is-soon:hover { transform: none; color: rgba(255, 255, 255, 0.72); }
.footer-soon { margin-left: 4px; padding: 1px 8px; border-radius: var(--radius-full); border: 1px solid rgba(255, 255, 255, 0.25); font-size: 10px; font-weight: 700; letter-spacing: 0.4px; text-transform: uppercase; }

.contact-wide { max-width: none; }
.contact-wide .contact-form { max-width: none; margin: 0; padding: clamp(24px, 3vw, 40px); }

/* Miniaturas ampliables */
.shot-zoom { position: relative; display: block; width: 100%; padding: 0; border: 0; background: transparent; cursor: zoom-in; font: inherit; color: inherit; text-align: left; }
.shot-zoom:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 14px; }
.shot-frame { display: block; }
.shot-bar { display: flex; }
.shot-zoom-hint { position: absolute; right: 14px; bottom: 14px; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: rgba(15, 34, 82, 0.82); color: #fff; opacity: 0; transform: scale(0.9); transition: opacity var(--transition-base), transform var(--transition-base); pointer-events: none; }
.shot-zoom:hover .shot-zoom-hint, .shot-zoom:focus-visible .shot-zoom-hint { opacity: 1; transform: none; }
.shot-zoom:hover .shot-frame { box-shadow: 0 28px 64px rgba(15, 34, 82, 0.28); }

/* Visor de capturas: ocupa la mitad del navegador (ancho y alto), centrado */
body.has-lightbox { overflow: hidden; }
.lightbox { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; animation: lightbox-in 0.2s ease both; }
.lightbox[hidden] { display: none; }
@keyframes lightbox-in { from { opacity: 0; } to { opacity: 1; } }
.lightbox-backdrop { position: absolute; inset: 0; background: rgba(8, 15, 35, 0.74); backdrop-filter: blur(3px); }
.lightbox-dialog { position: relative; display: flex; flex-direction: column; width: min(max(50vw, 800px), 96vw); height: min(max(50vh, 800px), 94vh); padding: 10px 14px 14px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 18px; box-shadow: 0 32px 80px rgba(0, 0, 0, 0.45); }
.lightbox-bar { display: flex; align-items: center; gap: 12px; flex: none; min-height: 40px; }
.lightbox-title { margin: 0; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; font-weight: 700; color: var(--text); }
.lightbox-count { margin: 0; font-size: 13px; font-weight: 600; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.lightbox-close, .lightbox-nav { appearance: none; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--border-strong); background: var(--bg-card); color: var(--text); border-radius: 50%; cursor: pointer; transition: background var(--transition-fast), color var(--transition-fast), transform var(--transition-fast); }
.lightbox-close { width: 36px; height: 36px; }
.lightbox-nav { width: 42px; height: 42px; flex: none; z-index: 1; box-shadow: var(--soft-shadow); }
.lightbox-close:hover, .lightbox-nav:hover { background: var(--blue); border-color: var(--blue); color: #fff; }
.lightbox-close:focus-visible, .lightbox-nav:focus-visible { outline: none; box-shadow: var(--ring); }
.lightbox-nav[hidden] { display: none; }
.lightbox-stage { position: relative; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 6px; }
.lightbox-scroll { flex: 1; min-width: 0; height: 100%; overflow: auto; border-radius: 10px; background: var(--bg); scrollbar-width: thin; }
.lightbox-scroll:focus-visible { outline: none; box-shadow: var(--ring); }
.lightbox-img { display: block; width: 100%; height: auto; }
.lightbox-img--dark { display: none; }
[data-theme="dark"] .lightbox-img--light { display: none; }
[data-theme="dark"] .lightbox-img--dark { display: block; }
@media (max-width: 899px) { .lightbox-dialog { width: 96vw; height: min(70vh, 92vh); } .lightbox-nav { position: absolute; top: 50%; transform: translateY(-50%); opacity: 0.92; } .lightbox-nav--prev { left: 6px; } .lightbox-nav--next { right: 6px; } }
@media (prefers-reduced-motion: reduce) { .lightbox { animation: none; } }
[data-theme="dark"] .legal-page-eyebrow, [data-theme="dark"] .legal-eyebrow-with-margin { color: var(--blue-light); }

/* Noticias: detalle */
.news-detail-cover { aspect-ratio: 1200 / 630; margin-bottom: var(--space-2); box-shadow: var(--soft-shadow); }
.news-detail-wrap--solo { grid-template-columns: minmax(0, var(--container-narrow)); justify-content: center; }
.news-detail-wrap--solo .news-detail-main { max-width: none; }
.news-detail-body > * + * { margin-top: var(--space-3); }
.news-detail-body h2 { margin-top: var(--space-8); }
.news-detail-body h3 { margin-top: var(--space-6); }
.news-detail-body ul + p, .news-detail-body ol + p, .news-detail-body ul + h2, .news-detail-body ol + h2 { margin-top: var(--space-5); }
[data-theme="dark"] .news-detail-body a { color: var(--blue-light); }
[data-theme="dark"] .news-detail-body a:hover { color: #fff; }
.news-detail-body ul, .news-detail-body ol { padding-left: var(--space-6); }

/* Pie en móvil: los marcadores no se salen de la columna */
.footer-link.is-soon { flex-wrap: wrap; row-gap: 4px; }

/* Tarjetas de noticias: toda la tarjeta es el enlace (sin «Leer más») */
.news-card { position: relative; }
.news-card-title a::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.news-card-title a:focus-visible { outline: none; }
.news-card:focus-within { box-shadow: var(--ring); border-color: var(--blue); }
.news-card:hover .news-card-title a { color: var(--blue); }
[data-theme="dark"] .news-card:hover .news-card-title a { color: var(--blue-light); }
