/* ==========================================================================
   Somos Pymes · portada «Producto digital»
   base.css — tipografía, colores, zonas y piezas que se repiten
   ========================================================================== */

@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;
}

/* ---------- colores ---------- */
:root {
  /* la marca */
  --noche: #09062a;          /* su cabecera */
  --noche-2: #110d3c;
  --noche-3: #1c1658;
  --abismo: #05031b;
  --celeste: #25a2c6;        /* su color */
  --celeste-luz: #6dd0ec;
  --celeste-tinta: #0a6f8f;  /* el celeste para texto sobre claro (AA) */
  --real: #1531cc;           /* el azul de la Comunidad */
  --real-2: #0e239c;
  --senal: #ffb627;          /* el ámbar de la Comunidad: lo que está por pasar */

  /* tema claro */
  --fondo: #ffffff;
  --fondo-2: #f1f4f9;
  --fondo-3: #e4e9f2;
  --tinte: #e6f4f9;
  --tinta: #0b0930;
  --tinta-2: #40445e;
  --tinta-3: #626783;
  --linea: #d8dde8;
  --linea-2: #b4bccf;
  --acento: var(--celeste-tinta);
  --foco: #0a6f8f;
  --sube: #0b8a57;
  --baja: #cb2c43;
  --cifra-fondo: var(--noche);
  --sombra: 0 18px 44px rgba(9, 6, 42, .18);

  --tipo: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --margen: 16px;
  --aire: 36px;
  --radio: 3px;
  --suave: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}

