/* La página de producto de ECenter (landing/DISENO.md). Los colores son los tokens de la aplicación
   (docs/fase2/rediseno-frontend.md §5.2), con sus mismos valores en claro y en oscuro. */

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 100 700;
  font-stretch: 75% 100%;
  font-display: swap;
  src: url("fuentes/ibm-plex-sans.woff2") format("woff2-variations"), url("fuentes/ibm-plex-sans.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fuentes/ibm-plex-mono.woff2") format("woff2");
}

:root {
  --lienzo: #f5f7f9;
  --papel: #ffffff;
  --papel-suave: #f1f4f7;
  --papel-encima: #eaeef2;
  --linea-suave: #e3e7ea;
  --linea: #d2d6db;
  --linea-fuerte: #b2b8bd;
  --tinta: #181d24;
  --pizarra: #4c545a;
  --apagado: #687076;
  --accion: #016d90;
  --accion-encima: #005e7c;
  --accion-texto: #016788;
  --accion-suave: #e2f4fc;
  --accion-borde: #88c1db;
  --acero: #378eb2;
  --foco: #017ca3;
  --pantalla: #0c0f12;

  --sans: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --radio-control: 4px;
  --radio-panel: 6px;
  --margen: 16px;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --lienzo: #0c0f12;
    --papel: #14171c;
    --papel-suave: #101317;
    --papel-encima: #1d2126;
    --linea-suave: #23272c;
    --linea: #31363c;
    --linea-fuerte: #484e55;
    --tinta: #e8ebef;
    --pizarra: #b2b8bf;
    --apagado: #8f969e;
    --accion: #04799f;
    --accion-encima: #017398;
    --accion-texto: #68bde4;
    --accion-suave: #072d3d;
    --accion-borde: #196c8c;
    --foco: #2fb3e5;
    --pantalla: #000000;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --lienzo: #0c0f12;
  --papel: #14171c;
  --papel-suave: #101317;
  --papel-encima: #1d2126;
  --linea-suave: #23272c;
  --linea: #31363c;
  --linea-fuerte: #484e55;
  --tinta: #e8ebef;
  --pizarra: #b2b8bf;
  --apagado: #8f969e;
  --accion: #04799f;
  --accion-encima: #017398;
  --accion-texto: #68bde4;
  --accion-suave: #072d3d;
  --accion-borde: #196c8c;
  --foco: #2fb3e5;
  --pantalla: #000000;
  color-scheme: dark;
}

/* Base */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--lienzo);
  color: var(--tinta);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
}

h1,
h2,
h3,
p,
dl,
dd,
ol,
ul,
figure {
  margin: 0;
}

h1,
h2 {
  font-weight: 600;
  font-stretch: 88%;
  letter-spacing: -0.012em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.5rem, 1.6rem + 4vw, 4.4rem);
  line-height: 1.02;
}

h2 {
  font-size: clamp(1.85rem, 1.4rem + 1.8vw, 2.6rem);
  line-height: 1.1;
  margin-bottom: 0.6rem;
}

h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.35;
}

p,
li,
dd {
  text-wrap: pretty;
}

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

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 2px solid var(--foco);
  outline-offset: 2px;
}

code {
  font-family: var(--mono);
  font-size: 0.92em;
}

.ancho {
  width: 100%;
  max-width: 76rem;
  margin-inline: auto;
  padding-inline: var(--margen);
}

@media (min-width: 720px) {
  :root {
    --margen: 32px;
  }
}

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

.saltar {
  position: absolute;
  left: var(--margen);
  top: -100px;
  z-index: 10;
  padding: 8px 14px;
  background: var(--papel);
  border: 1px solid var(--linea-fuerte);
  border-radius: var(--radio-control);
}

.saltar:focus {
  top: 12px;
}

/* Botones: el principal, una vez por zona */

.boton {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--linea-fuerte);
  border-radius: var(--radio-control);
  background: var(--papel);
  color: var(--tinta);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.2;
  text-decoration: none;
}

.boton:hover {
  background: var(--papel-encima);
}

.boton--principal {
  border-color: var(--accion);
  background: var(--accion);
  color: #ffffff;
}

.boton--principal:hover {
  border-color: var(--accion-encima);
  background: var(--accion-encima);
}

.boton--compacto {
  min-height: 36px;
  padding: 0 14px;
  font-size: 0.9375rem;
}

.acciones {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Cabecera */

.cabecera {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--lienzo);
  border-bottom: 1px solid var(--linea-suave);
}

.cabecera__fila {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 60px;
}

.marca {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--tinta);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.125rem;
}

