/* t420.dev — 90s IBM "night": base oscura cálida, paneles negros biselados, rojo IBM como único acento */
:root {
  --tp-black: #0d0d0d;
  --tp-black-2: #161616;
  --tp-black-3: #1e1e1e;
  --tp-border: #2a2a2a;
  --tp-red: #e2231a;
  --tp-red-dim: #b01d15;
  --tp-text: #e6e2da;
  --tp-text-dim: #8f8a80;
  --beige: #121110;
  --beige-dark: #1c1a18;
  --beige-panel: #1a1816;
  --panel-dim: #7d786f;
  --border-light: #38352f;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --mono: "SFMono-Regular", "JetBrains Mono", Consolas, "Courier New", monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { color-scheme: dark; scroll-behavior: smooth; scroll-padding-top: 72px; background: #121110; }

body {
  background: var(--beige);
  color: var(--tp-text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
}

/* ── fondo vivo: dot-grid a la deriva (transform-only, GPU, seamless 28px) ── */
body::before {
  content: "";
  position: fixed;
  inset: -56px;
  background-image:
    radial-gradient(rgba(230, 226, 218, 0.13) 1px, transparent 1.4px),
    radial-gradient(rgba(226, 35, 26, 0.14) 1.2px, transparent 1.7px);
  background-size: 28px 28px, 112px 112px;
  background-position: 0 0, 14px 14px;
  z-index: -1;
  pointer-events: none;
  will-change: transform;
  animation: griddrift 24s linear infinite;
}
@keyframes griddrift {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-28px, -28px, 0); }
}

::selection { background: var(--tp-red); color: #ffffff; }

.wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

a { color: var(--tp-text); text-decoration: none; border-bottom: 1px solid transparent; transition: color 0.15s, border-color 0.15s; }
a:hover { color: var(--tp-red); border-bottom-color: var(--tp-red); }

h1, h2, h3, h4 { color: var(--tp-text); line-height: 1.25; font-weight: 800; }
h1 { font-size: 1.7rem; letter-spacing: 0.5px; }
h2 {
  font-size: 1.15rem;
  margin: 40px 0 14px;
  padding-left: 18px;
  position: relative;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  font-weight: 800;
  padding-bottom: 10px;
  border-bottom: 3px double var(--border-light);
}
h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  width: 10px;
  height: 10px;
  background: var(--tp-red);
}
h3 { font-size: 1rem; margin: 24px 0 8px; }

p { margin: 10px 0; }

.muted { color: var(--tp-text-dim); }

/* ── nav ─────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  margin: 0 0 32px;
  padding: 12px 16px;
  font-size: 0.9rem;
  align-items: center;
  background: var(--tp-black);
  border-bottom: 2px solid var(--tp-border);
  box-shadow: inset 1px 1px 0 rgba(255, 255, 255, 0.12), inset -1px -1px 0 rgba(0, 0, 0, 0.6);
}
.nav a {
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-family: var(--mono);
  font-size: 0.8rem;
}
.nav a:hover { color: var(--tp-red); }
.nav a.active { border-bottom-color: var(--tp-red); }
.nav a.nav-cta {
  color: #ffffff;
  background: var(--tp-black);
  border: 2px solid var(--tp-red);
  border-radius: 0;
  padding: 2px 12px;
}
.nav a.nav-cta:hover { color: #ffffff; background: var(--tp-red); border-bottom-color: var(--tp-red); }

/* ── showcase: hero con T420 3D flotante ─────────────── */
.showcase {
  position: relative;
  /* viewport menos lo que hay encima (wrap padding-top + nav ≈ 135px):
     garantiza que el copy anclado abajo quede SIEMPRE sobre el fold */
  min-height: calc(100vh - 170px);
  min-height: calc(100svh - 170px);
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  padding: 0 0 72px;
  overflow: hidden;
}
.showcase::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(600px 400px at 50% 60%, rgba(226, 35, 26, 0.16), transparent 70%);
  pointer-events: none;
}
.showcase-copy { position: relative; z-index: 1; text-align: left; padding: 0; }
.overline {
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: 0.7rem;
  font-family: var(--mono);
  color: var(--tp-text-dim);
  margin-bottom: 12px;
}
.showcase-title { font-size: 3.4rem; font-weight: 800; letter-spacing: 0.5px; color: var(--tp-text); display: flex; align-items: center; justify-content: flex-start; gap: 12px; }
.showcase-tag { color: var(--tp-text-dim); margin-top: 10px; font-size: 1.15rem; }
.showcase-tag::before {
  content: "";
  display: block;
  width: 48px;
  height: 3px;
  background: var(--tp-red);
  margin-bottom: 12px;
}
.scroll-cue {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--tp-text-dim);
  font-size: 0.7rem;
  font-family: var(--mono);
  letter-spacing: 2px;
  text-transform: uppercase;
  animation: risecue .4s ease-out .6s both, cuefloat 2.2s ease-in-out 1s infinite;
}
@keyframes cuefloat { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 6px); } }

