/* =============================================================
   LA57 · base.css
   Tokens · reset · tipografía · botones · cabecera · menú · cursor
   ============================================================= */

/* ---------- Tokens ---------- */
:root {
  --negro: #08090B;
  --carbon: #15171A;
  --grafito: #2B2F34;
  --naranja: #FF6A00;
  --naranja-claro: #FF8A2E;
  --plata: #B8C0C8;
  --blanco: #F5F5F2;
  --ambar: #FFC400;

  --texto: #F5F5F2;
  --texto-2: #C9CDD1;          /* párrafos sobre negro (contraste > 11:1) */
  --texto-3: #9AA2AA;          /* notas y etiquetas (contraste > 7:1) */
  --linea: rgba(184, 192, 200, .18);
  --linea-fuerte: rgba(184, 192, 200, .34);
  --error: #FF8B6B;

  --fuente-display: "Anton", "Bebas Neue", Impact, "Arial Narrow", sans-serif;
  --fuente: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Escala de espaciado */
  --e-1: .25rem; --e-2: .5rem; --e-3: .75rem; --e-4: 1rem; --e-5: 1.5rem;
  --e-6: 2rem;   --e-7: 3rem; --e-8: 4rem;    --e-9: 6rem;
  --seccion: clamp(4.5rem, 9vw, 8.5rem);

  --radio-s: 6px;
  --radio: 10px;
  --radio-l: 16px;

  --sombra: 0 24px 60px -30px rgba(0, 0, 0, .8);
  --brillo-naranja: 0 10px 34px -12px rgba(255, 106, 0, .65);

  --ancho: 1320px;
  --margen: clamp(1.25rem, 4vw, 3rem);
  --alto-cabecera: 84px;

  --ease: cubic-bezier(.2, .8, .2, 1);
  --ease-salida: cubic-bezier(.16, 1, .3, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: var(--alto-cabecera); overflow-x: clip; }
html:not(.lenis) { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--negro);
  color: var(--texto);
  font-family: var(--fuente);
  font-size: clamp(1rem, .95rem + .2vw, 1.125rem);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg, picture { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, p, ul, ol, figure, address { margin: 0; padding: 0; }
ul, ol { list-style: none; }
address { font-style: normal; }
::selection { background: var(--naranja); color: var(--negro); }

[hidden] { display: none !important; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.contenedor { width: 100%; max-width: var(--ancho); margin-inline: auto; padding-inline: var(--margen); }

:focus-visible { outline: 2px solid var(--ambar); outline-offset: 3px; border-radius: 4px; }

.saltar {
  position: fixed; left: 1rem; top: -4rem; z-index: 1000;
  background: var(--naranja); color: var(--negro); font-weight: 600;
  padding: .75rem 1rem; border-radius: var(--radio-s); transition: top .2s;
}
.saltar:focus { top: 1rem; }

/* ---------- Tipografía ---------- */
.titulo-mayor, .titulo-seccion {
  font-family: var(--fuente-display);
  font-weight: 400;
  text-transform: uppercase;
  line-height: .98;
  letter-spacing: .005em;
  color: var(--blanco);
}
.titulo-seccion { font-size: clamp(2.3rem, .9rem + 3.5vw, 4.9rem); }
.linea { display: block; overflow: hidden; padding-block: .16em .05em; margin-block: -.16em -.05em; } /* margen para acentos (É, Á, Ñ) */
.linea__in { display: block; will-change: transform; }
.naranja { color: var(--naranja); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 1rem;
  font-family: var(--fuente); font-weight: 600; font-size: clamp(.72rem, .68rem + .2vw, .86rem);
  letter-spacing: .34em; text-transform: uppercase; color: var(--naranja);
  margin-bottom: clamp(.9rem, 1.4vw, 1.3rem);
}
.eyebrow--plata { color: var(--plata); }
.eyebrow--linea::after, .eyebrow--plata.eyebrow--linea::after {
  content: ""; width: clamp(3rem, 8vw, 8rem); height: 1px; background: currentColor; opacity: .8;
}
.eyebrow--barra { color: var(--plata); }
.eyebrow--barra::before { content: ""; width: 3px; height: 1.3em; background: var(--naranja); margin-right: .6rem; }

.intro { color: var(--texto-2); font-size: clamp(1.02rem, .95rem + .35vw, 1.3rem); line-height: 1.5; max-width: 58ch; margin-top: clamp(1rem, 1.6vw, 1.5rem); }

/* ---------- Botones ---------- */
.boton {
  --bx: 0px; --by: 0px;
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: .85rem;
  min-height: 3.5rem; padding: .95rem 1.8rem;
  border-radius: var(--radio); border: 1.5px solid transparent;
  font-family: var(--fuente); font-weight: 600; font-size: clamp(1rem, .95rem + .25vw, 1.2rem); line-height: 1.1;
  white-space: nowrap;
  transition: background-color .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease), box-shadow .35s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.boton__flecha { width: 1.35em; height: 1.35em; flex: none; transition: transform .45s var(--ease-salida); }
.boton:hover .boton__flecha, .boton:focus-visible .boton__flecha { transform: translateX(.35em); }
.boton:active { transform: scale(.97); }

/* reflejo que recorre el botón */
.boton::after {
  content: ""; position: absolute; inset: -2px; z-index: -1; pointer-events: none;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .45) 48%, transparent 64%);
  transform: translateX(-120%); transition: transform .8s var(--ease-salida);
}
.boton:hover::after, .boton:focus-visible::after { transform: translateX(120%); }

.boton--primario { background: var(--naranja); color: var(--negro); box-shadow: 0 0 0 0 rgba(255, 106, 0, 0); }
.boton--primario:hover, .boton--primario:focus-visible { background: var(--naranja-claro); box-shadow: var(--brillo-naranja); }
.boton--contorno { background: rgba(8, 9, 11, .35); color: var(--blanco); border-color: rgba(245, 245, 242, .85); }
.boton--contorno::after { background: linear-gradient(110deg, transparent 30%, rgba(255, 106, 0, .35) 48%, transparent 64%); }
.boton--contorno:hover, .boton--contorno:focus-visible { border-color: var(--naranja); color: var(--blanco); }
.boton--chico { min-height: 2.9rem; padding: .7rem 1.35rem; font-size: 1rem; }
.boton--bloque { width: 100%; }

.enlace-cotizar {
  display: inline-flex; align-items: center; gap: .55rem; margin-top: .9rem;
  color: var(--naranja); font-weight: 500; font-size: clamp(1rem, .95rem + .2vw, 1.15rem);
  min-height: 44px;
}
.enlace-cotizar svg { width: 1.25em; height: 1.25em; transition: transform .4s var(--ease-salida); }
.enlace-cotizar:hover svg, .enlace-cotizar:focus-visible svg { transform: translateX(.35em); }
.enlace-cotizar:hover { color: var(--naranja-claro); }

.enlace-subrayado {
  display: inline-flex; align-items: center; gap: .6rem; position: relative;
  color: var(--naranja); font-weight: 600; padding-block: .5rem; min-height: 44px;
}
.enlace-subrayado::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: .15rem; height: 1.5px; background: currentColor;
  transform-origin: right; transition: transform .5s var(--ease-salida);
}
.enlace-subrayado:hover::after { transform: scaleX(.35); transform-origin: left; }
.enlace-subrayado svg { width: 1.2em; height: 1.2em; transition: transform .4s var(--ease-salida); }
.enlace-subrayado:hover svg { transform: translateX(.35em); }

