:root {
  --brand-cyan: #28aae1;
  --brand-navy: #001224;
  --brand-panel: #00284b;
  --brand-pink: #ff6b8a;
  --brand-cyan-soft: #9fdcf7;
  --page-bg: #001224;
  --page-glow: #00284b;
  --surface: #061d33;
  --surface-soft: rgba(0, 40, 75, 0.58);
  --surface-raised: #00233f;
  --text: #ffffff;
  --text-soft: #d6e8f2;
  --muted: #9bb0bf;
  --border: rgba(40, 170, 225, 0.32);
  --border-soft: rgba(40, 170, 225, 0.18);
  --shadow: 0 22px 70px rgba(0, 10, 20, 0.34);
  --nav-bg: rgba(0, 18, 36, 0.92);
  --band-bg: #000a14;
  --link: #73cef3;
  --reading-width: 740px;
  color-scheme: dark;
}

html[data-theme="light"] {
  --page-bg: #f5fafd;
  --page-glow: #d9f1fb;
  --surface: #ffffff;
  --surface-soft: #edf7fb;
  --surface-raised: #ffffff;
  --text: #10283b;
  --text-soft: #29475d;
  --muted: #5b7282;
  --border: rgba(0, 40, 75, 0.2);
  --border-soft: rgba(0, 40, 75, 0.1);
  --shadow: 0 22px 70px rgba(0, 40, 75, 0.12);
  --nav-bg: rgba(255, 255, 255, 0.93);
  --band-bg: #001224;
  --link: #087dac;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

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

body {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  background:
    radial-gradient(circle at 88% 2%, var(--page-glow), transparent 28rem),
    var(--page-bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.72;
  transition: background-color 180ms ease, color 180ms ease;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(40, 170, 225, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(40, 170, 225, 0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, #000, transparent 72%);
}

a {
  color: var(--link);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.2em;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

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

.skip-link {
  position: fixed;
  top: 8px;
  left: 10px;
  z-index: 5000;
  transform: translateY(-160%);
  border-radius: 999px;
  background: var(--brand-cyan);
  color: var(--brand-navy);
  padding: 10px 16px;
  font-weight: 900;
  text-decoration: none;
}

.skip-link:focus {
  transform: translateY(0);
}

.reading-progress {
  position: fixed;
  inset: 0 auto auto 0;
  z-index: 4000;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand-cyan), var(--brand-pink));
}

.authority-band {
  position: relative;
  z-index: 100;
  display: flex;
  min-height: 31px;
  align-items: center;
  justify-content: center;
  gap: 16px;
  overflow-x: auto;
  padding: 7px 18px;
  background: var(--band-bg);
  border-bottom: 1px solid rgba(40, 170, 225, 0.28);
  color: #f2f2f2;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  scrollbar-width: none;
  white-space: nowrap;
}

.authority-band::-webkit-scrollbar {
  display: none;
}

.authority-band span + span::before {
  content: "·";
  margin-right: 16px;
  color: var(--brand-cyan);
  opacity: 0.7;
}

.authority-band a {
  color: var(--brand-cyan-soft);
  text-decoration: none;
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 90;
  border-bottom: 1px solid var(--border);
  background: var(--nav-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.site-nav__inner {
  display: flex;
  width: min(1120px, calc(100% - 36px));
  min-height: 70px;
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand-link {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 11px;
  color: var(--text);
  text-decoration: none;
}

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

.brand-link img {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  object-fit: contain;
}

.brand-link__copy {
  display: grid;
  line-height: 1.12;
}

.brand-link__copy strong {
  font-family: "Montserrat", sans-serif;
  font-size: 0.88rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.brand-link__copy small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.69rem;
  font-weight: 700;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link,
.theme-toggle {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--text);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  text-decoration: none;
}

.nav-link {
  padding: 9px 15px;
}

.theme-toggle {
  width: 42px;
  padding: 0;
  cursor: pointer;
}

.theme-toggle:hover,
.nav-link:hover {
  border-color: var(--brand-cyan);
  color: var(--text);
  transform: translateY(-1px);
}

.theme-toggle__sun,
html[data-theme="light"] .theme-toggle__moon {
  display: none;
}

html[data-theme="light"] .theme-toggle__sun {
  display: inline;
}

.page-shell {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
  padding: 34px 0 92px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 0.79rem;
  font-weight: 700;
}

.breadcrumb a {
  color: var(--muted);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--brand-cyan);
}

.article-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  align-items: center;
  gap: 28px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 26px;
  background: linear-gradient(145deg, var(--surface), var(--surface-soft));
  box-shadow: var(--shadow);
  padding: clamp(26px, 4.6vw, 52px);
}

.article-hero::before {
  content: "";
  position: absolute;
  top: -94px;
  right: -94px;
  width: 240px;
  height: 240px;
  border: 40px solid rgba(40, 170, 225, 0.09);
  border-radius: 50%;
}

.article-hero__copy,
.article-hero__visual {
  position: relative;
  z-index: 1;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  color: var(--brand-cyan);
  font-family: "Montserrat", sans-serif;
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 27px;
  height: 3px;
  border-radius: 999px;
  background: var(--brand-cyan);
}

h1,
h2,
h3 {
  font-family: "Montserrat", sans-serif;
  text-wrap: balance;
}

h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(2.05rem, 5.4vw, 4rem);
  font-weight: 900;
  letter-spacing: -0.045em;
  line-height: 1.04;
}

.hero-lede {
  max-width: 660px;
  margin: 20px 0 0;
  color: var(--text-soft);
  font-size: clamp(1rem, 1.7vw, 1.17rem);
  font-weight: 600;
  line-height: 1.62;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 9px 16px;
  margin-top: 22px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
}

.article-meta span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.article-meta span::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand-cyan);
}

.article-hero__visual {
  display: grid;
  min-height: 270px;
  place-items: center;
  border: 1px solid var(--border-soft);
  border-radius: 22px;
  background:
    radial-gradient(circle at 50% 40%, rgba(40, 170, 225, 0.18), transparent 62%),
    rgba(0, 18, 36, 0.12);
}

.article-hero__visual img {
  display: block;
  width: 100%;
  max-height: 350px;
  object-fit: contain;
  padding: 14px;
}

.content-layout {
  display: grid;
  grid-template-columns: minmax(0, var(--reading-width)) 250px;
  justify-content: center;
  align-items: start;
  gap: 54px;
  margin-top: 42px;
}

.article-content {
  min-width: 0;
}

.article-content > p:first-child {
  font-size: 1.09rem;
  font-weight: 600;
}

.article-content p {
  margin: 0 0 1.22em;
  color: var(--text-soft);
}

.article-content strong {
  color: var(--text);
}

.article-content h2 {
  position: relative;
  margin: 2.15em 0 0.72em;
  padding-top: 0.18em;
  color: var(--text);
  font-size: clamp(1.38rem, 3vw, 2rem);
  font-weight: 900;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.article-content h2::before {
  content: "";
  display: block;
  width: 46px;
  height: 5px;
  margin-bottom: 13px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand-cyan), var(--brand-pink));
}

