/* ==========================================================================
   Hardening — Sistema de diseño
   División de ciberseguridad de Dolbuck, S.L.
   Paleta verificada WCAG 2.1 AA sobre fondo oscuro.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */
:root {
  /* Superficies */
  --bg:            #080b14;
  --bg-alt:        #0b1120;
  --surface:       #101729;
  --surface-2:     #151d33;
  --surface-3:     #1b2440;

  /* Bordes */
  --border:        rgba(255, 255, 255, .08);
  --border-strong: rgba(255, 255, 255, .16);

  /* Texto (contraste sobre --bg) */
  --text:          #f2f5fa;   /* 17.99:1 */
  --text-2:        #a8b3c7;   /*  9.30:1 */
  --text-3:        #8491a8;   /*  6.17:1 */

  /* Marca */
  --orange:        #f86805;   /* relleno — texto #080b14 sobre él = 6.53:1 */
  --orange-hover:  #ff7b1f;
  --orange-text:   #ff9a4d;   /*  9.34:1 sobre --bg */
  --blue:          #2042a1;   /* relleno — texto #fff sobre él = 8.92:1 */
  --blue-hover:    #2a53c4;
  --blue-text:     #6b9bff;   /*  7.26:1 sobre --bg */

  /* Semánticos */
  --accent:        var(--orange);
  --accent-text:   var(--orange-text);
  --accent-rgb:    248, 104, 5;   /* el mismo tono que --accent, para componentes */
  --accent-on:     #080b14;
  --success-text:  #4ade80;

  /* Tipografía */
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --step--1: clamp(.82rem, .80rem + .10vw, .88rem);
  --step-0:  clamp(1rem, .97rem + .15vw, 1.06rem);
  --step-1:  clamp(1.15rem, 1.08rem + .34vw, 1.35rem);
  --step-2:  clamp(1.38rem, 1.24rem + .70vw, 1.80rem);
  --step-3:  clamp(1.65rem, 1.39rem + 1.30vw, 2.45rem);
  --step-4:  clamp(1.95rem, 1.48rem + 2.35vw, 3.30rem);
  --step-5:  clamp(2.30rem, 1.50rem + 4.00vw, 4.50rem);

  /* Espaciado */
  --space-1: .25rem;
  --space-2: .5rem;
  --space-3: .75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --space-9: 6rem;

  /* Layout */
  --gutter: 1rem;
  --maxw: 1200px;
  --maxw-narrow: 760px;
  --radius: 14px;
  --radius-sm: 9px;
  --radius-lg: 22px;
  --header-h: 72px;

  /* Elevación */
  --shadow-1: 0 1px 2px rgba(0,0,0,.4);
  --shadow-2: 0 10px 30px -12px rgba(0,0,0,.7);
  --shadow-3: 0 24px 60px -20px rgba(0,0,0,.8);

  --ease: cubic-bezier(.22, 1, .36, 1);
}

@media (min-width: 640px)  { :root { --gutter: 1.75rem; } }
@media (min-width: 1024px) { :root { --gutter: 2.5rem; --header-h: 80px; } }

