/* base.css: el sistema visual común de URIUS v2 (investigacion/04-direccion.md §2, §4.7, §4.9).
   ARCHIVO COMÚN: los constructores lo usan y no lo editan. Cada página suma su hoja (src/css/<página>.css) con
   clases que llevan su prefijo (in-, no-, sv-, sr-, co-, er-). Contrato: investigacion/05-contrato-constructores.md.
   Celular: 809 px o menos. */

/* ---------- fuentes (autoalojadas en sitio/fuentes/) */
@font-face { font-family: "Poppins"; src: url("/fuentes/poppins-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("/fuentes/poppins-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("/fuentes/poppins-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
/* Geist Mono 500 (OFL), solo para datos (§2.2). Si Curu la rechaza: borrar esta regla y --f-dato pasa a Poppins */
@font-face { font-family: "Geist Mono"; src: url("/fuentes/geist-mono-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }

/* ---------- tokens (§2.1). Solo estos colores. */
:root {
  --negro: #0b0201; --azul: #0248ff; --azul-texto: #5c87ff; --blanco: #fff; --gris: #aab1ad; --panel: #373a43;
  --filete: rgba(255, 255, 255, .14); --filete-azul: rgba(255, 255, 255, .32);
  /* el mundo (R16): lo cambia base.js poniendo data-mundo en <html>. Todo lo que no es foto usa estas dos */
  --m-fondo: var(--negro); --m-filete: var(--filete);
  --f: "Poppins", system-ui, sans-serif;
  --f-dato: "Geist Mono", "Poppins", ui-monospace, monospace;
  --m: clamp(20px, 4vw, 64px);   /* margen lateral */
  --gap: 24px;                    /* medianil */
  --cab: 80px;                    /* alto de la cabecera */
  --curva: cubic-bezier(.7, 0, .2, 1);
  --sale: cubic-bezier(.22, 1, .36, 1);
}
@media (max-width: 809px) { :root { --gap: 16px; --cab: 64px; } }
html[data-mundo="azul"] { --m-fondo: var(--azul); --m-filete: var(--filete-azul); }

/* ---------- base */
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--m-fondo); color-scheme: dark; -webkit-text-size-adjust: 100%; transition: background-color .7s var(--curva); }
body { margin: 0; min-height: 100vh; background: var(--m-fondo); color: var(--blanco); font: 400 17px/1.6 var(--f); letter-spacing: 0; -webkit-font-smoothing: antialiased; overflow-x: clip; transition: background-color .7s var(--curva); }
img, picture, svg, video, canvas { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p, ul, ol, figure, dl, dd, blockquote, address { margin: 0; }
ul, ol { padding: 0; list-style: none; }
address { font-style: normal; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
::selection { background: var(--azul); color: var(--blanco); }
:focus-visible { outline: 2px solid var(--blanco); outline-offset: 3px; }
.solo-lectores { position: absolute !important; width: 1px !important; height: 1px !important; min-height: 0 !important; padding: 0 !important; border: 0 !important; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.saltar { position: fixed; left: var(--m); top: -80px; z-index: 120; display: inline-flex; align-items: center; min-height: 48px; padding: 0 20px; background: var(--azul); color: var(--blanco); font-weight: 500; transition: top .2s; }
.saltar:focus { top: 12px; }

/* ---------- escala tipográfica (§2.2). Las cifras en vw son las que importan; clamp protege los extremos */
.t-cartel { font-size: clamp(52px, 12.5vw, 216px); font-weight: 600; line-height: .86; letter-spacing: -.045em; }
.t-escena { font-size: clamp(44px, 7.6vw, 128px); font-weight: 600; line-height: .9; letter-spacing: -.04em; }
.t-lista { font-size: clamp(32px, 5vw, 84px); font-weight: 500; line-height: .95; letter-spacing: -.035em; }
.t-sub { font-size: clamp(22px, 2vw, 30px); font-weight: 500; line-height: 1.2; letter-spacing: -.01em; }
.t-dato { font-size: clamp(72px, 14vw, 240px); font-weight: 600; line-height: .85; letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
@media (max-width: 809px) { .t-cartel { font-size: 14.5vw; } }
.cuerpo, .cuerpo p, p.cuerpo { font-size: 17px; line-height: 1.6; max-width: 38em; }
.entradilla { font-size: clamp(18px, 1.5vw, 22px); line-height: 1.5; max-width: 38em; }
.interfaz { font-size: 16px; font-weight: 500; line-height: 1; }
/* dato: Geist Mono en minúsculas normales, nunca mayúsculas espaciadas (tic 15) */
.dato { font-family: var(--f-dato); font-weight: 500; font-size: 16px; line-height: 1.35; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.gris { color: var(--gris); }
.azul-texto { color: var(--azul-texto); }
/* líneas de un texto partido (comunes.textoEn): cada una en su renglón */
.linea { display: block; }

/* ---------- retícula (§2.3): 12 columnas a todo el ancho; 4 en celular.
   Cada hijo dice su lugar con --col (escritorio) y --col-m (celular), en notación de grid-column:
   "col 8 a 12" de la dirección = style="--col: 8 / 13". Sin --col ocupa todo el ancho. */
.reticula { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); padding-inline: var(--m); }
.reticula > * { grid-column: var(--col, 1 / -1); min-width: 0; }
@media (max-width: 809px) {
  .reticula { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .reticula > * { grid-column: var(--col-m, 1 / -1); }
}
/* columnas recurrentes de la dirección */
.col-titular { --col: 1 / 8; }
.col-apoyo { --col: 8 / 13; }
.a-la-derecha { justify-self: end; text-align: right; }
@media (max-width: 809px) { .a-la-derecha { justify-self: start; text-align: left; } }
.a-sangre { margin-inline: calc(var(--m) * -1); }   /* dentro de una .reticula: saca el elemento hasta el borde */

/* ---------- filetes (§2.4) */
.filete { border: 0; height: 1px; margin: 0; background: var(--m-filete); }
.filas > * { border-top: 1px solid var(--m-filete); }
.filas > *:last-child { border-bottom: 1px solid var(--m-filete); }
/* filete que se traza de izquierda a derecha al entrar (base.js anima --traza de 0 a 1) */
[data-traza] { position: relative; }
[data-traza]::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--m-filete); transform: scaleX(var(--traza, 1)); transform-origin: 0 50%; }

/* ---------- botones (§2.4): recto, 56 px, esquinas de 2 px; texto que rueda al pasar (R08) */
.boton { position: relative; display: inline-flex; align-items: center; justify-content: center; min-height: 56px; padding: 0 28px; border: 1px solid transparent; border-radius: 2px; background: var(--azul); color: var(--blanco); font: 500 16px/1 var(--f); white-space: nowrap; cursor: pointer; transition: background-color .3s, color .3s, border-color .3s; will-change: transform; }
.boton:active { transform: scale(.98); }
.rueda { display: block; overflow: hidden; height: 1.25em; }
.rueda > span { display: block; line-height: 1.25em; text-shadow: 0 1.25em 0 currentColor; transition: transform .55s var(--curva); }
.boton:hover .rueda > span, .boton:focus-visible .rueda > span { transform: translateY(-1.25em); }
.boton--invertido, html[data-mundo="azul"] .boton:not(.boton--borde) { background: var(--blanco); color: var(--negro); }
.boton--borde { background: transparent; border-color: var(--blanco); color: var(--blanco); }
.boton--borde:hover { background: var(--blanco); color: var(--negro); }
.boton--ancho { width: 100%; }
.boton--cabecera { min-height: 48px; padding: 0 22px; }
@media (max-width: 809px) { .boton--cabecera { min-height: 44px; padding: 0 16px; } }

/* ---------- enlace de texto (§2.4): subrayado de 1,5 px a 6 px de la base, se recorre al pasar, sin flecha */
.enlace { display: inline-flex; align-items: center; min-height: 44px; padding-bottom: 0; background: linear-gradient(currentColor, currentColor) 0 calc(50% + .5em + 6px) / 100% 1.5px no-repeat; font-weight: 500; }
.enlace:hover, .enlace:focus-visible { animation: enlace-recorre .7s var(--curva); }
@keyframes enlace-recorre { 0% { background-size: 100% 1.5px; background-position-x: 100%; } 45% { background-size: 0 1.5px; background-position-x: 100%; } 46% { background-position-x: 0; } 100% { background-size: 100% 1.5px; background-position-x: 0; } }

/* ---------- fotos: esquinas 0. .marco recorta; la imagen llena con object-fit */
.marco { position: relative; overflow: hidden; }
.marco > img, .marco > picture, .marco > picture > img { width: 100%; height: 100%; object-fit: cover; }
/* velo negro de abajo hacia arriba donde va texto sobre una foto en color de campo (§2.5) */
.velo::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(11, 2, 1, .15) 0%, rgba(11, 2, 1, .05) 40%, rgba(11, 2, 1, .85) 100%); }
/* rótulo de foto (dato) y el obligatorio de las imágenes generadas */
.rotulo { color: var(--gris); }
.rotulo--ia { position: absolute; z-index: 2; right: 12px; bottom: 12px; padding: 4px 8px; background: rgba(11, 2, 1, .72); color: var(--blanco); }

/* ---------- cabecera (§4.9 y R11): transparente arriba, toma fondo al bajar, se esconde bajando */
.cabecera { position: fixed; inset: 0 0 auto; z-index: 50; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: var(--cab); padding-inline: var(--m); border-bottom: 1px solid transparent; transition: transform .5s var(--curva), background-color .35s, border-color .35s; }
.cabecera.con-fondo { background: rgba(11, 2, 1, .92); border-bottom-color: var(--filete); }
html[data-mundo="azul"] .cabecera.con-fondo { background: rgba(2, 72, 255, .94); border-bottom-color: var(--filete-azul); }
.cabecera.oculta { transform: translateY(-101%); }
.cabecera__logo { justify-self: start; display: inline-flex; align-items: center; min-height: 48px; }
.cabecera__logo img { width: auto; height: 34px; }
.cabecera__nav { display: flex; gap: 8px; }
.cabecera__nav a { display: inline-flex; align-items: center; min-height: 48px; padding: 0 12px; font-weight: 500; font-size: 16px; background: linear-gradient(currentColor, currentColor) 12px calc(50% + .5em + 6px) / 0 1.5px no-repeat; transition: background-size .45s var(--curva); }
.cabecera__nav a:hover, .cabecera__nav a[aria-current] { background-size: calc(100% - 24px) 1.5px; }
.cabecera__der { justify-self: end; display: flex; align-items: center; gap: 24px; }
.cabecera__menu { display: none; position: relative; width: 48px; height: 48px; margin-right: -12px; padding: 0; border: 0; background: none; cursor: pointer; }
.cabecera__menu i { position: absolute; left: 12px; right: 12px; height: 1.5px; background: currentColor; transition: transform .45s var(--curva); }
.cabecera__menu i:nth-of-type(1) { top: 19px; }
.cabecera__menu i:nth-of-type(2) { top: 28px; }
.menu-abierto .cabecera__menu i:nth-of-type(1) { transform: translateY(4.5px) rotate(45deg); }
.menu-abierto .cabecera__menu i:nth-of-type(2) { transform: translateY(-4.5px) rotate(-45deg); }
.menu-abierto .cabecera { background: var(--negro); transform: none; }
@media (max-width: 809px) {
  .cabecera { grid-template-columns: 1fr auto; }
  .cabecera__logo img { height: 28px; }
  .cabecera__nav, .cabecera__tel { display: none; }
  .cabecera__der { gap: 12px; }
  .cabecera__menu { display: block; }
}

/* ---------- menú de celular a pantalla completa (§4.9) */
.menu-cel { position: fixed; inset: 0; z-index: 45; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; padding: calc(var(--cab) + 24px) var(--m) 24px; background: var(--negro); visibility: hidden; clip-path: inset(0 0 100% 0); transition: clip-path .55s var(--curva), visibility 0s .55s; overflow-y: auto; }
.menu-abierto .menu-cel { visibility: visible; clip-path: inset(0); transition: clip-path .55s var(--curva), visibility 0s; }
.menu-cel__lista li { border-top: 1px solid var(--filete); }
.menu-cel__lista li:last-child { border-bottom: 1px solid var(--filete); }
.menu-cel__lista a { display: flex; align-items: center; min-height: 72px; }
.menu-cel__botones { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (min-width: 810px) { .menu-cel { display: none; } }

/* ---------- llamada común (§4.7): banda azul a sangre */
.llamada { position: relative; background: var(--azul); padding-block: 160px; }
.llamada__fila { row-gap: 40px; align-items: end; }
.llamada__titular { --col: 1 / 10; max-width: 12ch; }
.llamada__linea { --col: 1 / 7; max-width: 38em; }
.llamada__accion { --col: 9 / 13; justify-self: end; display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
@media (max-width: 809px) {
  .llamada { padding-block: 96px; }
  .llamada__accion { justify-self: stretch; align-items: stretch; }
  .llamada__accion .enlace { align-self: flex-start; }
}

/* ---------- pie (§4.9) */
.pie { position: relative; padding-top: 112px; overflow: hidden; }
.pie__fila { row-gap: 48px; }
.pie__marca { --col: 1 / 5; display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.pie__logo { display: inline-flex; align-items: center; min-height: 48px; }
.pie__logo img { width: 160px; height: auto; }
.pie__lema { color: var(--gris); max-width: 22em; }
.pie__redes { display: flex; gap: 8px; margin-left: -12px; }
.pie__redes a { display: grid; place-items: center; width: 48px; height: 48px; }
.pie__col--menu { --col: 5 / 7; }
.pie__col--servicios { --col: 7 / 10; }
.pie__col--contacto { --col: 10 / 13; }
.pie__titulo { margin-bottom: 8px; color: var(--gris); font-size: 16px; }
.pie__col a { display: inline-flex; align-items: center; min-height: 44px; font-size: 16px; line-height: 1.35; transition: color .25s; }
.pie__col a:hover { color: var(--azul-texto); }
.pie__legal { color: var(--gris); font-size: 16px; padding-top: 24px; border-top: 1px solid var(--filete); }
.pie__agua { margin: 56px var(--m) -2.2vw; opacity: .06; pointer-events: none; }
.pie__agua img { width: 100%; }
.icono { display: block; width: 24px; height: 24px; background: currentColor; -webkit-mask: var(--icono) center / contain no-repeat; mask: var(--icono) center / contain no-repeat; }
@media (max-width: 809px) {
  .pie { padding-top: 72px; }
  .pie__col--menu { --col-m: 1 / 3; }
  .pie__col--servicios { --col-m: 3 / 5; }
}

/* ---------- WhatsApp fijo (§2.6): recto, 56 x 56, azul; con filete para verse sobre la banda azul */
.whatsapp { position: fixed; right: var(--m); bottom: 24px; z-index: 40; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 2px; background: var(--azul); color: var(--blanco); box-shadow: 0 0 0 1px var(--filete-azul); transition: background-color .3s, color .3s; }
.whatsapp__glifo { width: 26px; height: 26px; background: currentColor; -webkit-mask: var(--icono) center / contain no-repeat; mask: var(--icono) center / contain no-repeat; }
html[data-mundo="azul"] .whatsapp, .whatsapp:hover { background: var(--blanco); color: var(--negro); }
.menu-abierto .whatsapp { visibility: hidden; }
/* con JS aparece después de bajar un poco: en la primera pantalla no tapa el botón del hero */
.js .whatsapp { opacity: 0; visibility: hidden; transform: translateY(12px); transition: opacity .4s, transform .5s var(--curva), visibility 0s .5s, background-color .3s, color .3s; }
.js.wa-visible .whatsapp { opacity: 1; visibility: visible; transform: none; transition: opacity .4s, transform .5s var(--curva), visibility 0s, background-color .3s, color .3s; }
@media (max-width: 809px) { .whatsapp { bottom: 16px; } }

/* ---------- grano global (R10) al 5 % */
body::after { content: ""; position: fixed; inset: -50%; z-index: 90; pointer-events: none; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
@media (prefers-reduced-motion: no-preference) { body::after { animation: grano 1.2s steps(5) infinite; } }
@keyframes grano { 0% { transform: translate(0, 0); } 25% { transform: translate(-3%, 2%); } 50% { transform: translate(2%, -3%); } 75% { transform: translate(-2%, -1%); } 100% { transform: translate(0, 0); } }

/* ---------- cursor propio (R18, §2.7): solo con mouse fino y movimiento permitido. El del sistema no se esconde */
.cursor { display: none; }
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .js .cursor { display: flex; position: fixed; left: 0; top: 0; z-index: 95; width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%; border: 1.5px solid #fff; mix-blend-mode: difference; pointer-events: none; align-items: center; justify-content: center; opacity: 0; will-change: transform; }
  .cursor span { font: 500 16px/1 var(--f); color: var(--blanco); opacity: 0; white-space: nowrap; transform: scale(.4); }
  .cursor.con-texto { mix-blend-mode: normal; border-color: var(--azul); background: var(--azul); }
  .cursor.con-texto span { opacity: 1; }
}

/* ---------- texto por líneas (R01): escondido hasta que base.js lo parte. Sin JS o sin GSAP se ve (la clase js se quita) */
@media (prefers-reduced-motion: no-preference) { .js [data-lineas] { visibility: hidden; } }

/* ---------- transición entre páginas (§2.7): View Transitions entre documentos, sin librería */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  ::view-transition-old(root) { animation: vt-sale .18s linear both; }
  ::view-transition-new(root) { animation: vt-entra .42s cubic-bezier(.7, 0, .2, 1) both; }
}
@keyframes vt-sale { to { filter: brightness(.3); } }
@keyframes vt-entra { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0); } }

/* ---------- movimiento reducido: nada se mueve solo */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}

/* ---------- pedidos de los constructores subidos a lo común (25 nov 2026) */
/* enlace dentro de un párrafo o en dos renglones: subrayado de texto, no de fondo */
.enlace--texto { display: inline; min-height: 0; background: none; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 6px; }
.enlace--texto:hover, .enlace--texto:focus-visible { animation: none; text-decoration-color: var(--azul-texto, #5c87ff); }
/* campo trampa de los formularios: existe para los robots, no ocupa lugar ni desborda */
.trampa { position: absolute; left: 0; top: 0; width: 1px; height: 1px; padding: 0; border: 0; opacity: 0; overflow: hidden; clip-path: inset(50%); pointer-events: none; }
/* rótulo "Imagen ilustrativa" arriba a la derecha */
.rotulo--arriba { top: 12px; bottom: auto; }
/* texto por líneas (R01): la máscara de cada línea no corta la g, la y ni la p */
[data-lineas] div[style*="overflow: clip"], [data-lineas] div[style*="overflow:clip"] { padding-bottom: .14em; margin-bottom: -.14em; }
/* el teléfono de la cabecera nunca se parte en dos renglones */
.cabecera__tel { white-space: nowrap; }
/* el WhatsApp fijo se retira sobre la llamada, el pie y las zonas marcadas con data-sin-wa */
.js.wa-fuera .whatsapp, .js.wa-baja .whatsapp { opacity: 0; visibility: hidden; transform: translateY(12px); transition: opacity .3s, transform .4s var(--curva), visibility 0s .4s; }