.article-content h3 {
  margin: 1.65em 0 0.55em;
  color: var(--text);
  font-size: 1.08rem;
  font-weight: 900;
}

.article-content ul,
.article-content ol {
  display: grid;
  gap: 11px;
  margin: 0 0 1.4em;
  padding-left: 1.35em;
  color: var(--text-soft);
}

.article-content li::marker {
  color: var(--brand-cyan);
  font-weight: 900;
}

.ai-summary {
  position: relative;
  overflow: hidden;
  margin: 0 0 34px;
  border: 1px solid var(--border);
  border-left: 5px solid var(--brand-cyan);
  border-radius: 16px;
  background: var(--surface-soft);
  padding: 22px 23px;
}

.ai-summary::after {
  content: "IA";
  position: absolute;
  right: 14px;
  bottom: -10px;
  color: rgba(40, 170, 225, 0.1);
  font-family: "Montserrat", sans-serif;
  font-size: 4rem;
  font-weight: 900;
  line-height: 1;
}

.ai-summary__label {
  position: relative;
  z-index: 1;
  margin: 0 0 6px;
  color: var(--brand-cyan);
  font-family: "Montserrat", sans-serif;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.ai-summary p:last-child {
  position: relative;
  z-index: 1;
  margin: 0;
  color: var(--text-soft);
  font-size: 0.92rem;
  line-height: 1.58;
}

.comparison-list {
  display: grid;
  gap: 12px;
  margin: 22px 0 36px;
  padding: 0;
  list-style: none;
  counter-reset: company;
}

.comparison-list li {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: start;
  gap: 14px;
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  background: var(--surface-soft);
  padding: 15px;
  counter-increment: company;
}

.comparison-list li::before {
  content: counter(company, decimal-leading-zero);
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 12px;
  background: var(--brand-cyan);
  color: var(--brand-navy);
  font-family: "Montserrat", sans-serif;
  font-size: 0.75rem;
  font-weight: 900;
}

.comparison-list strong {
  display: block;
  margin-bottom: 2px;
}

.source-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 7px;
  margin-top: -0.38em !important;
  border-bottom: 1px solid var(--border-soft);
  padding-bottom: 1.2em;
  font-size: 0.86rem;
}