/* --------------------------------------------------------------------------
   2. Reset / base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  font-feature-settings: "cv11", "ss01";
}

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

h1, h2, h3, h4 {
  line-height: 1.12;
  letter-spacing: -.022em;
  font-weight: 700;
  text-wrap: balance;
}

h1 { font-size: var(--step-5); }
h2 { font-size: var(--step-4); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); }

p { text-wrap: pretty; }

a { color: var(--accent-text); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--text); }

ul, ol { padding-left: 1.2em; }

button, input, select, textarea { font: inherit; color: inherit; }

:focus-visible {
  outline: 2px solid var(--orange-text);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection { background: var(--orange); color: #080b14; }

hr { border: 0; border-top: 1px solid var(--border); margin: var(--space-7) 0; }

/* Enlace de salto para lectores de pantalla / teclado */
.skip-link {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translate(-50%, -120%);
  z-index: 200;
  background: var(--orange);
  color: #080b14;
  font-weight: 650;
  padding: .7rem 1.2rem;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  text-decoration: none;
  transition: transform .2s var(--ease);
}
.skip-link:focus { transform: translate(-50%, 0); color: #080b14; }

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

/* --------------------------------------------------------------------------
   3. Layout
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--narrow { max-width: var(--maxw-narrow); }

.section { padding-block: clamp(3.5rem, 2rem + 7vw, 7rem); }
.section--tight { padding-block: clamp(2.5rem, 1.5rem + 4vw, 4.5rem); }
.section--alt { background: var(--bg-alt); }
.section--surface { background: var(--surface); }

.stack > * + * { margin-top: var(--flow, 1.25rem); }
.stack--lg { --flow: 1.75rem; }

.grid { display: grid; gap: var(--space-5); }
@media (min-width: 680px)  { .grid--2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 680px)  { .grid--3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .grid--3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 680px)  { .grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .grid--4 { grid-template-columns: repeat(4, 1fr); } }

.split { display: grid; gap: clamp(2rem, 1rem + 4vw, 4.5rem); align-items: center; }
@media (min-width: 900px) {
  .split { grid-template-columns: 1fr 1fr; }
  .split--wide-left  { grid-template-columns: 1.15fr .85fr; }
  .split--wide-right { grid-template-columns: .85fr 1.15fr; }
}

.text-center { text-align: center; }
.measure { max-width: 62ch; }
.measure-center { max-width: 62ch; margin-inline: auto; }

/* --------------------------------------------------------------------------
   4. Tipografía de apoyo
   -------------------------------------------------------------------------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent-text);
  margin-bottom: var(--space-4);
}
.eyebrow::before {
  content: "";
  width: 24px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}
.eyebrow--plain::before { display: none; }

.lead {
  font-size: var(--step-1);
  line-height: 1.55;
  color: var(--text-2);
}

.muted { color: var(--text-3); }
.soft  { color: var(--text-2); }

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

/* Palabra destacada en titulares, con subrayado degradado */
.mark {
  color: var(--accent-text);
  position: relative;
  white-space: nowrap;
}

.title-block { margin-bottom: clamp(2rem, 1rem + 3vw, 3.5rem); }
.title-block--center { text-align: center; }
.title-block--center .measure { margin-inline: auto; }
.title-block h2 { margin-bottom: var(--space-4); }

/* Titular de dos líneas: línea fina + línea gruesa */
.title-duo { display: block; }
.title-duo span {
  display: block;
  font-size: .52em;
  font-weight: 400;
  letter-spacing: -.01em;
  color: var(--text-3);
  margin-bottom: .15em;
}

/* --------------------------------------------------------------------------
   5. Botones
   -------------------------------------------------------------------------- */
.btn {
  --btn-bg: var(--orange);
  --btn-fg: #080b14;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  padding: .82rem 1.5rem;
  border: 1px solid transparent;
  border-radius: 100px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: var(--step-0);
  font-weight: 650;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: transform .18s var(--ease), background-color .18s var(--ease),
              border-color .18s var(--ease), box-shadow .18s var(--ease), color .18s var(--ease);
  will-change: transform;
}
.btn:hover {
  background: var(--orange-hover);
  color: var(--btn-fg);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px -10px rgba(248, 104, 5, .6);
}
.btn:active { transform: translateY(0); }

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--text);
  border-color: var(--border-strong);
  backdrop-filter: blur(6px);
}
.btn--ghost:hover {
  background: rgba(255, 255, 255, .06);
  border-color: var(--text-3);
  color: var(--text);
  box-shadow: none;
}

.btn--blue { --btn-bg: var(--blue); --btn-fg: #fff; }
.btn--blue:hover { background: var(--blue-hover); box-shadow: 0 10px 28px -10px rgba(32, 66, 161, .7); }

.btn--lg { padding: 1rem 1.9rem; font-size: var(--step-1); }
.btn--sm { padding: .55rem 1.05rem; font-size: var(--step--1); }
.btn--block { width: 100%; }

.btn .icon { width: 1.1em; height: 1.1em; flex: none; }
.btn:hover .icon--arrow { transform: translateX(3px); }
.icon--arrow { transition: transform .18s var(--ease); }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
}
.btn-row--center { justify-content: center; }

/* Enlace con flecha */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--accent-text);
}
.link-arrow::after {
  content: "→";
  transition: transform .18s var(--ease);
}
.link-arrow:hover { color: var(--text); }
.link-arrow:hover::after { transform: translateX(4px); }

