/* VANTA demo · telemetria tactica en oscuro · un solo acento rojo */

@font-face {
  font-family: "Archivo";
  src: url("../vendor/archivo-var.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../vendor/jetbrains-mono-var.woff2") format("woff2");
  font-weight: 100 800;
  font-display: swap;
}

:root {
  --bg: #0a0a0a;
  --bg-2: #111113;
  --ink: #eaeaea;
  --mute: #9a9a9a;
  --line: #2a2a2d;
  --red: #ff2a2a;
  --gut: clamp(1.25rem, 4vw, 3.5rem);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scrollbar-color: var(--red) var(--bg-2); scrollbar-width: thin; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--display);
  font-stretch: 100%;
  font-size: 1.0625rem;
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: var(--red); color: var(--bg); }
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p, dl, dd, ol { margin: 0; padding: 0; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.skip {
  position: fixed; top: 0.5rem; left: 0.5rem; z-index: 100;
  background: var(--red); color: var(--bg); padding: 0.6rem 1rem;
  font-family: var(--mono); font-size: 0.8rem; text-transform: uppercase;
  transform: translateY(-200%);
}
.skip:focus { transform: none; }

/* Grano mecanico global, fijo y sin eventos para no repintar el scroll */
body::after {
  content: "";
  position: fixed; inset: 0; z-index: 90; pointer-events: none; opacity: 0.07;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* ---------- Tipografia base ---------- */
.titulo {
  font-weight: 900;
  font-stretch: 112%;
  font-size: clamp(2.2rem, 6vw, 5rem);
  line-height: 0.95;
  letter-spacing: -0.035em;
  text-transform: uppercase;
  text-wrap: balance;
}
.subtitulo { max-width: 52ch; color: var(--mute); margin-top: 1.5rem; }
.mono, .hud, .btn, .nav__links a, .pie { font-family: var(--mono); }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
  padding: 0.95rem 1.4rem;
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  text-decoration: none; border: 1px solid var(--ink); color: var(--ink); background: transparent;
  border-radius: 0; cursor: pointer;
  transition: background 0.35s var(--ease), color 0.35s var(--ease), border-color 0.35s var(--ease), transform 0.35s var(--ease);
}
.btn:hover { background: var(--ink); color: var(--bg); }
.btn:active { transform: translateY(1px); }
.btn--sm { padding: 0.6rem 0.9rem; font-size: 0.72rem; }
.btn--rojo { background: var(--red); border-color: var(--red); color: var(--bg); }
.btn--rojo:hover { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn--linea { border-color: var(--line); }
.btn--linea:hover { border-color: var(--ink); }
.btn--xl { padding: 1.3rem 2rem; font-size: 0.95rem; background: var(--bg); border-color: var(--bg); color: var(--ink); }
.btn--xl:hover { background: var(--ink); border-color: var(--ink); color: var(--bg); }

/* ---------- Navegacion ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  padding: 0.85rem var(--gut);
  background: rgba(10, 10, 10, 0.88);
  border-bottom: 1px solid var(--line);
  transition: transform 0.5s var(--ease);
}
.nav.is-oculta { transform: translateY(-100%); }
.nav__marca {
  font-weight: 900; font-stretch: 125%; font-size: 1.25rem; letter-spacing: -0.02em;
  text-decoration: none; text-transform: uppercase;
}
.nav__marca sup { font-size: 0.5em; color: var(--red); vertical-align: super; }
.nav__links { display: flex; gap: 1.75rem; }
.nav__links a {
  font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none; color: var(--mute);
  transition: color 0.25s;
}
.nav__links a:hover { color: var(--ink); }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100svh; overflow: hidden;
  display: flex; align-items: flex-end;
  padding: 7rem var(--gut) clamp(2.5rem, 6vw, 4.5rem);
  border-bottom: 1px solid var(--line);
}
.hero__stage { position: absolute; inset: 0; }
.hero__poster {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 38% 46% at 70% 48%, rgba(255, 42, 42, 0.22), transparent 70%),
    radial-gradient(ellipse 60% 60% at 70% 50%, #17171a, transparent 75%);
}
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero::after {
  /* escaneo CRT muy sutil, solo sobre la portada */
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background: repeating-linear-gradient(0deg, transparent 0 3px, rgba(0, 0, 0, 0.16) 3px 4px);
}
.hero__contenido { position: relative; z-index: 2; width: 100%; max-width: 1200px; }
.hero__titulo {
  font-weight: 900; font-stretch: 118%;
  font-size: clamp(2.5rem, 8.2vw, 6rem);
  line-height: 0.9; letter-spacing: -0.04em; text-transform: uppercase;
}
.linea { display: block; overflow: hidden; padding-bottom: 0.06em; }
.linea__in { display: inline-block; }
.linea__in--rojo { color: var(--red); }
.hero__texto { max-width: 46ch; margin-top: 1.75rem; color: #c8c8c8; font-size: clamp(1rem, 1.5vw, 1.2rem); }
.hero__cta { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }

.hud {
  position: absolute; z-index: 2; font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--mute);
}
.hud--tl { top: 5.2rem; left: var(--gut); }
.hud--tr { top: 5.2rem; right: var(--gut); }
.hud--bl { bottom: 1.2rem; left: var(--gut); }
.hud--br { bottom: 1.2rem; right: var(--gut); }
.hud span:first-child { color: var(--red); }
.hud__flecha { display: inline-block; color: var(--red); animation: bajar 1.6s var(--ease) infinite; }
.hud output { color: var(--ink); font-variant-numeric: tabular-nums; }
@keyframes bajar { 0%, 100% { transform: translateY(-2px); } 50% { transform: translateY(3px); } }

/* ---------- Cinta ---------- */
.cinta { overflow: hidden; border-bottom: 1px solid var(--line); padding: 1.1rem 0; }
.cinta__pista {
  display: flex; align-items: center; gap: 2.5rem; width: max-content;
  animation: cinta 38s linear infinite;
}
.cinta span {
  font-weight: 900; font-stretch: 125%; font-size: clamp(2rem, 5vw, 4rem); letter-spacing: -0.03em; text-transform: uppercase;
  color: transparent; -webkit-text-stroke: 1px var(--ink); white-space: nowrap;
}
.cinta i { font-family: var(--mono); font-style: normal; color: var(--red); font-size: 1.2rem; }
@keyframes cinta { to { transform: translateX(-50%); } }

/* ---------- Manifiesto ---------- */
.manifiesto { padding: clamp(6rem, 14vw, 11rem) var(--gut); }
.manifiesto__texto {
  max-width: 1100px; font-weight: 700; font-stretch: 105%;
  font-size: clamp(1.7rem, 4.2vw, 3.6rem); line-height: 1.12; letter-spacing: -0.02em; text-wrap: balance;
}
.manifiesto__texto .w { opacity: 0.14; }

/* ---------- Secciones ---------- */
.seccion { padding: clamp(5rem, 12vw, 10rem) var(--gut); border-top: 1px solid var(--line); }
.seccion > .titulo { margin-bottom: clamp(2rem, 5vw, 4rem); }
.seccion > .subtitulo { margin-top: calc(-1 * clamp(1rem, 3vw, 2.5rem)); margin-bottom: clamp(2rem, 4vw, 3.5rem); }

/* ---------- Bento (sin huecos: 4x3 = 4+1+2+1+4) ---------- */
.bento {
  display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: minmax(250px, auto);
  grid-auto-flow: dense; gap: 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line);
}
.bento__c {
  position: relative; background: var(--bg); padding: clamp(1.2rem, 2vw, 1.8rem); overflow: hidden;
  box-shadow: inset -1px -1px 0 var(--line);
  display: flex; flex-direction: column; justify-content: flex-end; min-height: 250px;
  transition: background 0.5s var(--ease);
}
.bento__c--a { grid-column: 1 / 3; grid-row: 1 / 3; }
.bento__c--b { grid-column: 3; grid-row: 1; }
.bento__c--c { grid-column: 4; grid-row: 1 / 3; }
.bento__c--d { grid-column: 3; grid-row: 2; }
.bento__c--e { grid-column: 1 / -1; grid-row: 3; flex-direction: row; align-items: center; justify-content: space-between; gap: 2rem; }
.bento__arte {
  position: absolute; top: 0.9rem; right: 0.9rem; width: min(44%, 130px); aspect-ratio: 1;
  color: var(--ink); opacity: 0.85;
  transition: transform 0.9s var(--ease), color 0.5s, opacity 0.5s;
}
.bento__c--a .bento__arte { width: min(62%, 330px); top: 1.4rem; right: 1.4rem; }
.bento__c--c .bento__arte { width: min(70%, 220px); right: 50%; transform: translateX(50%); top: 1.2rem; }
.bento__c--c:hover .bento__arte { transform: translateX(50%) rotate(-4deg) scale(1.04); }
.bento__arte--ancha { position: static; flex: 0 0 auto; width: clamp(110px, 16vw, 200px); order: 2; }
.bento__pie { position: relative; z-index: 1; max-width: 34ch; }
.bento__pie--ancho { max-width: 60ch; }
.bento__pie h3 {
  font-weight: 800; font-stretch: 112%; font-size: clamp(1.2rem, 2vw, 1.7rem); letter-spacing: -0.02em; text-transform: uppercase; margin-bottom: 0.4rem;
}
.bento__pie p { color: var(--mute); font-size: 0.95rem; }
.bento__c:hover { background: var(--bg-2); }
.bento__c:hover .bento__arte { color: var(--red); transform: rotate(-6deg) scale(1.05); opacity: 1; }

