/* ════════════════════════════════════════════════════════════════════════════
   Somos Pymes · «Terminal Pyme» · 01 base
   Una sola familia: Archivo (Omnibus-Type, Buenos Aires · OFL), variable en
   ancho y peso. Tres registros: titular, rótulo de terminal y número.
   ════════════════════════════════════════════════════════════════════════════ */

@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-variable.woff2") format("woff2");
  font-weight: 100 900; font-stretch: 62% 125%; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-italica.woff2") format("woff2");
  font-weight: 400 800; font-stretch: 80% 100%; font-style: italic; font-display: swap;
}

/* ── colores ─────────────────────────────────────────────────────────────── */
:root {
  --noche: #09062A;          /* el azul noche de su cabecera */
  --abismo: #05031B;         /* un paso más oscuro: cinta de mercados, TV, pie */
  --celeste: #25A2C6;        /* SU celeste */
  --flecha: #00A2C6;         /* la flecha del logo */
  --sube: #27D796;
  --baja: #FF5F6D;
  --ambar: #FFB52E;          /* señal de terminal: riesgo, cuenta regresiva */

  --ancho: 1320px;
  --margen: 40px;
  --f: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --r: 3px;
  --mov: cubic-bezier(.2, .7, .2, 1);
}

/* Oscuro: el modo por defecto, y las superficies que son siempre oscuras */
:root,
.t-oscuro,
[data-tema="claro"] .t-inverso {
  --fondo: #09062A;
  --fondo-2: #0F0C3B;
  --fondo-3: #17134E;
  --fondo-4: #221E68;
  --texto: #FFFFFF;
  --texto-2: #CDCFEA;
  --texto-3: #979AC8;
  --linea: rgba(255, 255, 255, .11);
  --linea-2: rgba(255, 255, 255, .24);
  --acento: #3FB9DE;
  --sube-t: #27D796;
  --baja-t: #FF6F7B;
  --ambar-t: #FFB52E;
  --trama: rgba(255, 255, 255, .045);
  color-scheme: dark;
}

/* Claro */
[data-tema="claro"],
.t-inverso {
  --fondo: #F1F4F9;
  --fondo-2: #FFFFFF;
  --fondo-3: #E3E8F2;
  --fondo-4: #D3DAE8;
  --texto: #09062A;
  --texto-2: #36355A;
  --texto-3: #5A5A7E;
  --linea: rgba(9, 6, 42, .13);
  --linea-2: rgba(9, 6, 42, .3);
  --acento: #0A769A;
  --sube-t: #0A8556;
  --baja-t: #C4283A;
  --ambar-t: #9A5E00;
  --trama: rgba(9, 6, 42, .05);
  color-scheme: light;
}

/* Bloque celeste: el momento de revista */
.t-celeste {
  --fondo: #25A2C6;
  --fondo-2: #1E94B6;
  --fondo-3: #4DB6D5;
  --texto: #09062A;
  --texto-2: #0C0B3C;
  --texto-3: #14184F;
  --linea: rgba(9, 6, 42, .2);
  --linea-2: rgba(9, 6, 42, .42);
  --acento: #09062A;
  color-scheme: light;
}

.t-oscuro, .t-inverso, .t-celeste { background: var(--fondo); color: var(--texto); }

