/* ============================================================
   Rellenator — sistema de diseño
   Concepto: la página se comporta como el propio producto.
   Todo (tarjetas, secciones, foco) hereda el lenguaje visual
   de un campo de formulario: borde fino, relleno pálido,
   anillo de foco azul y el destello amarillo del autorelleno.
   ============================================================ */

/* ---------- 1. Tokens ---------- */
:root {
  --ink: #0a0e1a;
  --ink-soft: #39415a;
  --muted: #6b7288;
  --paper: #ffffff;
  --field: #f2f5fb;
  --field-deep: #e9eef9;
  --line: #dfe5f2;
  --line-soft: #eaeef7;

  --brand: #2f5bff;
  --brand-deep: #1c3fcc;
  --brand-wash: #eef2ff;

  /* el amarillo aparece SOLO en el instante del autorelleno */
  --fill: #ffe86b;
  --ok: #00a878;

  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 22px;

  --maxw: 1180px;
  --gutter: clamp(20px, 5vw, 48px);

  --shadow-card: 0 1px 2px rgba(10, 14, 26, 0.04);
  --shadow-lift: 0 18px 40px -22px rgba(10, 14, 26, 0.35);
  --shadow-hero: 0 40px 80px -40px rgba(10, 14, 26, 0.45);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
h4 {
  font-family: "Space Grotesk", "Inter", sans-serif;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin: 0;
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

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

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

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  padding: 10px 18px;
  border-radius: 8px;
  transition: top 0.2s var(--ease);
}
.skip:focus {
  top: 16px;
}

/* ---------- 3. Utilidades de composición ---------- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: clamp(64px, 9vw, 128px);
}

.section--field {
  background: var(--field);
}

.section--ink {
  background: var(--ink);
  color: #fff;
}

/* Etiqueta de sección: se lee como el label de un campo */
.eyebrow {
  font-family: "JetBrains Mono", ui-monospace, "SFMono-Regular", monospace;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}
.eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  background: var(--brand);
  border-radius: 2px;
  flex: none;
}
.section--ink .eyebrow {
  color: var(--fill);
}
.section--ink .eyebrow::before {
  background: var(--fill);
}

.section-head {
  max-width: 46ch;
  margin-bottom: clamp(40px, 5vw, 64px);
}

.section-head h2 {
  font-size: clamp(2rem, 3.7vw, 3.05rem);
}

.section-head p {
  margin-top: 20px;
  color: var(--muted);
  font-size: 1.125rem;
}
.section--ink .section-head p {
  color: #a8b0c6;
}

.lead {
  color: var(--ink-soft);
  font-size: clamp(1.0625rem, 1.5vw, 1.25rem);
  line-height: 1.6;
}

/* ---------- 4. Botones ---------- */
.btn {
  --btn-bg: var(--brand);
  --btn-fg: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.01em;
  padding: 15px 26px;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease),
    background 0.18s var(--ease);
  box-shadow: 0 10px 24px -12px rgba(47, 91, 255, 0.9);
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px -14px rgba(47, 91, 255, 0.95);
}
.btn:active {
  transform: translateY(0);
}

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  border-color: var(--line);
  box-shadow: none;
}
.btn--ghost:hover {
  border-color: var(--ink);
  box-shadow: none;
}

.btn--light {
  --btn-bg: #fff;
  --btn-fg: var(--ink);
  box-shadow: 0 14px 30px -16px rgba(0, 0, 0, 0.6);
}

.btn--sm {
  padding: 10px 18px;
  font-size: 0.9375rem;
}

.btn .ico {
  width: 18px;
  height: 18px;
}

/* ---------- 5. Cabecera ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
}
.header.is-stuck {
  border-bottom-color: var(--line);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 72px;
}

.brand {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 1.3125rem;
  letter-spacing: -0.04em;
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
}

/* cursor de texto tras el logotipo: la firma más pequeña de la marca */
.brand__caret {
  width: 3px;
  height: 1.05em;
  background: var(--brand);
  border-radius: 1px;
  transform: translateY(0.12em);
  animation: blink 1.15s steps(1, end) infinite;
}
@keyframes blink {
  0%,
  49% {
    opacity: 1;
  }
  50%,
  100% {
    opacity: 0;
  }
}

.nav {
  display: none;
  gap: 30px;
  font-size: 0.9375rem;
  color: var(--ink-soft);
}
.nav a {
  position: relative;
  padding-block: 4px;
  transition: color 0.15s var(--ease);
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 0;
  background: var(--brand);
  transition: width 0.22s var(--ease);
}
.nav a:hover {
  color: var(--ink);
}
.nav a:hover::after {
  width: 100%;
}