/* ---------- Proceso (seccion fijada con GSAP) ---------- */
.proceso { border-top: 1px solid var(--line); }
.proceso__pin {
  min-height: 100svh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--gut);
  align-items: center; padding: 6rem var(--gut) 3rem;
}
.proceso__izq .titulo { margin-bottom: clamp(1.5rem, 4vw, 3rem); }
.pasos { list-style: none; display: grid; gap: 0; border-top: 1px solid var(--line); }
.paso {
  display: grid; grid-template-columns: 8.5rem 1fr; gap: 1rem; align-items: baseline;
  padding: 1rem 0; border-bottom: 1px solid var(--line); opacity: 0.32;
  transition: opacity 0.5s var(--ease);
}
.paso strong {
  font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 700;
}
.paso strong::before { content: "> "; color: transparent; }
.paso span { color: var(--mute); font-size: 0.98rem; }
.paso.is-on { opacity: 1; }
.paso.is-on strong { color: var(--red); }
.paso.is-on strong::before { color: var(--red); }
.proceso__der { position: relative; display: grid; place-items: center; }
.trazo { width: min(78vh, 100%); aspect-ratio: 1; color: var(--ink); overflow: visible; }
.trazo__guia { color: var(--mute); opacity: 0.55; }
.trazo__linea * { stroke-dasharray: 1; stroke-dashoffset: 0; }
.trazo__tinta { color: var(--red); opacity: 0; }
.trazo__leyenda { position: absolute; bottom: 0; right: 0; font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.1em; color: var(--mute); }
.trazo__leyenda output { color: var(--red); }