.marca__monograma {
  width: 28px;
  height: 28px;
}

.marca__monograma rect {
  fill: var(--acero);
}

.marca__monograma path {
  fill: #ffffff;
}

.cabecera__nav {
  display: none;
  gap: 4px;
  margin-left: auto;
}

.cabecera__nav a {
  padding: 6px 10px;
  border-radius: var(--radio-control);
  color: var(--pizarra);
  text-decoration: none;
  font-size: 0.9375rem;
}

.cabecera__nav a:hover {
  color: var(--tinta);
  background: var(--papel-encima);
}

.cabecera .boton {
  margin-left: auto;
}

@media (min-width: 760px) {
  .cabecera__nav {
    display: flex;
  }

  .cabecera__nav + .boton {
    margin-left: 8px;
  }
}

/* Portada */

.portada {
  padding-block: 56px 72px;
}

.portada__texto {
  max-width: 44rem;
}

.portada h1 {
  margin-bottom: 20px;
}

/* En una pantalla ancha el titular y su explicación van lado a lado, y el cubo entra antes */
@media (min-width: 1100px) {
  .portada {
    padding-top: 72px;
  }

  .portada__texto {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
    gap: 64px;
    max-width: none;
  }

  .portada h1 {
    margin-bottom: 0;
  }

  .portada .entradilla {
    margin-bottom: 24px;
  }

  .portada .cubo {
    margin-top: 56px;
  }
}

.entradilla {
  font-size: clamp(1.125rem, 1.05rem + 0.35vw, 1.3rem);
  line-height: 1.55;
  color: var(--pizarra);
  margin-bottom: 28px;
  max-width: 60ch;
}

.nota {
  margin-top: 20px;
  font-size: 0.9375rem;
  color: var(--apagado);
}

/* El cubo de la portada */

.cubo {
  margin-top: 48px;
  background: var(--papel);
  border: 1px solid var(--linea);
  border-radius: var(--radio-panel);
  overflow: hidden;
}

.cubo__barra {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding: 14px 20px;
  background: var(--papel-suave);
  border-bottom: 1px solid var(--linea-suave);
}

.cubo__titulo {
  font-weight: 600;
}

.cubo__contexto {
  font-size: 0.875rem;
  color: var(--pizarra);
}

.ver-como {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.ver-como legend {
  float: left;
  margin-right: 12px;
  padding: 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--pizarra);
}

.ver-como input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.ver-como label {
  display: inline-flex;
  flex-direction: column;
  padding: 6px 14px;
  border: 1px solid var(--linea-fuerte);
  background: var(--papel);
  cursor: pointer;
  line-height: 1.3;
}

.ver-como label + input + label {
  margin-left: -1px;
}

.ver-como input:first-of-type + label {
  border-radius: var(--radio-control) 0 0 var(--radio-control);
}

.ver-como label:last-of-type {
  border-radius: 0 var(--radio-control) var(--radio-control) 0;
}

.ver-como input:checked + label {
  position: relative;
  background: var(--accion-suave);
  border-color: var(--accion-borde);
}

.ver-como input:focus-visible + label {
  outline: 2px solid var(--foco);
  outline-offset: 2px;
  position: relative;
}

.ver-como__usuario {
  font-family: var(--mono);
  font-size: 0.875rem;
}

.ver-como__ambito {
  font-size: 0.8125rem;
  color: var(--pizarra);
}

.cubo__rejilla {
  overflow-x: auto;
}

/* En una pantalla estrecha las zonas se quedan a la vista al desplazar la tabla */
.cubo__rejilla th:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--papel);
}

.cubo__rejilla tfoot th:first-child {
  background: var(--papel-suave);
}

@media (max-width: 600px) {
  .ver-como {
    width: 100%;
  }

  .ver-como legend {
    float: none;
    width: 100%;
    margin: 0 0 6px;
  }

  .ver-como label {
    flex: 1 1 0;
    padding: 6px 10px;
  }

  .cubo__barra,
  .cubo__consulta,
  .cubo figcaption {
    padding-inline: 14px;
  }

  .cifras th,
  .cifras td {
    padding-inline: 12px;
  }
}

.cifras {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
  font-size: 0.9375rem;
}

.cifras th,
.cifras td {
  padding: 9px 16px;
  white-space: nowrap;
}

.cifras td {
  text-align: right;
}

.cifras thead th {
  text-align: right;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--pizarra);
  border-bottom: 1px solid var(--linea);
}

.cifras thead th:first-child,
.cifras tbody th,
.cifras tfoot th {
  text-align: left;
}

.cifras tbody th {
  font-weight: 500;
}

