/* status.genio.cl — tokens del «Patrón visual GENIO» (claro y oscuro). */
:root {
  color-scheme: light;
  --fondo: #f5f5f5;
  --superficie: #ffffff;
  --borde-tarjeta: rgba(0, 0, 0, 0);
  --sombra-tarjeta: 0 1px 3px rgba(171, 190, 209, 0.55);
  --texto: #333333;
  --texto-2: #5c5c5c;
  --accion: #4964a4;
  --accion-hover: #3f5a9e;
  --primario: #6185db;
  --linea: #dce1ea;
  --pista: #dce4f6;
  --amarillo: #fad901;
  --punta-borde: #ffffff;
  --ok-fondo: #eaf7ee;
  --ok-tinta: #1d5e37;
  --rev-fondo: #fff1dc;
  --rev-tinta: #8a4b00;
  --prob-fondo: #fdecec;
  --prob-tinta: #b42318;
  --neutro-fondo: #eef2fc;
  --neutro-tinta: #4964a4;
  --cifra-ok: #4964a4;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --fondo: #0d1117;
    --superficie: #1e2433;
    --borde-tarjeta: #2a3145;
    --sombra-tarjeta: none;
    --texto: #e6ebf5;
    --texto-2: #b6c5ed;
    --accion: #8aa5e8;
    --accion-hover: #afc3f5;
    --linea: rgba(255, 255, 255, 0.2);
    --pista: rgba(169, 190, 240, 0.25);
    --punta-borde: #1e2433;
    --ok-fondo: rgba(46, 158, 91, 0.16);
    --ok-tinta: #9be3b5;
    --rev-fondo: rgba(192, 106, 0, 0.25);
    --rev-tinta: #ffddb0;
    --prob-fondo: rgba(255, 82, 82, 0.2);
    --prob-tinta: #ffc9c9;
    --neutro-fondo: rgba(97, 133, 219, 0.16);
    --neutro-tinta: #8aa5e8;
    --cifra-ok: #8aa5e8;
  }
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  background: var(--fondo);
  color: var(--texto);
  font-family: Poppins, system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accion); }
a:hover { color: var(--accion-hover); }
a:focus-visible { outline: 2px solid var(--primario); outline-offset: 3px; border-radius: 4px; }

[hidden] { display: none !important; }

.pagina {
  min-height: 100vh;
  width: 100%;
  max-width: 1104px;
  margin: 0 auto;
  padding-top: max(28px, env(safe-area-inset-top, 0px));
  padding-bottom: max(32px, env(safe-area-inset-bottom, 0px));
  padding-left: max(clamp(16px, 4vw, 32px), env(safe-area-inset-left, 0px));
  padding-right: max(clamp(16px, 4vw, 32px), env(safe-area-inset-right, 0px));
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* Cabecera */
.cabecera { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.marca { display: flex; align-items: center; gap: 14px; }
.logo { height: 40px; width: auto; display: block; }
.separador { width: 1px; height: 24px; background: var(--linea); }
.seccion { font-size: 15px; font-weight: 500; color: var(--texto-2); }
.entrar {
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 4px;
}

/* Tarjeta principal */
.tarjeta {
  background: var(--superficie);
  border: 1px solid var(--borde-tarjeta);
  border-radius: 16px;
  box-shadow: var(--sombra-tarjeta);
  padding: clamp(24px, 4vw, 48px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 40px 64px;
}

/* GENIO en el disco amarillo, con el anillo que marca el % */
.persona {
  flex: 0 1 380px;
  min-width: 220px;
  max-width: 380px;
  width: 100%;
  aspect-ratio: 1 / 1;
  position: relative;
}
.anillo { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.anillo-pista { fill: none; stroke: var(--pista); stroke-width: 10; }
.anillo-valor {
  fill: none;
  stroke: var(--primario);
  stroke-width: 10;
  stroke-linecap: round;
  stroke-dasharray: 0 1118.4;
  transition: stroke-dasharray 0.8s ease;
}
.anillo-punta { fill: var(--amarillo); stroke: var(--punta-borde); stroke-width: 4; }
.disco { position: absolute; inset: 9%; border-radius: 50%; background: var(--amarillo); }
.genio {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  height: auto;
  display: block;
}
.genio--saludable { width: 82%; bottom: 10%; }
.genio--revisando { width: 92%; bottom: 13%; }
.genio--problema { width: 66%; bottom: 6%; }

/* Texto del estado */
.texto {
  flex: 1 1 360px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  background: var(--neutro-fondo);
  color: var(--neutro-tinta);
}
.chip[data-tono='ok'] { background: var(--ok-fondo); color: var(--ok-tinta); }
.chip[data-tono='revision'] { background: var(--rev-fondo); color: var(--rev-tinta); }
.chip[data-tono='problema'] { background: var(--prob-fondo); color: var(--prob-tinta); }

.punto {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  display: inline-block;
  position: relative;
}
.punto::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid currentColor;
  opacity: 0;
  animation: latido 2.2s ease-out infinite;
}
@keyframes latido {
  0% { transform: scale(0.6); opacity: 0.55; }
  100% { transform: scale(1.7); opacity: 0; }
}

.titular { margin: 0; display: flex; flex-direction: column; gap: 6px; font-weight: 700; }
.pre { font-size: 30px; font-weight: 500; line-height: 1.2; text-wrap: balance; }
.cifra {
  font-size: clamp(84px, 10vw, 136px);
  line-height: 0.92;
  letter-spacing: -0.045em;
  font-variant-numeric: tabular-nums;
  color: var(--cifra-ok);
}
.tarjeta[data-nivel='revision'] .cifra { color: var(--rev-tinta); }
.tarjeta[data-nivel='problema'] .cifra { color: var(--prob-tinta); }
.post { font-size: 30px; font-weight: 700; line-height: 1.2; }

.cuerpo { margin: 0; font-size: 17px; line-height: 1.55; color: var(--texto-2); max-width: 36ch; }
.meta {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--texto-2);
  font-variant-numeric: tabular-nums;
}

.meta-extra:not(:empty)::before { content: '·'; margin: 0 6px 0 -2px; }

/* Bloque informativo */
.info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px 56px;
  padding: 4px 8px 0;
}
.info h2 { margin: 0 0 6px; font-size: 15px; font-weight: 700; }
.info p { margin: 0; font-size: 14.5px; line-height: 1.6; color: var(--texto-2); max-width: 48ch; }

.pie { margin-top: auto; padding: 0 8px; font-size: 12.5px; color: var(--texto-2); }

.sin-js { text-align: center; color: var(--texto-2); padding: 16px; }

/* Teléfono: todo centrado y más compacto */
@media (max-width: 600px) {
  .pagina { gap: 16px; padding-top: max(16px, env(safe-area-inset-top, 0px)); }
  .logo { height: 32px; }
  .tarjeta { flex-direction: column; text-align: center; gap: 16px; padding: 24px 20px 26px; }
  .persona { flex: 0 0 auto; width: 216px; min-width: 0; }
  .texto { align-items: center; gap: 14px; flex: 0 1 auto; width: 100%; }
  .meta { justify-content: center; text-align: center; }
  .meta-extra { display: none; }
  .titular { align-items: center; }
  .pre { font-size: 20px; }
  .cifra { font-size: 80px; }
  .post { font-size: 22px; }
  .cuerpo { font-size: 15px; max-width: 30ch; }
  .info { gap: 12px; padding: 2px 4px 0; }
  .info h2 { font-size: 14px; margin-bottom: 3px; }
  .info p { font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  .punto::after { animation: none; }
  .anillo-valor { transition: none; }
}