/* ---------- Flash 3D ---------- */
.flash { perspective: 1500px; perspective-origin: 50% 20%; }
.flash__rejilla {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(0.6rem, 1.6vw, 1.4rem);
  transform-style: preserve-3d;
  transform: rotateX(16deg) rotateY(calc(var(--ry, 0) * 1deg));
  transition: transform 0.9s var(--ease);
}
.hoja {
  position: relative; display: flex; flex-direction: column; justify-content: space-between;
  aspect-ratio: 3 / 4; padding: clamp(0.8rem, 1.4vw, 1.2rem); text-decoration: none;
  background: #0e0e10; border: 1px solid var(--line); color: var(--ink);
  transform: translateZ(0); transform-style: preserve-3d;
  transition: transform 0.7s var(--ease), border-color 0.4s, background 0.4s;
}
.hoja:nth-child(4n+2), .hoja:nth-child(4n+3) { transform: translateZ(26px); }
.hoja svg { width: 100%; height: auto; aspect-ratio: 1; margin: auto 0; transition: color 0.4s, transform 0.7s var(--ease); }
.hoja__n { font-weight: 800; font-stretch: 112%; text-transform: uppercase; letter-spacing: -0.01em; font-size: clamp(0.95rem, 1.5vw, 1.2rem); }
.hoja__m { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--mute); }
.hoja:hover, .hoja:focus-visible { transform: translateZ(90px) scale(1.04); border-color: var(--red); background: var(--bg-2); z-index: 2; }
.hoja:hover svg, .hoja:focus-visible svg { color: var(--red); transform: rotate(8deg); }