/* --------------------------------------------------------------------------
   6. Cabecera y navegación
   -------------------------------------------------------------------------- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(8, 11, 20, .72);
  backdrop-filter: blur(14px) saturate(180%);
  -webkit-backdrop-filter: blur(14px) saturate(180%);
  border-bottom: 1px solid transparent;
  transition: border-color .25s var(--ease), background-color .25s var(--ease);
}
.header.is-scrolled {
  border-bottom-color: var(--border);
  background: rgba(8, 11, 20, .9);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  width: 100%;
}

/* Logotipo */
.logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  flex: none;
  transition: opacity .18s var(--ease);
}
.logo:hover { opacity: .82; }

/* El logotipo lleva su propia versión para fondo oscuro: el azul marino de la
   marca es ilegible sobre #080b14, así que la tipografía va en blanco roto y
   el naranja se conserva. La versión original está en logo-claro.png. */
.logo__img {
  display: block;
  height: 30px;
  width: auto;
}
@media (min-width: 1024px) { .logo__img { height: 32px; } }

/* En el pie hay sitio para el logotipo completo, con su regla y su lema. */
.logo__img--footer { height: 46px; }

/* Navegación de escritorio */
.nav { display: none; }
@media (min-width: 1240px) {
  .nav { display: flex; align-items: center; gap: .15rem; }
}
.nav__link {
  position: relative;
  white-space: nowrap;
  padding: .5rem .7rem;
  border-radius: 8px;
  font-size: .95rem;
  font-weight: 500;
  color: var(--text-2);
  text-decoration: none;
  transition: color .18s var(--ease), background-color .18s var(--ease);
}
.nav__link:hover { color: var(--text); background: rgba(255, 255, 255, .05); }
.nav__link[aria-current="page"] { color: var(--text); font-weight: 600; }
.nav__link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: .8rem;
  right: .8rem;
  bottom: .1rem;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
}

.header__actions { display: flex; align-items: center; gap: var(--space-3); }
.header__cta { display: none; }
@media (min-width: 1240px) { .header__cta { display: inline-flex; white-space: nowrap; } }

/* Con siete secciones en hardening.es, la barra no cabe a 1140 px: el menu de
   escritorio empieza a 1240 y entre 1240 y 1400 los enlaces van mas juntos.
   Por debajo de 1240 se usa el menu hamburguesa, que no tiene ese limite. */
@media (min-width: 1240px) and (max-width: 1400px) {
  .nav__link { padding: .5rem .45rem; font-size: .9rem; }
  .nav__link[aria-current="page"]::after { left: .5rem; right: .5rem; }
  .header__actions { gap: var(--space-2); }
}

/* Botón hamburguesa */
.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0 10px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
}
@media (min-width: 1240px) { .nav-toggle { display: none; } }
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .25s var(--ease), opacity .2s var(--ease);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Panel de navegación móvil */
.mobile-nav {
  position: fixed;
  inset: var(--header-h) 0 0;
  z-index: 99;
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: var(--space-6) var(--gutter) var(--space-8);
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity .25s var(--ease), transform .25s var(--ease), visibility .25s;
}
.mobile-nav.is-open { opacity: 1; visibility: visible; transform: translateY(0); }
@media (min-width: 1240px) { .mobile-nav { display: none; } }

.mobile-nav__list { list-style: none; padding: 0; margin: 0 0 var(--space-6); }
.mobile-nav__list li + li { border-top: 1px solid var(--border); }
.mobile-nav__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem .25rem;
  font-size: var(--step-1);
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}
.mobile-nav__link[aria-current="page"] { color: var(--accent-text); }
.mobile-nav__link::after { content: "→"; color: var(--text-3); }

body.nav-open { overflow: hidden; }

/* --------------------------------------------------------------------------
   7. Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-block: clamp(3.5rem, 2rem + 8vw, 7.5rem) clamp(2.5rem, 1.5rem + 4vw, 4.5rem);
}

/* Capa de glows difusos */
.hero__glow {
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
}
.hero__glow::before,
.hero__glow::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .55;
}
.hero__glow::before {
  width: 52vw; height: 52vw;
  max-width: 680px; max-height: 680px;
  top: -18%; right: -10%;
  background: radial-gradient(circle, rgba(32, 66, 161, .85) 0%, rgba(32, 66, 161, 0) 70%);
}
.hero__glow::after {
  width: 38vw; height: 38vw;
  max-width: 480px; max-height: 480px;
  bottom: -22%; left: -8%;
  background: radial-gradient(circle, rgba(248, 104, 5, .4) 0%, rgba(248, 104, 5, 0) 70%);
}