/* ── base ────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--fondo);
  color: var(--texto);
  font-family: var(--f);
  font-size: 1rem;
  font-weight: 420;
  font-stretch: 98%;
  line-height: 1.5;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
p, h1, h2, h3, h4, figure, dl, dd, ol, ul, blockquote { margin: 0; }
ol, ul { padding: 0; }
[role="list"], .carril { list-style: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--acento); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--celeste); color: var(--noche); }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.saltar {
  position: fixed; left: 12px; top: -80px; z-index: 200; padding: 12px 16px;
  background: var(--celeste); color: var(--noche); font-weight: 700; text-decoration: none; border-radius: var(--r);
}
.saltar:focus { top: 12px; }

.cont { width: min(var(--ancho), 100% - 2 * var(--margen)); margin-inline: auto; }

/* ── íconos ──────────────────────────────────────────────────────────────── */
.i { width: 1em; height: 1em; flex: none; fill: currentColor; }
.i-flecha { width: .82em; height: .82em; }
.logo { width: 100%; height: auto; color: #fff; }

/* ── los tres registros de Archivo ───────────────────────────────────────── */
/* 1 · titular: ancho apenas cerrado, peso alto, minúsculas */
.tit {
  font-weight: 740; font-stretch: 92%; line-height: 1.13; letter-spacing: -.012em;
  color: var(--texto); text-wrap: balance; overflow-wrap: break-word;
}
.tit a { color: inherit; text-decoration: none; }
.tit .vol, .vol { color: var(--acento); }
.tit--xxl { font-size: clamp(1.9rem, 4.1vw, 3.5rem); font-weight: 820; font-stretch: 86%; line-height: .98; letter-spacing: -.03em; }
.tit--xl { font-size: clamp(1.56rem, 2.72vw, 2.5rem); font-weight: 810; font-stretch: 88%; line-height: 1.03; letter-spacing: -.024em; }
.tit--l { font-size: clamp(1.38rem, 2.05vw, 1.86rem); font-weight: 790; font-stretch: 90%; line-height: 1.07; letter-spacing: -.02em; }
.tit--m { font-size: 1.25rem; line-height: 1.15; }
.tit--s { font-size: 1.04rem; font-weight: 690; font-stretch: 94%; line-height: 1.21; letter-spacing: -.006em; }
.tit--it { font-style: italic; font-weight: 650; font-stretch: 94%; letter-spacing: -.008em; }

/* 2 · rótulo de terminal: ancho abierto, mayúsculas chicas */
.rot {
  font-size: .6875rem; font-weight: 640; font-stretch: 114%; letter-spacing: .075em; line-height: 1.25;
  text-transform: uppercase;
}

/* 3 · número: tabular siempre */
.num, time, table { font-variant-numeric: tabular-nums lining-nums; }

.bajada { color: var(--texto-2); font-size: .97rem; line-height: 1.5; text-wrap: pretty; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 0; color: var(--texto-3); font-size: .8rem; line-height: 1.3; }
.meta > * + *::before { content: "·"; margin: 0 .5em; color: var(--texto-3); }
.meta b { color: var(--texto-2); font-weight: 640; }
.meta__a { display: inline-flex; align-items: center; gap: .5em; }
.avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; background: var(--fondo-3); flex: none; }

/* ── foto, marca de video ────────────────────────────────────────────────── */
.foto { position: relative; overflow: hidden; aspect-ratio: 16 / 9; background: var(--fondo-3); border-radius: var(--r); }
.foto img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--mov); }
.video {
  position: absolute; left: 10px; bottom: 10px; z-index: 1;
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 10px 6px 9px;
  background: rgba(9, 6, 42, .9); color: #fff; border-radius: 2px;
  font-size: .625rem; font-weight: 700; font-stretch: 116%; letter-spacing: .1em; text-transform: uppercase; line-height: 1;
}
.video .i { color: var(--flecha); width: .95em; height: .95em; }

/* ── nota: la pieza que se repite ────────────────────────────────────────── */
.nota { position: relative; display: flex; flex-direction: column; gap: 13px; min-width: 0; }
.nota__txt { display: flex; flex-direction: column; gap: 9px; min-width: 0; }
.nota .tit a::after { content: ""; position: absolute; inset: 0; z-index: 2; }
.nota .tit a:focus-visible { outline: none; }
.nota .tit a:focus-visible::after { outline: 2px solid var(--acento); outline-offset: 3px; border-radius: var(--r); }
.nota:hover .foto img { transform: scale(1.04); }
.nota:hover .tit a { text-decoration: underline; text-decoration-color: var(--acento); text-decoration-thickness: .07em; text-underline-offset: .16em; }

.nota--h { flex-direction: row; align-items: flex-start; gap: 18px; }
.nota--h > .foto { flex: 0 0 42%; }
.nota--mini { gap: 14px; }
.nota--mini > .foto { flex: 0 0 108px; aspect-ratio: 4 / 3; }
.nota--mini .nota__txt { gap: 6px; }

/* título sobre la foto */
.nota--s {
  --texto: #fff; --texto-2: #E1E3F6; --texto-3: #BEC1E4; --acento: #5FCDEF;
  display: grid; overflow: hidden; border-radius: var(--r); color: #fff; background: var(--noche);
}
.nota--s > .foto { grid-area: 1 / 1; aspect-ratio: auto; width: 100%; height: 100%; border-radius: 0; }
.nota--s > .nota__txt {
  grid-area: 1 / 1; align-self: end; z-index: 1; padding: 64px 22px 20px;
  background: linear-gradient(to top, rgba(9, 6, 42, .96) 0%, rgba(9, 6, 42, .82) 46%, rgba(9, 6, 42, 0) 100%);
}
.nota--s .video { top: 12px; bottom: auto; left: 12px; }

/* nota con el dato adelante (las que traen un gráfico en lugar de foto) */
.nota--dato { gap: 10px; padding: 16px 18px; background: var(--fondo-2); border: 1px solid var(--linea); border-radius: var(--r); }

