/* ==========================================================================
   DC Virtual — hoja de estilos del sitio
   Mobile-first. Paleta de marca: teal #1e8a8a sobre petróleo #0c1e21.
   ========================================================================== */

:root {
  --brand: #1e8a8a;
  --brand-strong: #177373;   /* botones y enlaces sobre blanco (contraste AA) */
  --brand-deep: #0f5a5a;
  --brand-soft: #e9f4f3;
  --brand-tint: #cfe6e4;
  --brand-bright: #45b9b2;   /* acentos sobre fondos oscuros */

  --ink: #0c1e21;
  --ink-2: #112a2e;
  --ink-3: #1b3438;
  --text: #33494d;
  --muted: #5a6d70;
  --line: #dde7e7;
  --line-strong: #c5d4d4;
  --surface: #ffffff;
  --surface-2: #f4f8f8;
  --surface-3: #eaf2f2;

  --on-dark: #ffffff;
  --on-dark-muted: #a9bdbd;
  --on-dark-line: rgba(255, 255, 255, 0.12);

  --font: 'Mona Sans', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(12, 30, 33, 0.06);
  --shadow: 0 14px 34px -16px rgba(12, 30, 33, 0.24);
  --shadow-lg: 0 40px 80px -32px rgba(2, 12, 14, 0.7);

  --container: 1200px;
  --gutter: clamp(16px, 4vw, 32px);
  --section: clamp(64px, 9vw, 120px);
  --header-h: 68px;
}

@media (min-width: 1100px) {
  :root { --header-h: 78px; }
}

/* Base
   ========================================================================== */

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

/* Sin scroll-behavior: smooth global: en Chromium interrumpe el salto al ancla al cargar la página.
   El desplazamiento suave de enlaces internos se hace en dcvirtual.js. */
html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body.nav-open { overflow: hidden; }

h1, h2, h3, h4 {
  margin: 0 0 0.5em;
  color: var(--ink);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.15rem, 1.35rem + 3.4vw, 3.7rem); letter-spacing: -0.03em; line-height: 1.08; }