/* el tema oscuro y las zonas de noche comparten los mismos valores */
html[data-tema="oscuro"],
.zn {
  --fondo: #09062a;
  --fondo-2: #110d3c;
  --fondo-3: #1c1658;
  --tinte: #0c0932;
  --tinta: #f4f6fc;
  --tinta-2: #c3c7e0;
  --tinta-3: #979cbd;
  --linea: #272163;
  --linea-2: #3d3785;
  --acento: #3fb5d8;
  --foco: #6dd0ec;
  --sube: #37d391;
  --baja: #ff6f7d;
  --cifra-fondo: #1a1556;
  --sombra: 0 18px 44px rgba(0, 0, 0, .5);
}
html[data-tema="oscuro"] {
  --fondo: #0e0b37;          /* la página, un punto más clara que las zonas de noche */
  --fondo-2: #15114a;
  --fondo-3: #1e195c;
  --tinte: #120e41;
  color-scheme: dark;
}
html[data-tema="oscuro"] .zn { --fondo: #09062a; --fondo-2: #110d3c; --fondo-3: #1c1658; }
.zn-abismo, html[data-tema="oscuro"] .zn-abismo { --fondo: #05031b; --fondo-2: #0d0a33; --fondo-3: #17124b; }

.zn { background: var(--fondo); color: var(--tinta); }

/* zona celeste: su color a todo ancho */
.zc {
  --fondo: var(--celeste);
  --tinta: #09062a;
  --tinta-2: #0c1244;
  --tinta-3: #10194f;
  --linea: rgba(9, 6, 42, .3);
  --acento: #09062a;
  --foco: #09062a;
  background: var(--celeste);
  color: var(--tinta);
}
/* zona de la Comunidad */
.zr {
  --fondo: var(--real);
  --fondo-2: var(--real-2);
  --tinta: #ffffff;
  --tinta-2: #dfe4ff;
  --tinta-3: #c2caff;
  --linea: rgba(255, 255, 255, .26);
  --acento: var(--senal);
  --foco: var(--senal);
  background: var(--real);
  color: var(--tinta);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 84px; }
body {
  margin: 0;
  font-family: var(--tipo);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--tinta);
  background: var(--fondo);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4, p, ul, ol, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
kbd {
  font: inherit; font-size: .6875rem; font-weight: 700; line-height: 1;
  padding: 4px 6px; border: 1px solid var(--linea-2); border-radius: 3px; color: var(--tinta-2);
}
mark { background: color-mix(in srgb, var(--celeste) 32%, transparent); color: inherit; border-radius: 2px; padding: 0 1px; }
:focus { outline: none; }
:focus-visible { outline: 3px solid var(--foco); outline-offset: 2px; border-radius: 2px; }
::selection { background: var(--celeste); color: var(--noche); }

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

.cont { width: min(100% - var(--margen) * 2, 1360px); margin-inline: auto; }
main:focus { outline: none; }
[id] { scroll-margin-top: 84px; }

/* ---------- tipografía ---------- */
.rot {                         /* rótulo: mayúsculas anchas y chicas */
  font-size: .6875rem;
  font-weight: 700;
  font-stretch: 112%;
  letter-spacing: .09em;
  text-transform: uppercase;
  line-height: 1.25;
}
.num { font-variant-numeric: tabular-nums lining-nums; }
.vol { color: var(--acento); }             /* la volanta en celeste, pegada al título */
.tit {
  font-size: var(--tt, 1.0625rem);
  font-weight: 720;
  line-height: 1.17;
  letter-spacing: -.013em;
  text-wrap: balance;
}
.enl { text-decoration: underline; text-decoration-color: transparent; text-decoration-thickness: .07em; text-underline-offset: .16em; transition: text-decoration-color .18s; }
.enl:hover { text-decoration-color: currentColor; }
.baj { color: var(--tinta-2); font-size: .9375rem; line-height: 1.46; text-wrap: pretty; }
.pt { color: var(--tinta-3); }

.meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 2px .5em;
  font-size: .8125rem; line-height: 1.3; color: var(--tinta-3);
}
.meta b { font-weight: 650; color: var(--tinta-2); }
.por { display: inline-flex; align-items: center; gap: .5em; }
.cara { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; flex: none; background: var(--fondo-3); }

/* ---------- íconos ---------- */
.i { width: 1em; height: 1em; fill: currentColor; flex: none; }
.dardo { color: var(--celeste); }

/* ---------- botones ---------- */
.bt {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  min-height: 44px; padding: 0 16px;
  border: 1px solid transparent; border-radius: var(--radio); background: none;
  font-size: .875rem; font-weight: 700; letter-spacing: .005em; line-height: 1; white-space: nowrap;
  transition: background-color .18s, color .18s, border-color .18s, transform .18s var(--suave);
}
.bt:active { transform: scale(.97); }
.bt .dardo { color: currentColor; width: .8em; height: .8em; transition: transform .22s var(--suave); }
.bt:hover .dardo { transform: translateX(3px); }
.bt-celeste { background: var(--celeste); color: var(--noche); }
.bt-celeste:hover { background: var(--celeste-luz); }
.bt-senal { background: var(--senal); color: var(--noche); }
.bt-senal:hover { background: #ffc955; }
.bt-noche { background: var(--noche); color: #fff; }
.bt-noche:hover { background: var(--noche-3); }
.bt-linea { border-color: color-mix(in srgb, currentColor 38%, transparent); }
.bt-linea:hover { border-color: currentColor; }
.bt-plano:hover { background: color-mix(in srgb, currentColor 12%, transparent); }
.bt-ico { width: 44px; padding: 0; position: relative; }
.bt-ico .i { width: 1.125rem; height: 1.125rem; }

.cuenta {
  position: absolute; top: 4px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px;
  display: grid; place-items: center; border-radius: 9px;
  background: var(--senal); color: var(--noche); font-size: .6875rem; font-weight: 800; line-height: 1;
  font-variant-numeric: tabular-nums;
}
.cuenta[hidden] { display: none; }

/* guardar para después */
.gd {
  position: relative; flex: none; display: grid; place-items: center; width: 34px; height: 34px; margin: -6px -8px -6px 0;
  border: 0; border-radius: 50%; background: none; color: var(--tinta-3);
  transition: color .18s, background-color .18s;
}
.gd::after { content: ""; position: absolute; inset: -6px; }      /* zona de toque de 46 px */
.gd .i { width: 15px; height: 15px; }
.gd-1 { display: none; }
.gd:hover { color: var(--tinta); background: color-mix(in srgb, currentColor 10%, transparent); }
.gd[aria-pressed="true"] { color: var(--acento); }
.gd[aria-pressed="true"] .gd-0 { display: none; }
.gd[aria-pressed="true"] .gd-1 { display: block; animation: salto .38s var(--suave); }
@keyframes salto { 0% { transform: scale(.4); } 60% { transform: scale(1.25); } 100% { transform: scale(1); } }

/* ---------- la imagen de una nota ---------- */
.cuadro {
  position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden;
  border-radius: var(--radio); background: var(--fondo-3);
}
.cuadro img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--suave); }
.mv {                                   /* la marca de VIDEO */
  position: absolute; left: 8px; bottom: 8px; z-index: 2;
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px 5px 7px;
  background: rgba(9, 6, 42, .88); color: #fff; border-radius: 2px;
  font-size: .625rem; font-weight: 750; font-stretch: 112%; letter-spacing: .1em; text-transform: uppercase; line-height: 1;
}
.mv .dardo { width: 10px; height: 10px; }

/* cuando la «foto» de la nota es un gráfico: la cifra de su título, a lo grande */
.cuadro-cifra {
  container-type: inline-size;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 7% 8% 6%;
  background-color: var(--cifra-fondo); color: #fff;
  background-image:
    linear-gradient(var(--celeste), var(--celeste)), linear-gradient(#3b3493, #3b3493), linear-gradient(#3b3493, #3b3493),
    linear-gradient(#3b3493, #3b3493), linear-gradient(#3b3493, #3b3493);
  background-repeat: no-repeat;
  background-size: 5% 62%, 5% 44%, 5% 30%, 5% 36%, 5% 20%;
  background-position: 94% 100%, 86% 100%, 78% 100%, 70% 100%, 62% 100%;
}
.cf-n { font-size: clamp(1.25rem, 23cqw, 5.5rem); font-weight: 850; font-stretch: 116%; line-height: .92; letter-spacing: -.035em; color: #fff; font-variant-numeric: tabular-nums; }
.cf-larga { font-size: clamp(1.1rem, 13.5cqw, 3.4rem); }
.cf-r { display: flex; align-items: center; gap: .6em; font-size: clamp(.5625rem, 4.4cqw, .75rem); font-weight: 700; font-stretch: 112%; letter-spacing: .09em; text-transform: uppercase; color: var(--celeste-luz); max-width: 56%; line-height: 1.2; }
.cf-ico { font-size: clamp(1.5rem, 20cqw, 4rem); color: var(--celeste); }

/* ---------- tarjeta vertical ---------- */
.tj { position: relative; display: flex; flex-direction: column; min-width: 0; }
.tj-c { display: flex; flex-direction: column; gap: 8px; flex: 1; padding-top: 12px; }
.tj-pie { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; min-height: 24px; }
.tj:hover .cuadro img, .fl:hover .cuadro img, .sb:hover .sb-foto img { transform: scale(1.04); }
.tj-xl { --tt: clamp(1.375rem, 1.1rem + 1vw, 1.875rem); }
.tj-xl .tit { font-weight: 800; letter-spacing: -.022em; line-height: 1.08; }
.tj-xl .tj-c { gap: 10px; padding-top: 14px; }

/* ---------- tarjeta horizontal ---------- */
.fl { display: grid; grid-template-columns: var(--fw, 112px) minmax(0, 1fr); gap: 14px; align-items: start; min-width: 0; }
.fl .cuadro { aspect-ratio: 4 / 3; }
.fl-c { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.fl .tit { font-size: var(--tt, 1rem); }
.lista-fl > .fl + .fl { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--linea); }

/* ---------- tarjeta con el título sobre la foto ---------- */
.sb {
  --tinta: #fff; --tinta-2: #e0e3f3; --tinta-3: #bfc3de; --acento: #49bcdf; --foco: #6dd0ec;
  position: relative; isolation: isolate; display: flex; align-items: flex-end; min-width: 0; overflow: hidden;
  border-radius: var(--radio); background: var(--noche); color: #fff;
}
.sb-foto { position: absolute; inset: 0; z-index: -1; }
.sb-foto img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--suave); }
.sb-foto::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(9, 6, 42, 0) 24%, rgba(9, 6, 42, .62) 56%, rgba(9, 6, 42, .95) 100%);
}
.sb-c { display: flex; flex-direction: column; gap: 10px; width: 100%; padding: 18px; }
.sb .mv { left: 12px; top: 12px; bottom: auto; }
.sb .gd:hover { background: rgba(255, 255, 255, .16); }