/* Retícula técnica de fondo */
.hero__grid {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, .045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 85% 65% at 50% 35%, #000 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 85% 65% at 50% 35%, #000 20%, transparent 78%);
}

.hero h1 { margin-bottom: var(--space-5); }
.hero .lead { margin-bottom: var(--space-6); max-width: 54ch; }
.hero__actions { margin-bottom: var(--space-7); }

/* Hero de página interior, más compacto */
.hero--page { padding-block: clamp(2.75rem, 1.5rem + 5vw, 5rem) clamp(2.25rem, 1.5rem + 3vw, 3.5rem); }
.hero--page h1 { font-size: var(--step-4); }

/* Migas de pan */
.breadcrumb { font-size: var(--step--1); color: var(--text-3); margin-bottom: var(--space-5); }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; padding: 0; margin: 0; }
.breadcrumb li + li::before { content: "/"; margin-right: .5rem; color: var(--border-strong); }
.breadcrumb a { color: var(--text-3); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent-text); text-decoration: underline; }
.breadcrumb [aria-current="page"] { color: var(--text-2); }

/* Píldora de credibilidad */
.pill {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: .4rem .95rem .4rem .5rem;
  margin-bottom: var(--space-5);
  background: rgba(255, 255, 255, .05);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: var(--step--1);
  color: var(--text-2);
  text-decoration: none;
}
.pill:hover { color: var(--text); border-color: var(--border-strong); }
.pill__tag {
  padding: .15rem .55rem;
  background: var(--orange);
  color: #080b14;
  border-radius: 100px;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   8. Tarjetas
   -------------------------------------------------------------------------- */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: var(--space-6);
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg-alt) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform .25s var(--ease), border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.card h3 { margin-bottom: var(--space-3); font-size: var(--step-1); }
.card p { color: var(--text-2); font-size: .97rem; }
.card > :last-child { margin-bottom: 0; }

.card--link { text-decoration: none; color: inherit; }
.card--link:hover,
.card:hover {
  transform: translateY(-4px);
  border-color: rgba(var(--accent-rgb), .4);
  box-shadow: var(--shadow-2), 0 0 44px -22px rgba(var(--accent-rgb), .45);
  color: inherit;
}
.card--link .link-arrow { margin-top: auto; padding-top: var(--space-4); }

/* Icono de tarjeta */
.card__icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: var(--space-5);
  background: rgba(var(--accent-rgb), .12);
  border: 1px solid rgba(var(--accent-rgb), .28);
  border-radius: 12px;
  color: var(--accent-text);
  flex: none;
}
.card__icon svg { width: 24px; height: 24px; }
.card__icon--blue {
  background: rgba(107, 155, 255, .12);
  border-color: rgba(107, 155, 255, .28);
  color: var(--blue-text);
}

/* Numeración de proceso */
.card__num {
  font-family: var(--mono);
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--accent-text);
  letter-spacing: .08em;
  margin-bottom: var(--space-4);
}

/* Tarjeta destacada */
.card--feature {
  background: linear-gradient(145deg, rgba(32, 66, 161, .28) 0%, var(--surface) 55%);
  border-color: rgba(107, 155, 255, .25);
}
.card--feature:hover {
  border-color: rgba(107, 155, 255, .5);
  box-shadow: var(--shadow-2), 0 0 44px -22px rgba(32, 66, 161, .7);
}

/* --------------------------------------------------------------------------
   9. Listas de características
   -------------------------------------------------------------------------- */
.check-list { list-style: none; padding: 0; display: grid; gap: var(--space-3); }
.checklist { list-style: none; padding: 0; display: grid; gap: var(--space-2); }
.checklist li { position: relative; padding-left: 1.1em; color: var(--text-2); }
.checklist li::before { content: ""; position: absolute; left: 0; top: .62em;
  width: .32em; height: .32em; border-radius: 50%; background: var(--accent); }
