@font-face { font-family: 'Archivo'; font-weight: 700; font-display: swap; src: url('../../fonts/archivo-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Archivo'; font-weight: 800; font-display: swap; src: url('../../fonts/archivo-latin-800-normal.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-weight: 400; font-display: swap; src: url('../../fonts/jetbrains-mono-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-weight: 500; font-display: swap; src: url('../../fonts/jetbrains-mono-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Source Serif 4'; font-weight: 400; font-display: swap; src: url('../../fonts/source-serif-4-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Source Serif 4'; font-weight: 600; font-display: swap; src: url('../../fonts/source-serif-4-latin-600-normal.woff2') format('woff2'); }

:root {
  --ground: #0E161C;
  --ground-2: #0A1116;
  --surface: #131E25;
  --surface-2: #1A2730;
  --rule: #24333C;
  --rule-soft: #1C2A32;
  --ink: #E8EFF3;
  --ink-soft: #B9CAD4;
  --muted: #8A9EAA;
  --cian: #4FC7D1;
  --verde: #6FBE8C;
  --ambar: #E9B35A;
  --sobre-tono: #07141A;
  --display: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --body: 'Source Serif 4', Georgia, serif;
  --mono: 'JetBrains Mono', Consolas, monospace;
  --salida: cubic-bezier(0.16, 1, 0.3, 1);
  --tono: var(--cian);
}

* { box-sizing: border-box; }

html {
  background: var(--ground);
  color-scheme: dark;
  scrollbar-color: var(--rule) var(--ground);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  caret-color: var(--cian);
  overflow-x: clip;
}

::selection { background: var(--tono); color: var(--sobre-tono); }

a { color: var(--ink); text-underline-offset: 0.22em; text-decoration-thickness: 1px; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--tono); outline-offset: 3px; border-radius: 4px; }

.wrap {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 40px);
}

/* ---------- barra ---------- */

.barra {
  position: absolute; z-index: 3; top: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding-block: 22px;
}
.marca {
  margin: 0; font-family: var(--display); font-weight: 800;
  font-size: 17px; letter-spacing: -0.01em;
}

.langs { display: flex; gap: 2px; padding: 3px; border: 1px solid var(--rule); border-radius: 999px; }
.langs button {
  min-width: 40px; min-height: 32px; padding: 0 10px;
  background: none; border: 0; border-radius: 999px; cursor: pointer;
  font-family: var(--mono); font-size: 12px; font-weight: 500; color: var(--muted);
  transition: color 0.2s, background-color 0.2s;
}
.langs button.on { background: var(--ink); color: var(--ground); }
.langs button:not(.on):hover { color: var(--ink); }

/* ---------- portada ---------- */

.portada {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: min(86svh, 860px);
  padding-top: 84px;
  display: flex; align-items: flex-end;
}
.portada-css, #portada-gl { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; }
#portada-gl { display: block; }

/* Vidrio empañado en CSS: la escena borrosa debajo y una copia nítida que solo se ve en la lupa. */
@property --lx { syntax: '<length-percentage>'; inherits: true; initial-value: 72%; }
@property --ly { syntax: '<length-percentage>'; inherits: true; initial-value: 40%; }

.portada-css { overflow: hidden; --r: 120px; }
.mancha {
  position: absolute; border-radius: 50%; opacity: 0.34;
  background: radial-gradient(closest-side, var(--c), transparent);
  will-change: transform; animation: deriva 22s ease-in-out infinite alternate;
}
.m1 { --c: var(--cian); width: 70vw; height: 70vw; left: 38%; top: -30%; }
.m2 { --c: var(--verde); width: 60vw; height: 60vw; left: 62%; top: 22%; animation-duration: 27s; animation-delay: -9s; }
.m3 { --c: var(--ambar); width: 48vw; height: 48vw; left: 30%; top: 44%; opacity: 0.26; animation-duration: 31s; animation-delay: -4s; }
@keyframes deriva {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(-6vw, 4vh, 0) scale(1.12); }
}

.escena { position: absolute; inset: 0; }
.frag {
  position: absolute; left: var(--x); top: var(--y);
  display: inline-flex; align-items: center; gap: 10px;
  height: 38px; padding: 0 16px 0 14px; border-radius: 999px; white-space: nowrap;
  background: rgba(19, 30, 37, 0.92); border: 1px solid rgba(232, 239, 243, 0.1);
  font-family: var(--mono); font-size: 14px; font-weight: 500; color: var(--ink);
}
.frag::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--tono); }
.escena.borrosa { filter: blur(9px); opacity: 0.8; }
.vidrio {
  position: absolute; inset: 0;
  background:
    linear-gradient(to bottom, transparent 72%, var(--ground) 100%),
    radial-gradient(120% 90% at 30% 100%, rgba(14, 22, 28, 0.55), transparent 70%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .8 0 0 0 0 .87 0 0 0 0 .9 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.escena.nitida {
  -webkit-mask-image: radial-gradient(circle var(--r) at var(--lx) var(--ly), #000 55%, transparent 100%);
  mask-image: radial-gradient(circle var(--r) at var(--lx) var(--ly), #000 55%, transparent 100%);
  animation: lupa 16s ease-in-out infinite;
}
.portada-css.sigue .escena.nitida { animation: none; }
@keyframes lupa {
  0%, 100% { --lx: 64%; --ly: 30%; }
  25% { --lx: 84%; --ly: 40%; }
  50% { --lx: 72%; --ly: 72%; }
  75% { --lx: 60%; --ly: 52%; }
}

@media (max-width: 899px) {
  .portada-css { --r: 92px; }
  .frag { left: var(--xm); top: var(--ym); height: 34px; font-size: 13px; }
  .frag.solo-ancho { display: none; }
  .m1 { width: 130vw; height: 130vw; left: 10%; top: -30%; }
  .m2 { width: 110vw; height: 110vw; left: -50%; top: -5%; }
  .m3 { width: 90vw; height: 90vw; left: 40%; top: 20%; }
  @keyframes lupa {
    0%, 100% { --lx: 30%; --ly: 18%; }
    33% { --lx: 70%; --ly: 24%; }
    66% { --lx: 45%; --ly: 34%; }
  }
}

@media (prefers-reduced-motion: reduce) {
  .escena.nitida { --lx: 70%; --ly: 30%; }
}
.portada-texto { padding-block: 72px 64px; }

.portada h1 {
  margin: 0; max-width: 11.5ch;
  font-family: var(--display); font-weight: 800;
  font-size: clamp(44px, 8.2vw, 96px); line-height: 0.96; letter-spacing: -0.035em;
  text-wrap: balance;
}
.tesis {
  margin: 28px 0 0; max-width: 36em;
  font-size: clamp(18px, 1.6vw, 21px); line-height: 1.55; color: var(--ink-soft);
}
.sin {
  display: flex; flex-wrap: wrap; gap: 6px 22px;
  margin: 30px 0 0; padding: 0; list-style: none;
  font-family: var(--mono); font-size: 12.5px; color: var(--muted);
}
.sin li { display: flex; align-items: center; gap: 8px; }
.sin li::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--ink-soft); }

/* ---------- aviso de móvil ---------- */

.movil { display: none; padding-block: 8px 24px; }
.es-movil .movil { display: block; }
.movil-caja {
  padding: 22px 20px 20px; border: 1px solid var(--rule); border-radius: 14px;
  background: var(--surface);
}
.movil h2 { margin: 0 0 6px; font-family: var(--display); font-weight: 800; font-size: 20px; letter-spacing: -0.015em; }
.movil p { margin: 0 0 16px; font-size: 16px; color: var(--ink-soft); }
.acciones { display: flex; flex-wrap: wrap; gap: 8px; }
.acciones button, .acciones a {
  min-height: 42px; display: inline-flex; align-items: center;
  font-family: var(--display); font-size: 14px; font-weight: 700;
  padding: 0 16px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--rule); background: var(--surface-2);
  color: var(--ink); text-decoration: none;
}
.acciones button:hover, .acciones a:hover { border-color: var(--cian); }
.dicho { margin: 12px 0 0 !important; font-family: var(--mono); font-size: 12.5px !important; color: var(--verde) !important; }

/* ---------- las tres apps ---------- */

#followapp { --tono: var(--cian); }
#shield { --tono: var(--verde); }
#cv { --tono: var(--ambar); }

.app {
  display: grid; gap: 28px;
  grid-template-areas: "texto" "demo" "pie";
  padding-block: 72px;
  border-top: 1px solid var(--rule-soft);
}
.app-texto { grid-area: texto; }
.demo { grid-area: demo; }
.app-pie { grid-area: pie; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; }

.app h2 {
  margin: 0; max-width: 13ch;
  font-family: var(--display); font-weight: 800;
  font-size: clamp(34px, 5vw, 60px); line-height: 1; letter-spacing: -0.032em;
  text-wrap: balance;
}
.app-nombre {
  margin: 16px 0 0; font-family: var(--display); font-weight: 700;
  font-size: 15px; color: var(--muted);
}
.app-nombre b { color: var(--tono); font-weight: 800; }
.que { margin: 22px 0 0; max-width: 34em; font-size: 18px; color: var(--ink-soft); }

.app ul { margin: 22px 0 0; padding: 0; list-style: none; max-width: 34em; }
.app li {
  position: relative; padding: 9px 0 9px 26px;
  font-size: 16px; line-height: 1.5; color: var(--ink-soft);
  border-top: 1px solid var(--rule-soft);
}
.app li::before {
  content: ''; position: absolute; left: 0; top: 20px;
  width: 12px; height: 2px; border-radius: 1px; background: var(--tono);
}

.cta {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 48px; padding: 0 22px;
  border-radius: 999px; background: var(--tono); color: var(--sobre-tono);
  font-family: var(--display); font-weight: 800; font-size: 15px; text-decoration: none;
  box-shadow: 0 10px 22px -12px rgba(0, 0, 0, 0.7);
  transition: transform 0.35s var(--salida), box-shadow 0.35s var(--salida);
}
.cta svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.35s var(--salida); }
.cta:hover { transform: translateY(-1px); box-shadow: 0 16px 28px -12px rgba(0, 0, 0, 0.75); }
.cta:hover svg { transform: translateX(3px); }
.cta:active { transform: translateY(0); }
.mas { font-size: 15px; color: var(--muted); }
.mas:hover { color: var(--ink); }