@media (min-width: 900px) {
  .nav {
    display: flex;
  }
}

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

/* ---------- 6. Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(56px, 8vw, 104px) clamp(64px, 9vw, 120px);
  background: var(--paper);
}

/* rejilla tenue: papel pautado de formulario */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(
    ellipse 90% 60% at 50% 0%,
    #000 20%,
    transparent 75%
  );
  pointer-events: none;
}

.hero__grid {
  position: relative;
  display: grid;
  gap: clamp(44px, 6vw, 72px);
  align-items: center;
}
@media (min-width: 1000px) {
  .hero__grid {
    grid-template-columns: minmax(0, 0.86fr) minmax(0, 1fr);
  }
}

.hero h1 {
  font-size: clamp(2.6rem, 5.6vw, 4.4rem);
  letter-spacing: -0.045em;
  line-height: 0.98;
}

/* el trazo amarillo = el rastro que deja el autorelleno */
.hero h1 em {
  font-style: normal;
  white-space: nowrap;
  padding-inline: 0.07em;
  background-image: linear-gradient(var(--fill), var(--fill));
  background-repeat: no-repeat;
  background-size: 100% 0.3em;
  background-position: 0 88%;
}

.hero__lead {
  margin-top: 26px;
  max-width: 46ch;
}

.hero__actions {
  margin-top: 34px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.hero__trust {
  margin-top: 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.hero__trust li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.hero__trust .ico {
  width: 15px;
  height: 15px;
  color: var(--ok);
  flex: none;
}

/* ---------- 7. El demo: la pieza donde se gasta toda la audacia ---------- */
.demo {
  position: relative;
  border-radius: var(--radius-lg);
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-hero);
  overflow: hidden;
}

.demo__bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  background: var(--field);
  border-bottom: 1px solid var(--line);
}

.demo__dots {
  display: flex;
  gap: 6px;
  flex: none;
}
.demo__dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--line);
}

.demo__url {
  flex: 1;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 14px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.6875rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* pastilla de la extensión que "se pulsa" al iniciar la secuencia */
.demo__pill {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--brand);
  color: #fff;
  border-radius: 999px;
  padding: 5px 12px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: transform 0.2s var(--ease), box-shadow 0.3s var(--ease);
}
.demo__pill .ico {
  width: 13px;
  height: 13px;
}
.demo.is-clicking .demo__pill {
  transform: scale(0.9);
  box-shadow: 0 0 0 7px rgba(47, 91, 255, 0.16);
}

.demo__body {
  padding: clamp(22px, 3.4vw, 34px);
  display: grid;
  gap: 18px;
}

.demo__title {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: -0.02em;
  padding-bottom: 4px;
}

.field__label {
  display: block;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.6875rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 7px;
}

.field__box {
  position: relative;
  display: block;
  min-height: 48px;
  padding: 12px 44px 12px 15px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  color: var(--ink);
  transition: background 0.6s var(--ease), border-color 0.25s var(--ease),
    box-shadow 0.25s var(--ease);
}

.field--area .field__box {
  min-height: 86px;
  line-height: 1.55;
}

/* estado 1: el campo tiene el foco, aparece el cursor */
.field.is-active .field__box {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(47, 91, 255, 0.14);
}

/* estado 2: destello de autorelleno */
.field.is-flash .field__box {
  background: var(--fill);
  border-color: #e8ce3f;
  transition: background 0.05s linear, border-color 0.05s linear;
}

.field__text {
  white-space: pre-wrap;
  word-break: break-word;
}

.field__text:empty::before {
  content: attr(data-placeholder);
  color: #aeb6c9;
}

/* el cursor va en el flujo del texto: acompaña al salto de línea */
.caret {
  display: none;
  width: 2px;
  height: 1.05em;
  background: var(--ink);
  border-radius: 1px;
  margin-left: 1px;
  vertical-align: -0.16em;
  animation: blink 1s steps(1, end) infinite;
}
.field.is-active .caret {
  display: inline-block;
}

.field__check {
  position: absolute;
  right: 13px;
  top: 13px;
  width: 21px;
  height: 21px;
  color: var(--ok);
  opacity: 0;
  transform: scale(0.4);
  transition: opacity 0.3s var(--ease), transform 0.4s var(--ease);
}
.field.is-done .field__check {
  opacity: 1;
  transform: scale(1);
}

.demo__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  padding: 16px clamp(22px, 3.4vw, 34px);
  border-top: 1px solid var(--line);
  background: var(--field);
}