.check-list li {
  position: relative;
  padding-left: 2rem;
  color: var(--text-2);
}
.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .42em;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 50%;
  background: rgba(var(--accent-rgb), .15);
  border: 1px solid rgba(var(--accent-rgb), .4);
}
.check-list li::after {
  content: "";
  position: absolute;
  left: .37rem;
  top: .72em;
  width: .42rem;
  height: .22rem;
  border-left: 2px solid var(--accent-text);
  border-bottom: 2px solid var(--accent-text);
  transform: rotate(-45deg);
}
.check-list--2 { }
@media (min-width: 680px) { .check-list--2 { grid-template-columns: repeat(2, 1fr); gap: var(--space-3) var(--space-5); } }

/* Lista de servicios en etiquetas */
.tag-list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-3); }
.tag-list li {
  padding: .5rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: .93rem;
  color: var(--text-2);
  transition: border-color .2s var(--ease), color .2s var(--ease);
}
.tag-list li:hover { border-color: rgba(var(--accent-rgb), .45); color: var(--text); }

/* --------------------------------------------------------------------------
   10. Banda de cifras
   -------------------------------------------------------------------------- */
.stats {
  display: grid;
  gap: var(--space-5);
  padding: var(--space-6);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
@media (min-width: 560px) { .stats { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .stats { grid-template-columns: repeat(4, 1fr); gap: var(--space-6); } }

.stat { text-align: center; }
@media (min-width: 900px) {
  .stat { text-align: left; border-left: 1px solid var(--border); padding-left: var(--space-5); }
  .stat:first-child { border-left: 0; padding-left: 0; }
}
.stat__num {
  display: block;
  font-size: var(--step-3);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -.03em;
  color: var(--text);
  margin-bottom: .3rem;
}
.stat__num span { color: var(--accent-text); }
.stat__label { font-size: var(--step--1); color: var(--text-3); line-height: 1.4; }

/* --------------------------------------------------------------------------
   11. Acordeón (preguntas y bloques "más información")
   -------------------------------------------------------------------------- */
.accordion { border-top: 1px solid var(--border); }

.accordion__item { border-bottom: 1px solid var(--border); }

.accordion__trigger {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  width: 100%;
  padding: 1.35rem .25rem;
  background: none;
  border: 0;
  text-align: left;
  font-size: var(--step-1);
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: color .18s var(--ease);
}
.accordion__trigger:hover { color: var(--accent-text); }

.accordion__icon {
  position: relative;
  flex: none;
  width: 22px;
  height: 22px;
  margin-top: .3em;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
}
.accordion__icon::before,
.accordion__icon::after {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  translate: -50% -50%;
  background: var(--accent-text);
  border-radius: 1px;
  transition: transform .25s var(--ease), opacity .2s var(--ease);
}
.accordion__icon::before { width: 10px; height: 2px; }
.accordion__icon::after  { width: 2px; height: 10px; }
.accordion__trigger[aria-expanded="true"] .accordion__icon::after { transform: rotate(90deg); opacity: 0; }

.accordion__panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .3s var(--ease);
}
.accordion__trigger[aria-expanded="true"] + .accordion__panel { grid-template-rows: 1fr; }
.accordion__panel > div { overflow: hidden; }
.accordion__panel p,
.accordion__panel ul { color: var(--text-2); }
.accordion__panel > div > * { padding-bottom: .4rem; }
.accordion__panel > div > :first-child { padding-top: 0; }
.accordion__panel > div > :last-child { padding-bottom: 1.5rem; }

/* --------------------------------------------------------------------------
   12. Sellos y certificaciones
   -------------------------------------------------------------------------- */
.certs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: var(--space-4);
  max-width: 1000px;
  margin-inline: auto;
}
.cert {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .9rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text-2);
  transition: border-color .2s var(--ease), color .2s var(--ease);
}
.cert:hover { border-color: var(--border-strong); color: var(--text); }
.cert svg { width: 28px; height: 28px; flex: none; color: var(--blue-text); }
.cert__text { display: flex; flex-direction: column; line-height: 1.25; }
.cert__name { font-weight: 650; font-size: .95rem; color: var(--text); }
.cert__desc { font-size: .78rem; color: var(--text-3); }

/* --------------------------------------------------------------------------
   13. Banda de llamada a la acción
   -------------------------------------------------------------------------- */