/* ---------- Artistas ---------- */
.acordeon { display: flex; gap: 1px; height: clamp(420px, 64vh, 580px); background: var(--line); border: 1px solid var(--line); }
.art {
  position: relative; flex: 1 1 0; min-width: 0; overflow: hidden; background: var(--bg); padding: 1.4rem;
  display: flex; flex-direction: column; justify-content: flex-end; cursor: pointer;
  transition: flex-grow 0.8s var(--ease), background 0.4s;
}
.art.is-on { flex-grow: 4.2; background: var(--bg-2); cursor: default; }
.art__arte {
  position: absolute; top: 1rem; right: 1rem; width: min(70%, 380px); aspect-ratio: 1; color: var(--ink); opacity: 0.18;
  transition: opacity 0.6s, color 0.6s, transform 0.9s var(--ease);
}
.art.is-on .art__arte { opacity: 0.9; color: var(--ink); }
.art:hover:not(.is-on) .art__arte { opacity: 0.4; }
.art__info { position: relative; z-index: 1; min-width: 14rem; }
.art h3 {
  font-weight: 900; font-stretch: 118%; font-size: clamp(1.4rem, 2.6vw, 2.2rem); text-transform: uppercase; letter-spacing: -0.03em; line-height: 1;
}
.art:not(.is-on) h3 { writing-mode: vertical-rl; transform: rotate(180deg); font-size: clamp(1.1rem, 1.8vw, 1.5rem); }
.art__estilo { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--red); margin: 0.6rem 0 0.8rem; }
.art__txt { color: var(--mute); max-width: 36ch; margin-bottom: 1.2rem; font-size: 0.97rem; }
.art__estilo, .art__txt, .art .btn { opacity: 0; visibility: hidden; transition: opacity 0.5s 0.15s, visibility 0s 0.5s; }
.art.is-on .art__estilo, .art.is-on .art__txt, .art.is-on .btn { opacity: 1; visibility: visible; transition: opacity 0.5s 0.25s, visibility 0s; }
.art:not(.is-on) .art__estilo, .art:not(.is-on) .art__txt { display: none; }

/* ---------- Confianza ---------- */
.datos { border-top: 1px solid var(--line); }
.datos__f {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 2rem; align-items: baseline;
  padding: clamp(1.1rem, 2.2vw, 1.8rem) 0; border-bottom: 1px solid var(--line);
  transition: background 0.4s;
}
.datos dt { font-weight: 800; font-stretch: 112%; font-size: clamp(1.15rem, 2.4vw, 1.9rem); text-transform: uppercase; letter-spacing: -0.02em; line-height: 1.05; }
.datos dd { color: var(--mute); max-width: 50ch; }
.datos__f:hover dt { color: var(--red); }