/* ---------- Cabecera ---------- */
.cabecera {
  position: fixed; inset: 0 0 auto; z-index: 100; height: var(--alto-cabecera);
  transition: background-color .4s var(--ease), backdrop-filter .4s var(--ease), transform .5s var(--ease-salida);
}
.cabecera::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: linear-gradient(90deg, rgba(245, 245, 242, .28), rgba(245, 245, 242, .1) 70%, transparent);
}
.cabecera.es-solida { background: rgba(8, 9, 11, .82); -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%); }
.cabecera.es-oculta { transform: translateY(-100%); }
.cabecera__barra { height: 100%; display: flex; align-items: center; gap: clamp(1.5rem, 4vw, 4.5rem); max-width: 1480px; }
.cabecera__logo { flex: none; display: block; }
.cabecera__logo img { width: auto; height: 92px; margin-top: 46px; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .6)); transition: height .4s var(--ease), margin .4s var(--ease); }
.cabecera.es-solida .cabecera__logo img { height: 58px; margin-top: 0; }
.nav__lista { display: flex; gap: clamp(1.5rem, 3.5vw, 4rem); }
.nav__enlace {
  position: relative; display: inline-block; padding-block: .6rem; font-weight: 500; font-size: 1.06rem; color: var(--blanco);
  transition: color .3s var(--ease);
}
.nav__enlace::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: .05rem; height: 2.5px; border-radius: 2px; background: var(--naranja);
  transform: scaleX(0); transform-origin: left; transition: transform .5s var(--ease-salida);
}
.nav__enlace:hover { color: var(--naranja-claro); }
.nav__enlace.activo { color: var(--naranja); }
.nav__enlace.activo::after, .nav__enlace:hover::after { transform: scaleX(1); }
.cabecera__cta { margin-left: auto; }

