/* SeleQuest: landing pages de investigación
   Tokens del manual de identidad v1.0 */

@font-face { font-family: "Sora"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/sora-600.woff2") format("woff2"); }
@font-face { font-family: "Sora"; font-weight: 700; font-style: normal; font-display: swap; src: url("../fonts/sora-700.woff2") format("woff2"); }
@font-face { font-family: "Source Sans 3"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/source-sans-3-400.woff2") format("woff2"); }
@font-face { font-family: "Source Sans 3"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/source-sans-3-600.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/jetbrains-mono-500.woff2") format("woff2"); }

:root {
  /* Paleta nuclear */
  --base: #0C101D;
  --papel: #FDFFFC;
  --accion: #106BE7;
  --progreso: #57A773;
  --recompensa: #ECA400;
  --tension: #E01A4F;

  /* Tokens semánticos derivados (contraste AA sobre papel o base) */
  --texto: var(--base);
  --texto-2: #464C5A;
  --linea: #D9DEE6;
  --superficie: #EFF3F8;
  --accion-hover: #0B57BF;
  --progreso-hover: #4A9466;
  --base-elevada: #161C2E;
  --papel-suave: rgba(253, 255, 252, 0.78);
  --papel-linea: rgba(253, 255, 252, 0.2);

  --f-marca: "Sora", "Segoe UI", system-ui, sans-serif;
  --f-texto: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  --f-datos: "JetBrains Mono", ui-monospace, "SFMono-Regular", monospace;

  --radio: 14px;
  --ancho: 1160px;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--papel);
  color: var(--texto);
  font-family: var(--f-texto);
  font-size: 1.125rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }

h1, h2, h3 {
  font-family: var(--f-marca);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 0.6em;
  text-wrap: balance;
}
h2 { font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.6rem); letter-spacing: -0.03em; }
h3 { font-size: 1.3rem; font-weight: 600; }

p { margin: 0 0 1em; max-width: 65ch; }

a { color: var(--accion); text-underline-offset: 0.2em; }
a:hover { color: var(--accion-hover); }

:focus-visible { outline: 3px solid var(--accion); outline-offset: 3px; border-radius: 4px; }

.mono { font-family: var(--f-datos); font-weight: 500; font-size: 0.92em; letter-spacing: 0; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 10;
  background: var(--base); color: var(--papel); padding: 0.6rem 1rem; border-radius: 8px;
}
.skip:focus { top: 1rem; color: var(--papel); }

.wrap { max-width: var(--ancho); margin-inline: auto; padding-inline: clamp(1.25rem, 5vw, 3rem); }

/* Cabecera */
.site-header { border-bottom: 1px solid var(--linea); background: var(--papel); }
.header-inner { display: flex; align-items: center; gap: 1rem 1.5rem; padding-block: 1rem; }
.header-inner .brand { margin-right: auto; }
.header-inner .site-nav { order: 1; }
.header-inner .lang-switch { order: 2; }
.header-inner .nav-toggle { order: 3; }

.brand { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; }
.brand img { height: 40px; width: auto; }

.site-nav ul { display: flex; gap: 1.75rem; list-style: none; margin: 0; padding: 0; }
.site-nav a { color: var(--texto); font-weight: 600; font-size: 1rem; text-decoration: none; padding-block: 0.4rem; }
.site-nav a:hover { color: var(--accion); }
.site-nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; text-decoration-color: var(--accion); }

/* Selector de idioma */
.lang-switch { display: inline-flex; border: 1.5px solid var(--linea); border-radius: 10px; overflow: hidden; flex-shrink: 0; }
.lang-switch a {
  font-family: var(--f-marca); font-weight: 600; font-size: 0.9rem; line-height: 1;
  padding: 0.5rem 0.7rem; color: var(--texto-2); text-decoration: none;
}
.lang-switch a + a { border-left: 1.5px solid var(--linea); }
.lang-switch a:hover { color: var(--texto); background: var(--superficie); }
.lang-switch a[aria-current="true"] { background: var(--base); color: var(--papel); }
.lang-switch a:focus-visible { outline-offset: -3px; }

.nav-toggle {
  display: none; font: 600 1rem var(--f-texto); color: var(--texto);
  background: none; border: 1.5px solid var(--linea); border-radius: 10px; padding: 0.45rem 0.9rem; cursor: pointer;
}

