/* CorpJH · Página principal. Negro puro, monocromo, movimiento contenido. */
:root {
  color-scheme: dark;
  --negro: #000; --texto: #f4f4f4; --texto-2: #a3a3a3; --tenue: #6b6b6b; --sutil: #3a3a3a; --linea: #1c1c1c;
  --sans: Inter, "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", "Cascadia Mono", Consolas, ui-monospace, monospace;
  --suave: cubic-bezier(.2, .7, .2, 1);
}
* { box-sizing: border-box; }
html { background: var(--negro); scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; overflow-x: hidden; background: var(--negro); color: var(--texto); font: 15px/1.6 var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
::selection { background: #f4f4f4; color: #000; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 1px solid #f4f4f4; outline-offset: 4px; border-radius: 4px; }

/* Fondo: haces de luz + rejilla + grano */
#fondo { position: fixed; inset: 0; z-index: 0; width: 100%; height: 100%; pointer-events: none; }
.grano {
  position: fixed; inset: -50%; z-index: 1; pointer-events: none; opacity: .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='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grano 1.2s steps(6) infinite;
}
@keyframes grano { 0% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); } 40% { transform: translate(2%, -3%); } 60% { transform: translate(-2%, -1%); } 80% { transform: translate(3%, 3%); } 100% { transform: translate(0, 0); } }
header, main, footer { position: relative; z-index: 2; }

