/*
    Gamify Flow — shared stylesheet.

    Dark, and committed to it: the identity is built on the gem glowing against a near-black
    ground, and a light variant would be a different design rather than a tint. Every colour is
    painted explicitly so nothing borrows a value from the visitor's browser.
*/

:root {
  --void:     #04060D;
  --panel:    #0A0F1C;
  --panel-2:  #101728;
  --rule:     #1C2740;

  --ice:      #E6EDFF;
  --dim:      #7E8DAE;

  --cyan:     #22D3EE;
  --blue:     #3B82F6;
  --violet:   #7C3AED;
  --ember:    #FF4A3D;
  --mint:     #45E0B0;

  --display:  "Chakra Petch", "Segoe UI Semibold", system-ui, sans-serif;
  --body:     "IBM Plex Sans", system-ui, -apple-system, sans-serif;
  --mono:     "IBM Plex Mono", ui-monospace, "Cascadia Mono", monospace;

  --measure:  64ch;
  --gutter:   clamp(20px, 5vw, 48px);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--void);
  color: var(--ice);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.62;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

/* Skip link: the site is mostly one long page, and a keyboard user should not
   have to walk the whole nav on every visit. */
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--violet); color: #fff; padding: 12px 18px;
}
.skip:focus { left: 0; }

/* ------------------------------------------------------------------ layout */

