@import url('/css/fonts.css');

/* ======================================================================
   BBK Bootcamps · Kiosco
   Sistema visual calcado de bbkbootcamps.thebridge.tech:
   fondo blanco, texto negro, ROJO de marca y titulares en serif.
   ====================================================================== */
:root {
  /* Superficies */
  --bg:        #ffffff;
  --bg-2:      #f6f6f7;
  --panel:     #ffffff;
  --panel-2:   #f4f4f6;
  --line:      #e4e4e9;
  --line-2:    #cdcdd5;

  /* Tinta */
  --ink:       #111114;   /* negro de texto */
  --muted:     #55555e;   /* secundario legible */
  --faint:     #6E6E78;   /* terciario */

  /* Marca */
  --brand:      #EF3340;  /* rojo (fondos, barras, cifras grandes) */
  --brand-deep: #B01C27;  /* rojo oscuro: SOLO para texto pequeño sobre blanco */
  --brand-soft: #FDECEE;  /* tinte rojo muy claro */
  --brand-ink:  #ffffff;  /* texto sobre rojo */
  --black:      #111114;  /* botón principal, como en la web */

  --ok:   #14713F;
  --err:  #B01C27;

  --accent: var(--brand); /* se sobreescribe por pantalla de reto */

  --display: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --body:    'Inter', system-ui, -apple-system, sans-serif;
  --mono:    'JetBrains Mono', ui-monospace, monospace;

  --r:    12px;
  --r-lg: 18px;
  --maxw: 880px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

body {
  font-family: var(--body);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow: hidden;               /* kiosco: sin scroll de página */
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

/* ------------------------------- Marca -------------------------------- */
/* El logo es una imagen: basta con dejar el oficial en public/assets/ */
.brand { display: inline-flex; align-items: center; gap: .8rem; }
.brand .logo { height: 38px; width: auto; display: block; }
.brand small {
  display: block; font-family: var(--mono); font-weight: 400; font-size: .6rem;
  letter-spacing: .18em; color: var(--muted); text-transform: uppercase;
  border-left: 1px solid var(--line-2); padding-left: .8rem;
}

/* Antetítulo rojo con la rayita, como los destacados de la web */
.eyebrow {
  font-family: var(--body); font-weight: 600; font-size: .76rem; letter-spacing: .16em;
  text-transform: uppercase; color: var(--brand-deep);
  display: inline-flex; align-items: center; gap: .55rem;
}
.eyebrow::before { content: ''; width: 26px; height: 3px; background: var(--brand); display: inline-block; }

/* Titulares serif + subrayado rojo (recurso de la landing) */
h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: -.01em; }
.underline-brand { position: relative; padding-bottom: .5rem; }
.underline-brand::after { content: ''; position: absolute; left: 0; bottom: 0; width: 88px; height: 4px; background: var(--brand); }

/* ----------------------------- Botones -------------------------------- */
.btn {
  font-family: var(--body); font-weight: 600; font-size: 1.02rem;
  border: 1px solid var(--line-2); background: var(--panel); color: var(--ink);
  border-radius: 999px; padding: .95rem 1.7rem; cursor: pointer;
  transition: transform .12s ease, border-color .18s ease, background .18s ease;
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
}
.btn:active { transform: scale(.97); }
.btn:hover { border-color: var(--ink); }
/* Principal = pastilla negra con texto blanco (idéntico a la web) */
.btn.primary { background: var(--black); color: #fff; border-color: var(--black); }
.btn.primary:hover { background: #000; }
.btn.brand { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); font-weight: 700; }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.block { width: 100%; }
.btn:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; }

/* ================================ TABLET ============================== */
#app {
  position: relative; z-index: 2;
  height: 100dvh; width: 100%;
  display: flex; flex-direction: column; align-items: center;
  padding: clamp(1rem, 3vw, 2rem);
}
.screen {
  width: 100%; max-width: var(--maxw); margin: auto;
  display: none; flex-direction: column; gap: 1.4rem;
  animation: rise .4s cubic-bezier(.2,.7,.2,1) both;
}
.screen.active { display: flex; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.topbar {
  position: absolute; top: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: clamp(1rem, 3vw, 1.5rem) clamp(1rem, 3vw, 2rem); z-index: 5;
  border-bottom: 1px solid var(--line); background: var(--bg);
}
.topbar .who { font-family: var(--mono); font-size: .8rem; color: var(--muted); }
.topbar .who b { color: var(--brand-deep); }

/* --- Atracción --- */
#screen-attract { text-align: center; align-items: center; gap: 1.6rem; padding-top: 5.5rem; }
#screen-attract h1 {
  font-family: var(--display); font-weight: 700; letter-spacing: -.02em;
  font-size: clamp(2.4rem, 8vw, 4.2rem); line-height: 1.04;
}
#screen-attract h1 .hl { color: var(--brand); }
#screen-attract p.lead { color: var(--muted); font-size: clamp(1rem, 2.4vw, 1.2rem); max-width: 40ch; line-height: 1.55; }
.pulse { animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.hint { font-family: var(--mono); font-size: .8rem; color: var(--faint); letter-spacing: .08em; }
.badges { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; }
.badge {
  font-family: var(--body); font-weight: 500; font-size: .78rem; color: var(--muted);
  border: 1px solid var(--line); border-radius: 999px; padding: .42rem .9rem; background: var(--panel-2);
}

/* La pantalla de bienvenida imita el hero rojo de la web (si el navegador
   soporta :has()). Si no, se queda en blanco/negro: legible igualmente. */
body:has(#screen-attract.active) { background: var(--brand); }
body:has(#screen-attract.active) #screen-attract h1,
body:has(#screen-attract.active) #screen-attract h1 .hl { color: #fff; }
body:has(#screen-attract.active) #screen-attract p.lead { color: rgba(255,255,255,.92); }
body:has(#screen-attract.active) .hint { color: rgba(255,255,255,.78); }
body:has(#screen-attract.active) .eyebrow { color: #fff; }
body:has(#screen-attract.active) .eyebrow::before { background: #fff; }
body:has(#screen-attract.active) .badge { color: #fff; border-color: rgba(255,255,255,.5); background: rgba(255,255,255,.14); }
/* La barra superior es SIEMPRE blanca, como la navegación de la web,
   también sobre el hero rojo. */
body:has(#screen-attract.active) .btn.primary { background: var(--black); color: #fff; border-color: var(--black); }

/* --- Entrada de alias --- */
.alias-field {
  width: 100%; font-family: var(--mono); font-size: 1.5rem; text-align: center; letter-spacing: .12em;
  color: var(--ink); background: var(--panel); border: 1.5px solid var(--line-2);
  border-radius: var(--r); padding: 1.1rem; text-transform: uppercase;
}
.alias-field::placeholder { color: var(--faint); }
.alias-field:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(239,51,64,.18); }

/* --- Hub / home --- */
.hub-head { display: flex; flex-direction: column; gap: .5rem; }
.hub-head h2 { font-size: clamp(1.7rem, 4.2vw, 2.3rem); }
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.card {
  --c: var(--brand);
  position: relative; overflow: hidden; cursor: pointer; text-align: left;
  border: 1px solid var(--line); background: var(--panel);
  border-radius: var(--r-lg); padding: 1.35rem; min-height: 172px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 1rem;
  transition: transform .14s ease, border-color .18s ease, box-shadow .18s ease;
}
.card:active { transform: scale(.98); }
.card::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 5px; background: var(--c); }
.card:hover { border-color: var(--line-2); box-shadow: 0 8px 24px -14px rgba(0,0,0,.35); }
.card .ic {
  width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center;
  font-family: var(--mono); font-weight: 700; font-size: 1.15rem;
  color: var(--brand-ink); background: var(--brand);
}
.card h3 { font-size: 1.22rem; }
.card p { font-family: var(--body); color: var(--muted); font-size: .92rem; line-height: 1.4; }
.card .go { font-family: var(--body); font-weight: 600; font-size: .76rem; color: var(--brand-deep); letter-spacing: .1em; display: flex; align-items: center; gap: .4rem; }
.card.done { background: var(--panel-2); }
.card .chk { margin-left: auto; font-family: var(--body); font-weight: 600; font-size: .74rem; color: var(--ok); }

.card.wide { grid-column: 1 / -1; min-height: 0; flex-direction: row; align-items: center; --c: var(--black); }
.card.wide .ic { font-size: 1.3rem; background: var(--black); }
.card.wide .txt { flex: 1; }
.card.wide .arrow { font-size: 1.4rem; color: var(--brand); }

/* --- Reto / Quiz (comparten look) --- */
.q-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.q-title { font-family: var(--display); font-weight: 700; font-size: clamp(1.35rem, 3.5vw, 1.8rem); }
.progress { display: flex; gap: .35rem; }
.progress i { width: 28px; height: 6px; border-radius: 3px; background: var(--line); display: block; }
.progress i.on { background: var(--brand); }

.timer-wrap { display: flex; align-items: center; gap: .7rem; }
.timer { font-family: var(--mono); font-weight: 700; font-size: .9rem; color: var(--ink); min-width: 3ch; text-align: right; }
.timer-bar { flex: 1; height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.timer-bar > i { display: block; height: 100%; width: 100%; background: var(--brand); transform-origin: left; }

.prompt {
  font-family: var(--display); font-weight: 600; font-size: clamp(1.25rem, 3.4vw, 1.7rem);
  line-height: 1.3;
}
.prompt code { font-family: var(--mono); font-weight: 700; font-size: .88em; color: var(--brand-deep); background: var(--panel-2); padding: .12em .4em; border-radius: 6px; }

.options { display: grid; gap: .7rem; }
.opt {
  font-family: var(--body); font-size: 1.05rem; text-align: left; color: var(--ink);
  border: 1.5px solid var(--line); background: var(--panel); border-radius: var(--r);
  padding: 1.05rem 1.2rem; cursor: pointer; display: flex; align-items: center; gap: .9rem;
  transition: transform .1s ease, border-color .15s ease, background .15s ease;
}
.opt:hover { border-color: var(--line-2); }
.opt:active { transform: scale(.985); }
.opt .key {
  font-family: var(--mono); font-weight: 700; font-size: .82rem; color: var(--muted);
  width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center;
  border: 1px solid var(--line-2); flex: none; background: var(--panel);
}
.opt code { font-family: var(--mono); color: var(--brand-deep); }
/* Correcta: rojo de marca + pastilla rellena (no depende sólo del color) */
.opt.correct { border-color: var(--brand); background: var(--brand-soft); }
.opt.correct .key { border-color: var(--brand); background: var(--brand); color: #fff; }
/* Incorrecta: apagada y tachada, distinguible sin depender del color */
.opt.wrong { border-color: var(--line-2); background: var(--panel-2); color: var(--muted); text-decoration: line-through; }
.opt.wrong .key { border-color: var(--muted); color: var(--muted); text-decoration: none; }
.opt[disabled] { cursor: default; }

.explain {
  border-left: 4px solid var(--brand); background: var(--panel-2);
  border-radius: 0 var(--r) var(--r) 0; padding: 1rem 1.15rem; color: var(--muted); line-height: 1.55;
  font-size: .96rem; animation: rise .3s ease both;
}
.explain b { color: var(--ink); }
.explain code { font-family: var(--mono); color: var(--brand-deep); }

/* --- Resultado de reto --- */
.result-hero { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.score-big { font-family: var(--display); font-weight: 700; font-size: clamp(3.4rem, 12vw, 5.6rem); line-height: 1; color: var(--brand); }
.score-big small { display: block; font-family: var(--body); font-weight: 600; font-size: .85rem; color: var(--muted); letter-spacing: .2em; text-transform: uppercase; }
.rank-chip { font-family: var(--body); font-weight: 500; border: 1px solid var(--line-2); border-radius: 999px; padding: .55rem 1.1rem; color: var(--ink); }
.rank-chip b { color: var(--brand-deep); }

/* --- Resultado del test de orientación --- */
.match {
  border: 1px solid var(--line); border-top: 5px solid var(--brand);
  background: var(--panel); border-radius: var(--r-lg); padding: 1.8rem;
  text-align: center; display: flex; flex-direction: column; gap: .8rem; align-items: center;
}
.match .ic { width: 68px; height: 68px; border-radius: 16px; display: grid; place-items: center; font-family: var(--mono); font-weight: 700; font-size: 1.6rem; color: #fff; background: var(--brand); }
.match h2 { font-size: clamp(1.6rem, 4.5vw, 2.2rem); color: var(--ink); }
.match p { font-family: var(--body); color: var(--muted); max-width: 44ch; line-height: 1.55; }

/* --- Formulario de contacto (lead) --- */
.lead form { display: flex; flex-direction: column; gap: .9rem; }
.field label { display: block; font-family: var(--body); font-weight: 600; font-size: .76rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: .4rem; }
.field input {
  width: 100%; font-family: var(--body); font-size: 1.05rem; color: var(--ink);
  background: var(--panel); border: 1.5px solid var(--line-2); border-radius: var(--r); padding: .95rem 1.1rem;
}
.field input::placeholder { color: var(--faint); }
.field input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(239,51,64,.18); }
.consent { display: flex; gap: .7rem; align-items: flex-start; font-size: .86rem; color: var(--muted); line-height: 1.5; }
.consent input { width: 22px; height: 22px; accent-color: var(--brand); flex: none; margin-top: 1px; }
.consent a { color: var(--brand-deep); text-decoration: underline; }
.form-msg { font-family: var(--body); font-weight: 600; font-size: .88rem; min-height: 1.2em; }
.form-msg.err { color: var(--err); }
.form-msg.ok { color: var(--ok); }

.row { display: flex; gap: .8rem; }
.row > * { flex: 1; }

.center { text-align: center; }
.muted { color: var(--muted); }
.stack { display: flex; flex-direction: column; gap: 1rem; }

/* Cierre tras enviar contacto */
.done-hero { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.done-hero .big-check { width: 88px; height: 88px; border-radius: 50%; display: grid; place-items: center; font-size: 2.4rem; color: #fff; background: var(--ok); }

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

/* Tablets pequeñas / móvil */
@media (max-width: 560px) {
  .grid { grid-template-columns: 1fr; }
  .row { flex-direction: column; }
}

/* Logo: versión oscura por defecto, blanca sobre el hero rojo.
   Con las dos en el DOM, si el navegador no soporta :has() se ve la oscura
   sobre fondo blanco (nunca queda un logo blanco sobre blanco). */
/* Tarjeta blanca que envuelve el logo, igual que en el hero de la web:
   el logo oficial (oscuro) se ve perfecto también sobre el rojo. */
.brand-card {
  display: inline-flex; align-items: center; gap: .9rem;
  background: #fff; border-radius: 14px; padding: .85rem 1.3rem;
}
.brand-card .logo { height: 40px; width: auto; display: block; }