h2 { font-size: clamp(1.75rem, 1.2rem + 2.1vw, 2.7rem); }
h3 { font-size: clamp(1.1rem, 1rem + 0.45vw, 1.28rem); line-height: 1.3; letter-spacing: -0.01em; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a {
  color: var(--brand-strong);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover { color: var(--brand-deep); }

img, svg { max-width: 100%; height: auto; display: block; }

strong { color: var(--ink); font-weight: 650; }

:focus-visible {
  outline: 3px solid var(--brand-bright);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection { background: var(--brand-tint); color: var(--ink); }

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 1000;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  font-weight: 600;
  box-shadow: var(--shadow);
}

.skip-link:focus { top: 12px; }

/* Layout
   ========================================================================== */

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  position: relative;
  padding-block: var(--section);
}

.section--tight { padding-block: clamp(48px, 6vw, 80px); }
.section--flush-top { padding-top: 0; }
.section--alt { background: var(--surface-2); }

.section--dark {
  background: var(--ink);
  color: var(--on-dark-muted);
  overflow: hidden;
  isolation: isolate;
}

.section--dark h2,
.section--dark h3,
.section--dark strong { color: #fff; }

.section-head {
  max-width: 760px;
  margin-bottom: clamp(36px, 5vw, 56px);
}

.section-head--center {
  margin-inline: auto;
  text-align: center;
}

.section-head .lead { margin-top: 4px; }

.section-foot {
  display: flex;
  justify-content: center;
  margin-top: clamp(32px, 4vw, 48px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand-strong);
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

.section-head--center .eyebrow::after,
.error-page .eyebrow::after {
  content: "";
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

.section--dark .eyebrow,
.hero .eyebrow,
.page-hero .eyebrow { color: var(--brand-bright); }

.lead {
  font-size: clamp(1.05rem, 1rem + 0.3vw, 1.2rem);
  line-height: 1.7;
  color: var(--muted);
}

.section--dark .lead { color: var(--on-dark-muted); }

.text-accent { color: var(--brand); }

.section--dark .text-accent,
.hero .text-accent,
.page-hero .text-accent,
.cta-band .text-accent { color: var(--brand-bright); }

.grid {
  display: grid;
  gap: clamp(16px, 2vw, 24px);
}

@media (min-width: 640px) {
  .grid--2,
  .grid--3,
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
  .grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.split {
  display: grid;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}

@media (min-width: 1024px) {
  .split { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split--start { align-items: start; }
}

/* Botones y enlaces
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: 10px;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 650;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.btn i { font-size: 0.95em; transition: transform 0.2s ease; }
.btn:hover .fa-arrow-right { transform: translateX(3px); }
.btn[disabled] { opacity: 0.7; cursor: progress; }

.btn--primary {
  background: var(--brand-strong);
  color: #fff;
  box-shadow: 0 10px 22px -12px rgba(23, 115, 115, 0.9);
}

.btn--primary:hover { background: var(--brand-deep); color: #fff; }

.btn--outline {
  background: #fff;
  border-color: var(--line-strong);
  color: var(--ink);
}

.btn--outline:hover { border-color: var(--brand); color: var(--brand-strong); }

.btn--light { background: #fff; color: var(--ink); }
.btn--light:hover { background: var(--brand-soft); color: var(--ink); }

.btn--ghost-light {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.28);
  color: #fff;
}

.btn--ghost-light:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.6);
  color: #fff;
}

.btn--sm {
  min-height: 42px;
  padding: 9px 16px;
  font-size: 0.9rem;
}

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

@media (max-width: 479px) {
  .btn-row .btn { flex: 1 1 100%; }
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 650;
  color: var(--brand-strong);
}

.link-arrow i { font-size: 0.9em; transition: transform 0.2s ease; }
.link-arrow:hover i { transform: translateX(3px); }

/* Encabezado
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(12, 30, 33, 0.94);
  border-bottom: 1px solid var(--on-dark-line);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  backdrop-filter: saturate(140%) blur(12px);
  transition: box-shadow 0.2s ease;
}

.site-header.is-scrolled { box-shadow: 0 10px 30px -18px rgba(0, 0, 0, 0.8); }

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 16px;
  height: var(--header-h);
}

.site-header__logo {
  flex: none;
  display: block;
}

.site-header__logo img {
  width: auto;
  height: 40px;
}

@media (min-width: 1100px) {
  .site-header__logo img { height: 48px; }
}

.main-nav {
  display: none;
  flex: 1;
}

.main-nav ul {
  display: flex;
  justify-content: center;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.main-nav a {
  position: relative;
  display: block;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.95rem;
  font-weight: 550;
}

.main-nav a:hover { color: #fff; background: rgba(255, 255, 255, 0.06); }
.main-nav a[aria-current="page"] { color: #fff; }

.main-nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 4px;
  height: 2px;
  border-radius: 2px;
  background: var(--brand-bright);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.header-login,
.header-cta { display: none; }

.header-login {
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.92rem;
  font-weight: 550;
  white-space: nowrap;
}

.header-login:hover { color: #fff; background: rgba(255, 255, 255, 0.06); }
.header-login i { color: var(--brand-bright); }

@media (min-width: 640px) {
  .header-cta { display: inline-flex; }
}

@media (min-width: 1100px) {
  .main-nav { display: block; }
  .header-actions { margin-left: 0; }
  .header-login { display: inline-flex; }
  .header-login span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
}

@media (min-width: 1280px) {
  .header-login span { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  background: transparent;
  color: #fff;
  cursor: pointer;
}

.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.25s ease, background-color 0.2s ease;
}

.nav-toggle__bars { position: relative; }

.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle__bars::before { top: -6px; }
.nav-toggle__bars::after { top: 6px; }

.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: translateY(-6px) rotate(-45deg); }

@media (min-width: 1100px) {
  .nav-toggle { display: none; }
}

/* Menú móvil */
.mobile-nav {
  position: fixed;
  inset: var(--header-h) 0 0 0;
  z-index: 99;
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 16px var(--gutter) 40px;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--ink);
  color: var(--on-dark-muted);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.mobile-nav.is-open {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.mobile-nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.mobile-nav li + li { border-top: 1px solid var(--on-dark-line); }

.mobile-nav__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 2px;
  color: #fff;
  font-size: 1.15rem;
  font-weight: 600;
}

.mobile-nav__link i { color: var(--on-dark-muted); font-size: 0.9rem; }
.mobile-nav__link[aria-current="page"] { color: var(--brand-bright); }

.mobile-nav__actions {
  display: grid;
  gap: 12px;
}

.mobile-nav__contact {
  display: grid;
  gap: 10px;
  padding-top: 20px;
  border-top: 1px solid var(--on-dark-line);
  font-size: 0.95rem;
}

.mobile-nav__contact a { color: var(--on-dark-muted); }
.mobile-nav__contact i { width: 20px; margin-right: 8px; color: var(--brand-bright); }

@media (min-width: 1100px) {
  .mobile-nav { display: none; }
}

/* Hero de inicio
   ========================================================================== */

.hero,
.page-hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: var(--ink);
  color: var(--on-dark-muted);
}

.hero::before,
.page-hero::before,
.section--dark::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(206, 224, 224, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(206, 224, 224, 0.05) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 75% 70% at 75% 25%, #000 25%, transparent 75%);
  mask-image: radial-gradient(ellipse 75% 70% at 75% 25%, #000 25%, transparent 75%);
}

.hero::after,
.page-hero::after,
.section--dark::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: -300px;
  right: -240px;
  width: 760px;
  height: 760px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(30, 138, 138, 0.42), rgba(30, 138, 138, 0) 65%);
  pointer-events: none;
}

.hero { padding-block: clamp(48px, 8vw, 104px) clamp(56px, 9vw, 112px); }

.hero__grid {
  display: grid;
  gap: clamp(40px, 6vw, 56px);
  align-items: center;
}

@media (min-width: 1024px) {
  .hero__grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
}

.hero h1 { color: #fff; margin-bottom: 22px; }

.hero__lead {
  max-width: 600px;
  margin-bottom: 32px;
  font-size: clamp(1.05rem, 1rem + 0.35vw, 1.2rem);
  line-height: 1.7;
}

.hero__checks {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.93rem;
  color: #d4e3e3;
}

.hero__checks i { margin-right: 8px; color: var(--brand-bright); }

/* Maqueta del panel (ilustrativa) */
.console {
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  background: #0f2528;
  box-shadow: var(--shadow-lg);
  color: #cfe0df;
  font-size: 13px;
  line-height: 1.45;
}

.console__bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.console__dots { display: inline-flex; gap: 6px; }

.console__dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #2b4447;
}

.console__title { color: #fff; font-size: 12.5px; font-weight: 600; }

.console__status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-left: auto;
  color: var(--brand-bright);
  font-size: 11.5px;
  font-weight: 600;
}

.console__status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 4px rgba(69, 185, 178, 0.18);
}

.console__body {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.console__kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.kpi {
  display: grid;
  gap: 2px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
}

.kpi__label {
  font-size: 10.5px;
  line-height: 1.3;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--on-dark-muted);
}

.kpi__value {
  color: #fff;
  font-size: clamp(17px, 2vw, 21px);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.kpi__meta { font-size: 11px; color: var(--brand-bright); }

.meter {
  position: relative;
  display: block;
  height: 6px;
  margin-top: 6px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
}

.meter > span {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--value, 50%);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), var(--brand-bright));
}

.console__table {
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  overflow: hidden;
}

.console__row {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
}

.console__row + .console__row { border-top: 1px solid rgba(255, 255, 255, 0.06); }

.console__row--head {
  background: rgba(255, 255, 255, 0.03);
  color: var(--on-dark-muted);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.console__row > span:first-child {
  overflow: hidden;
  color: #fff;
  font-weight: 550;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.console__row--head > span:first-child { color: var(--on-dark-muted); font-weight: 400; }
.console__row .meter { margin: 0; }
.console__plan { display: none; }

@media (min-width: 480px) {
  .console__row { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr) auto; }
  .console__plan { display: block; color: var(--on-dark-muted); }
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.pill--ok { background: rgba(69, 185, 178, 0.14); color: #7fd6cf; }
.pill--warn { background: rgba(245, 180, 70, 0.14); color: #f3c776; }

.console__log {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 12px;
  list-style: none;
  border-radius: 10px;
  background: #0a1b1e;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11.5px;
  color: #9fb6b5;
}

.console__log li {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.console__log time { margin-right: 8px; color: #5f7b7b; }
.console__log b { margin-right: 6px; color: var(--brand-bright); font-weight: 600; }

.console__caption {
  padding: 0 16px 14px;
  color: #6f8a8a;
  font-size: 11px;
}

/* Logos de clientes
   ========================================================================== */

.logos {
  padding-block: clamp(40px, 5vw, 64px);
  border-bottom: 1px solid var(--line);
}

.logos__title {
  margin: 0 0 clamp(20px, 3vw, 28px);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0;
  text-align: center;
  color: var(--muted);
}

.logos__title .text-accent { color: var(--brand-strong); font-weight: 700; }

/* Degradados en los bordes con pseudo-elementos: una máscara sobre la animación no se pinta de forma confiable */
.marquee {
  --marquee-fade: #fff;
  position: relative;
  overflow: hidden;
}

.section--alt .marquee,
.logos.section--alt .marquee { --marquee-fade: var(--surface-2); }

.marquee::before,
.marquee::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 1;
  width: clamp(24px, 8vw, 120px);
  pointer-events: none;
}

.marquee::before { left: 0; background: linear-gradient(90deg, var(--marquee-fade), transparent); }
.marquee::after { right: 0; background: linear-gradient(-90deg, var(--marquee-fade), transparent); }

.marquee__track {
  display: flex;
  width: max-content;
  margin: 0;
  padding: 0;
  list-style: none;
  animation: marquee 70s linear infinite;
}

.marquee:hover .marquee__track { animation-play-state: paused; }

@keyframes marquee {
  to { transform: translateX(-50%); }
}

.logo-tile {
  display: grid;
  flex: none;
  place-items: center;
  width: 188px;
  height: 88px;
  margin-right: 14px;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.logo-tile img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.logo-tile:hover img { opacity: 1; }

.logo-tile__text {
  color: #5c5c5c;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

@media (prefers-reduced-motion: reduce) {
  .marquee::before,
  .marquee::after { display: none; }

  .marquee__track {
    flex-wrap: wrap;
    justify-content: center;
    width: auto;
    gap: 12px;
    padding-inline: var(--gutter);
    animation: none;
  }

  .marquee__track .logo-tile { margin-right: 0; }
  .marquee__track [aria-hidden="true"] { display: none; }
}

/* Tarjetas y componentes de contenido
   ========================================================================== */

.card {
  height: 100%;
  padding: clamp(22px, 3vw, 30px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.card:hover { border-color: var(--brand-tint); box-shadow: var(--shadow); }
.card h3 { margin-bottom: 10px; }
.card p { color: var(--muted); }

.card--link {
  display: flex;
  flex-direction: column;
  color: inherit;
}

.card--link:hover { color: inherit; transform: translateY(-2px); }
.card--link .link-arrow { margin-top: auto; padding-top: 18px; }

.section--dark .card,
.section--dark .feature {
  border-color: var(--on-dark-line);
  background: rgba(255, 255, 255, 0.035);
}

.section--dark .card:hover { border-color: rgba(69, 185, 178, 0.45); box-shadow: none; }
.section--dark .card p,
.section--dark .feature p { color: var(--on-dark-muted); }

.icon-badge {
  display: inline-grid;
  flex: none;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 18px;
  border-radius: 12px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-size: 20px;
}

.section--dark .icon-badge {
  background: rgba(69, 185, 178, 0.12);
  color: var(--brand-bright);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.chips li {
  padding: 4px 10px;
  border-radius: 99px;
  background: var(--surface-3);
  color: var(--ink-3);
  font-size: 0.78rem;
  font-weight: 600;
}

.check-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  position: relative;
  padding-left: 32px;
}

.check-list li::before {
  content: "\f00c";
  position: absolute;
  top: 2px;
  left: 0;
  display: grid;
  place-items: center;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-family: "Font Awesome 6 Pro";
  font-size: 10px;
  font-weight: 900;
}

.section--dark .check-list li,
.value-box .check-list li { color: #dde9e9; }

.section--dark .check-list li::before,
.value-box .check-list li::before {
  background: rgba(69, 185, 178, 0.16);
  color: var(--brand-bright);
}

/* Pasos */
.steps {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 640px) {
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
  .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.step {
  position: relative;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.step__num {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 18px;
  border-radius: 12px;
  background: var(--ink);
  color: #fff;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.step h3 { margin-bottom: 8px; }
.step p { color: var(--muted); }

@media (min-width: 1024px) {
  .step:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 48px;
    right: -17px;
    width: 18px;
    height: 2px;
    background: var(--line-strong);
  }
}

/* Insignias de cumplimiento */
.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.badges li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--on-dark-line);
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.035);
  color: #e6f0f0;
  font-size: 0.88rem;
  font-weight: 600;
}

.badges i { color: var(--brand-bright); }

.badges-label {
  margin: 28px 0 12px;
  font-size: 0.85rem;
  color: var(--on-dark-muted);
}

/* Nuestro origen (componente reutilizable) */
.origin { padding-bottom: clamp(40px, 5vw, 64px); }

.origin__grid {
  display: grid;
  gap: clamp(32px, 5vw, 64px);
}

@media (min-width: 1024px) {
  .origin__grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    align-items: center;
  }
}

.origin__text p:not(.eyebrow):not(.lead) { color: var(--muted); }
.origin__text .link-arrow { margin-top: 8px; }

.stats {
  display: grid;
  gap: 16px;
}

@media (min-width: 640px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.stat {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 190px;
  padding: 26px;
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--on-dark-muted);
}

.stat--accent {
  background: linear-gradient(145deg, var(--brand-strong), var(--brand-deep));
  color: #dff1ef;
}

.stat strong {
  display: block;
  margin-bottom: 8px;
  color: #fff;
  font-size: clamp(2.1rem, 1.6rem + 2vw, 2.9rem);
  font-weight: 750;
  line-height: 1;
  letter-spacing: -0.03em;
}

.pains { margin-top: clamp(48px, 6vw, 72px); }

.pains__title {
  margin-bottom: 20px;
  font-size: 1.2rem;
}

.pains__list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 1024px) {
  .pains__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.pain {
  display: grid;
  gap: 6px;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  font-size: 0.95rem;
}

.pain__from,
.pain__to {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.pain__from { color: var(--muted); }
.pain__to { color: var(--ink); font-weight: 600; }
.pain__from i { margin-top: 4px; color: #b7791f; }
.pain__to i { margin-top: 4px; color: var(--brand-strong); }
.pain__arrow { display: none; color: var(--brand); }

@media (min-width: 768px) {
  .pain {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 16px;
  }

  .pain__arrow { display: block; }
}

/* Banda de llamado a la acción */
.cta-band {
  position: relative;
  display: grid;
  gap: 28px;
  overflow: hidden;
  padding: clamp(32px, 6vw, 68px);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 88% 12%, rgba(69, 185, 178, 0.35), rgba(69, 185, 178, 0) 45%),
    linear-gradient(135deg, var(--ink) 0%, #103438 100%);
  color: var(--on-dark-muted);
}

@media (min-width: 1024px) {
  .cta-band {
    grid-template-columns: minmax(0, 1.4fr) auto;
    align-items: center;
    gap: 48px;
  }
}

.cta-band h2 { margin-bottom: 12px; color: #fff; }
.cta-band p { max-width: 620px; font-size: 1.05rem; }

/* Encabezado de páginas interiores
   ========================================================================== */

.page-hero { padding-block: clamp(44px, 7vw, 96px) clamp(48px, 6vw, 80px); }

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
  font-size: 0.86rem;
}

.breadcrumb a { color: var(--on-dark-muted); }
.breadcrumb a:hover { color: #fff; }

.breadcrumb li + li::before {
  content: "/";
  margin-right: 8px;
  opacity: 0.45;
}

.breadcrumb [aria-current="page"] { color: #fff; }

.page-hero h1 {
  max-width: 900px;
  margin-bottom: 18px;
  color: #fff;
  font-size: clamp(2rem, 1.35rem + 2.7vw, 3.2rem);
}

.page-hero .lead {
  max-width: 740px;
  color: var(--on-dark-muted);
}

/* Subnavegación de la plataforma */
.subnav {
  position: sticky;
  top: var(--header-h);
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.95);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.subnav ul {
  display: flex;
  gap: 8px;
  margin: 0;
  padding: 12px 0;
  overflow-x: auto;
  list-style: none;
  scrollbar-width: none;
}

.subnav ul::-webkit-scrollbar { display: none; }

.subnav a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: #fff;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
}

.subnav a i { color: var(--brand); }

.subnav a:hover,
.subnav a.is-active {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand-strong);
}

/* Módulos de la plataforma */
.module { scroll-margin-top: calc(var(--header-h) + 72px); }

.module__head {
  display: grid;
  gap: 28px;
  margin-bottom: clamp(32px, 4vw, 48px);
}

@media (min-width: 1024px) {
  .module__head {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    gap: 56px;
    align-items: start;
  }
}

.module__title {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.module__title .icon-badge { margin: 0; }
.module__title h2 { margin: 0; }

.value-box {
  padding: 26px 28px;
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--on-dark-muted);
}

.value-box h3 {
  margin-bottom: 16px;
  color: var(--brand-bright);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.feature {
  display: flex;
  gap: 16px;
  height: 100%;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.feature .icon-badge {
  width: 44px;
  height: 44px;
  margin: 0;
  font-size: 18px;
}

.feature h3 { margin-bottom: 6px; font-size: 1.05rem; }
.feature p { color: var(--muted); font-size: 0.95rem; }

/* Segmentos (soluciones) */
.segment {
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 100%;
  padding: clamp(24px, 3vw, 32px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  scroll-margin-top: calc(var(--header-h) + 24px);
}

.segment__head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.segment__head .icon-badge { margin: 0; }
.segment__head h3 { margin: 0; }

.segment__label {
  margin: 0 0 8px;
  color: var(--brand-strong);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.segment__challenge { color: var(--muted); }

.segment__solution {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px dashed var(--line-strong);
}

/* Planes de ejemplo */
.plans {
  display: grid;
  gap: 20px;
}

@media (min-width: 640px) {
  .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1200px) {
  .plans { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 28px 24px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.plan--featured {
  border-color: var(--brand);
  box-shadow: 0 24px 44px -28px rgba(23, 115, 115, 0.6);
}

.plan__tag {
  position: absolute;
  top: -12px;
  left: 24px;
  padding: 4px 10px;
  border-radius: 99px;
  background: var(--brand-strong);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.plan h3 { margin-bottom: 6px; }
.plan__for { color: var(--muted); font-size: 0.93rem; }

.plan__specs {
  display: grid;
  gap: 8px;
  margin: 18px 0;
  padding: 16px 0;
  border-block: 1px dashed var(--line-strong);
  font-size: 0.92rem;
  font-variant-numeric: tabular-nums;
}

.plan__specs div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.plan__specs dt { color: var(--muted); }
.plan__specs dd { margin: 0; color: var(--ink); font-weight: 600; text-align: right; }
.plan .check-list { font-size: 0.93rem; }

.plans-note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  margin-top: 28px;
  padding: 18px 22px;
  border-radius: var(--radius);
  background: var(--surface-3);
  font-size: 0.95rem;
}

/* Línea de tiempo de implementación */
.timeline {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline li {
  position: relative;
  padding: 0 0 30px 66px;
}

.timeline li:last-child { padding-bottom: 0; }

.timeline li::before {
  content: "";
  position: absolute;
  top: 48px;
  bottom: 4px;
  left: 21px;
  width: 2px;
  background: var(--line-strong);
}

.timeline li:last-child::before { display: none; }

.timeline__num {
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--brand-strong);
  color: #fff;
  font-weight: 700;
}

.timeline h3 { margin: 8px 0 6px; font-size: 1.08rem; }
.timeline p { color: var(--muted); font-size: 0.95rem; }

@media (min-width: 1024px) {
  .timeline {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 24px;
  }

  .timeline li { padding: 64px 0 0; }

  .timeline li::before {
    top: 21px;
    right: -26px;
    bottom: auto;
    left: 54px;
    width: auto;
    height: 2px;
  }
}

/* Preguntas frecuentes */
.faq {
  display: grid;
  gap: 12px;
}

.faq details {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.faq details[open] { border-color: var(--brand-tint); box-shadow: var(--shadow-sm); }

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  color: var(--ink);
  font-weight: 650;
  line-height: 1.4;
  list-style: none;
  cursor: pointer;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
  content: "\2b";
  flex: none;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--surface-3);
  color: var(--brand-strong);
  font-family: "Font Awesome 6 Pro";
  font-size: 13px;
  font-weight: 400;
  transition: transform 0.2s ease;
}

.faq details[open] summary::after { transform: rotate(45deg); }

.faq__body {
  padding: 0 22px 22px;
  color: var(--muted);
}

/* Principios y cifras */
.principle {
  padding: 24px 0 0;
  border-top: 2px solid var(--ink);
}

.principle h3 { margin-bottom: 8px; }
.principle p { color: var(--muted); }

.statement {
  padding: clamp(26px, 4vw, 40px);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.statement__label {
  margin-bottom: 12px;
  color: var(--brand-strong);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.statement p:not(.statement__label) {
  color: var(--ink);
  font-size: clamp(1.1rem, 1rem + 0.5vw, 1.35rem);
  font-weight: 550;
  line-height: 1.5;
}

.prose-lg p {
  font-size: 1.05rem;
  line-height: 1.75;
}

/* Contacto
   ========================================================================== */

.contact-grid {
  display: grid;
  gap: 24px;
}

@media (min-width: 1024px) {
  .contact-grid {
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    gap: 40px;
    align-items: start;
  }
}

.info-card {
  padding: clamp(26px, 4vw, 40px);
  border-radius: var(--radius-lg);
  background: var(--ink);
  color: var(--on-dark-muted);
}

.info-card h2 {
  margin-bottom: 24px;
  color: #fff;
  font-size: 1.35rem;
}

.info-list {
  display: grid;
  gap: 20px;
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
}

.info-list li {
  display: flex;
  gap: 14px;
}

.info-list i {
  display: grid;
  flex: none;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(69, 185, 178, 0.12);
  color: var(--brand-bright);
}

.info-list span {
  display: block;
  color: var(--on-dark-muted);
  font-size: 0.82rem;
}

.info-list a,
.info-list strong {
  color: #fff;
  font-weight: 600;
  word-break: break-word;
}

.info-list a:hover { color: var(--brand-bright); }

.info-card .btn-row { margin-top: 28px; }

.next-steps {
  margin: 0;
  padding: 22px 0 0;
  border-top: 1px solid var(--on-dark-line);
  counter-reset: next;
  list-style: none;
}

.next-steps li {
  position: relative;
  padding-left: 36px;
  counter-increment: next;
}

.next-steps li + li { margin-top: 12px; }

.next-steps li::before {
  content: counter(next);
  position: absolute;
  top: 1px;
  left: 0;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
}

.form-card {
  padding: clamp(22px, 4vw, 40px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow);
}

.form-card h2 { font-size: clamp(1.3rem, 1.1rem + 0.8vw, 1.6rem); }
.form-card > p { color: var(--muted); margin-bottom: 24px; }

.form-grid {
  display: grid;
  gap: 18px;
}

@media (min-width: 640px) {
  .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .form-field--full,
  .form-consent,
  .form-actions { grid-column: 1 / -1; }
}

.form-field label,
.form-field .label {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 600;
}

.form-field .optional { color: var(--muted); font-weight: 400; }

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-field select {
  padding-right: 40px;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%23177373' stroke-width='1.8' d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
}

.form-field textarea {
  min-height: 150px;
  resize: vertical;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--brand);
  outline: none;
  box-shadow: 0 0 0 4px rgba(30, 138, 138, 0.16);
}

.form-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--muted);
  font-size: 0.9rem;
}

.form-consent label { cursor: pointer; }
.form-consent a { font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

.form-consent input[type="checkbox"] {
  flex: none;
  width: 20px;
  height: 20px;
  min-height: 0;
  margin: 2px 0 0;
  padding: 0;
  accent-color: var(--brand-strong);
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.form-actions small { color: var(--muted); }

/* Selector de asunto del formulario ("Solicitar demo" / "Contactar") */
.segmented {
  min-width: 0;
  margin: 0 0 22px;
  padding: 0;
  border: 0;
}

.segmented legend {
  margin-bottom: 8px;
  padding: 0;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 600;
}

.segmented__options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 5px;
  border-radius: 12px;
  background: var(--surface-3);
}

.segmented__option {
  position: relative;
  cursor: pointer;
}

.segmented__option input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.segmented__option span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 10px 12px;
  border-radius: 9px;
  color: var(--muted);
  font-weight: 600;
  text-align: center;
  transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.segmented__option input:checked + span {
  background: #fff;
  color: var(--brand-strong);
  box-shadow: 0 1px 2px rgba(12, 30, 33, 0.08), 0 6px 14px -8px rgba(12, 30, 33, 0.3);
}

.segmented__option input:focus-visible + span {
  outline: 3px solid var(--brand-bright);
  outline-offset: 2px;
}

@media (max-width: 419px) {
  .segmented__option span {
    padding-inline: 8px;
    font-size: 0.92rem;
    white-space: nowrap;
  }

  .segmented__option i { display: none; }
}

/* Diálogo (política de privacidad en el formulario) */
html:has(dialog[open]) { overflow: hidden; }

.dialog {
  width: min(760px, calc(100% - 24px));
  max-width: none;
  max-height: none;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-lg);
  color: var(--text);
}

.dialog::backdrop {
  background: rgba(6, 18, 20, 0.62);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

.dialog__inner {
  display: flex;
  flex-direction: column;
  max-height: min(86vh, 900px);
}

.dialog__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--line);
}

.dialog__head h2 { margin: 0; font-size: 1.2rem; }

.dialog__close {
  display: grid;
  flex: none;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}

.dialog__close:hover { border-color: var(--brand); color: var(--brand-strong); }

.dialog__body {
  padding: 8px 24px 24px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.dialog__body .prose { max-width: none; }
.dialog__body h3 { margin-top: 28px; font-size: 1.05rem; }

.dialog__foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
}

@media (max-width: 479px) {
  .dialog__foot .btn { flex: 1 1 100%; }
}

.form-status {
  display: none;
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 10px;
  font-size: 0.95rem;
}

.form-status.is-success {
  display: block;
  border: 1px solid #b6e0c7;
  background: #e8f6ee;
  color: #14532d;
}

.form-status.is-error {
  display: block;
  border: 1px solid #f3c1c1;
  background: #fdeeee;
  color: #7f1d1d;
}

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Páginas legales
   ========================================================================== */

.legal {
  display: grid;
  gap: 32px;
}

@media (min-width: 1024px) {
  .legal {
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 64px;
    align-items: start;
  }

  .legal__toc {
    position: sticky;
    top: calc(var(--header-h) + 24px);
  }
}

.legal__toc {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.legal__toc h2 {
  margin-bottom: 12px;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.legal__toc ol {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
  font-size: 0.93rem;
}

.prose { max-width: 760px; }

.prose h2 {
  margin-top: 44px;
  font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
  scroll-margin-top: calc(var(--header-h) + 24px);
}

.prose ul { padding-left: 20px; }
.prose li { margin-bottom: 8px; }

.note {
  margin: 24px 0;
  padding: 16px 20px;
  border-left: 3px solid var(--brand);
  border-radius: 0 10px 10px 0;
  background: var(--brand-soft);
}

.muted { color: var(--muted); font-size: 0.93rem; }

/* Error 404 */
.error-page {
  max-width: 640px;
  margin-inline: auto;
  text-align: center;
}

.error-page img {
  width: min(100%, 460px);
  margin: 0 auto 32px;
}

.error-page .btn-row { justify-content: center; margin-top: 28px; }

/* Pie de página
   ========================================================================== */

.site-footer {
  padding-top: clamp(56px, 7vw, 88px);
  background: var(--ink);
  color: var(--on-dark-muted);
  font-size: 0.95rem;
}

.footer-grid {
  display: grid;
  gap: 36px;
  padding-bottom: 48px;
}

@media (min-width: 640px) {
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
  .footer-grid {
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 0.8fr) minmax(0, 1.1fr);
    gap: 48px;
  }
}

.footer-brand img.footer-logo {
  width: auto;
  height: 46px;
  margin-bottom: 20px;
}

.footer-brand p { max-width: 380px; }

.footer-backing {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
  padding: 10px 14px;
  border: 1px solid var(--on-dark-line);
  border-radius: 12px;
  color: var(--on-dark-muted);
  font-size: 0.82rem;
}

.footer-backing:hover { border-color: rgba(255, 255, 255, 0.3); color: #fff; }
.footer-backing img { width: 110px; height: auto; }

.footer-title {
  margin-bottom: 16px;
  color: #fff;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.footer-links,
.footer-contact {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-links a,
.footer-contact a { color: var(--on-dark-muted); }

.footer-links a:hover,
.footer-contact a:hover { color: #fff; }

.footer-contact li {
  display: flex;
  gap: 10px;
  word-break: break-word;
}

.footer-contact i {
  width: 18px;
  margin-top: 5px;
  color: var(--brand-bright);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding-block: 22px;
  border-top: 1px solid var(--on-dark-line);
  font-size: 0.88rem;
}

.footer-bottom p { margin: 0; }

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-legal a { color: var(--on-dark-muted); }
.footer-legal a:hover { color: #fff; }

/* Animación de aparición (solo con JS y sin movimiento reducido)
   ========================================================================== */

@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    transition-delay: var(--reveal-delay, 0s);
  }

  .js [data-reveal].is-visible,
  .js.reveal-fallback [data-reveal] {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
