/* AwayLock · landing
   Mundo: fondo casi negro violáceo con grilla de medición, un brillo violeta,
   Archivo pesado y ancho para titulares, Martian Mono solo para lecturas reales.
   Los colores de señal tienen significado: verde = cerca, rojo = umbral de bloqueo,
   naranja = alejándote, violeta = bloqueada. */

:root {
  --bg: #0a0816;
  --bg-raise: #120f26;
  --bg-sunk: #07060f;
  --line: rgba(190, 180, 255, 0.1);
  --line-strong: rgba(190, 180, 255, 0.18);
  --grid: rgba(155, 140, 255, 0.055);

  --ink: #f4f2ff;
  --ink-2: #c3bde3;
  --ink-3: #928bb8;

  --violet: #7b6cff;
  --violet-hi: #9d91ff;
  --violet-deep: #3a2a9e;
  --green: #4ade80;
  --red: #ff5c6c;
  --orange: #ffa24c;

  --font-display: "Archivo", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "Martian Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);

  --gutter: clamp(16px, 4vw, 56px);
  --maxw: 1240px;
  --radius: 16px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(1200px 700px at 78% -8%, rgba(123, 108, 255, 0.22), transparent 60%),
    linear-gradient(var(--grid) 1px, transparent 1px) 0 0 / 56px 56px,
    linear-gradient(90deg, var(--grid) 1px, transparent 1px) 0 0 / 56px 56px,
    var(--bg);
  font-family: var(--font-display);
  font-size: 17px;
  line-height: 1.55;
  font-variation-settings: "wdth" 100;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
code { font-family: var(--font-mono); font-size: 0.86em; }
.mono { font-family: var(--font-mono); letter-spacing: -0.01em; }
.muted { color: var(--ink-3); }
.i { width: 18px; height: 18px; flex: none; }

:focus-visible {
  outline: 2px solid var(--violet-hi);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--bg);
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
}
.skip:focus { top: 12px; }

/* ---------- Navegación ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 14px var(--gutter);
  background: linear-gradient(to bottom, rgba(10, 8, 22, 0.92), rgba(10, 8, 22, 0.7));
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 17px;
  text-decoration: none;
  font-variation-settings: "wdth" 110;
}
.brand img { border-radius: 7px; }

.nav-links {
  display: flex;
  gap: 26px;
  margin-left: 28px;
  font-size: 15px;
  color: var(--ink-2);
}
.nav-links a { text-decoration: none; transition: color 150ms ease; }
.nav-links a:hover { color: var(--ink); }

.nav-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.lang {
  height: 34px;
  min-width: 42px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 150ms ease, transform 160ms var(--ease-out);
}
.lang:hover { background: rgba(255, 255, 255, 0.06); }
.lang:active { transform: scale(0.96); }

/* ---------- Botones ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 52px;
  padding: 0 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 160ms var(--ease-out), background-color 180ms ease, border-color 180ms ease, box-shadow 220ms ease;
}
.btn:active { transform: scale(0.97); }
.btn-sm { height: 36px; padding: 0 14px; font-size: 14px; gap: 8px; }
.btn-sm .i { width: 16px; height: 16px; }

.btn-primary {
  background: var(--ink);
  color: #120e2e;
  box-shadow: 0 10px 30px -10px rgba(123, 108, 255, 0.7), inset 0 -2px 0 rgba(58, 42, 158, 0.18);
}
.btn-primary:hover { background: #fff; box-shadow: 0 14px 38px -10px rgba(123, 108, 255, 0.9), inset 0 -2px 0 rgba(58, 42, 158, 0.18); }

.btn-ghost {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--line-strong);
  color: var(--ink);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.07); border-color: rgba(190, 180, 255, 0.3); }

.link {
  color: var(--violet-hi);
  text-decoration: underline;
  text-decoration-color: rgba(157, 145, 255, 0.4);
  text-underline-offset: 3px;
  transition: text-decoration-color 150ms ease;
}
.link:hover { text-decoration-color: currentColor; }

/* ---------- Tipografía ---------- */