/* Cabecera */
.cabecera { position: fixed; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; height: 72px; padding: 0 clamp(18px, 4vw, 48px); z-index: 10; background: linear-gradient(#000 45%, rgba(0,0,0,0)); }
.marca { display: inline-flex; align-items: center; gap: 11px; }
.marca svg { width: 20px; height: 20px; }
.marca svg path { fill: none; stroke: #f4f4f4; stroke-width: 6; stroke-linecap: square; }
.marca span { font-size: 17px; font-weight: 600; letter-spacing: -.06em; }
.estado { display: inline-flex; align-items: center; gap: 10px; font-size: 10.5px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: var(--tenue); }
.estado i { position: relative; width: 6px; height: 6px; border-radius: 50%; background: #f4f4f4; }
.estado i::after { content: ""; position: absolute; inset: -4px; border: 1px solid #f4f4f4; border-radius: 50%; animation: pulso 2.4s infinite; }
@keyframes pulso { from { transform: scale(.5); opacity: .9; } to { transform: scale(2); opacity: 0; } }

/* Héroe */
.heroe { min-height: 100svh; display: grid; place-content: center; justify-items: center; text-align: center; padding: 110px 20px 90px; }
.monograma { width: 58px; height: 58px; margin-bottom: 34px; }
.monograma path { fill: none; stroke: #f4f4f4; stroke-width: 6; stroke-linecap: square; stroke-dasharray: 400; stroke-dashoffset: 400; animation: trazo 1.7s .1s forwards cubic-bezier(.6, 0, .2, 1); }
.monograma .marco { stroke: #2a2a2a; stroke-width: 2; stroke-dasharray: none; stroke-dashoffset: 0; animation: none; }
@keyframes trazo { to { stroke-dashoffset: 0; } }
.sobre { margin: 0 0 18px; font-size: 11px; font-weight: 500; letter-spacing: .32em; text-transform: uppercase; color: var(--tenue); }
/* Brillo metálico: patrón que se repite sin costura (los extremos del mosaico son iguales). */
.brillo {
  background-image: linear-gradient(100deg, #5a5a5a 0%, #5a5a5a 38%, #9a9a9a 45%, #ffffff 50%, #9a9a9a 55%, #5a5a5a 62%, #5a5a5a 100%);
  background-size: 200% 100%; background-repeat: repeat-x; background-position: 0 0;
  -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
  animation: brillo 5s linear infinite;
}
/* Desplazar exactamente un mosaico (200% de ancho) hace que el último fotograma coincida con el primero. */
@keyframes brillo { from { background-position: 200% 0; } to { background-position: 0% 0; } }

.nombre { margin: 0; font-size: clamp(76px, 15vw, 210px); line-height: .86; font-weight: 500; letter-spacing: -.075em; user-select: none; white-space: nowrap; }
.nombre .l { display: inline-block; will-change: transform, filter, opacity; opacity: 0; filter: blur(18px); transform: translateY(.35em) scale(1.08); animation: letra 1.1s var(--suave) forwards; }
.nombre .l > span { display: inline-block; transition: transform .5s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes letra { to { opacity: 1; filter: blur(0); transform: none; } }

.lema { display: flex; align-items: baseline; justify-content: center; gap: 12px; margin: clamp(40px, 5vw, 64px) 0 0; font-size: clamp(18px, 2.2vw, 26px); letter-spacing: -.03em; }
.lema-fijo { color: var(--tenue); font-weight: 400; }
.palabra { display: inline-flex; min-width: 7.2em; font-weight: 500; perspective: 400px; }
.palabra .c { display: inline-block; transform-origin: 50% 50% -.4em; animation: giro .55s var(--suave) both; }
@keyframes giro { from { opacity: 0; transform: rotateX(-90deg); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
.intro { max-width: 520px; margin: 22px auto 0; color: var(--texto-2); font-size: 15px; }

.desliza { margin-top: 56px; width: 22px; height: 36px; border: 1px solid #3a3a3a; border-radius: 12px; display: grid; justify-items: center; padding-top: 7px; }
.desliza span { width: 2px; height: 7px; border-radius: 2px; background: #f4f4f4; animation: desliza 1.8s infinite var(--suave); }
@keyframes desliza { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(12px); opacity: 0; } 100% { opacity: 0; } }

/* Revelado al hacer scroll */
.revelar { opacity: 0; filter: blur(10px); transform: translateY(28px); transition: opacity 1s var(--suave), filter 1s var(--suave), transform 1s var(--suave); }
.revelar.visible { opacity: 1; filter: none; transform: none; }

/* Bloques */
.bloques { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 60px 0 40px; perspective: 1200px; }
.tarjeta {
  --x: 50%; --y: 50%; --rx: 0deg; --ry: 0deg;
  position: relative; min-height: 300px; display: flex; flex-direction: column; padding: 28px 28px 30px; border: 1px solid #1e1e1e; border-radius: 18px; overflow: hidden;
  background: radial-gradient(420px circle at var(--x) var(--y), rgba(255,255,255,.075), transparent 45%), linear-gradient(160deg, #0c0c0c, #040404);
  transform: rotateX(var(--rx)) rotateY(var(--ry)); transform-style: preserve-3d; transition: border-color .3s, transform .25s var(--suave), opacity 1s var(--suave), filter 1s var(--suave);
}
.tarjeta::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; background: radial-gradient(280px circle at var(--x) var(--y), rgba(255,255,255,.35), transparent 60%); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: 0; transition: opacity .3s; pointer-events: none; }
.tarjeta:hover::before { opacity: 1; }
.tarjeta.revelar.visible { transform: rotateX(var(--rx)) rotateY(var(--ry)); }
.tarjeta:nth-child(2) { transition-delay: .08s; } .tarjeta:nth-child(3) { transition-delay: .16s; }
.tarjeta-n { font: 11px var(--mono); color: #4a4a4a; letter-spacing: .1em; }
.tarjeta h2 { margin: auto 0 14px; padding-top: 60px; font-size: clamp(26px, 2.6vw, 34px); line-height: 1; font-weight: 450; letter-spacing: -.055em; transform: translateZ(30px); }
.tarjeta p { margin: 0; color: var(--texto-2); font-size: 14.5px; line-height: 1.65; transform: translateZ(20px); }
.cifras { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin: 0; transform: translateZ(20px); }
.cifras div { padding: 12px 0; border-top: 1px solid #1e1e1e; }
.cifras div:nth-child(odd) { padding-right: 14px; }
.cifras div:nth-child(even) { padding-left: 14px; border-left: 1px solid #1e1e1e; }
.cifras dt { font-size: 10px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--tenue); }
.cifras dd { margin: 4px 0 0; font-size: 22px; font-weight: 400; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }

/* Trayectoria */
.trayecto { position: relative; display: flex; justify-content: space-between; width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 60px 0 20px; }
.trayecto-linea { position: absolute; left: 6px; right: 6px; top: 66px; height: 1px; background: #232323; overflow: hidden; }
.haz { position: absolute; top: 0; left: -30%; width: 30%; height: 100%; background: linear-gradient(90deg, transparent, #f4f4f4, transparent); animation: haz 3.6s infinite var(--suave); }
@keyframes haz { to { left: 100%; } }
.hito { position: relative; display: grid; gap: 4px; padding-top: 26px; }
.hito::before { content: ""; position: absolute; top: 0; left: 0; width: 13px; height: 13px; border-radius: 50%; border: 1px solid #555; background: #000; }
.hito.actual { text-align: right; }
.hito.actual::before { left: auto; right: 0; background: #f4f4f4; border-color: #f4f4f4; box-shadow: 0 0 0 6px rgba(255,255,255,.08), 0 0 30px rgba(255,255,255,.35); }
.hito b { font-size: clamp(30px, 4vw, 48px); font-weight: 400; letter-spacing: -.06em; line-height: 1; }
.hito span { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--tenue); }

/* El porcentaje: el corazón de la página original */
.progreso { width: min(720px, calc(100% - 40px)); margin: 0 auto; padding: 110px 0 120px; text-align: center; }
.cifra { font-size: clamp(48px, 9vw, 112px); line-height: 1; font-weight: 300; letter-spacing: -.06em; font-variant-numeric: tabular-nums; }
.pista { position: relative; height: 2px; margin-top: 36px; background: rgba(255,255,255,.14); overflow: hidden; }
.pista i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: #fff; box-shadow: 0 0 18px rgba(255,255,255,.7); transition: width .25s linear; }

/* Pie */
.pie { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 22px clamp(18px, 4vw, 48px) calc(26px + env(safe-area-inset-bottom)); border-top: 1px solid var(--linea); font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: #5a5a5a; }

@media (max-width: 900px) {
  .bloques { grid-template-columns: 1fr; }
  .tarjeta { min-height: 0; }
  .tarjeta h2 { padding-top: 34px; }
}
@media (max-width: 560px) {
  .estado span { display: none; }
  .lema { flex-direction: column; align-items: center; gap: 2px; }
  .palabra { justify-content: center; }
  .pie { flex-direction: column; gap: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .monograma path { stroke-dashoffset: 0; }
  .nombre .l { opacity: 1; filter: none; transform: none; }
  .revelar { opacity: 1; filter: none; transform: none; }
}