@media (max-width: 760px) {
  .header-inner { flex-wrap: wrap; gap: 0.6rem; }
  .brand img { height: 32px; }
  .lang-switch a { padding: 0.5rem 0.6rem; }
  .nav-toggle { padding: 0.45rem 0.7rem; }
  .nav-toggle { display: inline-block; }
  .header-inner .site-nav { display: none; width: 100%; order: 10; }
  .header-inner .site-nav[data-open] { display: block; }
  .site-nav[data-open] { display: block; }
  .site-nav ul { flex-direction: column; gap: 0.25rem; padding-bottom: 0.5rem; }
}

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font-family: var(--f-marca); font-weight: 600; font-size: 1.05rem; line-height: 1.2;
  padding: 1rem 1.5rem; border-radius: 12px; border: 2px solid transparent;
  text-decoration: none; cursor: pointer; transition: background-color 0.15s ease;
}
.btn--empresas { background: var(--accion); color: var(--papel); }
.btn--empresas:hover { background: var(--accion-hover); color: var(--papel); }
.btn--candidatos { background: var(--progreso); color: var(--base); }
.btn--candidatos:hover { background: var(--progreso-hover); color: var(--base); }

.cta-meta { font-size: 0.98rem; color: var(--texto-2); margin: 0.6rem 0 0; }

/* Hero de la portada */
.hero {
  padding-block: clamp(3rem, 7vw, 6rem) clamp(3.5rem, 8vw, 6.5rem);
  background-image: radial-gradient(circle at 1px 1px, rgba(12, 16, 29, 0.13) 1px, transparent 1.4px);
  background-size: 26px 26px;
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(2rem, 5vw, 4rem); align-items: center; }

.status {
  display: inline-flex; align-items: center; gap: 0.55rem; margin: 0 0 1.5rem;
  font-size: 0.98rem; font-weight: 600; padding: 0.35rem 0.85rem 0.35rem 0.7rem;
  border: 1px solid var(--linea); border-radius: 999px; background: var(--papel);
}
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--recompensa); box-shadow: 0 0 0 0 rgba(236, 164, 0, 0.5); animation: pulso 2.4s ease-out infinite; }
@keyframes pulso { 0% { box-shadow: 0 0 0 0 rgba(236, 164, 0, 0.55); } 70%, 100% { box-shadow: 0 0 0 9px rgba(236, 164, 0, 0); } }

.hero h1 { font-size: clamp(2.6rem, 1.4rem + 4.4vw, 4.6rem); letter-spacing: -0.04em; line-height: 1.02; max-width: 13ch; }
.lead { font-size: clamp(1.15rem, 1rem + 0.5vw, 1.35rem); color: var(--texto-2); max-width: 46ch; }

.hero-ask { font-family: var(--f-marca); font-weight: 600; font-size: 1.05rem; margin: 2.25rem 0 0.9rem; }

.paths-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; max-width: 600px; }
.choice {
  position: relative; display: grid; gap: 0.3rem; align-content: start;
  padding: 1.1rem 2.75rem 1.2rem 1.25rem; border-radius: var(--radio); border: 2px solid;
  background: var(--papel); color: var(--texto); text-decoration: none;
  transition: background-color 0.15s ease;
}
.choice::after {
  content: ""; position: absolute; right: 1.1rem; top: 1.25rem;
  width: 14px; height: 14px; border-radius: 50%; border: 3px solid currentColor; color: inherit;
}
.choice--empresas { border-color: var(--accion); }
.choice--empresas::after { border-color: var(--accion); }
.choice--empresas:hover { background: rgba(16, 107, 231, 0.07); color: var(--texto); }
.choice--candidatos { border-color: var(--progreso); }
.choice--candidatos::after { border-color: var(--progreso); }
.choice--candidatos:hover { background: rgba(87, 167, 115, 0.1); color: var(--texto); }
.choice-title { font-family: var(--f-marca); font-weight: 600; font-size: 1.12rem; line-height: 1.25; }
.choice-text { font-size: 0.98rem; color: var(--texto-2); line-height: 1.4; }

/* Mapa de caminos */
.hero-map svg { width: 100%; max-width: 500px; margin-inline: auto; overflow: visible; }
.hero-map .track { fill: none; stroke: var(--linea); stroke-width: 4; stroke-dasharray: 2 9; stroke-linecap: round; }
.hero-map .trunk, .hero-map .branch { fill: none; stroke-width: 5; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.hero-map .trunk { stroke: var(--base); animation: trazo 0.55s ease-out 0.25s forwards; }
.hero-map .branch { animation: trazo 0.9s ease-in-out 0.75s forwards; }
.hero-map .branch--empresas { stroke: var(--accion); }
.hero-map .branch--candidatos { stroke: var(--progreso); }
.hero-map .stop, .hero-map .end, .hero-map .map-label { opacity: 0; animation: aparecer 0.4s ease-out 1.55s forwards; }
.hero-map .group { transition: opacity 0.25s ease; }
.hero-map[data-active="empresas"] .group--candidatos,
.hero-map[data-active="candidatos"] .group--empresas { opacity: 0.18; }
.map-label { font-family: var(--f-marca); font-weight: 600; font-size: 17px; fill: var(--base); }
.map-start { font-family: var(--f-marca); font-weight: 700; font-size: 13px; fill: var(--papel); }

@keyframes trazo { to { stroke-dashoffset: 0; } }
@keyframes aparecer { to { opacity: 1; } }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-map { order: -1; }
  .hero-map svg { max-width: 360px; margin-inline: 0; }
}
@media (max-width: 560px) {
  .paths-choice { grid-template-columns: 1fr; }
  .hero-map svg { max-width: 280px; }
}