/* ---------- módulo ---------- */
.mod { padding-block: var(--aire); }
.mh {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 20px;
  padding-top: 12px; margin-bottom: 20px; border-top: 2px solid var(--tinta);
}
.mh-t {
  display: flex; align-items: center; gap: .42em;
  font-size: clamp(1.5rem, 1.25rem + 1.1vw, 2.125rem); font-weight: 820; font-stretch: 104%;
  letter-spacing: -.026em; line-height: 1.04;
}
.mh-t .dardo { width: .62em; height: .62em; }
.mh-s { margin-top: 6px; color: var(--tinta-2); font-size: .9375rem; max-width: 64ch; }
.mh-s b { font-weight: 650; color: var(--tinta); }
.mh-acc { display: flex; align-items: center; justify-content: flex-end; gap: 8px 18px; flex: none; }
.mh-mas { display: inline-flex; align-items: center; gap: .5em; min-height: 32px; font-size: .8125rem; font-weight: 700; white-space: nowrap; }
.mh-mas .dardo { width: .75em; height: .75em; transition: transform .22s var(--suave); }
.mh-mas:hover .dardo { transform: translateX(3px); }
.mh-mas:hover { color: var(--acento); }

.seguir {
  display: inline-flex; align-items: center; gap: .5em; height: 32px; padding: 0 10px;
  border: 1px solid var(--linea-2); border-radius: var(--radio); background: none;
  font-size: .75rem; font-weight: 700; color: var(--tinta-2); white-space: nowrap;
  transition: background-color .18s, color .18s, border-color .18s;
}
.seguir .i { width: 11px; height: 11px; }
.seguir .sg-1, .seguir .sg-t1 { display: none; }
.seguir .sg-t0 { display: none; }
.seguir:hover { border-color: var(--tinta); color: var(--tinta); }
.seguir[aria-pressed="true"] { background: var(--tinta); border-color: var(--tinta); color: var(--fondo); }
.seguir[aria-pressed="true"] .sg-0 { display: none; }
.seguir[aria-pressed="true"] .sg-1 { display: block; color: var(--celeste); }

