:root {
  color-scheme: dark;

  --bg: #070c13;
  --surface: #0b131e;
  --surface-2: #0e1825;

  --border: #1b293a;
  --border-strong: #27394e;

  --text: #f3f5fc;
  --muted: #aebacd;
  --soft: #7f91a9;

  --violet: #b594ff;
  --blue: #80b8ff;
  --cyan: #4ce2df;

  --accent: var(--blue);
  --accent-glow: #2865a52b;

  --gradient:
    linear-gradient(
      110deg,
      #792ee3,
      #5b46e4 50%,
      #326fcf
    );

  --font:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Helvetica,
    Arial,
    sans-serif;

  --mono:
    "SFMono-Regular",
    Consolas,
    "Liberation Mono",
    Menlo,
    monospace;

  --max-width: 1180px;
  --reading-width: 720px;
  --header-height: 68px;
}

/* =========================================================
   BASE
   ========================================================= */

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;

  background:
    radial-gradient(
      ellipse at 78% 5%,
      var(--accent-glow),
      transparent 35%
    ),
    var(--bg);

  color: var(--text);

  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;

  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

button {
  color: inherit;
  font: inherit;
}

svg {
  display: block;
  flex-shrink: 0;
}

.icon {
  width: 22px;
  height: 22px;

  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-sm {
  width: 16px;
  height: 16px;
}

::selection {
  background: #7354b8;
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 5px;
  border-radius: 4px;
}

.container {
  width: min(
    calc(100% - 64px),
    var(--max-width)
  );

  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 100;

  top: 8px;
  left: 12px;

  padding: 10px 18px;

  background: #fff;
  color: #111;

  border-radius: 6px;

  transform: translateY(-160%);
}

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

/* =========================================================
   HEADER
   ========================================================= */

.site-header {
  position: sticky;
  z-index: 40;
  top: 0;

  border-bottom: 1px solid #172230;

  background: #080c12ed;

  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.header-inner {
  height: var(--header-height);

  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  color: #f8f9ff;

  font-size: 18px;
  font-weight: 700;
  letter-spacing: -.02em;
}

/* Ya no hay selector de idioma */
.language-switch {
  display: none;
}

/* =========================================================
   MAIN
   ========================================================= */

.case-main {
  padding-top: 42px;
  padding-bottom: 96px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;

  color: #8496ad;

  font-size: 12px;
  font-weight: 500;

  transition: color .2s ease;
}

.back-link:hover {
  color: #dce8fa;
}

.case-article {
  margin-top: 50px;
}

/* =========================================================
   HERO DEL CASO
   ========================================================= */

.case-head {
  display: grid;

  grid-template-columns:
    minmax(0, 1fr)
    minmax(230px, 300px);

  column-gap: clamp(52px, 8vw, 120px);

  align-items: start;

  padding-bottom: 58px;

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

/* El kicker y el título viven en la columna izquierda */

.case-kicker {
  grid-column: 1;

  display: flex;
  align-items: center;
  gap: 12px;

  margin-bottom: 22px;
}

.case-icon {
  width: 36px;
  height: 36px;

  display: grid;
  place-items: center;

  border: 1px solid
    color-mix(
      in srgb,
      var(--accent) 35%,
      transparent
    );

  border-radius: 9px;

  color: var(--accent);

  background:
    color-mix(
      in srgb,
      var(--accent) 9%,
      transparent
    );
}

.case-icon .icon {
  width: 20px;
  height: 20px;
}

.eyebrow {
  color: var(--accent);

  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;

  letter-spacing: .12em;
  text-transform: uppercase;
}

.case-head h1 {
  grid-column: 1;

  max-width: 830px;

  margin: 0;

  color: #f7f8fd;

  font-size:
    clamp(
      42px,
      5.2vw,
      70px
    );

  font-weight: 700;

  line-height: .99;

  letter-spacing: -.045em;

  text-wrap: balance;
}

.case-subtitle {
  grid-column: 1;

  max-width: 720px;

  margin: 26px 0 0;

  color: #a9b7ca;

  font-size: 16px;
  line-height: 1.8;
}

/* =========================================================
   MÉTRICAS LATERALES
   ========================================================= */

.case-stats {
  grid-column: 2;
  grid-row: 1 / span 4;

  align-self: center;

  display: flex;
  flex-direction: column;

  border-top: 1px solid var(--border);
}

.case-stat {
  padding: 22px 0;

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

.case-stat strong {
  display: block;

  margin-bottom: 7px;

  color: var(--accent);

  font-family: var(--mono);
  font-size: clamp(22px, 2.1vw, 29px);
  font-weight: 600;

  line-height: 1.05;
  letter-spacing: -.04em;
}

.case-stat span {
  display: block;

  color: var(--soft);

  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;

  line-height: 1.45;

  letter-spacing: .08em;
  text-transform: uppercase;
}

/* =========================================================
   CUERPO EDITORIAL
   ========================================================= */

.case-body {
  width: min(
    100%,
    var(--reading-width)
  );

  margin: 72px auto 0;
}

.case-body p {
  position: relative;

  margin: 0 0 56px;

  color: var(--muted);

  font-size: 16px;
  line-height: 1.88;
}

.case-body p:last-child {
  margin-bottom: 0;
}

.case-body strong {
  display: block;

  margin-bottom: 12px;

  color: var(--accent);

  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;

  line-height: 1.4;

  letter-spacing: .11em;
  text-transform: uppercase;
}

/*
  Línea vertical editorial.
  Muy sutil, no timeline.
*/

.case-body {
  position: relative;
}

.case-body::before {
  content: "";

  position: absolute;

  top: 3px;
  bottom: 3px;

  left: -38px;

  width: 1px;

  background:
    linear-gradient(
      to bottom,
      transparent,
      #233247 5%,
      #233247 95%,
      transparent
    );
}

.case-body p::before {
  content: "";

  position: absolute;

  top: 6px;
  left: -41px;

  width: 7px;
  height: 7px;

  border-radius: 50%;

  background: var(--bg);

  border: 1px solid
    color-mix(
      in srgb,
      var(--accent) 60%,
      #304257
    );
}

/* =========================================================
   CTA FINAL
   ========================================================= */

.case-cta {
  width: min(
    100%,
    var(--reading-width)
  );

  margin: 74px auto 0;

  padding: 30px 0;

  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);

  display: flex;

  justify-content: space-between;
  align-items: center;

  gap: 30px;
}

.case-cta p {
  margin: 0;

  color: #aab8cb;

  font-size: 14px;
}

.button {
  display: inline-flex;

  align-items: center;
  justify-content: center;

  gap: 10px;

  padding: 0;

  min-height: auto;

  border: 0;

  background: none;

  color: var(--accent);

  font-size: 14px;
  font-weight: 600;

  transition:
    color .2s ease,
    transform .2s ease;
}

.button-primary {
  background: none;
  box-shadow: none;
}

.button-primary:hover {
  color: #d9e8ff;
  box-shadow: none;
  transform: translateX(3px);
}

/* =========================================================
   FOOTER
   ========================================================= */

.site-footer {
  border-top: 1px solid #172230;

  padding: 26px 0 34px;
}

.footer-minimal {
  display: flex;

  align-items: center;
  justify-content: space-between;

  gap: 18px;

  color: #718198;

  font-size: 11px;
}

.footer-minimal p {
  margin: 0;
}

.footer-links {
  display: flex;
  align-items: center;

  gap: 9px;
}

.footer-links a {
  color: #93a9c6;

  transition: color .2s ease;
}

.footer-links a:hover {
  color: #e0ebfa;
}

/* =========================================================
   ACENTOS POR CASO
   ========================================================= */

body.case-accent-blue {
  --accent: #80b8ff;
  --accent-glow: #2865a52b;
}

body.case-accent-violet {
  --accent: #b594ff;
  --accent-glow: #6f45d329;
}

body.case-accent-cyan {
  --accent: #4ce2df;
  --accent-glow: #175d5d35;
}

/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 900px) {

  .case-head {
    grid-template-columns: 1fr;

    column-gap: 0;
  }

  .case-kicker,
  .case-head h1,
  .case-subtitle,
  .case-stats {
    grid-column: 1;
  }

  .case-stats {
    grid-row: auto;

    margin-top: 38px;

    display: grid;

    grid-template-columns:
      repeat(
        3,
        minmax(0, 1fr)
      );

    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
  }

  .case-stat {
    padding: 20px;

    border-bottom: 0;
  }

  .case-stat:first-child {
    padding-left: 0;
  }

  .case-stat + .case-stat {
    border-left: 1px solid var(--border);
  }

}

/* =========================================================
   MÓVIL
   ========================================================= */

@media (max-width: 699px) {

  :root {
    --header-height: 62px;
  }

  .container {
    width: calc(100% - 40px);
  }

  .case-main {
    padding-top: 28px;
    padding-bottom: 64px;
  }

  .case-article {
    margin-top: 34px;
  }

  .case-head {
    padding-bottom: 38px;
  }

  .case-kicker {
    margin-bottom: 18px;
  }

  .case-head h1 {
    font-size:
      clamp(
        36px,
        11vw,
        48px
      );

    line-height: 1.03;

    letter-spacing: -.035em;
  }

  .case-subtitle {
    margin-top: 22px;

    font-size: 14px;
    line-height: 1.75;
  }

  .case-stats {
    margin-top: 30px;

    display: block;

    border-bottom: 0;
  }

  .case-stat {
    padding: 16px 0;

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

  .case-stat + .case-stat {
    border-left: 0;
  }

  .case-stat strong {
    font-size: 19px;
  }

  .case-body {
    margin-top: 48px;
  }

  .case-body::before {
    display: none;
  }

  .case-body p {
    margin-bottom: 40px;

    font-size: 15px;
    line-height: 1.82;
  }

  .case-body p::before {
    display: none;
  }

  .case-body strong {
    margin-bottom: 9px;

    font-size: 10px;
  }

  .case-cta {
    margin-top: 52px;

    padding: 26px 0;

    align-items: flex-start;

    flex-direction: column;

    gap: 14px;
  }

  .footer-minimal {
    align-items: flex-start;
    flex-direction: column;

    gap: 10px;
  }

}

/* =========================================================
   ACCESIBILIDAD
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }

}