.wrap { max-width: 1120px; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.section { padding: clamp(56px, 9vw, 108px) 0; }
.section.alt { background: var(--panel); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }

/* ------------------------------------------------------------------- type */

h1, h2, h3, h4 { font-family: var(--display); font-weight: 700; color: #fff; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(34px, 5.6vw, 60px); line-height: 1.04; letter-spacing: -.01em; }
h2 { font-size: clamp(26px, 3.6vw, 40px); line-height: 1.1; margin-bottom: 16px; }
h3 { font-size: clamp(18px, 2vw, 21px); font-weight: 600; margin-bottom: 8px; }

p { margin: 0 0 16px; max-width: var(--measure); }
p:last-child { margin-bottom: 0; }

.lead { font-size: clamp(17px, 2vw, 20px); color: var(--dim); }
.eyebrow {
  font-family: var(--mono); font-size: 11px; letter-spacing: .2em;
  text-transform: uppercase; color: var(--cyan); margin: 0 0 16px;
}
.muted { color: var(--dim); }

/* ----------------------------------------------------------------- header */

.top {
  position: sticky; top: 0; z-index: 40;
  background: rgba(4, 6, 13, .88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}
.top .bar { display: flex; align-items: center; gap: 26px; padding: 18px 0; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand svg { width: 28px; height: 28px; display: block; }
.brand .name {
  /* 18px y no 16: con la navegacion a 15.5 la marca quedaba casi igual de grande y las dos
     competian. La marca tiene que leerse primero. */
  font-family: var(--display); font-size: 18px; letter-spacing: .1em;
  font-weight: 500; color: #fff; white-space: nowrap;
}
.brand .name b { font-weight: 700; }
/*
    La navegación, legible.

    Estaba a 14px en --dim (#7E8DAE), que sobre este fondo da 6:1 y cumple de sobra el mínimo de
    contraste — y aun así se leía mal. El contraste no es lo único que decide si algo se ve: a ese
    tamaño, con peso 400 y encima de un fondo translúcido con desenfoque, el ojo lo lee como
    decoración y no como el menú.

    Sube a 15.5px, peso 500 y un gris bastante más claro. El subrayado al pasar por encima está
    para lo otro que faltaba: que se note que son enlaces antes de hacer clic.
*/
.top nav { display: flex; gap: 26px; margin-left: auto; align-items: center; }

.top nav a {
  color: #BCC9E8;
  font-size: 15.5px;
  font-weight: 500;
  letter-spacing: .01em;
  /* Vertical, para que el area pulsable llegue a los 44px que pide un dedo sin separar el menu. */
  padding: 11px 0;
  border-bottom: 1.5px solid transparent;
  transition: color .15s ease, border-color .15s ease;
}

.top nav a:hover,
.top nav a:focus-visible {
  color: #fff;
  border-bottom-color: var(--cyan);
  text-decoration: none;
}

@media (max-width: 780px) {
  .top nav a.hide-sm { display: none; }
  /* Con tres enlaces menos sobra sitio: los dos que quedan pueden respirar. */
  .top nav { gap: 22px; }
  .top nav a { font-size: 16px; }
}

/* --------------------------------------------------------------- buttons */

.btn {
  display: inline-block;
  font-family: var(--display); font-weight: 600; font-size: 14px; letter-spacing: .04em;
  padding: 12px 24px; border: 1px solid transparent; cursor: pointer;
  border-radius: 3px; text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn-primary {
  background: linear-gradient(100deg, var(--violet), var(--blue));
  color: #fff; box-shadow: 0 0 26px -8px rgba(124, 58, 237, .9);
}
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { background: transparent; color: var(--ice); border-color: var(--rule); }
.btn-ghost:hover { border-color: var(--dim); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* ------------------------------------------------------------------ cards */

.grid { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(258px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

.card {
  background: var(--void); border: 1px solid var(--rule);
  border-radius: 3px; padding: 24px;
}
.section.alt .card { background: var(--panel-2); }
.card p { color: var(--dim); font-size: 15px; margin-bottom: 0; }
.card .num {
  font-family: var(--mono); font-size: 11px; letter-spacing: .16em;
  color: var(--violet); margin-bottom: 10px; display: block;
}

.feature { border-left: 2px solid var(--violet); padding-left: 16px; }
.feature p { color: var(--dim); font-size: 15px; margin-bottom: 0; }

/* ------------------------------------------------------------------- code */

pre {
  background: var(--panel); border: 1px solid var(--rule); border-radius: 3px;
  padding: 18px 20px; overflow-x: auto; margin: 0;
  font-family: var(--mono); font-size: 13px; line-height: 1.66; color: var(--ice);
}
code { font-family: var(--mono); font-size: .92em; }
p code, li code, td code { background: var(--panel-2); padding: 1px 6px; border-radius: 2px; color: var(--cyan); }
.tok-c { color: var(--dim); }
.tok-k { color: var(--cyan); }
.tok-s { color: var(--mint); }

/* ------------------------------------------------------------------ forms */

.field { display: block; margin-bottom: 16px; }
.field > span {
  display: block; font-family: var(--mono); font-size: 11px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--dim); margin-bottom: 7px;
}
.field input, .field textarea, .field select {
  width: 100%; background: var(--void); color: var(--ice);
  border: 1px solid var(--rule); border-radius: 3px;
  padding: 12px 14px; font-family: var(--body); font-size: 15.5px; font-weight: 300;
}
.field input:focus, .field textarea:focus { border-color: var(--violet); outline: none; }
.field textarea { min-height: 122px; resize: vertical; }

/* The honeypot. Hidden from people and from screen readers, visible to the
   crude bots that fill in every input they find. */
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-note { font-size: 13.5px; color: var(--dim); }
.form-status { margin-top: 14px; font-size: 15px; min-height: 1.6em; }
.form-status.ok { color: var(--mint); }
.form-status.bad { color: var(--ember); }

/* ----------------------------------------------------------------- footer */

footer.site {
  border-top: 1px solid var(--rule); padding: 40px 0 56px;
  color: var(--dim); font-size: 14px;
}
footer.site .cols { display: flex; gap: 40px; flex-wrap: wrap; align-items: flex-start; }
footer.site a { color: var(--dim); }
footer.site a:hover { color: var(--ice); }

/* ------------------------------------------------------------------ misc */

.stat-row { display: flex; gap: 12px; flex-wrap: wrap; }
.stat {
  flex: 1 1 130px; background: var(--panel); border: 1px solid var(--rule);
  border-radius: 3px; padding: 14px 16px;
}
.stat b { display: block; font-family: var(--display); font-size: 22px; color: #fff; line-height: 1.2; }
.stat span { font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }

.scroller { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { text-align: left; padding: 11px 16px 11px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); font-weight: 500; }
td { color: var(--dim); }
td strong { color: var(--ice); font-weight: 500; }

/* ------------------------------------------------------------------ shots */

/*  Capturas del demo. El marco es el mismo que el de una tarjeta: el sitio ya
    tiene un lenguaje de bordes y no hacia falta inventar otro para las imagenes.
    Van a ancho completo porque su unico trabajo es cortar el texto.            */

.shot { margin: 40px 0 0; }

.shot img {
  display: block; width: 100%; height: auto;
  border: 1px solid var(--rule); border-radius: 3px;
  background: var(--panel);
}

.shot figcaption {
  font-family: var(--mono); font-size: 12px; line-height: 1.65;
  color: var(--dim); margin-top: 12px; max-width: 62ch;
}

.shot figcaption b { color: var(--ice); font-weight: 500; }