.cifras tbody tr + tr {
  border-top: 1px solid var(--linea-suave);
}

.cifras tfoot tr {
  border-top: 1px solid var(--linea-fuerte);
  background: var(--papel-suave);
  font-weight: 600;
}

.cifras i {
  font-style: italic;
  color: var(--pizarra);
}

.v-norte,
.universo,
.universo-nota {
  display: none;
}

.cubo:has(#ver-norte:checked) .fuera-norte,
.cubo:has(#ver-norte:checked) .v-todas {
  display: none;
}

.cubo:has(#ver-norte:checked) .v-norte {
  display: inline;
}

.cubo:has(#ver-norte:checked) .universo {
  display: block;
  background: var(--accion-suave);
  outline: 1px solid transparent;
}

.cubo:has(#ver-norte:checked) .universo-nota {
  display: block;
}

@media (prefers-reduced-motion: no-preference) {
  .cubo:has(#ver-norte:checked) .universo {
    animation: universo-llega 1.4s cubic-bezier(0.2, 0.7, 0.2, 1);
  }

  .cubo:has(#ver-norte:checked) .norte {
    animation: fila-queda 1.4s cubic-bezier(0.2, 0.7, 0.2, 1);
  }
}

@keyframes universo-llega {
  from {
    background: color-mix(in srgb, var(--acero) 45%, var(--accion-suave));
  }
}

@keyframes fila-queda {
  from {
    background: color-mix(in srgb, var(--acero) 22%, transparent);
  }
}

.cubo__consulta {
  padding: 16px 20px 18px;
  border-top: 1px solid var(--linea-suave);
}

.cubo__consulta-titulo {
  margin-bottom: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--pizarra);
}

.sql {
  margin: 0;
  padding: 14px 16px;
  overflow-x: auto;
  background: var(--papel-suave);
  border: 1px solid var(--linea-suave);
  border-radius: var(--radio-control);
  font-family: var(--mono);
  font-size: 0.8125rem;
  line-height: 1.65;
  color: var(--tinta);
  tab-size: 2;
}

.sql code {
  font-size: inherit;
}

/* Cada línea de la consulta se parte por sus espacios, con la continuación sangrada: el texto es el que se envió */
.sql .l {
  display: block;
  padding-left: 4ch;
  text-indent: -4ch;
  white-space: pre-wrap;
}

.sql .l.universo {
  display: none;
}

.universo-nota {
  margin-top: 10px;
  font-size: 0.875rem;
  color: var(--pizarra);
}

.cubo figcaption {
  padding: 12px 20px 16px;
  border-top: 1px solid var(--linea-suave);
  font-size: 0.875rem;
  color: var(--apagado);
}

/* Secciones */

.seccion {
  padding-block: 64px;
  border-top: 1px solid var(--linea-suave);
}

@media (min-width: 720px) {
  .seccion {
    padding-block: 88px;
  }
}

.seccion__entradilla {
  max-width: 56ch;
  margin-bottom: 36px;
  color: var(--pizarra);
}

.dos-columnas {
  display: grid;
  gap: 40px;
}

.dos-columnas p + p {
  margin-top: 14px;
}

.dos-columnas .acciones {
  margin-top: 24px;
}

@media (min-width: 900px) {
  .dos-columnas {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 64px;
    align-items: start;
  }
}

/* En qué se diferencia */

.pruebas {
  margin-top: 32px;
}

.prueba {
  display: grid;
  gap: 8px;
  padding-block: 24px;
  border-top: 1px solid var(--linea);
}

.prueba:last-child {
  border-bottom: 1px solid var(--linea);
}

.prueba dt {
  font-size: 1.375rem;
  font-weight: 600;
  font-stretch: 92%;
  line-height: 1.25;
}

.prueba dd {
  max-width: 62ch;
  color: var(--pizarra);
}

@media (min-width: 900px) {
  .prueba {
    grid-template-columns: 22rem minmax(0, 1fr);
    gap: 48px;
  }
}

/* Vídeos */

.seccion--cine {
  background: var(--papel);
}

.cine {
  display: grid;
  gap: 24px;
}

@media (min-width: 1000px) {
  .cine {
    grid-template-columns: minmax(0, 1fr) 21rem;
    gap: 32px;
  }
}

.cine video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--pantalla);
  border-radius: var(--radio-panel);
}

.cine__actual {
  margin-top: 12px;
  color: var(--pizarra);
}

.num {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--apagado);
}

.cine__actual .num {
  margin-right: 6px;
}

.capitulos {
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--linea-suave);
  max-height: 26rem;
  overflow-y: auto;
  overscroll-behavior: contain;
}