.cta-band {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(2.5rem, 1.5rem + 4vw, 4rem);
  background: linear-gradient(135deg, #0d1529 0%, #15224a 55%, #1b2d63 100%);
  border: 1px solid rgba(107, 155, 255, .22);
  border-radius: var(--radius-lg);
  text-align: center;
}
.cta-band::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 420px; height: 420px;
  top: -40%; right: -8%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(248, 104, 5, .35) 0%, rgba(248, 104, 5, 0) 68%);
  filter: blur(50px);
}
.cta-band h2 { font-size: var(--step-3); margin-bottom: var(--space-4); }
.cta-band p { color: var(--text-2); max-width: 54ch; margin-inline: auto; margin-bottom: var(--space-6); }

/* --------------------------------------------------------------------------
   14. Formularios
   -------------------------------------------------------------------------- */
.form {
  display: grid;
  gap: var(--space-5);
  padding: clamp(1.5rem, 1rem + 2vw, 2.5rem);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.form__row { display: grid; gap: var(--space-5); }
@media (min-width: 620px) { .form__row--2 { grid-template-columns: repeat(2, 1fr); } }

.field { display: grid; gap: .45rem; }
.field > label {
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--text-2);
  letter-spacing: .01em;
}
.field .req { color: var(--orange-text); }

.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field select,
.field textarea {
  width: 100%;
  padding: .8rem 1rem;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
  appearance: none;
}
.field textarea { min-height: 140px; resize: vertical; }
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%238491a8'%3E%3Cpath d='M8 11 3.5 6h9z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 14px;
  padding-right: 2.5rem;
  cursor: pointer;
}
.field input::placeholder,
.field textarea::placeholder { color: var(--text-3); opacity: 1; }

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(248, 104, 5, .22);
}
.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible { outline: none; }

.field--error input,
.field--error select,
.field--error textarea { border-color: #f87171; }

.field__error {
  font-size: var(--step--1);
  color: #fca5a5;
  min-height: 0;
}
.field:not(.field--error) .field__error { display: none; }

/* Casilla de verificación */
.checkbox {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .75rem;
  align-items: start;
  font-size: var(--step--1);
  color: var(--text-2);
  line-height: 1.55;
}
.checkbox input[type="checkbox"] {
  appearance: none;
  width: 1.2rem;
  height: 1.2rem;
  margin-top: .15rem;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: 5px;
  cursor: pointer;
  flex: none;
  position: relative;
  transition: background-color .18s var(--ease), border-color .18s var(--ease);
}
.checkbox input[type="checkbox"]:checked {
  background: var(--orange);
  border-color: var(--orange);
}
.checkbox input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: .3rem;
  top: .26rem;
  width: .42rem;
  height: .22rem;
  border-left: 2px solid #080b14;
  border-bottom: 2px solid #080b14;
  transform: rotate(-45deg);
}
.checkbox a { color: var(--accent-text); }

/* Trampa anti-spam: oculta visual y semánticamente, pero rellenable por bots */
.honeypot {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px;
  overflow: hidden;
}