/* Secciones */
.section { padding-block: clamp(3.5rem, 8vw, 6rem); }
.section--superficie { background: var(--superficie); }
.section-intro { max-width: 60ch; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-intro p { color: var(--texto-2); font-size: 1.15rem; }

.two-sides { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.75rem, 5vw, 4rem); }
.side { padding-left: 1.5rem; border-left: 4px solid; }
.side--empresas { border-color: var(--accion); }
.side--candidatos { border-color: var(--progreso); }
.side h3 { font-size: 1.5rem; }
.text-link { font-weight: 600; }

@media (max-width: 760px) { .two-sides { grid-template-columns: 1fr; } }

/* Micro misión */
.mission { background: var(--base); color: var(--papel); padding-block: clamp(3.5rem, 8vw, 6rem); }
.mission-grid { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.mission-intro p { color: var(--papel-suave); font-size: 1.15rem; }
.mission-intro .mission-note { font-size: 1rem; margin-top: 1.5rem; }

.mission-card { background: var(--base-elevada); border: 1px solid var(--papel-linea); border-radius: 18px; padding: clamp(1.25rem, 3vw, 2rem); }
.mission-meta { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.98rem; color: var(--papel-suave); }
.timer { height: 4px; border-radius: 4px; background: var(--papel-linea); margin: 0.7rem 0 1.25rem; overflow: hidden; }
.timer span { display: block; height: 100%; width: 72%; background: var(--tension); border-radius: 4px; }
.mission-scenario { font-size: 1.22rem; line-height: 1.5; margin-bottom: 1.25rem; }

.option {
  display: block; width: 100%; text-align: left; margin: 0 0 0.65rem;
  font: 400 1.06rem/1.45 var(--f-texto); color: var(--papel);
  background: transparent; border: 1.5px solid var(--papel-linea); border-radius: 12px;
  padding: 0.9rem 1rem; cursor: pointer; transition: border-color 0.15s ease, opacity 0.15s ease;
}
.option:hover { border-color: var(--papel); }
.option[aria-pressed="true"] { border-color: var(--recompensa); background: rgba(236, 164, 0, 0.1); }
.mission-card.has-choice .option[aria-pressed="false"] { opacity: 0.55; }
.mission-card .option:focus-visible, .mission-card button:focus-visible { outline-color: var(--recompensa); }

.mission-feedback { border-top: 1px solid var(--papel-linea); margin-top: 0.6rem; padding-top: 1.1rem; }
.feedback-title { font-family: var(--f-marca); font-weight: 600; font-size: 1.15rem; color: var(--recompensa); margin-bottom: 0.35rem; }
.feedback-text { color: var(--papel-suave); }
.mission-reset { font: 600 1rem var(--f-texto); color: var(--papel); background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: 0.2em; cursor: pointer; }

@media (max-width: 900px) { .mission-grid { grid-template-columns: 1fr; } }

/* Principios */
.principles { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 2rem clamp(1.5rem, 3vw, 2.5rem); }
.principle { border-top: 2px solid var(--base); padding-top: 1rem; }
.principle h3 { font-size: 1.15rem; margin-bottom: 0.45em; }
.principle p { color: var(--texto-2); font-size: 1.05rem; margin: 0; }

/* Estado del proyecto: secuencia */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.5rem, 3vw, 2.5rem); counter-reset: paso; }
.step { position: relative; padding-top: 2.4rem; }
.step::before { content: ""; position: absolute; top: 10px; left: 24px; right: calc(-1 * clamp(1.5rem, 3vw, 2.5rem)); border-top: 3px dotted var(--linea); }
.step:last-child::before { right: 0; }
.step-node { position: absolute; top: 0; left: 0; width: 23px; height: 23px; border-radius: 50%; border: 3px solid var(--base); background: var(--papel); }
.step--actual .step-node { background: var(--recompensa); }
.step-when { display: inline-block; font-size: 0.95rem; font-weight: 600; margin-bottom: 0.4rem; color: var(--texto-2); }
.step--actual .step-when { color: var(--texto); }
.step h3 { font-size: 1.2rem; }
.step p { color: var(--texto-2); font-size: 1.05rem; }