/* boot choreography + hero stagger (transform/opacity only, ≤1s total) */
@keyframes bootlid  { from { transform: rotateX(-88deg); } to { transform: rotateX(-78deg); } }
@keyframes flicker  { 0% { opacity: 0; } 8% { opacity: .8; } 14% { opacity: .1; } 22% { opacity: .9; } 30% { opacity: .3; } 40% { opacity: 1; } 100% { opacity: 1; } }
@keyframes rise     { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes risecue  { from { opacity: 0; transform: translate(-50%, 14px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes ledpulse { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
@keyframes poweron  { from { opacity: 0; } to { opacity: 1; } }
.overline       { animation: rise .5s ease-out .1s both; }
.showcase-title { animation: rise .55s ease-out .15s both; }
.showcase-tag   { animation: rise .5s ease-out .35s both; }
.scene          { animation: rise .6s ease-out .5s both; }

/* ── escena 3D: ThinkPad T420 (2011) — réplica spec ───── */
.scene {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  perspective: 1400px;
  pointer-events: none;
  z-index: 0;
}
.shadow {
  position: absolute;
  width: 340px;
  height: 40px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 50%;
  filter: blur(24px);
  top: calc(50% + 120px);
  left: 50%;
  transform: translateX(-50%) translate(calc(var(--px, 0deg) / 1deg * 1.2px), calc(var(--py, 0deg) / 1deg * -.6px)) scale(1);
  opacity: .5;
  transition: transform .25s ease-out, opacity .25s ease-out;
}
.float { animation: bob 8s ease-in-out infinite; will-change: transform; pointer-events: none; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }

.tilt {
  transform: rotateX(calc(62deg + var(--py, 0deg))) rotateZ(calc(-12deg + var(--px, 0deg)));
  transition: transform 0.25s ease-out;
  transform-style: preserve-3d;
  will-change: transform;
}
.laptop { width: 480px; transform-style: preserve-3d; pointer-events: auto; }

/* tapa 16:10 */
.lid {
  position: relative;
  height: 300px;
  background: linear-gradient(#181818, #101010);
  border: 1px solid #232323;
  border-radius: 6px 6px 2px 2px;
  transform-origin: bottom center;
  transform: rotateX(-78deg);
  transform-style: preserve-3d;
  animation: bootlid .6s cubic-bezier(.2,.7,.3,1) .05s backwards;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06); /* canto mecanizado */
  /* curvatura convexa sutil de la tapa cerrada */
  background-image: linear-gradient(rgba(255, 255, 255, 0.025), transparent 30%, rgba(255, 255, 255, 0.025) 50%, transparent 70%, rgba(255, 255, 255, 0.02)), linear-gradient(#181818, #101010);
}
.lid::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(calc(115deg + var(--px, 0deg)), transparent 30%, rgba(255, 255, 255, 0.05) 48%, transparent 68%);
  opacity: 0;
  animation: poweron .8s ease-out .4s forwards;
}
.latch {
  position: absolute;
  top: -4px;
  left: 50%;
  transform: translateX(-50%) translateZ(4px);
  width: 60px;
  height: 14px;
  background: #0a0a0a;
  border: 1px solid #222;
  border-radius: 3px;
}
.hinge { position: absolute; bottom: -2px; width: 44px; height: 8px; background: linear-gradient(#555, #222); border-left: 2px solid #1a1a1a; border-right: 2px solid #1a1a1a; border-radius: 0 0 2px 2px; }
.hinge.l { left: 8px; }
.hinge.r { right: 8px; }
.screen {
  position: absolute;
  inset: 8% 7%;
  background: linear-gradient(175deg, #131313, #0e0e0e); /* panel apenas más oscuro, tapa cerrada */
  border-radius: 4px;
  border: 1px solid #1a1a1a;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.5);
}
.cam { position: absolute; top: 2.5%; left: 50%; width: 3px; height: 3px; border-radius: 50%; background: #333; }
.screen-dot {
  position: absolute;
  right: 24px;
  bottom: 8px;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--tp-red);
  box-shadow: 0 0 10px rgba(226, 35, 26, 0.8);
  animation: ledpulse 3s ease-in-out .9s infinite;
}
.logo {
  position: absolute;
  bottom: 8px;
  right: 14px;
  color: #c8c8c8;
  font: 700 9px/1 sans-serif;
  letter-spacing: 2.5px;
}
.logo i { color: var(--tp-red); font-style: normal; }

/* base y teclado — 6 filas visibles + fn, anchos --u */
.base {
  height: 252px;
  padding: 26px 40px 18px;
  background: linear-gradient(#1c1c1c, #141414);
  border: 1px solid #232323;
  border-radius: 6px 6px 12px 12px;
  box-shadow:
    inset 1px 0 0 #0a0a0a, inset -1px 0 0 #0a0a0a, /* cantos laterales */
    inset 0 1px 0 #333;
  position: relative;
}
/* ranuras de puertos en el canto frontal */
.base::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 5px;
  height: 4px;
  background: repeating-linear-gradient(90deg, #050505 0 14px, transparent 14px 26px);
  border-radius: 2px;
  opacity: 0.5;
}
/* palmrest levemente más claro que la base, con brillo superior */
.keys {
  display: flex;
  flex-direction: column;
  gap: 5px;
  position: relative;
  padding: 8px;
  background: #101010;
  border: 1px solid #050505;
  border-radius: 4px;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.7), inset 0 -1px 0 #1e1e1e;
}
.krow { display: flex; gap: 4px; }
.key {
  flex: var(--u, 1);
  min-width: 0;
  height: 14px;
  background: #242424;
  border: 1px solid #0c0c0c;
  border-radius: 2px 2px 3px 3px; /* teclas cóncavas classic 7-row */
  box-shadow: inset 0 -3px 0 #0c0c0c, inset 0 2px 1px rgba(0, 0, 0, 0.45), inset 0 1px 0 #333;
  transition: transform .2s ease, background .2s ease;
}
.krow.fn .key { height: 10px; }
.key.up { transform: translateY(-6px); }

/* TrackPoint */
.nub {
  position: absolute;
  left: 47%;
  top: 44%;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background:
    repeating-conic-gradient(rgba(0, 0, 0, 0.35) 0deg 15deg, transparent 15deg 30deg), /* textura cóncava clásica */
    radial-gradient(circle at 50% 45%, var(--tp-red) 30%, var(--tp-red-dim) 100%);
  box-shadow: 0 0 12px rgba(226, 35, 26, 0.8);
  z-index: 1;
  transition: transform .2s ease, box-shadow .2s ease;
}

/* keyboard/trackpoint life on laptop hover (only .laptop receives pointer events) */
.laptop:hover .nub {
  transform: scale(1.25);
  box-shadow: 0 0 20px rgba(226, 35, 26, 1);
}
.laptop:hover .key { transform: translateY(1px); background: #2b2b2b; }
.laptop:hover .key.up { transform: translateY(-5px); background: #2b2b2b; }

/* franja superior: speaker grilles izquierda+derecta + botón power a la derecha */
.speaker {
  position: absolute;
  top: -14px;
  width: 70px;
  height: 6px;
  border-radius: 3px;
  background: repeating-linear-gradient(90deg, #050505 0 2px, #2a2a2a 2px 4px);
  border: 1px solid #0c0c0c;
}
.speaker.l { left: 2px; }
.speaker.r { right: 46px; }
.power {
  position: absolute;
  top: -15px;
  right: 0;
  width: 28px;
  height: 8px;
  background: #2a2a2a;
  border: 1px solid #0c0c0c;
  border-radius: 4px;
  box-shadow: inset 0 1px 0 #3a3a3a;
}
/* ThinkVantage — única excepción azul histórica del T420 real (hardware 2011) */
.tv-btn {
  position: absolute;
  top: -14px;
  left: 78px;
  width: 10px;
  height: 6px;
  background: #24518f;
  border: 1px solid #0c0c0c;
  border-radius: 2px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

/* LEDs de estado en el canto inferior de la base: power, battery, disk, caps
   (4 puntos vía box-shadow sobre un solo elemento — sin markup extra) */
.led-strip {
  position: absolute;
  bottom: 13px;
  left: 50%;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  margin-left: -70px;
  background: #4a4; /* power */
  box-shadow:
    8px 0 3px -1px #4a4,  /* battery */
    16px 0 0 #da4,        /* disk */
    24px 0 0 #333,        /* caps (off) */
    0 0 6px rgba(68, 170, 68, 0.6); /* glow del power */
  opacity: 0.8;
}
/* patas de goma frontales de la base (el ::after ya es la ranura de puertos) */
.base::before {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 1px;
  height: 3px;
  background:
    linear-gradient(#0a0a0a, #000) no-repeat 0 0 / 12px 3px,
    linear-gradient(#0a0a0a, #000) no-repeat 100% 0 / 12px 3px;
  border-radius: 2px;
  opacity: 0.8;
}

/* separación teclado/palmrest */
.kbd-sep { height: 1px; background: #050505; margin: 8px 0 10px; box-shadow: 0 1px 0 #2e2e2e; }

/* palmrest: botones TrackPoint + touchpad + stickers */
.palmrest {
  position: relative;
  background: linear-gradient(#00000000, rgba(0, 0, 0, 0.18)); /* pendiente hacia el canto frontal */
}
.palmrest::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.06), transparent);
}
.tp-buttons { display: flex; gap: 3px; width: 96px; margin: 0 auto; }
.tpb { flex: 1; height: 8px; background: #1a1a1a; border: 1px solid #0d0d0d; border-radius: 2px; }
.tpb.mid { flex: 0.8; background: repeating-linear-gradient(90deg, #3a3a3a 0 2px, #161616 2px 5px); }
.pad-zone {
  width: 110px;
  height: 58px;
  margin: 10px auto 0;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 4px),
    #151515;
  border: 1px solid #262626;
  border-radius: 4px;
  position: relative;
}
.pad-zone::before {
  content: "";
  position: absolute;
  top: 4px;
  left: 8%;
  right: 8%;
  border-top: 1px dashed #333;
}
.stickers { position: absolute; left: 12px; bottom: 10px; display: flex; gap: 6px; opacity: 0.75; align-items: center; }
.sticker { width: 18px; height: 12px; border-radius: 2px; }
.sticker.intel { width: 24px; background: #0f6cbd; border: 1px solid #0a4d8c; box-shadow: inset 0 5px 4px -3px rgba(255, 255, 255, 0.45); transform: rotate(-3deg); }
.sticker.win { width: 12px; height: 12px; background: conic-gradient(from 0deg at 50% 50%, #f25022 0 25%, #7fba00 0 50%, #00a4ef 0 75%, #ffb900 0); transform: rotate(2deg); }

/* ── stats con contadores ────────────────────────────── */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin: 16px 0;
}
.stat {
  background: var(--tp-black-2);
  border: 2px solid var(--border-light);
  border-radius: 0;
  border-top: 2px solid var(--tp-red);
  padding: 18px 16px;
  text-align: center;
  box-shadow: inset 1px 1px 0 rgba(255, 255, 255, 0.12), inset -1px -1px 0 rgba(0, 0, 0, 0.6);
}
.stat-num { font-size: 2.2rem; font-weight: 700; color: #ffffff; display: block; line-height: 1.2; }
.stat-label { color: var(--panel-dim); font-size: 0.7rem; font-family: var(--mono); letter-spacing: 1px; }

/* ── reveal al scroll ────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ── narrativa: lista de facts ───────────────────────── */
.facts { list-style: none; margin: 14px 0; display: grid; gap: 10px; }
.facts li { padding-left: 22px; position: relative; }
.facts li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 8px;
  height: 8px;
  border-radius: 0;
  background: var(--tp-red);
}

/* ── hero ─────────────────────────────────────────────── */
.hero { margin-bottom: 8px; padding: 24px 0 8px; }
.hero-title { font-size: 2.4rem; font-weight: 800; letter-spacing: 0.5px; display: flex; align-items: center; gap: 10px; }
.tp-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--tp-red);
  box-shadow: 0 0 8px rgba(226, 35, 26, 0.7);
  flex-shrink: 0;
}
.hero-tagline { color: var(--tp-text-dim); margin-top: 8px; font-size: 1.05rem; }

/* ── flow diagram ─────────────────────────────────────── */
.flow {
  background: var(--tp-black-2);
  border: 2px solid var(--border-light);
  border-radius: 0;
  padding: 18px;
  margin: 16px 0;
  box-shadow: inset 1px 1px 0 rgba(255, 255, 255, 0.12), inset -1px -1px 0 rgba(0, 0, 0, 0.6);
}
.flow-legend {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-family: var(--mono);
  color: var(--panel-dim);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.flow-legend::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 0;
  background: var(--tp-red);
  flex-shrink: 0;
}
.flow-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.flow-row:last-child { margin-bottom: 0; }
.flow-node {
  background: var(--tp-black-3);
  border: 1px solid var(--tp-border);
  border-radius: 0;
  padding: 8px 12px;
  min-width: 0;
  box-shadow: inset 1px 1px 0 rgba(255, 255, 255, 0.12), inset -1px -1px 0 rgba(0, 0, 0, 0.6);
}
.flow-node strong { display: block; color: #ffffff; font-size: 0.85rem; font-weight: 600; }
.flow-node small { display: block; color: var(--panel-dim); font-size: 0.72rem; }
.flow-arrow { color: var(--panel-dim); font-size: 1rem; align-self: center; flex-shrink: 0; }

/* ── tables ─────────────────────────────────────────── */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  margin: 12px 0;
  background: var(--tp-black-2);
}
th, td {
  text-align: left;
  padding: 8px 10px;
  border: 1px solid var(--border-light);
  vertical-align: top;
}
th {
  background: var(--tp-black);
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.72rem;
  font-family: var(--mono);
  border: 2px solid var(--tp-border);
}

code.inline {
  background: var(--beige-panel);
  border: 1px solid var(--border-light);
  border-radius: 0;
  padding: 1px 6px;
  font-size: 0.8rem;
  font-family: var(--mono);
  color: var(--tp-text);
}

/* ── project cards ───────────────────────────────────── */
.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 16px 0;
}
.card {
  background: var(--tp-black-2);
  border: 2px solid var(--tp-border);
  border-radius: 0;
  padding: 16px 18px;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.card:hover {
  border-color: var(--tp-red);
  transform: translateY(-2px);
  box-shadow: inset 1px 1px 0 rgba(255, 255, 255, 0.12), inset -1px -1px 0 rgba(0, 0, 0, 0.6);
}
.card h4 { margin-bottom: 6px; font-size: 0.95rem; }
.card p { margin: 4px 0; font-size: 0.8rem; color: var(--tp-text-dim); }
.card .badges { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.badge {
  font-size: 0.65rem;
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 1px;
  border: 1px solid var(--tp-border);
  border-radius: 0;
  padding: 1px 7px;
  color: var(--tp-text-dim);
}
.badge-hosted {
  color: var(--tp-red);
  border-color: var(--tp-red-dim);
}

/* ── buttons ─────────────────────────────────────────── */
.btn {
  display: inline-block;
  background: var(--tp-black);
  color: #ffffff;
  font-family: var(--mono);
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 0;
  border: 2px solid var(--tp-black);
  margin: 6px 6px 6px 0;
  transition: filter 0.15s, background 0.15s, border-color 0.15s;
}
.btn:hover { background: var(--tp-red); border-color: var(--tp-red); text-decoration: none; color: #ffffff; filter: none; }
.btn.ghost {
  background: transparent;
  color: var(--tp-text);
  border-color: var(--tp-border);
}
.btn.ghost:hover { background: var(--tp-red); border-color: var(--tp-red); color: #ffffff; }

/* ── footer ─────────────────────────────────────────── */
.footer {
  max-width: 900px;
  margin: 0 auto;
  padding: 24px;
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: center;
  border-top: 3px double var(--border-light);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 1px;
  color: var(--tp-text-dim);
  background: var(--tp-black);
  box-shadow: inset 1px 1px 0 rgba(255, 255, 255, 0.08), inset -1px -1px 0 rgba(0, 0, 0, 0.6);
  flex-wrap: wrap;
}

/* ── responsive ──────────────────────────────────────── */
/* rango intermedio (laptops chicos): escala el modelo 3D completo
   sin tocar sus piezas internas */
@media (min-width: 601px) and (max-width: 1100px) {
  .laptop { transform: scale(.8); }
  .shadow { width: 280px; }
}

@media (max-width: 600px) {
  body { font-size: 14px; }
  .wrap { padding: 24px 16px 60px; }

  .grid { grid-template-columns: 1fr; }

  /* tablas: scroll horizontal en vez de aplastarse */
  table { display: block; overflow-x: auto; white-space: nowrap; }

  /* hero escala */
  .hero-title { font-size: 1.7rem; }
  .showcase { min-height: calc(100vh - 150px); min-height: calc(100svh - 150px); padding-bottom: 64px; }
  .showcase-title { font-size: 2.2rem; }
  .laptop { width: 300px; }
  .lid { height: 188px; }
  .base { height: 172px; padding: 16px 22px 10px; }
  .key { height: 9px; }
  .krow.fn .key { height: 7px; }
  .nub { width: 8px; height: 8px; }
  .speaker { width: 44px; height: 4px; top: -10px; }
  .speaker.r { right: 30px; }
  .power { width: 18px; height: 6px; top: -11px; }
  .tv-btn { top: -10px; left: 50px; width: 7px; height: 4px; }
  .led-strip { display: none; } /* a 375px los LEDs son ruido subpíxel */
  .tp-buttons { width: 64px; }
  .pad-zone { width: 72px; height: 42px; }
  .hinge { width: 28px; }
  .stickers { display: none; }
  .shadow { width: 220px; height: 28px; top: calc(50% + 90px); }

  /* flow: apilar verticalmente con flechas rotadas */
  .flow-row { flex-direction: column; align-items: stretch; }
  .flow-arrow { transform: rotate(90deg); align-self: center; }

  /* nav compacto */
  .nav { gap: 4px 16px; font-size: 0.85rem; }

  .footer { flex-direction: column; gap: 6px; text-align: center; }
}

/* ── scroll experience: progreso, stagger, flow ──────── */
.progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--tp-red);
  transform: scaleX(0);
  transform-origin: left;
  z-index: 20;
  pointer-events: none;
}
.nav a.active { color: var(--tp-red); }

/* stagger de hijos dentro de cada .reveal */
.reveal > * { opacity: 0; transform: translateY(24px); transition: opacity .75s ease, transform .75s ease; }
.reveal > *:nth-child(2) { transition-delay: 90ms; }
.reveal > *:nth-child(3) { transition-delay: 180ms; }
.reveal > *:nth-child(4) { transition-delay: 270ms; }
.reveal.in > * { opacity: 1; transform: none; }

/* cuadrado rojo del h2 se dibuja al entrar (scaleY 0→1) */
h2.reveal::before { transform: scaleY(0); transform-origin: top; transition: transform .45s ease; }
h2.reveal.in::before { transform: scaleY(1); }

/* flow: encendido secuencial en orden del DOM (índice --i via JS) */
.flow-node, .flow-arrow { opacity: 0; transition: opacity .5s ease; transition-delay: calc(var(--i, 0) * 80ms); }
.flow-node { transform: translateY(8px); transition: opacity .5s ease, transform .5s ease; transition-delay: calc(var(--i, 0) * 80ms); }
.reveal.in .flow-node, .reveal.in .flow-arrow { opacity: 1; }
.reveal.in .flow-node { transform: none; }

.nav a, .nav-cta, .card, .btn, .scroll-cue { transition: transform .12s ease; }
.nav-cta:active, .card:active, .btn:active, .scroll-cue:active { transform: scale(.97); }

/* ── micro-interactions: tooltips, row hover, press, focus ── */
/* NOTE: estas reglas van ANTES del media block reduce — si van después,
   el orden de cascada (misma especificidad) re-arma la animación bajo reduce. */
.tp-dot { animation: ledpulse 3s ease-in-out .9s infinite; }

tbody tr:hover td { background: var(--tp-black-3); }

.flow-node[data-path] { position: relative; }
.flow-node[data-path]::after {
  content: attr(data-path);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--tp-black);
  border: 1px solid var(--tp-border);
  border-radius: 0;
  color: #ffffff;
  padding: 2px 8px;
  font-size: 0.7rem;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity .15s ease;
}
.flow-node[data-path]:hover::after,
.flow-node[data-path]:focus-visible::after { opacity: 1; }

/* ── accesibilidad: menos movimiento (ÚLTIMO — debe ganar la cascada) ── */
@media (prefers-reduced-motion: reduce) {
  .float, .scroll-cue, .shadow, .lid, .lid::after, .screen, .screen-dot,
  .overline, .showcase-title, .showcase-tag, .scene { animation: none; }
  body::before { animation: none; }
  .tilt { transition: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .reveal > *, .flow-node, .flow-arrow { opacity: 1; transform: none; transition: none; }
  h2.reveal::before { transform: none; transition: none; }
  .nav a { transition: none; }
  .shadow, .key, .nub, .tp-dot { transition: none; animation: none; }
  .nav a, .nav-cta, .card, .btn, .scroll-cue { transition: none; }
  .flow-node[data-path]::after { transition: none; }
  .lid::after { opacity: 1; }
}

.nav a:focus-visible, .nav-cta:focus-visible, .card a:focus-visible,
.btn:focus-visible, .scroll-cue:focus-visible, .flow-node:focus-visible {
  outline: 2px solid var(--tp-red);
  outline-offset: 2px;
}