.h2 {
  margin: 0 0 20px;
  font-size: clamp(38px, 5.4vw, 76px);
  line-height: 0.98;
  font-weight: 800;
  letter-spacing: -0.035em;
  font-variation-settings: "wdth" 112;
  text-wrap: balance;
}
.narrow { max-width: 18ch; }
.body.narrow { max-width: 60ch; }

.body {
  margin: 0;
  max-width: 58ch;
  color: var(--ink-2);
  font-size: clamp(17px, 1.35vw, 19px);
  text-wrap: pretty;
}

/* ---------- Portada ---------- */

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: clamp(24px, 4vw, 64px);
  max-width: var(--maxw);
  margin: 0 auto;
  min-height: calc(100svh - 64px);
  padding: clamp(40px, 7vh, 96px) var(--gutter) clamp(56px, 8vh, 110px);
}

.kinetic {
  margin: 0 0 28px;
  font-size: clamp(52px, 7.4vw, 96px);
  line-height: 0.92;
  font-weight: 850;
  letter-spacing: -0.04em;
  font-variation-settings: "wdth" 115;
}
.k {
  display: block;
  opacity: 0;
  filter: blur(10px);
  transform: translateY(14px);
  animation: word-in 900ms var(--ease-out) forwards, word-dim 700ms ease forwards;
}
.k1 { animation-delay: 150ms, 1350ms; }
.k2 { animation-delay: 750ms, 1950ms; }
.k3 { animation: word-in 900ms var(--ease-out) 1350ms forwards; }