.source-line::before {
  content: "Fuente";
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px 9px;
  color: var(--brand-cyan);
  font-family: "Montserrat", sans-serif;
  font-size: 0.63rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.note-card,
.cta-card {
  margin: 34px 0;
  border-radius: 20px;
  padding: clamp(22px, 4vw, 32px);
}

.note-card {
  border: 1px solid var(--border);
  background: var(--surface-soft);
}

.note-card h2,
.cta-card h2 {
  margin-top: 0;
}

.note-card h2::before,
.cta-card h2::before {
  display: none;
}

.cta-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(40, 170, 225, 0.66);
  background: linear-gradient(135deg, var(--brand-panel), #053e66);
  box-shadow: 0 18px 42px rgba(0, 40, 75, 0.24);
  color: #fff;
}

.cta-card::after {
  content: "";
  position: absolute;
  right: -55px;
  bottom: -70px;
  width: 180px;
  height: 180px;
  border: 30px solid rgba(255, 107, 138, 0.16);
  border-radius: 50%;
}

.cta-card > * {
  position: relative;
  z-index: 1;
}

.cta-card h2,
.cta-card p,
.cta-card strong {
  color: #fff;
}

.cta-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.button-primary,
.button-secondary {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 12px 20px;
  font-family: "Montserrat", sans-serif;
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.035em;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
}

.button-primary {
  background: var(--brand-cyan);
  color: var(--brand-navy);
}

.button-primary:hover {
  background: #65c9f1;
  color: var(--brand-navy);
}

.button-secondary {
  border: 1px solid rgba(255, 255, 255, 0.48);
  color: #fff;
}

.button-secondary:hover {
  border-color: #fff;
  color: #fff;
}

.updated-note {
  margin: 38px 0 0 !important;
  color: var(--muted) !important;
  font-size: 0.82rem;
  font-style: italic;
  text-align: center;
}

.toc {
  position: sticky;
  top: 104px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 12px 36px rgba(0, 10, 20, 0.12);
  padding: 20px;
}

.toc__title {
  margin: 0 0 13px;
  color: var(--brand-cyan);
  font-family: "Montserrat", sans-serif;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.toc ol {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.toc a {
  display: block;
  border-left: 2px solid transparent;
  padding: 7px 0 7px 11px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.38;
  text-decoration: none;
}

.toc a:hover,
.toc a[aria-current="true"] {
  border-left-color: var(--brand-cyan);
  color: var(--text);
}

.toc__contact {
  margin-top: 17px;
  border-top: 1px solid var(--border-soft);
  padding-top: 16px;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.45;
}

.toc__contact a {
  margin-top: 8px;
  border: 1px solid var(--border);
  border-left: 1px solid var(--border);
  border-radius: 999px;
  padding: 9px 11px;
  color: var(--text);
  text-align: center;
}

.related {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto 76px;
}

.related h2 {
  margin: 0 0 20px;
  color: var(--text);
  font-size: clamp(1.5rem, 3vw, 2.15rem);
  font-weight: 900;
  letter-spacing: -0.03em;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.related-card {
  position: relative;
  display: grid;
  min-height: 180px;
  align-content: end;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: linear-gradient(145deg, var(--surface), var(--surface-soft));
  padding: 24px;
  color: var(--text);
  text-decoration: none;
}

.related-card::before {
  content: "";
  position: absolute;
  top: -60px;
  right: -44px;
  width: 150px;
  height: 150px;
  border: 26px solid rgba(40, 170, 225, 0.11);
  border-radius: 50%;
}

.related-card small,
.related-card strong,
.related-card span {
  position: relative;
  z-index: 1;
}

.related-card small {
  color: var(--brand-cyan);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.related-card strong {
  margin-top: 8px;
  font-family: "Montserrat", sans-serif;
  font-size: 1.12rem;
  line-height: 1.28;
}

.related-card span {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.related-card:hover {
  border-color: var(--brand-cyan);
  color: var(--text);
  transform: translateY(-3px);
}

.site-footer {
  border-top: 1px solid var(--border-soft);
  background: rgba(0, 10, 20, 0.12);
}

.site-footer__inner {
  display: grid;
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
  padding: 34px 0 110px;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 24px;
}

.site-footer strong {
  display: block;
  color: var(--text);
  font-family: "Montserrat", sans-serif;
  font-size: 0.86rem;
  font-weight: 900;
  text-transform: uppercase;
}

.site-footer p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 16px;
  font-size: 0.78rem;
  font-weight: 750;
}

.mobile-whatsapp {
  position: fixed;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 80;
  display: none;
  min-height: 52px;
  align-items: center;
  gap: 9px;
  border-radius: 999px;
  background: linear-gradient(90deg, #25d366, #128c7e);
  box-shadow: 0 10px 28px rgba(18, 140, 126, 0.32);
  color: #fff;
  padding: 13px 18px;
  font-family: "Montserrat", sans-serif;
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-decoration: none;
  text-transform: uppercase;
}

.mobile-whatsapp:hover {
  color: #fff;
  transform: translateY(-2px);
}

.back-to-top {
  position: fixed;
  left: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 70;
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(0, 10, 20, 0.22);
  color: var(--text);
  cursor: pointer;
  font-size: 1.05rem;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

@media (max-width: 960px) {
  .article-hero {
    grid-template-columns: 1fr;
  }

  .article-hero__visual {
    min-height: 220px;
  }

  .article-hero__visual img {
    max-height: 290px;
  }

  .content-layout {
    grid-template-columns: minmax(0, var(--reading-width));
  }

  .toc {
    position: static;
    grid-row: 1;
  }

  .toc__contact {
    display: none;
  }

  .toc ol {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  html {
    scroll-padding-top: 92px;
  }

  body {
    font-size: 16px;
  }

  .authority-band {
    justify-content: flex-start;
    gap: 0;
  }

  .site-nav__inner,
  .page-shell,
  .related,
  .site-footer__inner {
    width: min(100% - 28px, 1120px);
  }

  .site-nav__inner {
    min-height: 62px;
  }

  .brand-link img {
    width: 39px;
    height: 39px;
  }

  .brand-link__copy small,
  .nav-link {
    display: none;
  }

  .page-shell {
    padding-top: 24px;
  }

  .breadcrumb {
    margin-bottom: 17px;
  }

  .article-hero {
    gap: 20px;
    border-radius: 20px;
    padding: 24px 20px 20px;
  }

  h1 {
    font-size: clamp(2rem, 11vw, 3rem);
  }

  .hero-lede {
    margin-top: 16px;
  }

  .article-hero__visual {
    min-height: 180px;
  }

  .article-hero__visual img {
    max-height: 225px;
  }

  .content-layout {
    gap: 25px;
    margin-top: 26px;
  }

  .toc {
    padding: 17px;
  }

  .toc ol {
    grid-template-columns: 1fr;
  }

  .toc a {
    padding-block: 6px;
  }

  .ai-summary {
    padding: 19px;
  }

  .article-content h2 {
    margin-top: 1.9em;
  }

  .comparison-list li {
    grid-template-columns: 36px minmax(0, 1fr);
  }

  .comparison-list li::before {
    width: 36px;
    height: 36px;
  }

  .cta-card__actions,
  .button-primary,
  .button-secondary {
    width: 100%;
  }

  .related-grid {
    grid-template-columns: 1fr;
  }

  .related-card {
    min-height: 150px;
  }

  .site-footer__inner {
    grid-template-columns: 1fr;
    padding-bottom: 96px;
    text-align: center;
  }

  .footer-links {
    justify-content: center;
  }

  .mobile-whatsapp {
    display: inline-flex;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media print {
  .authority-band,
  .site-nav,
  .toc,
  .mobile-whatsapp,
  .back-to-top,
  .related,
  .reading-progress {
    display: none !important;
  }

  body {
    background: #fff;
    color: #111;
  }

  .page-shell,
  .content-layout {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
  }

  .article-hero,
  .ai-summary,
  .note-card,
  .cta-card {
    box-shadow: none;
    break-inside: avoid;
  }

  a {
    color: #111;
  }
}