.menu-boton {
  display: none; margin-left: auto; width: 48px; height: 48px; border-radius: var(--radio);
  background: rgba(21, 23, 26, .8); border: 1px solid var(--linea-fuerte); position: relative;
}
.menu-boton span { position: absolute; left: 13px; right: 13px; height: 2px; background: var(--blanco); transition: transform .4s var(--ease-salida), top .4s var(--ease-salida); }
.menu-boton span:first-child { top: 19px; }
.menu-boton span:last-child { top: 27px; }
.menu-boton[aria-expanded="true"] span:first-child { top: 23px; transform: rotate(45deg); }
.menu-boton[aria-expanded="true"] span:last-child { top: 23px; transform: rotate(-45deg); }

.menu-movil {
  position: fixed; inset: 0; z-index: 90; background: var(--negro);
  padding: calc(var(--alto-cabecera) + 2rem) var(--margen) 2rem;
  display: flex; flex-direction: column;
}
.menu-movil[hidden] { display: none; }
.menu-movil nav { display: flex; flex-direction: column; gap: 2rem; height: 100%; }
.menu-movil ul { display: grid; gap: .25rem; }
.menu-movil ul a {
  display: block; font-family: var(--fuente-display); text-transform: uppercase; font-size: clamp(2.6rem, 12vw, 4rem);
  line-height: 1.05; padding-block: .35rem; border-bottom: 1px solid var(--linea);
}
.menu-movil ul a:hover, .menu-movil ul a:focus-visible { color: var(--naranja); }
.menu-movil .boton { margin-top: auto; }

@media (max-width: 860px) {
  :root { --alto-cabecera: 72px; }
  .nav, .cabecera__cta { display: none; }
  .menu-boton { display: block; }
  .cabecera__logo img { height: 50px; margin-top: 12px; }
  .cabecera.es-solida .cabecera__logo img { height: 44px; }
}

/* ---------- Cursor animado ---------- */
.cursor { position: fixed; inset: 0; z-index: 2000; pointer-events: none; display: none; }
html.cursor-listo .cursor { display: block; }
.cursor > * { position: absolute; left: 0; top: 0; pointer-events: none; will-change: transform; }
.cursor__punto {
  width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%;
  background: var(--cursor-color, var(--naranja));
  box-shadow: 0 0 0 1.5px rgba(8, 9, 11, .55), 0 0 12px var(--cursor-color, var(--naranja));
  transition: background-color .3s var(--ease), opacity .2s, width .3s var(--ease), height .3s var(--ease), margin .3s var(--ease);
}
.cursor__halo {
  width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%;
  border: 1.5px solid var(--cursor-color, var(--naranja));
  box-shadow: 0 0 0 1px rgba(8, 9, 11, .35), inset 0 0 18px -6px var(--cursor-color, var(--naranja));
  transition: width .35s var(--ease-salida), height .35s var(--ease-salida), margin .35s var(--ease-salida),
              border-color .3s var(--ease), background-color .3s var(--ease), opacity .25s;
}
.cursor__estela { inset: 0; width: 0; height: 0; }
.cursor__estela i {
  position: absolute; left: 0; top: 0; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%;
  background: var(--cursor-color, var(--naranja)); will-change: transform; transition: background-color .3s var(--ease);
}
html.cursor-listo.cursor-oculto .cursor { opacity: 0; }
.cursor.es-interactivo .cursor__halo { width: 64px; height: 64px; margin: -32px 0 0 -32px; background: color-mix(in srgb, var(--cursor-color) 14%, transparent); }
.cursor.es-interactivo .cursor__punto { width: 5px; height: 5px; margin: -2.5px 0 0 -2.5px; }
.cursor.es-presion .cursor__halo { width: 30px; height: 30px; margin: -15px 0 0 -15px; }
.cursor.es-texto .cursor__halo, .cursor.es-texto .cursor__estela, .cursor.es-texto .cursor__punto { opacity: 0; }
html.cursor-listo body, html.cursor-listo a, html.cursor-listo button, html.cursor-listo label { cursor: none; }
html.cursor-listo input, html.cursor-listo textarea { cursor: text; }
html.cursor-listo select, html.cursor-listo .carga__zona { cursor: pointer; }

/* ---------- Estados iniciales de animación (solo con JS) ---------- */
html.js:not(.anim-liberada) [data-anim-cabecera],
html.js:not(.anim-liberada) [data-anim-hero] { opacity: 0; }
html.js:not(.anim-liberada) [data-anim-linea] { transform: translateY(110%); }
html.js:not(.anim-liberada) .hero__foto-marco { clip-path: inset(0 0 0 100%); }

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  html:not(.lenis) { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  html.js [data-anim-cabecera], html.js [data-anim-hero] { opacity: 1 !important; }
  html.js [data-anim-linea] { transform: none !important; }
  html.js .hero__foto-marco { clip-path: none !important; }
  .cursor { display: none !important; }
}
