/* eknigi.net - hoja de estilos (mobile-first, solo tema claro) */
:root {
  color-scheme: only light;
  --ink: #0d0b2b;
  --text: #25263d;
  --muted: #585a70;
  --blue: #0b3c9e;
  --blue-d: #082c78;
  --tint: #f1f5fb;
  --tint-2: #f6f8fc;
  --line: #dde3f0;
  --white: #ffffff;
  --radius: 4px;
  --col: 884px;
  --font: Inter, "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-body: "Open Sans", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html {
  background-color: #ffffff;
  color: #25263d;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body.page {
  margin: 0;
  background-color: #ffffff;
  color: #25263d;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

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

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

.skip {
  position: absolute; left: 16px; top: -64px; z-index: 100;
  padding: 12px 16px; background-color: #0d0b2b; color: #ffffff;
  font: 700 .9375rem/1.2 var(--font); border-radius: var(--radius); text-decoration: none;
  transition: top .2s;
}
.skip:focus { top: 12px; }

/* ---------- Barra de progreso de lectura ---------- */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60; background-color: transparent; pointer-events: none; }
.progress__bar { display: block; height: 100%; width: 0; background-color: #0b3c9e; transition: width .1s linear; }

/* ---------- Cabecera ---------- */
.masthead {
  position: relative; z-index: 5;
  background-color: #ffffff; color: #0d0b2b;
  box-shadow: 0 4px 18px rgba(13, 11, 43, .08);
}
.masthead__inner {
  max-width: var(--col); margin: 0 auto; padding: 0 16px; min-height: 64px;
  display: flex; align-items: center; justify-content: center; gap: 12px;
}
.brand {
  display: inline-flex; align-items: center; min-height: 44px;
  font-family: var(--font); font-weight: 800; font-size: 1.5rem; letter-spacing: -.03em;
  color: #0d0b2b; text-decoration: none; transition: color .2s;
}
.brand::before {
  content: ""; width: 11px; height: 22px; margin-right: 10px; border-radius: 2px;
  background-color: #0b3c9e; transform: skewX(-14deg);
}
.brand:hover { color: #0b3c9e; }
.brand:focus-visible { outline: 3px solid #0b3c9e; outline-offset: 3px; border-radius: 3px; }
.ad-label {
  font: 700 .6875rem/1 var(--font); letter-spacing: .1em; text-transform: uppercase;
  color: #0b3c9e; background-color: #ffffff; border: 1px solid #0b3c9e; border-radius: 3px; padding: 6px 8px;
}

/* ---------- Estructura ---------- */
.wrap { width: 100%; max-width: var(--col); margin: 0 auto; padding-left: 16px; padding-right: 16px; }

.article { background-color: #ffffff; color: #25263d; padding-top: 16px; }

.kicker { margin: 8px 0 14px; font: 600 .8125rem/1.4 var(--font); letter-spacing: .01em; color: #0d0b2b; }

.article__title {
  margin: 0 0 16px; font-family: var(--font); font-weight: 800; color: #0d0b2b;
  font-size: clamp(1.75rem, 1.35rem + 2.2vw, 3rem); line-height: 1.17; letter-spacing: -.015em;
}

.dek {
  margin: 0 0 28px; color: #3a3c55;
  font-size: clamp(1.0625rem, 1rem + .5vw, 1.3125rem); line-height: 1.55;
}

.hero-fig { margin: 0; }
.hero-fig img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; object-position: 50% 30%; border-radius: var(--radius); }

.byline {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px;
  margin: 20px 0 36px; font: .8125rem/1.4 var(--font); color: #585a70;
}
.byline__who { display: flex; align-items: center; gap: 10px; }
.byline__avatar {
  display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  background-color: #0d0b2b; color: #ffffff; font: 800 .75rem/1 var(--font);
}
.byline strong { color: #0d0b2b; font-weight: 700; }

.article p { margin: 0 0 1.25rem; }
.lede { color: #0d0b2b; font-size: clamp(1.125rem, 1.05rem + .4vw, 1.25rem); line-height: 1.65; }

.article strong { color: #0d0b2b; font-weight: 700; }

/* Secciones */
.sec { background-color: #ffffff; color: #25263d; padding: 22px 0; }
.sec .wrap > :last-child { margin-bottom: 0; }
.sec--tint { background-color: #f6f8fc; padding: 40px 0; margin: 20px 0; }

.article h2,
.doc h2 {
  font-family: var(--font); font-weight: 800; color: #0d0b2b;
  font-size: clamp(1.4rem, 1.15rem + 1.1vw, 1.8125rem); line-height: 1.25; letter-spacing: -.01em;
}
.sec h2 { margin: 0 0 1.125rem; }
.num { color: #0b3c9e; }

/* Listas */
.article ul, .article ol, .doc ul { margin: 0 0 1.5rem; padding: 0; list-style: none; }
.article li, .doc li { position: relative; padding-left: 1.75rem; margin: 0 0 .75rem; }
.article ul li::before, .doc ul li::before {
  content: ""; position: absolute; left: .35rem; top: .75em; width: .45rem; height: .45rem;
  border-radius: 50%; background-color: #0b3c9e;
}
.article ol { counter-reset: step; }
.article ol li { counter-increment: step; padding-left: 2.75rem; }
.article ol li::before {
  content: counter(step); position: absolute; left: 0; top: .1rem; width: 1.75rem; height: 1.75rem;
  border-radius: 50%; background-color: #0d0b2b; color: #ffffff;
  font: 700 .875rem/1.75rem var(--font); text-align: center;
}

/* Destacado editorial */
.article .takeaway {
  margin: 1.75rem 0; padding: 18px 20px; background-color: #f1f5fb; color: #0d0b2b;
  border-left: 4px solid #0b3c9e; border-radius: 0 var(--radius) var(--radius) 0;
}
.sec--tint .takeaway { background-color: #ffffff; }

/* Figuras */
.fig { margin: 2rem 0; }
.fig img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius); }
.fig figcaption { margin-top: .625rem; font: .8125rem/1.5 var(--font); color: #585a70; }
.fig--narrow { max-width: 620px; }
.fig--video { margin: 0 auto; width: 100%; max-width: 280px; }

.video-frame {
  aspect-ratio: 9 / 16; width: 100%; overflow: hidden; border-radius: var(--radius);
  background-color: #e6ebf4;
}
.video-frame > video { width: 100%; height: 100%; object-fit: cover; }

.fig-pair { display: grid; gap: 24px; margin: 2rem 0 0; }
.fig-pair .fig { margin: 0; }

.split { display: grid; gap: 24px; margin: 0 0 .5rem; }

/* ---------- Bloques de llamada a la acción ---------- */
.cta {
  margin: 2.25rem 0; padding: 20px 16px; background-color: #f1f5fb; color: #0d0b2b;
  border: 1px solid #dde3f0; border-radius: var(--radius);
}
.cta__row { display: grid; gap: 16px; align-items: center; }
.article .cta__text { margin: 0; font: 600 1.0625rem/1.45 var(--font); color: #0d0b2b; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 52px; padding: 0 24px; border-radius: 3px;
  background-color: #0b3c9e; color: #ffffff;
  font: 800 1rem/1.2 var(--font); letter-spacing: .03em; text-transform: uppercase; text-decoration: none; text-align: center;
  transition: background-color .2s, transform .2s, box-shadow .2s;
}
.btn::after { content: "\2192"; transition: transform .2s; }
.btn:hover { background-color: #082c78; transform: translateY(-1px); box-shadow: 0 6px 16px rgba(11, 60, 158, .28); }
.btn:hover::after { transform: translateX(3px); }
.btn:focus-visible { outline: 3px solid #0d0b2b; outline-offset: 3px; }

.article .cta-hint, .cta-hint { margin: 12px 0 0; font: .8125rem/1.5 var(--font); color: #585a70; }

.cta--dark { background-color: #0d0b2b; color: #ffffff; border-color: #0d0b2b; }
.article .cta--dark .cta__text { color: #ffffff; }
.cta--dark .btn { background-color: #ffffff; color: #0d0b2b; }
.cta--dark .btn:hover { background-color: #e8eefc; box-shadow: 0 6px 16px rgba(0, 0, 0, .35); }
.cta--dark .btn:focus-visible { outline-color: #ffffff; }
.article .cta--dark .cta-hint { color: #c9cfe8; }

.cta--final { margin: 2rem 0 0; padding: 24px 16px; }
.article .cta--final .cta__text { font-size: 1.1875rem; }

/* ---------- Tabla comparativa (bloques apilados en movil) ---------- */
.compare { width: 100%; margin: 1.25rem 0 0; border-collapse: collapse; font-size: 1rem; line-height: 1.6; }
.compare thead {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.compare tr { display: block; padding: 18px 0; border-top: 1px solid #dde3f0; }
.compare tbody th, .compare td { display: block; padding: 0; text-align: left; font-weight: 400; color: #25263d; }
.compare tbody th { font-weight: 700; color: #0d0b2b; }
.compare tbody th::before, .compare td::before {
  content: attr(data-label); display: block; margin-bottom: 2px;
  font: 700 .6875rem/1.4 var(--font); letter-spacing: .09em; text-transform: uppercase; color: #0b3c9e;
}
.compare td { margin-top: 12px; }

/* ---------- Preguntas frecuentes ---------- */
.faq { margin-top: 1rem; border-top: 1px solid #dde3f0; }
.faq__item { border-bottom: 1px solid #dde3f0; }
.faq__q { margin: 0; font: inherit; }
button.faq__btn {
  display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 56px; padding: 14px 0; margin: 0; border: 0; border-radius: 0; cursor: pointer;
  background-color: transparent; color: #0d0b2b; text-align: left;
  font: 700 1.0625rem/1.4 var(--font); transition: color .2s;
}
button.faq__btn:hover { color: #0b3c9e; }
button.faq__btn:focus-visible { outline: 3px solid #0b3c9e; outline-offset: 2px; }
.faq__icon { flex: none; position: relative; width: 18px; height: 18px; }
.faq__icon::before, .faq__icon::after {
  content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 2px; margin-top: -1px;
  background-color: currentColor; transition: transform .25s;
}
.faq__icon::after { transform: rotate(90deg); }
button.faq__btn[aria-expanded="true"] .faq__icon::after { transform: rotate(0deg); }
.faq__a { padding: 0 0 18px; }
.article .faq__a p { margin: 0; }

/* ---------- Paginas de texto (legales / about) ---------- */
.doc { background-color: #ffffff; color: #25263d; padding-top: 28px; padding-bottom: 24px; }
.doc__title {
  margin: 0 0 12px; font-family: var(--font); font-weight: 800; color: #0d0b2b;
  font-size: clamp(1.75rem, 1.35rem + 2vw, 2.625rem); line-height: 1.17; letter-spacing: -.015em;
}
.doc__title + .lede { margin-top: 1.25rem; }
.updated { margin: 0 0 2rem; font: .875rem/1.5 var(--font); color: #585a70; }
.doc h2 { margin: 2.25rem 0 .75rem; font-size: clamp(1.25rem, 1.1rem + .7vw, 1.5rem); }
.doc p { margin: 0 0 1.1rem; }
.doc strong { color: #0d0b2b; font-weight: 700; }
.doc a { color: #0b3c9e; text-decoration: underline; text-underline-offset: 3px; }
.doc a:hover { color: #082c78; }
.doc a:focus-visible { outline: 3px solid #0b3c9e; outline-offset: 2px; }
.doc .lede { font-size: clamp(1.0625rem, 1rem + .4vw, 1.1875rem); }
.doc__list { margin: 0 0 1.5rem; }

/* ---------- Pie ---------- */
.footer { background-color: #ffffff; color: #585a70; font: .8125rem/1.65 var(--font); padding: 44px 0 56px; margin-top: 24px; }
.footer__inner { display: grid; gap: 8px; }
.footer__entity { margin: 0 0 8px; font-style: normal; color: #585a70; }
.footer__entity p { margin: 0; }
.footer__entity strong { color: #0d0b2b; font-weight: 700; }
.footer__foot-links { display: flex; flex-wrap: wrap; gap: 0 20px; margin: 0 0 12px; }
.footer__foot-links a {
  display: inline-flex; align-items: center; min-height: 44px;
  color: #0b3c9e; text-decoration: underline; text-underline-offset: 3px; transition: color .2s;
}
.footer__foot-links a:hover { color: #082c78; }
.footer__foot-links a:focus-visible { outline: 3px solid #0b3c9e; outline-offset: 2px; border-radius: 2px; }
.imprint-line { margin: 0; max-width: 72ch; font-size: .8125rem; line-height: 1.65; color: #585a70; }

/* ---------- >= 480px ---------- */
@media (min-width: 480px) {
  .hero-fig img { aspect-ratio: 16 / 9; }
  .cta { padding: 24px; }
  .cta--final { padding: 28px 24px; }
}

/* ---------- >= 768px ---------- */
@media (min-width: 768px) {
  body.page { font-size: 1.125rem; }
  .masthead__inner { min-height: 84px; }
  .brand { font-size: 1.875rem; }
  .brand::before { width: 13px; height: 26px; }
  .article { padding-top: 12px; }
  .hero-fig img { aspect-ratio: 2.25 / 1; }
  .byline { margin: 22px 0 48px; font-size: .875rem; }
  .sec { padding: 26px 0; }
  .sec--tint { padding: 56px 0; margin: 28px 0; }
  .fig img { aspect-ratio: 16 / 9; }
  .fig--narrow img { aspect-ratio: 3 / 2; }
  .fig--wide img { aspect-ratio: 2 / 1; }
  .fig-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
  .fig-pair .fig img { aspect-ratio: 4 / 3; }
  .split { grid-template-columns: minmax(0, 1fr) 280px; gap: 40px; align-items: center; }
  .split .fig--video { margin: 0; }
  .cta__row { grid-template-columns: minmax(0, 1fr) auto; gap: 32px; }
  .cta .btn { justify-self: end; }
  .cta--final .cta__row { gap: 40px; }

  .compare thead { position: static; width: auto; height: auto; overflow: visible; clip: auto; display: table-header-group; white-space: normal; }
  .compare thead th {
    padding: 0 20px 12px 0; text-align: left; border-bottom: 2px solid #0d0b2b;
    font: 700 .75rem/1.4 var(--font); letter-spacing: .09em; text-transform: uppercase; color: #0b3c9e;
  }
  .compare tr { display: table-row; padding: 0; border-top: 0; }
  .compare tbody th, .compare td {
    display: table-cell; vertical-align: top; padding: 18px 24px 18px 0; border-bottom: 1px solid #dde3f0;
  }
  .compare tbody th { width: 36%; }
  .compare td { margin-top: 0; }
  .compare tbody th::before, .compare td::before { display: none; }

  .doc { padding-top: 44px; }
  .footer { padding: 56px 0 72px; }
}

/* ---------- >= 1024px ---------- */
@media (min-width: 1024px) {
  body.page { font-size: 1.125rem; line-height: 1.75; }
  .article { padding-top: 16px; }
  .kicker { font-size: .875rem; margin-top: 12px; }
  .byline { margin-bottom: 56px; }
  .sec { padding: 30px 0; }
  .split { grid-template-columns: minmax(0, 1fr) 300px; gap: 56px; }
  .fig--video { max-width: 300px; }
  .cta { padding: 28px 32px; }
  .cta--final { padding: 36px 40px; }
  .article .cta__text { font-size: 1.1875rem; }
  .article .cta--final .cta__text { font-size: 1.25rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