/* ---------- carriles: se deslizan con el dedo en el celu, son grilla en compu ---------- */
.carril, .carril-x {
  display: flex; gap: 14px; overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scroll-padding-inline: var(--margen);
  margin-inline: calc(var(--margen) * -1); padding-inline: var(--margen);
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.carril::-webkit-scrollbar, .carril-x::-webkit-scrollbar { display: none; }
.carril > *, .carril-x > * { flex: 0 0 var(--cw, 72%); scroll-snap-align: start; }
.flechas { display: none; gap: 6px; }
.flechas button {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--linea); background: none; color: var(--tinta);
  transition: background-color .18s, border-color .18s, opacity .18s;
}
.flechas button:hover { background: color-mix(in srgb, currentColor 12%, transparent); border-color: currentColor; }
.flechas button:disabled { opacity: .35; cursor: default; }
.flechas .i { width: 12px; height: 12px; }

/* ---------- publicidad ---------- */
.pub-rot {
  display: block; margin-bottom: 6px;
  font-size: .5625rem; font-weight: 650; letter-spacing: .16em; text-transform: uppercase; color: var(--tinta-3); line-height: 1;
}
.pub img { width: 100%; height: auto; }
.pub a { display: block; }
.pub-tira { background: var(--fondo-2); padding-block: 16px 20px; }
.pub-caja { width: min(100%, calc(var(--pw) * 1px)); margin-inline: auto; }
.pub-tira--cuad .pub-caja { width: 300px; max-width: 100%; }
.pub-riel { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; margin-top: 28px; }
.pub-cu { width: 300px; max-width: 100%; }
.pub-cu--dup, .pub-riel--dup { display: none; }

/* ---------- apariciones ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js [data-ap] {
    opacity: 0; transform: translateY(18px);
    transition: opacity .55s ease, transform .7s var(--suave);
    transition-delay: calc(var(--i, 0) * 55ms);
  }
  .js [data-ap].visto { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ==========================================================================
   desde 700 px
   ========================================================================== */
@media (min-width: 700px) {
  :root { --margen: 24px; --aire: 44px; }
  .carril, .carril-x { gap: 20px; }
  .carril > *, .carril-x > * { --cw: 42%; }
  .seguir .sg-t0 { display: inline; }
  .seguir[aria-pressed="true"] .sg-t0 { display: none; }
  .seguir[aria-pressed="true"] .sg-t1 { display: inline; }
  .pub-tira--cuad .pub-caja { width: min(100%, calc(var(--pw) * 1px)); }
  .pub-cu--dup { display: block; }
  .pub-riel--dup { display: flex; }
  .fl { --fw: 132px; gap: 16px; }
  .sb-c { padding: 22px; }
}

/* ==========================================================================
   desde 1024 px: compu
   ========================================================================== */
@media (min-width: 1024px) {
  :root { --margen: 40px; --aire: 56px; }
  .bt { min-height: 40px; }
  .bt-ico { width: 40px; }
  .mh { margin-bottom: 24px; padding-top: 14px; }
  .carril { display: grid; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); gap: 28px; overflow: visible; margin-inline: 0; padding-inline: 0; scroll-snap-type: none; }
  .carril > * { flex: none; }
  .flechas { display: flex; }
  .gd { width: 32px; height: 32px; }
}

/* el riel de publicidad al costado */
@media (min-width: 1180px) {
  .con-riel { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; align-items: start; }
  .pub-riel { flex-direction: column; flex-wrap: nowrap; justify-content: flex-start; margin-top: 0; position: sticky; top: 84px; }
}