/* Mensajes de resultado */
.form__status {
  padding: .9rem 1.1rem;
  border-radius: var(--radius-sm);
  font-size: .95rem;
  border: 1px solid;
}
.form__status--ok    { background: rgba(74, 222, 128, .1);  border-color: rgba(74, 222, 128, .35);  color: #86efac; }
.form__status--error { background: rgba(248, 113, 113, .1); border-color: rgba(248, 113, 113, .35); color: #fca5a5; }

.legal-note {
  font-size: .78rem;
  line-height: 1.6;
  color: var(--text-3);
}

/* Bloque de datos de contacto */
.contact-list { list-style: none; padding: 0; display: grid; gap: var(--space-5); }
.contact-item { display: grid; grid-template-columns: auto 1fr; gap: var(--space-4); align-items: start; }
.contact-item__icon {
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  background: rgba(var(--accent-rgb), .12);
  border: 1px solid rgba(var(--accent-rgb), .28);
  border-radius: 11px;
  color: var(--accent-text);
  flex: none;
}
.contact-item__icon svg { width: 20px; height: 20px; }
.contact-item dt { font-size: var(--step--1); color: var(--text-3); margin-bottom: .15rem; }
.contact-item dd { margin: 0; font-weight: 600; }
.contact-item dd a { color: var(--text); text-decoration: none; }
.contact-item dd a:hover { color: var(--accent-text); text-decoration: underline; }

/* --------------------------------------------------------------------------
   15. Pie de página
   -------------------------------------------------------------------------- */
.footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding-block: var(--space-8) var(--space-5);
  font-size: .93rem;
}
.footer__grid {
  display: grid;
  gap: var(--space-7);
  margin-bottom: var(--space-7);
}
@media (min-width: 680px)  { .footer__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .footer__grid { grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: var(--space-6); } }

.footer h2 {
  font-size: .8rem;
  font-weight: 650;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: var(--space-4);
}
.footer__list { list-style: none; padding: 0; display: grid; gap: .6rem; }
.footer__list a { color: var(--text-2); text-decoration: none; }
.footer__list a:hover { color: var(--accent-text); text-decoration: underline; }

.footer__about p { color: var(--text-3); max-width: 38ch; margin-top: var(--space-4); }

.social { display: flex; gap: var(--space-3); margin-top: var(--space-5); }
.social a {
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-2);
  transition: color .18s var(--ease), border-color .18s var(--ease), transform .18s var(--ease);
}
.social a:hover { color: var(--accent-text); border-color: rgba(var(--accent-rgb), .4); transform: translateY(-2px); }
.social svg { width: 18px; height: 18px; }

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-5);
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-5);
  border-top: 1px solid var(--border);
  color: var(--text-3);
  font-size: .85rem;
}
.footer__legal { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); list-style: none; padding: 0; }
.footer__legal a { color: var(--text-3); text-decoration: none; }
.footer__legal a:hover { color: var(--text-2); text-decoration: underline; }

/* Volver arriba */
.to-top {
  position: fixed;
  right: var(--gutter);
  bottom: var(--gutter);
  z-index: 90;
  display: grid;
  place-items: center;
  width: 46px; height: 46px;
  background: var(--orange);
  color: #080b14;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity .25s var(--ease), transform .25s var(--ease), visibility .25s, background-color .2s;
  box-shadow: var(--shadow-2);
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top:hover { background: var(--orange-hover); }
.to-top svg { width: 20px; height: 20px; }

/* --------------------------------------------------------------------------
   16. Animaciones de entrada
   -------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .08s; }
.reveal[data-delay="2"] { transition-delay: .16s; }
.reveal[data-delay="3"] { transition-delay: .24s; }
.reveal[data-delay="4"] { transition-delay: .32s; }

/* Sin JavaScript, el contenido debe verse igual */
.no-js .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* --------------------------------------------------------------------------
   17. Impresión
   -------------------------------------------------------------------------- */
@media print {
  :root { --bg: #fff; --text: #000; --text-2: #333; --text-3: #555; }
  body { background: #fff; color: #000; }
  .header, .mobile-nav, .to-top, .hero__glow, .hero__grid, .nav-toggle, .form { display: none !important; }
  .card, .stats, .cta-band { border: 1px solid #ccc; background: none; }
  a { color: #000; text-decoration: underline; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: .8em; }
}

/* --------------------------------------------------------------------------
   18. Consentimiento de cookies
   -------------------------------------------------------------------------- */
.cc-banner {
  position: fixed;
  left: var(--gutter);
  bottom: var(--gutter);
  z-index: 150;
  width: min(calc(100% - var(--gutter) * 2), 460px);
  padding: clamp(1.1rem, .8rem + 1.2vw, 1.6rem);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow-3);
  transform: translateY(calc(100% + var(--gutter) + 12px));
  transition: transform .4s var(--ease), opacity .3s var(--ease);
  opacity: 0;
}
.cc-banner.is-open { transform: translateY(0); opacity: 1; }

.cc-banner__title {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: var(--step-1);
  font-weight: 700;
  margin-bottom: var(--space-3);
}
.cc-banner__title svg { width: 22px; height: 22px; color: var(--accent-text); flex: none; }

.cc-banner__text {
  font-size: .92rem;
  line-height: 1.6;
  color: var(--text-2);
  margin-bottom: var(--space-5);
  max-width: 68ch;
}
.cc-banner__text a { color: var(--accent-text); }

.cc-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.cc-actions .btn { flex: 1 1 auto; }
@media (min-width: 600px) { .cc-actions .btn { flex: 0 0 auto; } }

/* El botón de rechazar debe pesar visualmente lo mismo que el de aceptar */
.btn--equal {
  --btn-bg: var(--surface-3);
  --btn-fg: var(--text);
  border-color: var(--border-strong);
}
.btn--equal:hover {
  background: var(--surface-2);
  border-color: var(--text-3);
  color: var(--text);
  box-shadow: none;
}

.btn--link {
  --btn-bg: transparent;
  --btn-fg: var(--text-2);
  border-color: transparent;
  text-decoration: underline;
  text-underline-offset: 3px;
  padding-inline: .9rem;
}
.btn--link:hover {
  background: transparent;
  color: var(--text);
  box-shadow: none;
  transform: none;
}

/* --- Panel de preferencias ------------------------------------------------ */
.cc-overlay {
  position: fixed;
  inset: 0;
  z-index: 160;
  display: grid;
  place-items: center;
  padding: var(--gutter);
  background: rgba(4, 6, 12, .75);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s var(--ease), visibility .25s;
}
.cc-overlay.is-open { opacity: 1; visibility: visible; }

.cc-modal {
  width: min(100%, 680px);
  max-height: min(85vh, 760px);
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-3);
  transform: translateY(12px) scale(.985);
  transition: transform .25s var(--ease);
}
.cc-overlay.is-open .cc-modal { transform: none; }

.cc-modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-6) var(--space-6) var(--space-4);
  border-bottom: 1px solid var(--border);
}
.cc-modal__head h2 { font-size: var(--step-2); }
.cc-modal__head p { font-size: .9rem; color: var(--text-3); margin-top: .4rem; }

.cc-close {
  flex: none;
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-2);
  cursor: pointer;
  transition: color .18s var(--ease), border-color .18s var(--ease);
}
.cc-close:hover { color: var(--text); border-color: var(--border-strong); }
.cc-close svg { width: 18px; height: 18px; }