@media (max-width: 760px) {
  .steps { grid-template-columns: 1fr; gap: 0; }
  .step { padding: 0 0 1.75rem 2.75rem; }
  .step::before { top: 26px; left: 10px; right: auto; bottom: 0; border-top: 0; border-left: 3px dotted var(--linea); }
  .step:last-child::before { display: none; }
}

/* Llamada final */
.cta-final h2 { max-width: 22ch; }
.cta-options { display: flex; flex-wrap: wrap; gap: 2rem 3rem; margin-top: 2rem; }
.cta-option { max-width: 380px; }
.cta-option h3 { font-size: 1.15rem; }

/* Preguntas frecuentes */
.faq { max-width: 760px; }
.faq details { border-bottom: 1px solid var(--linea); }
.faq details:first-of-type { border-top: 1px solid var(--linea); }
.faq summary {
  list-style: none; cursor: pointer; position: relative;
  font-family: var(--f-marca); font-weight: 600; font-size: 1.1rem; line-height: 1.35;
  padding: 1.15rem 2.5rem 1.15rem 0;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0.25rem; top: 1rem; font-size: 1.5rem; font-weight: 600; color: var(--accion); }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { color: var(--texto-2); padding-bottom: 0.5rem; }

/* Páginas de perfil */
.page-hero { padding-block: clamp(3rem, 7vw, 5.5rem); border-bottom: 1px solid var(--linea); }
.page-hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.page-hero h1 { font-size: clamp(2.3rem, 1.4rem + 3.4vw, 3.9rem); letter-spacing: -0.035em; line-height: 1.05; max-width: 16ch; }
.who { font-family: var(--f-marca); font-weight: 600; font-size: 1rem; margin: 0 0 1.25rem; display: inline-flex; align-items: center; gap: 0.55rem; }
.who::before { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 3px solid; }
.who--empresas::before { border-color: var(--accion); }
.who--candidatos::before { border-color: var(--progreso); }

.cta-panel { border: 2px solid; border-radius: 18px; padding: clamp(1.25rem, 3vw, 1.75rem); background: var(--papel); }
.cta-panel--empresas { border-color: var(--accion); }
.cta-panel--candidatos { border-color: var(--progreso); }
.cta-panel h2 { font-size: 1.3rem; letter-spacing: -0.015em; }
.cta-panel ul { margin: 0 0 1.5rem; padding-left: 1.1rem; color: var(--texto-2); font-size: 1.05rem; }
.cta-panel li { margin-bottom: 0.35rem; }
.cta-panel .btn { width: 100%; }
.cta-panel .fine { font-size: 0.95rem; color: var(--texto-2); margin: 0.9rem 0 0; }

@media (max-width: 900px) { .page-hero-grid { grid-template-columns: 1fr; } }

.features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.25rem clamp(2rem, 5vw, 4rem); }
.feature { position: relative; padding-left: 2.1rem; }
.feature::before { content: ""; position: absolute; left: 0; top: 0.3rem; width: 14px; height: 14px; border-radius: 50%; border: 3px solid; }
.features--empresas .feature::before { border-color: var(--accion); }
.features--candidatos .feature::before { border-color: var(--progreso); }
.feature h3 { font-size: 1.2rem; margin-bottom: 0.4em; }
.feature p { color: var(--texto-2); font-size: 1.05rem; margin: 0; }

@media (max-width: 760px) { .features { grid-template-columns: 1fr; } }

.note {
  margin-top: 2.5rem; padding: 1rem 1.25rem; max-width: 70ch;
  border-left: 4px solid var(--recompensa); background: #FFF7E0; border-radius: 0 10px 10px 0;
}
.note p { margin: 0; }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4.5rem); }
.split p { color: var(--texto-2); }
@media (max-width: 760px) { .split { grid-template-columns: 1fr; } }

.profiles { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
.profiles li { border: 1.5px solid var(--linea); border-radius: var(--radio); padding: 1rem 1.1rem; font-weight: 600; background: var(--papel); }
.profiles span { display: block; font-weight: 400; color: var(--texto-2); font-size: 1rem; margin-top: 0.2rem; }

/* Texto legal */
.legal { max-width: 760px; }
.legal h2 { font-size: 1.4rem; margin-top: 2rem; }
.legal mark { background: #FFF1C2; color: var(--texto); padding: 0 0.2em; border-radius: 3px; }

/* Pie */
.site-footer { background: var(--base); color: var(--papel-suave); padding-block: 3rem; font-size: 1rem; }
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.5rem 3rem; align-items: start; }
.footer-grid p { margin: 0.75rem 0 0; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.site-footer a { color: var(--papel); }
.site-footer a:hover { color: var(--papel); text-decoration-thickness: 2px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .hero-map .trunk, .hero-map .branch { stroke-dashoffset: 0; }
  .hero-map .stop, .hero-map .end, .hero-map .map-label { opacity: 1; }
}