@media (min-width: 1000px) {
  .capitulos {
    height: 0;
    min-height: 100%;
    max-height: none;
  }
}

.capitulos li {
  border-bottom: 1px solid var(--linea-suave);
}

.capitulos a {
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr) auto;
  column-gap: 8px;
  padding: 10px 12px 11px 10px;
  color: var(--tinta);
  text-decoration: none;
  line-height: 1.35;
}

.capitulos a:hover {
  background: var(--papel-encima);
}

.capitulos a[aria-current="true"] {
  background: var(--accion-suave);
  outline: 1px solid transparent;
}

.capitulos a[aria-current="true"] .num {
  color: var(--accion-texto);
}

.capitulo__titulo {
  font-weight: 600;
}

.capitulo__dur {
  grid-column: 3;
  grid-row: 1;
  font-variant-numeric: tabular-nums;
  font-size: 0.875rem;
  color: var(--apagado);
}

.capitulo__desc {
  grid-column: 2 / 4;
  font-size: 0.875rem;
  color: var(--pizarra);
}

/* Si ya tiene EC7: los pasos del asistente, como los dibuja la aplicación */

.pasos {
  padding: 0;
  list-style: none;
  counter-reset: paso;
}

.pasos li {
  position: relative;
  padding: 2px 0 20px 48px;
  color: var(--pizarra);
  counter-increment: paso;
}

.pasos li b {
  color: var(--tinta);
  font-weight: 600;
}

.pasos li::before {
  content: counter(paso);
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--linea-fuerte);
  border-radius: 50%;
  background: var(--papel);
  color: var(--tinta);
  font-weight: 600;
  font-size: 0.9375rem;
  font-variant-numeric: tabular-nums;
}

.pasos li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 15px;
  top: 34px;
  bottom: 4px;
  border-left: 1px solid var(--linea);
}

/* Qué hace */

.funciones {
  display: grid;
  gap: 40px 48px;
}

@media (min-width: 700px) {
  .funciones {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1080px) {
  .funciones {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.grupo h3 {
  padding-bottom: 8px;
  border-bottom: 1px solid var(--linea);
}

.grupo ul {
  padding: 0;
  list-style: none;
}

.grupo li {
  padding-block: 8px;
  font-size: 0.9875rem;
  color: var(--pizarra);
}

.grupo li + li {
  border-top: 1px solid var(--linea-suave);
}

/* La demo */

.usuarios {
  width: 100%;
  border-collapse: collapse;
}

.usuarios caption {
  padding-bottom: 10px;
  text-align: left;
  font-weight: 600;
}

.usuarios th,
.usuarios td {
  padding: 10px 0;
  vertical-align: baseline;
  border-top: 1px solid var(--linea-suave);
  text-align: left;
}

.usuarios th {
  padding-right: 20px;
  font-family: var(--mono);
  font-weight: 400;
  font-size: 0.9375rem;
  white-space: nowrap;
}

.usuarios td {
  color: var(--pizarra);
}

/* Contacto y pie */

.seccion--contacto p {
  max-width: 64ch;
  color: var(--pizarra);
}

.contacto__correo {
  margin-top: 16px;
  font-size: 1.375rem;
  font-weight: 600;
}

.pie {
  padding-block: 32px 48px;
  border-top: 1px solid var(--linea);
}

.pie__fila {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px 32px;
}

.pie__logo {
  width: auto;
  height: 16px;
}

.logo__action {
  fill: var(--tinta);
}

.logo__ware {
  fill: var(--acero);
}

.pie__enlaces {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  font-size: 0.9375rem;
}

.pie__enlaces a {
  color: var(--pizarra);
}

/* El aviso legal (aviso-legal.html) */

.legal { padding-block: 48px 88px; }
.legal h1 { font-size: clamp(2rem, 1.5rem + 2vw, 2.8rem); margin-bottom: 32px; }
.legal h2 { font-size: 1.375rem; margin: 36px 0 8px; }
.legal p, .legal li { max-width: 64ch; color: var(--pizarra); }
.legal p + p { margin-top: 12px; }
.legal dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 24px; max-width: 44em; }
.legal dt { font-weight: 600; }
.legal dd { color: var(--pizarra); }

/* Colores forzados: lo elegido y lo marcado se ven sin sus fondos */

@media (forced-colors: active) {
  .ver-como input:checked + label,
  .capitulos a[aria-current="true"] {
    outline: 2px solid CanvasText;
    outline-offset: -2px;
  }

  .cubo:has(#ver-norte:checked) .universo {
    outline: 1px solid CanvasText;
  }
}