.demo__stamp {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: var(--ok);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}
.demo.is-complete .demo__stamp {
  opacity: 1;
  transform: none;
}
.demo__stamp .ico {
  width: 16px;
  height: 16px;
}

.demo__replay {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.6875rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  background: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 14px;
  cursor: pointer;
  transition: color 0.15s var(--ease), border-color 0.15s var(--ease);
}
.demo__replay:hover {
  color: var(--ink);
  border-color: var(--ink);
}
.demo__replay .ico {
  width: 13px;
  height: 13px;
}

/* ---------- 8. Cifras ---------- */
.stats {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
@media (min-width: 700px) {
  .stats {
    grid-template-columns: repeat(3, 1fr);
  }
}
.stat {
  background: var(--paper);
  padding: clamp(26px, 3.4vw, 38px);
}
.stat__num {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: clamp(2.4rem, 4.4vw, 3.4rem);
  letter-spacing: -0.045em;
  line-height: 1;
}
.stat__label {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.9375rem;
}

/* ---------- 9. Tarjetas (lenguaje de campo, no de sombra) ---------- */
.grid {
  display: grid;
  gap: 20px;
}
.grid--2 {
  grid-template-columns: 1fr;
}
.grid--3 {
  grid-template-columns: 1fr;
}
@media (min-width: 680px) {
  .grid--2,
  .grid--3 {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1000px) {
  .grid--3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(24px, 3vw, 32px);
  box-shadow: var(--shadow-card);
  transition: border-color 0.22s var(--ease), box-shadow 0.22s var(--ease),
    transform 0.22s var(--ease);
}
/* al pasar por encima, la tarjeta se comporta como un input enfocado */
.card:hover {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(47, 91, 255, 0.1);
  transform: translateY(-2px);
}

.card__icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--brand-wash);
  color: var(--brand);
  margin-bottom: 20px;
}
.card__icon .ico {
  width: 23px;
  height: 23px;
}

.card h3 {
  font-size: 1.25rem;
  margin-bottom: 10px;
}

.card p {
  color: var(--muted);
  font-size: 0.9688rem;
}

.card__note {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  color: var(--brand);
}

/* ---------- 10. Pasos numerados (la numeración sí informa: es una secuencia) ---------- */
.steps {
  display: grid;
  gap: 1px;
  background: var(--line);
  border-block: 1px solid var(--line);
}
@media (min-width: 620px) {
  .steps {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1000px) {
  .steps {
    grid-template-columns: repeat(4, 1fr);
  }
}

.step {
  background: var(--paper);
  padding: clamp(26px, 3vw, 36px) clamp(22px, 2.6vw, 30px);
}
.section--field .step {
  background: var(--field);
}

.step__num {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  color: var(--brand);
  display: block;
  margin-bottom: 18px;
}

.step h3 {
  font-size: 1.125rem;
  margin-bottom: 8px;
}
.step p {
  color: var(--muted);
  font-size: 0.9375rem;
}

/* ---------- 11. Vídeo ---------- */
.video {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lift);
  background: var(--ink);
}
.video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---------- 12. Reseñas ---------- */
.quote {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(24px, 3vw, 30px);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.quote p {
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink-soft);
}

.quote__who {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-top: auto;
}

.avatar {
  width: 42px;
  height: 42px;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--brand-wash);
  color: var(--brand-deep);
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.02em;
}

.quote__who strong {
  display: block;
  font-size: 0.9375rem;
  font-weight: 600;
}
.quote__who span {
  font-size: 0.8125rem;
  color: var(--muted);
}

.stars {
  display: flex;
  gap: 3px;
  color: #f5b301;
}
.stars .ico {
  width: 16px;
  height: 16px;
}

/* ---------- 13. FAQ ---------- */
.faq {
  max-width: 780px;
  border-top: 1px solid var(--line);
}

.faq details {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 4px;
  cursor: pointer;
  list-style: none;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 1.0625rem;
  letter-spacing: -0.015em;
  transition: color 0.15s var(--ease);
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary:hover {
  color: var(--brand);
}

.faq summary .ico {
  width: 20px;
  height: 20px;
  flex: none;
  color: var(--brand);
  transition: transform 0.28s var(--ease);
}
.faq details[open] summary .ico {
  transform: rotate(45deg);
}

.faq__answer {
  padding: 0 4px 24px;
  color: var(--muted);
  max-width: 68ch;
}

/* ---------- 14. Bloques largos con imagen/lista ---------- */
.split {
  display: grid;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}
@media (min-width: 900px) {
  .split {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  /* alterna el lado del panel en escritorio sin romper el orden de lectura en móvil */
  .split--flip > :first-child {
    order: 2;
  }
  .split--flip > :last-child {
    order: 1;
  }
}

.ticks {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}
.ticks li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  color: var(--ink-soft);
  font-size: 0.9688rem;
}
.ticks .ico {
  width: 19px;
  height: 19px;
  flex: none;
  margin-top: 3px;
  color: var(--ok);
}

/* panel decorativo hecho de campos, no de imagen de stock */
.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(22px, 3vw, 30px);
  display: grid;
  gap: 12px;
  box-shadow: var(--shadow-lift);
}
.section--field .panel {
  background: var(--paper);
}