/* ---------- Cierre ---------- */
.cierre {
  display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: var(--gut); align-items: end;
  padding: clamp(5rem, 12vw, 10rem) var(--gut); background: var(--red); color: var(--bg);
}
.cierre__titulo {
  font-weight: 900; font-stretch: 118%; font-size: clamp(2.5rem, 6.4vw, 6.4rem);
  line-height: 0.88; letter-spacing: -0.045em; text-transform: uppercase;
}
.cierre__titulo em { font-style: normal; color: #fff; -webkit-text-stroke: 0; }
.cierre__lado { display: grid; gap: 1.5rem; justify-items: start; }
.cierre__lado p { font-weight: 500; max-width: 38ch; }
.cierre__datos { font-family: var(--mono); font-size: 0.78rem !important; letter-spacing: 0.08em; text-transform: uppercase; }
.cierre :focus-visible { outline-color: var(--bg); }

.pie {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.75rem 2rem;
  padding: 1.4rem var(--gut) 5rem; font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--mute);
  border-top: 1px solid var(--line);
}
.pie a { color: var(--ink); }

.wa-flotante {
  position: fixed; right: var(--gut); bottom: 1.1rem; z-index: 60;
  display: inline-flex; align-items: center; gap: 0.55rem; padding: 0.8rem 1.1rem;
  background: var(--ink); color: var(--bg); text-decoration: none; border: 1px solid var(--bg);
  font-family: var(--mono); font-size: 0.74rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  transition: background 0.3s, color 0.3s, opacity 0.4s var(--ease), transform 0.4s var(--ease);
}
.js .wa-flotante { opacity: 0; transform: translateY(12px); pointer-events: none; }
.js .wa-flotante.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.wa-flotante::before { content: ""; width: 0.55rem; height: 0.55rem; background: var(--red); }
.wa-flotante:hover { background: var(--red); }
.wa-flotante:hover::before { background: var(--bg); }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .nav__links { display: none; }
  .bento { grid-template-columns: 1fr 1fr; }
  .bento__c--a { grid-column: 1 / -1; grid-row: auto; min-height: 380px; }
  .bento__c--b, .bento__c--d { grid-column: auto; grid-row: auto; }
  .bento__c--c { grid-column: auto; grid-row: span 2; }
  .bento__c--e { grid-column: 1 / -1; grid-row: auto; }
  .flash__rejilla { grid-template-columns: repeat(2, 1fr); transform: rotateX(8deg) rotateY(calc(var(--ry, 0) * 1deg)); }
  .hoja:nth-child(4n+2), .hoja:nth-child(4n+3) { transform: none; }
  .cierre { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .hero { padding-top: 6rem; }
  .hero__poster { background:
    radial-gradient(ellipse 70% 40% at 50% 36%, rgba(255, 42, 42, 0.24), transparent 70%),
    radial-gradient(ellipse 90% 50% at 50% 38%, #17171a, transparent 75%); }
  .hud--tl, .hud--tr { top: 4.6rem; font-size: 0.6rem; }
  .hud--tr { display: none; }
  .hud--bl, .hud--br { display: none; }
  .hero__cta .btn { flex: 1 1 100%; }
  .proceso__pin { grid-template-columns: 1fr; align-content: center; padding-top: 5.5rem; gap: 1.2rem; }
  .paso { grid-template-columns: 1fr; gap: 0.2rem; padding: 0.7rem 0; }
  .paso:not(.is-on) span { display: none; }
  .trazo { width: min(38svh, 90vw); }
  .trazo__leyenda { position: static; margin-top: 0.4rem; }
  .acordeon { flex-direction: column; height: auto; }
  .art { flex: 0 0 auto; min-height: 84px; transition: min-height 0.7s var(--ease), background 0.4s; }
  .art.is-on { min-height: 360px; }
  .art.is-on .art__arte { opacity: 0.4; width: 50%; }
  .art:not(.is-on) h3 { writing-mode: horizontal-tb; transform: none; }
  .datos__f { grid-template-columns: 1fr; gap: 0.4rem; }
  .bento { grid-template-columns: 1fr; }
  .bento__c--c, .bento__c--b, .bento__c--d { grid-row: auto; }
  .bento__c--e { flex-direction: column; align-items: flex-start; }
  .bento__arte--ancha { order: 0; }
  .pie { padding-bottom: 6rem; }
  .wa-flotante { left: var(--gut); right: var(--gut); justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .flash__rejilla { transform: rotateX(8deg); }
  .manifiesto__texto .w { opacity: 1; }
}