@keyframes word-in {
  to { opacity: 1; filter: blur(0); transform: none; }
}
@keyframes word-dim {
  to { color: #736c96; }
}

.lede {
  margin: 0 0 34px;
  max-width: 44ch;
  font-size: clamp(18px, 1.5vw, 21px);
  color: var(--ink-2);
  opacity: 0;
  animation: fade-up 800ms var(--ease-out) 1800ms forwards;
}

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.cta-row.center { justify-content: center; }
.hero .cta-row, .hero .mobile-note, .hero .meta {
  opacity: 0;
  animation: fade-up 800ms var(--ease-out) 2000ms forwards;
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.meta {
  margin: 22px 0 0;
  font-size: 14px;
  color: var(--ink-3);
}

.mobile-note { display: none; }
.mobile-note p { margin: 0 0 16px; color: var(--ink-2); max-width: 36ch; }
.mobile-note strong { color: var(--ink); }

@media (hover: none) and (pointer: coarse) {
  .desk-only { display: none !important; }
  .mobile-note { display: block; }
}
@media (hover: hover), (pointer: fine) {
  .touch-only:not(.mobile-note) { display: none !important; }
}

/* Radar */
.radar {
  position: relative;
  margin: 0;
  justify-self: center;
  width: min(100%, 540px);
}
.radar-stage { position: relative; }
.radar-svg { width: 100%; height: auto; overflow: visible; }
.ring { fill: none; stroke-width: 2; }
.ring-far { stroke: rgba(190, 180, 255, 0.12); }
.ring-lock { stroke: var(--red); stroke-opacity: 0.8; stroke-dasharray: 3 9; stroke-linecap: round; }
.ring-near { stroke: var(--green); stroke-opacity: 0.85; stroke-dasharray: 3 9; stroke-linecap: round; }
.pulse {
  fill: none;
  stroke: rgba(157, 145, 255, 0.5);
  stroke-width: 2;
  transform-origin: 200px 200px;
  animation: pulse 3.2s var(--ease-out) infinite;
}
@keyframes pulse {
  from { transform: scale(1); opacity: 0.7; }
  to { transform: scale(4.6); opacity: 0; }
}
.padlock .shackle { transition: transform 420ms var(--ease-out); }
.radar.is-locked .shackle { transform: translateY(6px); }
.radar:not(.is-locked) .shackle { transform: translate(9px, -3px) rotate(18deg); transform-origin: 15px -6px; }
.phone-dot { filter: drop-shadow(0 4px 14px rgba(74, 222, 128, 0.55)); }

.radar-read {
  position: absolute;
  left: 50%;
  bottom: -2%;
  transform: translateX(-50%);
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(18, 15, 38, 0.85);
  border: 1px solid var(--line-strong);
  box-shadow: 0 16px 40px -18px rgba(0, 0, 0, 0.8);
  white-space: nowrap;
}
.read-state { font-weight: 700; font-size: 16px; transition: color 200ms ease; }
.read-value { font-size: 13px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.radar[data-state="near"] .read-state { color: var(--green); }
.radar[data-state="leaving"] .read-state { color: var(--orange); }
.radar[data-state="locked"] .read-state { color: var(--violet-hi); }

.radar-legend {
  display: flex;
  justify-content: center;
  gap: 22px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
  color: var(--ink-3);
}
.radar-legend li { display: flex; align-items: center; gap: 8px; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot-green { background: var(--green); }
.dot-red { background: var(--red); }

/* ---------- La caminata ---------- */

.walk { position: relative; border-top: 1px solid var(--line); }
.walk-track { height: 440vh; }
.walk-stage {
  position: sticky;
  top: 0;
  height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  align-items: center;
  gap: clamp(24px, 4vw, 64px);
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 88px var(--gutter) 40px;
}

.captions { position: relative; list-style: none; margin: 8px 0 30px; padding: 0; min-height: 150px; }
.cap {
  position: absolute;
  inset: 0 0 auto 0;
  opacity: 0;
  filter: blur(6px);
  transform: translateY(10px);
  transition: opacity 380ms ease, filter 380ms ease, transform 480ms var(--ease-out);
  pointer-events: none;
}
.cap.is-active { opacity: 1; filter: blur(0); transform: none; }
.cap h3 {
  margin: 0 0 8px;
  font-size: clamp(26px, 2.6vw, 36px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  font-weight: 750;
  font-variation-settings: "wdth" 108;
}
.cap[data-phase="near"] h3, .cap[data-phase="back"] h3 { color: var(--green); }
.cap[data-phase="leaving"] h3 { color: var(--orange); }
.cap[data-phase="locked"] h3 { color: var(--violet-hi); }
.cap p { margin: 0; color: var(--ink-2); max-width: 40ch; }

.readouts {
  display: flex;
  gap: 36px;
  margin-bottom: 28px;
}
.readouts > div { display: flex; flex-direction: column; gap: 4px; }
.ro-value {
  font-size: clamp(30px, 3.2vw, 46px);
  font-weight: 500;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.ro-label { font-size: 11px; color: var(--ink-3); text-transform: lowercase; }

.steps {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
}
.steps button {
  height: 34px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-3);
  font-size: 14px;
  cursor: pointer;
  transition: background-color 180ms ease, color 180ms ease, transform 160ms var(--ease-out);
}
.steps button:hover { color: var(--ink); }
.steps button:active { transform: scale(0.96); }
.steps button[aria-current="step"] { background: rgba(157, 145, 255, 0.16); color: var(--ink); }

.walk-visual { display: flex; flex-direction: column; gap: 18px; min-width: 0; }

/* Mac dibujada */
.mac { width: 100%; }
.mac-screen {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 14px 14px 4px 4px;
  overflow: hidden;
  background: #000;
  border: 7px solid #1b1830;
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(190, 180, 255, 0.12);
}
.mac-base {
  height: 12px;
  margin: 0 -4%;
  border-radius: 2px 2px 14px 14px;
  background: linear-gradient(#2a2644, #16132a);
  box-shadow: 0 18px 30px -16px rgba(0, 0, 0, 0.9);
}
.wall {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 80% at 20% 90%, rgba(74, 222, 128, 0.18), transparent 60%),
    radial-gradient(70% 90% at 85% 10%, rgba(123, 108, 255, 0.7), transparent 60%),
    linear-gradient(160deg, #2b1f7a, #110c35 60%, #0a0820);
}
.menubar {
  position: absolute;
  inset: 0 0 auto 0;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 22px;
  padding: 0 10px;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(20, 16, 44, 0.45);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.mb-app { font-weight: 700; }
.mb-menu { opacity: 0.8; }
.mb-spacer { flex: 1; }
.mb-status { width: 16px; height: 16px; display: grid; place-items: center; border-radius: 4px; background: rgba(255, 255, 255, 0.22); }
.mb-status svg { width: 12px; height: 12px; }
.mb-time { font-variant-numeric: tabular-nums; }

.panel {
  position: absolute;
  top: 28px;
  right: 10px;
  width: min(52%, 250px);
  padding: 12px;
  border-radius: 12px;
  background: rgba(24, 21, 44, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 18px 40px -14px rgba(0, 0, 0, 0.8);
  transition: opacity 300ms ease, transform 400ms var(--ease-out);
}
.panel-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.panel-badge {
  position: relative;
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--green);
  transition: background-color 300ms ease;
}
.panel-badge svg { width: 17px; height: 17px; position: absolute; transition: opacity 200ms ease; }
.panel-badge .pb-walk { opacity: 0; }
.panel[data-state="leaving"] .panel-badge { background: var(--orange); }
.panel[data-state="leaving"] .pb-near { opacity: 0; }
.panel[data-state="leaving"] .pb-walk { opacity: 1; }
.panel-title { margin: 0; font-size: 13px; font-weight: 700; line-height: 1.2; }
.panel-detail { margin: 2px 0 0; font-size: 9px; color: rgba(255, 255, 255, 0.62); font-variant-numeric: tabular-nums; white-space: nowrap; }
.meter { position: relative; height: 12px; }
.meter-bar {
  position: absolute;
  inset: 3px 0;
  display: flex;
  border-radius: 99px;
  overflow: hidden;
}
.z { display: block; height: 100%; }
.z-red { width: 35.7%; background: rgba(255, 92, 108, 0.45); }
.z-mid { width: 21.4%; background: rgba(255, 255, 255, 0.14); }
.z-green { flex: 1; background: rgba(74, 222, 128, 0.45); }
.meter-knob {
  position: absolute;
  top: 0;
  left: 0;
  width: 12px;
  height: 12px;
  margin-left: -6px;
  border-radius: 50%;
  background: #fff;
  box-shadow: inset 0 0 0 3px var(--green), 0 1px 3px rgba(0, 0, 0, 0.4);
  will-change: transform;
}
.panel[data-state="leaving"] .meter-knob { box-shadow: inset 0 0 0 3px var(--orange), 0 1px 3px rgba(0, 0, 0, 0.4); }
.meter-legend { display: flex; justify-content: space-between; margin-top: 6px; font-size: 8px; color: rgba(255, 255, 255, 0.5); }
.meter-legend span { display: inline-flex; align-items: center; gap: 4px; }
.meter-legend span:first-child { color: #ff8b96; }
.meter-legend span:last-child { color: #7fe9a3; }
.meter-legend i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }

.lockscreen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 9%;
  background: rgba(8, 6, 22, 0.35);
  backdrop-filter: blur(22px) saturate(120%);
  -webkit-backdrop-filter: blur(22px) saturate(120%);
  opacity: 0;
  visibility: hidden;
  transition: opacity 500ms ease, visibility 0s linear 500ms;
}
.mac.is-locked .lockscreen { opacity: 1; visibility: visible; transition: opacity 500ms ease, visibility 0s; }
.ls-date { margin: 0; font-size: clamp(10px, 1.1vw, 14px); font-weight: 600; color: rgba(255, 255, 255, 0.85); }
.ls-time {
  margin: 0;
  font-size: clamp(44px, 7vw, 96px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variation-settings: "wdth" 88;
  color: rgba(255, 255, 255, 0.92);
  font-variant-numeric: tabular-nums;
}
.ls-user {
  margin-top: auto;
  margin-bottom: 9%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: clamp(9px, 0.9vw, 12px);
  color: rgba(255, 255, 255, 0.78);
}
.ls-avatar {
  width: clamp(30px, 3.4vw, 44px);
  height: clamp(30px, 3.4vw, 44px);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(#8f84d6, #5a4db0);
  color: rgba(255, 255, 255, 0.9);
}
.ls-avatar svg { width: 64%; height: 64%; }
.ls-field {
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.7);
}

.toast {
  position: absolute;
  top: 30px;
  right: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px 10px 10px;
  border-radius: 14px;
  background: rgba(34, 30, 60, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 18px 40px -14px rgba(0, 0, 0, 0.85);
  font-size: 11px;
  line-height: 1.3;
  opacity: 0;
  transform: translateY(-12px) scale(0.97);
  transition: opacity 250ms ease, transform 450ms var(--ease-out);
}
.toast strong { display: block; font-size: 12px; }
.toast > span:last-child span { color: rgba(255, 255, 255, 0.65); }
.toast-icon { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: #1d1a33; color: var(--green); }
.toast-icon svg { width: 20px; height: 20px; }
.mac.show-toast .toast { opacity: 1; transform: none; }
.mac.show-toast .panel { opacity: 0; transform: translateY(-6px); }

/* Gráfico de señal */
.trace {
  position: relative;
  height: clamp(90px, 13vh, 130px);
  border-radius: 12px;
  background: rgba(7, 6, 15, 0.55);
  border: 1px solid var(--line);
  overflow: hidden;
}
.trace-svg { width: 100%; height: 100%; }
.th { stroke-width: 1.5; stroke-dasharray: 4 6; vector-effect: non-scaling-stroke; }
.th-green { stroke: var(--green); stroke-opacity: 0.7; }
.th-red { stroke: var(--red); stroke-opacity: 0.8; }
.trace-line { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.trace-head { fill: var(--ink); }
.trace-labels { position: absolute; inset: 0; pointer-events: none; font-size: 10px; }
.tl { position: absolute; right: 10px; transform: translateY(-120%); }
.tl-green { color: #7fe9a3; }
.tl-red { color: #ff8b96; }

/* Regla de distancia */
.ruler { padding: 0 6px; }
.ruler-line { position: relative; height: 26px; border-bottom: 1px solid var(--line-strong); }
.ruler-mac { position: absolute; left: 0; bottom: 6px; width: 22px; color: var(--ink-2); transform: translateX(-50%); }
.ruler-phone {
  position: absolute;
  left: 0;
  bottom: -7px;
  width: 14px;
  height: 14px;
  margin-left: -7px;
  border-radius: 50%;
  background: var(--green);
  border: 3px solid #fff;
  box-shadow: 0 0 18px rgba(74, 222, 128, 0.6);
  will-change: transform;
}
.ruler-ticks { display: flex; justify-content: space-between; margin-top: 10px; font-size: 10px; color: var(--ink-3); }
.synthetic { margin: 0; font-size: 12px; color: var(--ink-3); text-align: right; }

/* ---------- Secciones ---------- */

.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(96px, 16vh, 180px) var(--gutter) 0;
}

/* Sin esto, un bloque de código largo ensancha la grilla y se sale de la pantalla. */
.split > *, .install-grid > *, .hero > *, .walk-stage > * { min-width: 0; }

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
}

.nots { list-style: none; margin: 34px 0 0; padding: 0; display: grid; gap: 14px; }
.nots li { display: flex; align-items: center; gap: 12px; font-size: 18px; font-weight: 600; }
.nots .i { width: 22px; height: 22px; padding: 3px; border-radius: 50%; color: var(--red); background: rgba(255, 92, 108, 0.14); }

.login { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.login-card {
  width: min(100%, 380px);
  padding: 44px 32px 34px;
  border-radius: 24px;
  text-align: center;
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(123, 108, 255, 0.35), transparent 70%),
    var(--bg-raise);
  border: 1px solid var(--line-strong);
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.9);
}
.login-avatar {
  width: 76px;
  height: 76px;
  margin: 0 auto 14px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(#8f84d6, #5a4db0);
  color: rgba(255, 255, 255, 0.92);
}
.login-avatar svg { width: 60%; height: 60%; }
.login-name { margin: 0 0 18px; font-weight: 700; font-size: 18px; }
.login-field {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 14px;
  color: var(--ink-3);
  text-align: left;
}
.caret { width: 2px; height: 18px; background: var(--violet-hi); animation: caret 1.1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.login-watch { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 18px 0 0; font-size: 14px; color: var(--ink-2); }
.spinner {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.18);
  border-top-color: var(--green);
  animation: spin 800ms linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.login-note { margin: 0; font-size: 13px; color: var(--ink-3); text-align: center; }

/* Lógica */
.logic-chart {
  position: relative;
  margin: 56px 0 0;
  height: clamp(220px, 34vh, 320px);
  border-radius: var(--radius);
  background: rgba(7, 6, 15, 0.55);
  border: 1px solid var(--line);
  overflow: hidden;
}
.logic-svg { width: 100%; height: 100%; }
.logic-line {
  fill: none;
  stroke: var(--ink);
  stroke-width: 2.2;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
/* El trazo se dibuja de izquierda a derecha recortando el SVG. */
.js .logic-svg { clip-path: inset(0 100% 0 0); }
.logic-chart.is-in .logic-svg { clip-path: inset(0 0 0 0); transition: clip-path 2600ms var(--ease-in-out); }
.lock-mark { stroke: var(--violet-hi); stroke-width: 2; vector-effect: non-scaling-stroke; opacity: 0; transition: opacity 400ms ease 1300ms; }
.logic-chart.is-in .lock-mark { opacity: 1; }
.logic-tags { position: absolute; inset: 0; pointer-events: none; }
.tag {
  position: absolute;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  background: rgba(18, 15, 38, 0.92);
  border: 1px solid var(--line-strong);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 400ms ease, transform 500ms var(--ease-out);
}
.tag-lock { color: var(--violet-hi); transition-delay: 1400ms; }
.tag-calm { color: var(--ink-2); transition-delay: 1900ms; }
.tag-arm { color: #7fe9a3; transition-delay: 2500ms; }
.logic-chart.is-in .tag { opacity: 1; transform: none; }

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 36px 48px;
  margin: 64px 0 0;
}
@media (min-width: 1100px) {
  .facts { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .facts > div { grid-column: span 2; }
  .facts > div:nth-child(1), .facts > div:nth-child(2) { grid-column: span 3; }
}
.facts dt {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.facts dt::before {
  content: "";
  flex: none;
  width: 34px;
  height: 12px;
  background: radial-gradient(circle, var(--violet-hi) 3.5px, transparent 4px) center / 12px 12px no-repeat;
}
.facts .f-median dt::before {
  background: linear-gradient(90deg, transparent 0 15px, var(--ink) 15px 19px, transparent 19px) center / 34px 2px no-repeat,
    radial-gradient(circle, var(--ink) 3px, transparent 3.5px) center / 12px 12px no-repeat;
}
.facts .f-thresholds dt::before {
  background:
    repeating-linear-gradient(90deg, var(--green) 0 5px, transparent 5px 9px) 0 2px / 34px 2px no-repeat,
    repeating-linear-gradient(90deg, var(--red) 0 5px, transparent 5px 9px) 0 8px / 34px 2px no-repeat;
}
.facts .f-delay dt::before, .facts .f-grace dt::before {
  background: linear-gradient(var(--orange), var(--orange)) 0 5px / 34px 2px no-repeat,
    radial-gradient(circle, var(--orange) 3.5px, transparent 4px) 100% 50% / 12px 12px no-repeat;
}
.facts .f-lock dt::before { background: linear-gradient(var(--violet-hi), var(--violet-hi)) center / 2px 12px no-repeat; }
.facts dd { margin: 0; color: var(--ink-2); font-size: 16px; max-width: 42ch; }

.code-link { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; margin: 44px 0 0; }
.code-link .link { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 18px; }
.code-link .muted { font-size: 14px; }

/* Privacidad: la sección se tiñe de violeta */
.privacy { max-width: none; padding-left: 0; padding-right: 0; }
.privacy-field {
  margin: 0 auto;
  max-width: calc(var(--maxw) - 2 * var(--gutter));
  padding: clamp(56px, 9vw, 110px) clamp(24px, 6vw, 96px);
  border-radius: 28px;
  background:
    radial-gradient(90% 120% at 100% 0%, rgba(157, 145, 255, 0.35), transparent 60%),
    linear-gradient(150deg, #4a37c9, #2a1d86 55%, #1a1256);
  box-shadow: 0 50px 100px -50px rgba(58, 42, 158, 0.9);
  margin-left: var(--gutter);
  margin-right: var(--gutter);
}
@media (min-width: 1240px) { .privacy-field { margin-left: auto; margin-right: auto; } }
.privacy .body { color: rgba(236, 233, 255, 0.86); }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; margin: 36px 0 0; padding: 0; }
.chips li {
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  opacity: 0;
  transform: translateY(8px) scale(0.97);
  transition: opacity 380ms ease, transform 480ms var(--ease-out);
}
.chips.is-in li { opacity: 1; transform: none; }
.cpu {
  margin: 48px 0 6px;
  font-size: clamp(28px, 3.4vw, 46px);
  font-weight: 750;
  letter-spacing: -0.03em;
  line-height: 1.05;
  font-variation-settings: "wdth" 110;
  max-width: 20ch;
}
.cpu strong { color: #b6ffcf; font-weight: 850; }
.footnote { margin: 0; font-size: 13px; color: rgba(236, 233, 255, 0.72); }

/* Instalar */
.install-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(28px, 4vw, 56px);
  margin-top: 48px;
}
.install-steps {
  counter-reset: st;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 22px;
  align-content: start;
}
.install-steps li {
  counter-increment: st;
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 16px;
  align-items: baseline;
  font-size: clamp(19px, 1.7vw, 23px);
  font-weight: 600;
  line-height: 1.3;
}
.install-steps li::before {
  content: counter(st);
  font-size: 15px;
  font-weight: 700;
  color: var(--violet-hi);
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(157, 145, 255, 0.4);
  transform: translateY(-2px);
}
.install-steps strong { color: var(--ink); }
.install-steps code { color: var(--violet-hi); }

.gatekeeper {
  grid-row: span 2;
  padding: 28px;
  border-radius: 20px;
  background: rgba(255, 162, 76, 0.07);
  border: 1px solid rgba(255, 162, 76, 0.3);
}
.gatekeeper h3 { margin: 0 0 10px; font-size: 22px; line-height: 1.2; letter-spacing: -0.02em; color: #ffc48c; }
.gatekeeper p { margin: 0 0 14px; color: var(--ink-2); }
.gatekeeper ol { margin: 0 0 18px; padding-left: 22px; display: grid; gap: 8px; color: var(--ink-2); }
.gatekeeper strong { color: var(--ink); }

.code {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 12px 12px 16px;
  border-radius: 12px;
  background: var(--bg-sunk);
  border: 1px solid var(--line-strong);
}
.code code { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; color: var(--ink); font-size: 13px; line-height: 1.7; scrollbar-width: thin; }
.code-block code { white-space: pre; }
.copy {
  flex: none;
  height: 32px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.05);
  font-size: 13px;
  cursor: pointer;
  transition: background-color 150ms ease, transform 160ms var(--ease-out);
}
.copy:hover { background: rgba(255, 255, 255, 0.1); }
.copy:active { transform: scale(0.96); }

.reqs h3 { margin: 0 0 12px; font-size: 18px; }
.reqs h3:not(:first-child) { margin-top: 28px; }
.reqs ul { margin: 0; padding-left: 20px; display: grid; gap: 8px; color: var(--ink-2); }

/* Preguntas */
.faq-list { margin-top: 40px; max-width: 860px; border-top: 1px solid var(--line-strong); }
.faq details { border-bottom: 1px solid var(--line-strong); }
.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 22px 0;
  font-size: clamp(18px, 1.6vw, 21px);
  font-weight: 650;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  width: 12px;
  height: 12px;
  flex: none;
  border-right: 2px solid var(--ink-3);
  border-bottom: 2px solid var(--ink-3);
  transform: rotate(45deg) translateY(-3px);
  transition: transform 220ms var(--ease-out);
}
.faq details[open] summary::after { transform: rotate(-135deg) translateY(-3px); }
.faq details p { margin: 0 0 24px; max-width: 64ch; color: var(--ink-2); }

/* Cierre */
.close {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: clamp(120px, 20vh, 220px) var(--gutter) clamp(90px, 14vh, 150px);
}
.close-mark { position: relative; width: 132px; height: 132px; margin-bottom: 34px; }
.close-mark img { position: relative; border-radius: 30px; filter: drop-shadow(0 24px 40px rgba(58, 42, 158, 0.8)); }
.cm-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1.5px solid rgba(157, 145, 255, 0.45);
  animation: cm 3.6s var(--ease-out) infinite;
}
.cm-ring:nth-child(2) { animation-delay: 1.2s; }
.cm-ring:nth-child(3) { animation-delay: 2.4s; }
@keyframes cm { from { transform: scale(0.9); opacity: 0.8; } to { transform: scale(2.8); opacity: 0; } }
.close-title {
  margin: 0 0 14px;
  font-size: clamp(48px, 8vw, 96px);
  line-height: 0.95;
  font-weight: 850;
  letter-spacing: -0.04em;
  font-variation-settings: "wdth" 115;
}
.close .body { margin-bottom: 34px; }

.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 28px var(--gutter) 40px;
  border-top: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 14px;
}
.footer p { margin: 0; }

.toast-copy {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 80;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-weight: 600;
  font-size: 14px;
  opacity: 0;
  transform: translate(-50%, 12px);
  transition: opacity 200ms ease, transform 300ms var(--ease-out);
  pointer-events: none;
}
.toast-copy.is-on { opacity: 1; transform: translate(-50%, 0); }

/* Revelado al entrar en pantalla: el contenido es visible por defecto y solo se
   anima cuando el JS confirma que puede hacerlo. */
.js .login-card.reveal { opacity: 0; filter: blur(12px); transform: scale(0.96); transition: opacity 600ms ease, filter 700ms ease, transform 900ms var(--ease-out); }
.js .login-card.reveal.is-in { opacity: 1; filter: none; transform: none; }

/* ---------- Pantallas chicas ---------- */

@media (max-width: 960px) {
  .nav-links { display: none; }
  .hero { grid-template-columns: 1fr; min-height: auto; padding-top: 40px; }
  .radar { width: min(100%, 340px); margin-top: 8px; }
  .walk-stage {
    grid-template-columns: 1fr;
    align-content: start;
    gap: 14px;
    padding-top: 88px;
    padding-bottom: 16px;
  }
  .walk-visual { padding-inline: 6px; }
  .mac-base { margin: 0 -2%; }
  .walk-copy { order: 2; }
  .walk-visual { order: 1; gap: 12px; }
  .walk .h2 { font-size: 28px; margin-bottom: 6px; }
  .captions { min-height: 108px; margin: 0 0 8px; }
  .cap h3 { font-size: 22px; }
  .cap p { font-size: 15px; }
  .readouts { display: none; }
  .trace { height: 70px; }
  .steps button { padding: 0 10px; font-size: 13px; }
  .split, .install-grid { grid-template-columns: 1fr; }
  .gatekeeper { grid-row: auto; }
}

@media (max-width: 700px) {
  /* Las etiquetas del gráfico pasan abajo, en fila, para no pisarse. */
  .logic-chart { height: auto; }
  .logic-svg { height: 200px; }
  .logic-tags { position: static; display: flex; flex-wrap: wrap; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
  .tag { position: static; }
  .radar-legend { flex-direction: column; align-items: center; gap: 8px; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .brand span { display: none; }
  .btn { height: 50px; padding: 0 20px; }
  .cta-row .btn { flex: 1 1 auto; }
  .panel { width: 62%; padding: 8px; }
  .panel-title { font-size: 11px; }
  .meter-legend { display: none; }
  .synthetic { text-align: left; }
  .footer { flex-direction: column; align-items: flex-start; }
  .tag { font-size: 10px; }
}

/* En pantallas táctiles, los controles chicos llegan a 44 px para el dedo. */
@media (pointer: coarse) {
  .lang, .steps button { height: 44px; }
  .lang { min-width: 48px; }
}

/* ---------- Movimiento reducido ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .k, .lede, .hero .cta-row, .hero .mobile-note, .hero .meta {
    animation: none;
    opacity: 1;
    filter: none;
    transform: none;
  }
  .k1, .k2 { color: #736c96; }
  .pulse, .cm-ring, .spinner, .caret { animation: none; }
  .pulse, .cm-ring { opacity: 0; }
  .walk-track { height: auto; }
  .walk-stage { position: relative; height: auto; min-height: 100svh; }
  .cap, .toast, .panel, .chips li, .tag, .js .reveal { transform: none !important; filter: none !important; }
  .js .logic-svg { clip-path: none; }
  .js .login-card.reveal { opacity: 1; }
}