/* ── botones, enlaces ────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  min-height: 42px; padding: .62em 1.15em; border: 1px solid transparent; border-radius: var(--r);
  font-size: .8rem; font-weight: 720; font-stretch: 108%; letter-spacing: .05em; text-transform: uppercase; text-decoration: none; line-height: 1.1;
  white-space: nowrap; transition: background-color .2s, color .2s, border-color .2s, transform .2s var(--mov);
}
.btn .i-flecha { transition: transform .25s var(--mov); }
.btn:hover .i-flecha { transform: translateX(4px); }
.btn--celeste { background: var(--celeste); color: var(--noche); }
.btn--celeste:hover { background: #4CC0E3; }
.btn--ambar { background: var(--ambar); color: var(--noche); }
.btn--ambar:hover { background: #FFC85C; }
.btn--noche { background: var(--noche); color: #fff; }
.btn--noche .i-flecha { color: var(--flecha); }
.btn--noche:hover { background: #1B1760; }
.btn--linea { border-color: var(--linea-2); color: var(--texto); }
.btn--linea:hover { border-color: var(--acento); color: var(--acento); }
.btn--xl { min-height: 54px; padding-inline: 1.5em; font-size: .9rem; }

.ibtn {
  display: inline-grid; place-items: center; width: 42px; height: 42px; flex: none;
  background: none; border: 1px solid transparent; border-radius: var(--r); color: var(--texto); font-size: 1rem;
  transition: background-color .2s, border-color .2s, color .2s;
}
.ibtn:hover { background: var(--fondo-3); color: var(--acento); }

.enl { display: inline-flex; align-items: center; gap: .55em; color: var(--texto); font-size: .86rem; font-weight: 680; text-decoration: none; }
.enl .i { color: var(--acento); font-size: .85em; transition: transform .25s var(--mov); }
.enl:hover { color: var(--acento); }
.enl:hover .i-flecha { transform: translateX(4px); }

kbd {
  display: inline-grid; place-items: center; min-width: 1.7em; height: 1.7em; padding: 0 .4em;
  border: 1px solid var(--linea-2); border-radius: 3px; background: var(--fondo-3); color: var(--texto-2);
  font: 640 .7rem/1 var(--f); font-stretch: 100%;
}

/* ── señales ─────────────────────────────────────────────────────────────── */
.vivo { position: relative; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--sube); flex: none; }
.vivo::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--sube); animation: pulso 2.4s ease-out infinite; }
.vivo--fijo::after { animation: none; opacity: 0; }
@keyframes pulso { 0% { transform: scale(1); opacity: .7; } 70%, 100% { transform: scale(3.4); opacity: 0; } }

/* suba y baja: la flecha del logo, girada */
.var { display: inline-flex; align-items: center; gap: .32em; font-weight: 640; font-variant-numeric: tabular-nums; white-space: nowrap; }
.var__f { width: .72em; height: .72em; }
.var--sube { color: var(--sube-t); }
.var--sube .var__f { transform: rotate(-90deg); }
.var--baja { color: var(--baja-t); }
.var--baja .var__f { transform: rotate(90deg); }
.var--igual { color: var(--texto-3); }

.pto { display: inline-block; width: 8px; height: 8px; margin-right: .55em; border-radius: 50%; vertical-align: .02em; }
.pto--blanco { background: var(--texto); }
.pto--celeste { background: var(--celeste); }
.pto--ambar { background: var(--ambar); }

/* ── carriles ────────────────────────────────────────────────────────────── */
.carril { scrollbar-width: none; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
.carril::-webkit-scrollbar { display: none; }
.carril-ctl { display: flex; gap: 6px; }
.carril-ctl .ibtn { width: 36px; height: 36px; border-color: var(--linea-2); font-size: .8rem; }
.carril-ctl .ibtn[disabled] { opacity: .32; cursor: default; }
.carril-ctl .ibtn[disabled]:hover { background: none; color: var(--texto); }

/* ── aparición al scrollear (solo si hay JS y no se pidió menos movimiento) ── */
.rv { opacity: 0; transform: translateY(16px); transition: opacity .7s var(--mov), transform .7s var(--mov); }
.rv.is-in { opacity: 1; transform: none; }

::view-transition-old(root), ::view-transition-new(root) { animation-duration: .42s; animation-timing-function: var(--mov); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .rv { opacity: 1; transform: none; }
}

/* ── márgenes por ancho ──────────────────────────────────────────────────── */
@media (min-width: 1800px) { :root { --ancho: 1480px; } }
@media (max-width: 1279px) { :root { --margen: 28px; } }
@media (max-width: 1099px) { :root { --margen: 24px; } }
@media (max-width: 699px) {
  :root { --margen: 16px; }
  html { scroll-padding-top: 60px; }
  .tit--m { font-size: 1.16rem; }
  .tit--s { font-size: 1rem; }
  .nota--mini > .foto { flex-basis: 96px; }
  .nota--mini { flex-direction: row-reverse; }
}