.cc-modal__body { padding: var(--space-5) var(--space-6); overflow-y: auto; }

.cc-group + .cc-group { margin-top: var(--space-4); }
.cc-group {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-alt);
}
.cc-group__head {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
}
.cc-group__head h3 { font-size: 1rem; font-weight: 650; }
.cc-group__head > div:first-child { flex: 1; min-width: 0; }
.cc-group__tag {
  display: inline-block;
  margin-top: .25rem;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-3);
}
.cc-group p {
  padding: 0 var(--space-5) var(--space-4);
  margin: 0;
  font-size: .86rem;
  line-height: 1.6;
  color: var(--text-3);
}

/* Interruptor */
.cc-switch { position: relative; flex: none; }
.cc-switch input {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.cc-switch input:disabled { cursor: not-allowed; }
.cc-switch span {
  display: block;
  width: 46px; height: 26px;
  background: var(--surface-3);
  border: 1px solid var(--border-strong);
  border-radius: 100px;
  transition: background-color .2s var(--ease), border-color .2s var(--ease);
  pointer-events: none;
}
.cc-switch span::after {
  content: "";
  position: absolute;
  top: 4px; left: 4px;
  width: 18px; height: 18px;
  background: var(--text-2);
  border-radius: 50%;
  transition: transform .2s var(--ease), background-color .2s var(--ease);
}
.cc-switch input:checked + span {
  background: var(--accent);
  border-color: var(--accent);
}
.cc-switch input:checked + span::after { transform: translateX(20px); background: #fff; }
.cc-switch input:disabled + span { opacity: .55; }
.cc-switch input:focus-visible + span { outline: 2px solid var(--orange-text); outline-offset: 3px; }

.cc-modal__foot {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  padding: var(--space-5) var(--space-6);
  border-top: 1px solid var(--border);
}
.cc-modal__foot .btn { flex: 1 1 auto; }

/* Enlace de reapertura en el pie */
.cc-reopen {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--text-3);
  cursor: pointer;
  text-decoration: none;
}
.cc-reopen:hover { color: var(--text-2); text-decoration: underline; }

body.cc-locked { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  .cc-banner, .cc-overlay, .cc-modal { transition: none; }
}