.rowline {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper);
  font-size: 0.9375rem;
}
.rowline .ico {
  width: 18px;
  height: 18px;
  flex: none;
  color: var(--ok);
}
.rowline--pending {
  background: var(--field);
  color: var(--muted);
}
.rowline--pending .ico {
  color: #b9c0d2;
}
.rowline b {
  font-weight: 600;
}
.rowline small {
  margin-left: auto;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.6875rem;
  color: var(--muted);
  letter-spacing: 0.05em;
}

/* ---------- 15. Lista compacta de casos (contenido SEO sin ruido visual) ---------- */
.uses {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
@media (min-width: 760px) {
  .uses {
    grid-template-columns: repeat(2, 1fr);
  }
}

.use {
  background: var(--paper);
  padding: 24px clamp(20px, 2.4vw, 28px);
  transition: background 0.18s var(--ease);
}
.use:hover {
  background: var(--brand-wash);
}
.use h3 {
  font-size: 1.0625rem;
  margin-bottom: 8px;
  display: flex;
  gap: 11px;
  align-items: baseline;
}
.use h3 span {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.6875rem;
  color: var(--brand);
  letter-spacing: 0.08em;
  flex: none;
}
.use p {
  color: var(--muted);
  font-size: 0.9063rem;
  line-height: 1.6;
}

/* ---------- 16. CTA final ---------- */
.cta {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--ink);
  color: #fff;
  padding: clamp(44px, 6vw, 80px) clamp(26px, 5vw, 72px);
  text-align: center;
}
.cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: radial-gradient(ellipse 70% 80% at 50% 50%, #000, transparent 72%);
  -webkit-mask-image: radial-gradient(
    ellipse 70% 80% at 50% 50%,
    #000,
    transparent 72%
  );
}
.cta > * {
  position: relative;
}
.cta .eyebrow {
  color: var(--fill);
}
.cta .eyebrow::before {
  background: var(--fill);
}
.cta h2 {
  font-size: clamp(2rem, 4.2vw, 3.2rem);
  max-width: 20ch;
  margin-inline: auto;
}
.cta p {
  margin-top: 20px;
  color: #a8b0c6;
  max-width: 52ch;
  margin-inline: auto;
}
.cta .btn {
  margin-top: 34px;
}
.cta__fine {
  max-width: none;
  margin-top: 22px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  color: #7d859c;
}

/* ---------- 17. Pie ---------- */
.footer {
  background: var(--ink);
  color: #9aa2b8;
  padding-block: clamp(52px, 6vw, 76px) 32px;
  font-size: 0.9375rem;
}

.footer__grid {
  display: grid;
  gap: 40px;
}
@media (min-width: 760px) {
  .footer__grid {
    grid-template-columns: 1.6fr 1fr 1fr 1fr;
  }
}

.footer h4 {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #676e85;
  margin-bottom: 18px;
}

.footer .brand {
  color: #fff;
  margin-bottom: 14px;
}

.footer li {
  margin-bottom: 11px;
}
.footer a {
  transition: color 0.15s var(--ease);
}
.footer a:hover {
  color: #fff;
}

.social {
  display: flex;
  gap: 10px;
}
.social a {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid #262c3e;
  border-radius: 10px;
  transition: border-color 0.15s var(--ease), color 0.15s var(--ease);
}
.social a:hover {
  border-color: #4b556f;
  color: #fff;
}
.social .ico {
  width: 18px;
  height: 18px;
}

.footer__bottom {
  margin-top: 52px;
  padding-top: 26px;
  border-top: 1px solid #1d2333;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  justify-content: space-between;
  font-size: 0.8125rem;
  color: #676e85;
}