.demo {
  position: relative; overflow: hidden;
  min-height: 360px;
  border: 1px solid var(--rule); border-radius: 18px;
  background: linear-gradient(180deg, var(--surface) 0%, var(--ground-2) 100%);
}

@media (min-width: 900px) {
  .app {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    grid-template-rows: auto auto;
    grid-template-areas: "texto demo" "pie demo";
    align-content: center; column-gap: clamp(48px, 6vw, 96px); row-gap: clamp(20px, 3.5vh, 32px);
    min-height: 100svh; padding-block: clamp(32px, 7vh, 112px);
  }
  /* La sección se fija a pantalla completa: el texto escala con el alto para que el CTA quepa. */
  .app h2 { max-width: 16ch; font-size: clamp(34px, min(5vw, 6.5vh), 60px); }
  .que { margin-top: clamp(12px, 2.4vh, 22px); }
  .app ul { margin-top: clamp(12px, 2.4vh, 22px); }
  .app-texto { align-self: end; }
  .app-pie { align-self: start; }
  .demo { min-height: 480px; align-self: center; }
}

/* ---------- demo: FollowApp ---------- */

.fa {
  position: relative; min-height: inherit; display: flex; flex-direction: column;
  padding: clamp(18px, 3vw, 28px);
  font-family: var(--display);
}
.fa-cabeza { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.fa-cuenta { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.fa-total { font-size: 14px; color: var(--muted); font-weight: 700; }
.fa-num { font-size: clamp(22px, 2.6vw, 30px); font-weight: 800; color: var(--ink); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.fa-estado {
  display: flex; align-items: center; gap: 8px; margin: 10px 0 14px;
  font-family: var(--mono); font-size: 12px; color: var(--muted);
}
.fa-pulso { width: 7px; height: 7px; border-radius: 50%; background: var(--cian); box-shadow: 0 0 0 4px rgba(79, 199, 209, 0.15); }

.demo .fa-lista { position: relative; margin: 0 0 16px; padding: 0; list-style: none; max-width: none; }
.demo .fa-fila {
  display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 12px;
  padding: 10px 6px; border-top: 1px solid var(--rule-soft);
  border-radius: 8px; overflow: hidden; color: var(--ink); font-size: 14px;
  transition: opacity 0.4s var(--salida), filter 0.4s var(--salida);
}
.demo .fa-fila::before, .demo .fa-barrido::before { display: none; }
.demo .fa-fila:first-of-type { border-top: 0; }
.fa-avatar {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: color-mix(in srgb, var(--av) 22%, var(--surface-2)); color: color-mix(in srgb, var(--av) 55%, #fff);
  font-size: 13px; font-weight: 800; letter-spacing: 0.02em;
}
.fa-quien { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.fa-quien b { font-weight: 700; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fa-quien span { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.fa-chip { font-family: var(--mono); font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.fa-fila.apagada { opacity: 0.45; filter: grayscale(1); }
.fa-fila.apagada .fa-chip { color: var(--ink-soft); padding: 2px 8px; border: 1px solid var(--rule); border-radius: 999px; }
.demo .fa-barrido {
  position: absolute; left: 0; right: 0; height: 2px; padding: 0; border: 0;
  background: linear-gradient(90deg, transparent, var(--cian), transparent);
  pointer-events: none; visibility: hidden;
}
.fa-barrido::before { display: none; }

.aviso {
  margin-top: auto; display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 16px; border-radius: 14px;
  background: var(--surface-2); border: 1px solid var(--rule);
  box-shadow: 0 18px 40px -20px rgba(0, 0, 0, 0.8);
  visibility: hidden;
}
.aviso-punto { flex: none; width: 10px; height: 10px; margin-top: 6px; border-radius: 50%; background: var(--ambar); }
.aviso.es-suspension .aviso-punto { background: var(--muted); }
.aviso-txt { font-size: 15px; font-weight: 700; color: var(--ink); line-height: 1.35; }
.aviso-que { color: var(--ink-soft); }
.aviso-meta { display: block; margin-top: 3px; font-family: var(--mono); font-size: 12px; font-weight: 400; color: var(--muted); }

/* ---------- demo: Chat Privacy Shield ---------- */

.sh {
  position: relative; min-height: inherit; display: flex; flex-direction: column;
  padding: clamp(16px, 3vw, 24px); font-family: var(--display);
}
.sh-buscar {
  display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 14px; margin-bottom: 8px;
  border-radius: 10px; background: var(--surface-2); color: var(--muted); font-size: 14px; font-weight: 700;
}
.sh-buscar svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }

.demo .sh-lista { margin: 0; padding: 0; list-style: none; max-width: none; }
.demo .chat {
  display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 12px;
  padding: 10px 8px; border-top: 1px solid var(--rule-soft); border-radius: 10px;
  color: var(--ink); font-size: 14px; cursor: default; touch-action: manipulation;
}
.demo .chat::before { display: none; }
.demo .chat:first-child { border-top: 0; }
.chat-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--av) 70%, #fff) 0 18%, var(--av) 45%, color-mix(in srgb, var(--av) 40%, var(--ground)) 100%);
}
.chat-texto { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.chat-quien { font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-msg { font-family: var(--body); font-size: 14px; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-avatar, .chat-texto {
  filter: blur(var(--desenfoque, 8px));
  transition: filter 0.25s var(--salida);
}
.chat.revelada .chat-avatar, .chat.revelada .chat-texto,
.chat.revelada-demo .chat-avatar, .chat.revelada-demo .chat-texto { filter: none; }
.chat.revelada, .chat.revelada-demo { background: rgba(111, 190, 140, 0.07); }
.chat-lado { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.chat-lado small { font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.no-leidos {
  min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; display: grid; place-items: center;
  background: var(--verde); color: var(--sobre-tono); font-size: 12px; font-weight: 800;
}

.sh-cursor {
  position: absolute; left: 0; top: 0; width: 22px; height: 22px; pointer-events: none; visibility: hidden;
  fill: var(--ink); stroke: var(--ground); stroke-width: 1.4; stroke-linejoin: round;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.5));
}

.sh-control {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px;
  margin-top: auto; padding: 14px 4px 0; border-top: 1px solid var(--rule-soft);
}
.sh-etiqueta { font-size: 14px; font-weight: 700; color: var(--ink-soft); }
.sh-valor { font-family: var(--mono); font-size: 12.5px; color: var(--verde); min-width: 4.5ch; text-align: right; font-variant-numeric: tabular-nums; }
#intensidad { width: 100%; accent-color: var(--verde); min-height: 28px; cursor: pointer; }
.sh-pista { margin: 10px 4px 0; font-family: var(--mono); font-size: 12px; color: var(--muted); }

/* ---------- demo: Best CV ---------- */

.cvd {
  position: relative; min-height: inherit; display: flex; flex-direction: column; gap: 18px;
  padding: clamp(16px, 3vw, 28px);
}
/* La hoja es clara a propósito: un CV impreso dentro de la interfaz oscura. */
.cvd-hoja {
  padding: clamp(18px, 3vw, 28px); border-radius: 10px;
  background: #F7F9FA; color: #0E161C;
  box-shadow: 0 24px 50px -24px rgba(0, 0, 0, 0.8);
}
.cvd-cabeza { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.cvd-etiqueta {
  font-family: var(--mono); font-size: 11.5px; font-weight: 500; color: #5F717B;
  padding: 3px 10px; border: 1px solid #D6DFE4; border-radius: 999px; transition: color 0.3s, border-color 0.3s;
}
.reescrito .cvd-etiqueta { color: #8A5A10; border-color: #E9B35A; background: #FBF1DE; }
.cvd-seccion { font-family: var(--display); font-weight: 800; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: #42525C; }
.cvd-cargo { margin: 0 0 8px; font-family: var(--display); font-weight: 700; font-size: 17px; color: #0E161C; }
.cvd-linea { display: grid; }
.cvd-linea > * { grid-area: 1 / 1; align-self: start; margin: 0; font-family: var(--body); font-size: clamp(16px, 1.5vw, 18px); line-height: 1.55; color: #26343C; }
/* El tachado es un fondo en línea: así recorre también la segunda línea si el texto se parte. */
.logro-antes-txt {
  background: linear-gradient(#C0392B, #C0392B) no-repeat 0 58% / calc(var(--tachado, 0) * 100%) 2px;
}
.palabra { display: inline-block; opacity: 0; }
.palabra.dato {
  font-weight: 600; color: #0E161C; padding: 0 2px; border-radius: 3px;
  background: linear-gradient(#F6D9A4, #F6D9A4) no-repeat left center / calc(var(--resalte, 0) * 100%) 100%;
}

.cvd-chat { display: flex; flex-direction: column; gap: 10px; margin-top: auto; }
.burbuja, .respuesta {
  max-width: 80%; margin: 0; padding: 10px 14px 11px; border-radius: 14px;
  font-family: var(--display); font-size: 15px; font-weight: 700; line-height: 1.35;
  visibility: hidden;
}
.burbuja small, .respuesta small { display: block; margin-bottom: 2px; font-family: var(--mono); font-size: 11px; font-weight: 500; }
.burbuja { align-self: flex-start; background: rgba(233, 179, 90, 0.13); border: 1px solid rgba(233, 179, 90, 0.35); color: var(--ink); border-bottom-left-radius: 4px; }
.burbuja small { color: var(--ambar); }
.respuesta { align-self: flex-end; background: var(--surface-2); border: 1px solid var(--rule); color: var(--ink); border-bottom-right-radius: 4px; }
.respuesta small { color: var(--muted); }

/* ---------- pie ---------- */

.pie {
  padding-block: 40px 56px; border-top: 1px solid var(--rule-soft);
  font-size: 14px; color: var(--muted);
}
.pie p { margin: 0 0 6px; }
.pie p:last-child { font-family: var(--mono); font-size: 12.5px; }

/* Sin GSAP: estado final, quieto. */
.demo.quieta .aviso, .demo.quieta .burbuja, .demo.quieta .respuesta { visibility: visible; }
.demo.quieta .fa-fila.se-va, .demo.quieta .logro-antes { display: none; }

/* La portada fuera de pantalla no gasta batería en animarse. */
.portada-css.fuera .mancha, .portada-css.fuera .escena.nitida { animation-play-state: paused; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
