/* ══════════════════════════════════════════════════════════════════
   RADAR · reporte público (Uruguay expuesto)
   Espresso oscuro + acento cobre. Elegante, cálido. Datos en mono.
   Cero dependencias externas (ni una fuente de terceros).
   ══════════════════════════════════════════════════════════════════ */

:root {
  --bg:       #15100C;   /* espresso profundo */
  --bg-2:     #1C1610;   /* bandas alternas */
  --card:     #221A12;   /* tarjetas */
  --ink:      #EFE7DA;   /* crema cálido */
  --ink-2:    #A2917E;   /* apagado */
  --line:     #34281D;   /* hairline cálido */
  --copper:   #C98A52;   /* acento café/cobre */
  --copper-2: #E2B07C;

  --crit:   #E05B4F;
  --high:   #DE8F45;
  --medium: #D8BE6B;
  --low:    #5FB99A;
  --alarm:  #E05B4F;

  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", "Cascadia Code", Menlo, Consolas, monospace;
  --wrap: 1100px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: 17px; line-height: 1.62;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
h1, h2, h3, p, ol, figure { margin: 0; }
b { font-weight: 700; color: var(--ink); }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
svg { display: block; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding-inline: 24px; }

:focus-visible { outline: 3px solid var(--copper); outline-offset: 3px; border-radius: 3px; }
.skip {
  position: fixed; top: 10px; left: 10px; z-index: 50; background: var(--copper); color: #1a130c;
  padding: 8px 14px; border-radius: 8px; font-weight: 700; transform: translateY(-160%); transition: transform .18s;
}
.skip:focus { transform: none; }

.eyebrow {
  font-family: var(--mono); text-transform: uppercase; letter-spacing: .18em;
  font-size: 12px; color: var(--copper); font-weight: 600; margin: 0 0 14px;
}

/* ── Top bar ─────────────────────────────────────────────────────── */
.top { border-bottom: 1px solid var(--line); background: rgba(21,16,12,.86); backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 20; }
.top-row { display: flex; align-items: center; justify-content: space-between; height: 58px; }
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); text-decoration: none; font-weight: 800; }
.brand-mark { color: var(--copper); display: grid; place-items: center; }
.brand-word { font-size: 18px; letter-spacing: -.02em; }
.brand-dot { color: var(--copper); }
.top-updated { font-size: 13px; color: var(--ink-2); }
.top-updated b { color: var(--ink); font-family: var(--mono); font-weight: 600; }

/* ── Hero ────────────────────────────────────────────────────────── */
.hero {
  display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center;
  padding-block: clamp(40px, 8vw, 80px);
}
.hero-title {
  font-size: clamp(2.3rem, 6vw, 4.1rem); font-weight: 850; line-height: 1.02;
  letter-spacing: -.035em; margin: 0 0 20px;
}
.hero-lead { font-size: clamp(1.02rem, 2.2vw, 1.24rem); color: var(--ink-2); max-width: 44ch; }
.hero-lead b { color: var(--copper-2); font-weight: 600; }
.hero-figure { margin-top: 32px; }
.bignum {
  display: block; font-size: clamp(3.4rem, 11vw, 6.2rem); font-weight: 700; line-height: .92;
  color: var(--copper-2); letter-spacing: -.04em;
}
.bignum-label {
  display: block; margin-top: 10px; font-size: 14px; color: var(--ink-2);
  text-transform: uppercase; letter-spacing: .08em; font-weight: 600; max-width: 30ch;
}