/* ---------- 18. Barra móvil ---------- */
.dock {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 60;
  display: flex;
  opacity: 0;
  transform: translateY(120%);
  transition: opacity 0.3s var(--ease), transform 0.35s var(--ease);
  pointer-events: none;
}
.dock.is-visible {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.dock .btn {
  width: 100%;
}
@media (min-width: 640px) {
  .dock {
    display: none;
  }
}

/* ---------- 19. Iconos ---------- */
.ico {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}
.ico--solid {
  fill: currentColor;
  stroke: none;
}

/* ---------- 20. Aparición al hacer scroll ----------
   El contenido es visible por defecto. Sólo se oculta si el script ha
   confirmado que puede volver a mostrarlo: así ningún fallo de JS deja
   la página en blanco. */
html.reveal-armed .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
html.reveal-armed .reveal.is-in {
  opacity: 1;
  transform: none;
}

/* ---------- 21. Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
  .brand__caret,
  .caret {
    animation: none;
  }
  .caret {
    display: none !important;
  }
}

/* ============================================================
   22. Páginas de contenido
   Bloques pensados para que un motor de respuesta pueda extraer
   la respuesta sin arrastrar el resto de la página.
   ============================================================ */

.breadcrumb {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}
.breadcrumb a:hover {
  color: var(--brand);
}
.breadcrumb span[aria-hidden] {
  color: #c2c9d9;
}

.article {
  max-width: 760px;
}

.article h1 {
  font-size: clamp(2rem, 4.2vw, 3rem);
  letter-spacing: -0.035em;
}

.article__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 22px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.6875rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}

/* El bloque de respuesta directa: la unidad que se cita.
   Mismo lenguaje visual que un campo enfocado. */
.answer {
  margin-top: 30px;
  padding: 22px 26px;
  background: var(--field);
  border-left: 3px solid var(--brand);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--ink);
}

.prose {
  margin-top: 44px;
}

.prose h2 {
  font-size: clamp(1.5rem, 2.6vw, 1.95rem);
  margin-top: 52px;
  margin-bottom: 16px;
  scroll-margin-top: 96px;
}

.prose h3 {
  font-size: 1.1875rem;
  margin-top: 34px;
  margin-bottom: 10px;
}

.prose > h2:first-child {
  margin-top: 0;
}

.prose p {
  margin-bottom: 18px;
  color: var(--ink-soft);
}

.prose ul,
.prose ol {
  margin-bottom: 20px;
  display: grid;
  gap: 10px;
}

.prose ul li,
.prose ol li {
  position: relative;
  padding-left: 26px;
  color: var(--ink-soft);
}

.prose ul li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.62em;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--brand);
}

.prose ol {
  counter-reset: paso;
}
.prose ol li {
  counter-increment: paso;
  padding-left: 34px;
}
.prose ol li::before {
  content: counter(paso, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0.1em;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.75rem;
  color: var(--brand);
}

.prose a:not(.btn) {
  color: var(--brand-deep);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.prose a:not(.btn):hover {
  text-decoration-thickness: 2px;
}

.prose strong {
  font-weight: 600;
  color: var(--ink);
}

/* Tablas: siempre con su propio scroll horizontal en móvil */
.table-wrap {
  overflow-x: auto;
  margin-bottom: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  min-width: 420px;
}

.prose th,
.prose td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.prose th {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--field);
  font-weight: 500;
}

.prose tr:last-child td {
  border-bottom: 0;
}

.yes {
  color: var(--ok);
  font-weight: 600;
}
.no {
  color: #b42318;
  font-weight: 600;
}
.partial {
  color: #b54708;
  font-weight: 600;
}

/* Aviso: para lo que hay que decir claro, no para decorar */
.callout {
  margin: 30px 0;
  padding: 20px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}
.callout--warn {
  border-color: rgba(181, 71, 8, 0.28);
  background: rgba(181, 71, 8, 0.045);
}
.callout p:last-child {
  margin-bottom: 0;
}
.callout__title {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--ink);
}
.callout__title .ico {
  width: 18px;
  height: 18px;
  color: #b54708;
}

/* Enlaces a las demás páginas del clúster */
.related {
  margin-top: 60px;
  padding-top: 34px;
  border-top: 1px solid var(--line);
}
.related h2 {
  font-size: 1.25rem;
  margin-bottom: 20px;
}
.related ul {
  display: grid;
  gap: 12px;
}
.related li {
  padding-left: 0;
}
.related li::before {
  display: none;
}
.related a {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 15px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none !important;
  color: var(--ink) !important;
  font-weight: 600;
  font-size: 1rem;
  transition: border-color 0.18s var(--ease), background 0.18s var(--ease);
}
.related a:hover {
  border-color: var(--brand);
  background: var(--brand-wash);
}
.related a small {
  font-weight: 400;
  color: var(--muted);
  font-size: 0.875rem;
}