/* ── Radar scope (la firma, ahora en oscuro = radar de verdad) ───── */
.scope { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.scope-svg { width: 100%; max-width: 380px; height: auto; filter: drop-shadow(0 24px 46px rgba(201,138,82,.14)); }
.scope-face { fill: #120D09; stroke: var(--line); stroke-width: 1; }
.scope-rings circle { stroke: var(--copper); stroke-opacity: .22; }
.scope-cross path { stroke: var(--copper); stroke-opacity: .14; }
.scope-hub { fill: var(--copper-2); }
#sweepGrad .sw0 { stop-color: var(--copper); }
#sweepGrad .sw1 { stop-color: var(--copper); }
.scope-line { stroke: var(--copper-2); opacity: .7; }
.blip { fill: var(--copper); opacity: .5; }
.blip-bright { fill: var(--copper-2); opacity: .95; }
.scope-cap { font-size: 12.5px; color: var(--ink-2); text-align: center; max-width: 34ch; }

.scope-sweep { transform-origin: 200px 200px; }
@media (prefers-reduced-motion: no-preference) {
  .scope-sweep { animation: radarSweep 4.5s linear infinite; }
  #blips { animation: blipsIn 2.4s ease-out 1 both; }
  .blip-bright { animation: blipPulse 2.6s ease-in-out infinite; }
}
@keyframes radarSweep { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes blipsIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes blipPulse { 0%,100% { opacity: .55; } 50% { opacity: 1; } }

/* ── Cómo funciona (arriba, capta la atención) ───────────────────── */
.how { background: var(--bg-2); border-block: 1px solid var(--line); padding-block: clamp(38px, 6vw, 60px); }
.how-lead { font-size: clamp(1.1rem, 2.6vw, 1.5rem); font-weight: 600; letter-spacing: -.02em; line-height: 1.35; max-width: 40ch; }
.how-lead b { color: var(--copper-2); }
.how-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 34px; }
.how-step { }
.how-step .n { font-family: var(--mono); color: var(--copper); font-size: 13px; font-weight: 700; letter-spacing: .1em; }
.how-step h3 { font-size: 1.12rem; font-weight: 700; margin: 8px 0 6px; letter-spacing: -.01em; }
.how-step p { color: var(--ink-2); font-size: 15px; }

/* ── Bandas / secciones ──────────────────────────────────────────── */
.band { background: var(--bg-2); border-block: 1px solid var(--line); padding-block: clamp(46px, 8vw, 76px); }
.band-alarm { background: var(--card); }
.section { padding-block: clamp(46px, 8vw, 76px); }
.section-head { margin-bottom: 30px; }
.section-title { font-size: clamp(1.5rem, 3.4vw, 2.15rem); font-weight: 800; letter-spacing: -.025em; line-height: 1.1; }
.section-sub { color: var(--ink-2); margin-top: 10px; max-width: 58ch; }

/* Criticidad */
.band-head { font-size: clamp(1.5rem, 3.6vw, 2.3rem); font-weight: 800; letter-spacing: -.02em; line-height: 1.12; }
.band-head .alarm { color: var(--alarm); }
.band-sub { color: var(--ink-2); margin-top: 12px; max-width: 56ch; }
.crit-bar { display: flex; height: 46px; border-radius: 12px; overflow: hidden; margin-top: 28px; box-shadow: inset 0 0 0 1px var(--line); }
.crit-bar span { display: block; height: 100%; }
.crit-legend, .seg-legend { display: flex; flex-wrap: wrap; gap: 20px 28px; margin-top: 18px; }
.crit-legend .li, .seg-legend .li { display: flex; align-items: baseline; gap: 9px; font-size: 14px; color: var(--ink-2); }
.crit-legend .sw, .seg-legend .sw { width: 11px; height: 11px; border-radius: 3px; align-self: center; }
.crit-legend .n, .seg-legend .n { font-family: var(--mono); font-weight: 700; color: var(--ink); font-size: 16px; }

/* Barras horizontales */
.chart-h { display: flex; flex-direction: column; gap: 12px; }
.row { display: grid; grid-template-columns: 168px 1fr auto; align-items: center; gap: 14px; }
.row-label { font-size: 14.5px; font-weight: 600; text-align: right; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-track { height: 26px; background: var(--bg); border-radius: 7px; overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); }
.row-fill { height: 100%; background: linear-gradient(90deg, var(--copper), var(--copper-2)); border-radius: 7px; }
.row-val { font-family: var(--mono); font-weight: 700; font-size: 15px; min-width: 4ch; text-align: right; color: var(--copper-2); }

/* Segmentado (auth) */
.seg { display: flex; height: 46px; border-radius: 12px; overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); margin-top: 26px; }
.seg span { display: flex; align-items: center; justify-content: center; color: #16100b; font-weight: 700; font-size: 14px; min-width: 0; overflow: hidden; }

/* Rankings */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.rank { list-style: none; padding: 0; margin: 0; }
.rank li { display: grid; grid-template-columns: 26px 1fr auto; align-items: baseline; gap: 12px;
  padding: 13px 0; border-bottom: 1px solid var(--line); }
.rank li:last-child { border-bottom: 0; }
.rank .idx { font-family: var(--mono); color: var(--copper); font-weight: 700; font-size: 13px; }
.rank .name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.rank .name small { display: block; font-weight: 400; color: var(--ink-2); font-size: 12.5px; margin-top: 2px; }
.rank .cnt { font-family: var(--mono); font-weight: 700; color: var(--copper-2); }

/* ── Footer ──────────────────────────────────────────────────────── */
.foot { background: #0F0B08; border-top: 1px solid var(--line); padding-block: clamp(44px, 7vw, 68px); }
.foot-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; }
.foot-title { color: var(--ink); font-size: 1.12rem; font-weight: 700; margin-bottom: 12px; letter-spacing: -.01em; }
.foot p { color: var(--ink-2); max-width: 52ch; }
.foot u { text-decoration-color: var(--copper); text-underline-offset: 3px; }
.foot-note { display: flex; justify-content: space-between; align-items: center; gap: 16px;
  margin-top: 38px; padding-top: 22px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-2); }

/* ── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 820px) {
  body { font-size: 16px; }
  .hero { grid-template-columns: 1fr; gap: 30px; }
  .scope { order: -1; }
  .scope-svg { max-width: 290px; }
  .how-steps, .two-col, .foot-grid { grid-template-columns: 1fr; gap: 26px; }
  .row { grid-template-columns: 104px 1fr auto; gap: 10px; }
  .row-label { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
