/* ==========================================================================
   cijtec.cl — «La línea plana»
   Idea rectora: en todo gráfico de negocio la curva debe subir. Acá plano es
   ganar. La traza recorre la página y solo se dispara donde algo se cayó.
   ========================================================================== */

/* ---------- Tipografías auto-alojadas (variables donde se puede) ---------- */
@font-face { font-family:'Archivo'; font-style:normal; font-weight:100 900; font-display:swap; src:url('fonts/archivo-var.woff2') format('woff2'); }
@font-face { font-family:'Plex'; font-style:normal; font-weight:100 700; font-display:swap; src:url('fonts/ibm-plex-sans-var.woff2') format('woff2'); }
@font-face { font-family:'PlexMono'; font-style:normal; font-weight:400; font-display:swap; src:url('fonts/ibm-plex-mono-400.woff2') format('woff2'); }
@font-face { font-family:'PlexMono'; font-style:normal; font-weight:500; font-display:swap; src:url('fonts/ibm-plex-mono-500.woff2') format('woff2'); }

:root {
  --ink:        #0A1428;
  --ink-deep:   #050D1C;
  --paper:      #FFFFFF;
  --soft:       #F2F5F9;
  --soft-2:     #E8EDF4;
  --rule:       #D7DFE9;
  --rule-soft:  #E7ECF3;
  --muted:      #566579;
  --faint:      #8593A5;

  --cyan:       #0E7FAE;
  --cyan-lt:    #3EC2EE;
  --alarm:      #F2724A;

  --on-dark:      #DCE4EF;
  --on-dark-mute: #8E9CB2;
  --rule-dark:    #1B2842;

  --display: 'Archivo', 'Arial Narrow', Helvetica, sans-serif;
  --body:    'Plex', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono:    'PlexMono', ui-monospace, Consolas, monospace;

  --shell: 1180px;
  --ease:  cubic-bezier(.2,.7,.3,1);

  /* Pico en miniatura para el indice de sintomas. Vuelve a la linea base, como el grande. */
  --spark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 14'%3E%3Cpath d='M0 7H8l2-5 2 10 2-7 2 4 2-2h12' fill='none' stroke='%23000' stroke-width='1.6' stroke-linejoin='round'/%3E%3C/svg%3E");
}

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

html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }

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

.shell { width: 100%; max-width: var(--shell); margin: 0 auto; padding: 0 26px; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--ink); color: #fff; padding: 12px 20px; font-weight: 600;
}
.skip:focus { left: 0; }

/* ---------- Etiquetas y titulares ---------- */
.eyebrow, .label {
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--faint);
}
.label--light { color: var(--cyan-lt); }
.label--alarm { color: var(--alarm); }

h1, h2 {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.02;
  text-wrap: balance;
}
h3 { font-family: var(--body); font-weight: 600; font-size: 1.02rem; letter-spacing: -.005em; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 15px 26px;
  background: var(--ink); color: #fff;
  border: 1px solid var(--ink);
  font-family: var(--body); font-size: 15px; font-weight: 600; line-height: 1;
  cursor: pointer;
  transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.btn:hover { background: var(--cyan); border-color: var(--cyan); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--rule); }
.btn--ghost:hover { background: transparent; color: var(--cyan); border-color: var(--cyan); }
.btn--sm { padding: 11px 18px; font-size: 13.5px; }
.btn--block { width: 100%; }

/* ---------- Header ---------- */
.hd {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s var(--ease);
}
.hd.is-stuck { border-bottom-color: var(--rule); }
.hd__in { display: flex; align-items: center; gap: 22px; height: 74px; }
.hd__logo img { height: 34px; width: auto; }

.nav { margin-left: auto; }
.nav ul { display: flex; align-items: center; gap: 24px; }
.nav a { font-size: 14.5px; font-weight: 500; color: var(--muted); transition: color .2s var(--ease); }
.nav a:hover { color: var(--ink); }
.nav__out { color: var(--cyan) !important; font-weight: 600 !important; }

.burger {
  display: none; flex-direction: column; gap: 5px;
  width: 42px; height: 42px; padding: 0 9px;
  background: none; border: none; cursor: pointer;
}
.burger span { display: block; height: 2px; background: var(--ink); transition: transform .25s var(--ease), opacity .2s; }
.burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; }
.burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { padding: 152px 0 0; }
.hero .eyebrow { display: block; margin-bottom: 30px; }

.hero__h {
  font-size: clamp(2.3rem, 5.4vw, 4.3rem);
  font-weight: 700;
  max-width: 21ch;
  margin-bottom: 30px;
}
/* El titular lleva su propia línea plana: el subrayado ES la traza.
   Va como fondo, no como ::after, para que cada línea del texto envuelto
   lleve la suya en vez de un subrayado del ancho del bloque. */
.flat {
  background-image: linear-gradient(var(--cyan), var(--cyan));
  background-repeat: no-repeat;
  background-size: 100% 3px;
  background-position: 0 100%;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  padding-bottom: .08em;
}

.hero__lead {
  max-width: 60ch;
  font-size: clamp(1.05rem, 1.7vw, 1.27rem);
  color: var(--muted);
  margin-bottom: 38px;
}
.hero__lead strong { color: var(--ink); font-weight: 600; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; padding-bottom: 76px; }

/* ---------- La traza ---------- */
.trace { position: relative; margin: 0; }
.trace__svg { display: block; width: 100%; height: 96px; }
.trace__line  { fill: none; stroke: var(--cyan); stroke-width: 2; }
.trace__ticks { fill: none; stroke: var(--rule); stroke-width: 1; }

/* barrido de monitor: prueba de que alguien está mirando ahora */
.trace__sweep {
  position: absolute; top: 26px; left: 0;
  width: 2px; height: 44px;
  background: linear-gradient(to bottom, transparent, var(--cyan-lt), transparent);
  opacity: 0;
}
.js .trace__sweep { animation: sweep 13s linear infinite; }
@keyframes sweep {
  0%   { left: 0;    opacity: 0; }
  6%   { opacity: .85; }
  94%  { opacity: .85; }
  100% { left: 100%; opacity: 0; }
}

.trace__marks {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 20px;
  max-width: var(--shell); margin: 0 auto; padding: 12px 26px 0;
  font-family: var(--mono); font-size: 11px; color: var(--faint);
}
.trace__cap {
  max-width: var(--shell); margin: 0 auto; padding: 22px 26px 0;
  font-family: var(--mono); font-size: 11.5px; color: var(--faint); letter-spacing: .02em;
}

/* ---------- Franja de cobertura ---------- */
.cover {
  display: grid; grid-template-columns: repeat(3, 1fr);
  max-width: var(--shell); margin: 54px auto 0; padding: 0 26px;
  border-top: 1px solid var(--rule);
}
.cover li {
  padding: 18px 20px 18px 0;
  border-bottom: 1px solid var(--rule);
  font-family: var(--mono); font-size: 12px; letter-spacing: .03em;
  color: var(--muted);
}

/* ---------- Indice de sintomas ---------- */
.sx { margin-top: 52px; border-top: 1px solid var(--rule); }

.sx__i { border-bottom: 1px solid var(--rule); }

.sx__i summary {
  display: flex; align-items: center; gap: 18px;
  padding: 20px 0;
  cursor: pointer;
  list-style: none;
  transition: padding-left .22s var(--ease);
}
.sx__i summary::-webkit-details-marker { display: none; }
.sx__i summary:hover { padding-left: 8px; }
.sx__i summary:focus-visible { outline: 2px solid var(--cyan); outline-offset: 4px; }

/* La chispa: un pico en miniatura. Se enciende cuando el sintoma se abre. */
.sx__i summary::before {
  content: "";
  flex: none;
  width: 30px; height: 14px;
  background: currentColor;
  color: var(--rule);
  transition: color .22s var(--ease);
  -webkit-mask: var(--spark) no-repeat center / contain;
  mask: var(--spark) no-repeat center / contain;
}
.sx__i:hover summary::before { color: var(--cyan); }
.sx__i[open] summary::before { color: var(--alarm); }

.sx__q {
  flex: 1;
  font-family: var(--display); font-weight: 600; letter-spacing: -.02em;
  font-size: clamp(1.02rem, 1.9vw, 1.28rem); line-height: 1.25;
  color: var(--ink);
}

/* El signo: + cerrado, — abierto */
.sx__i summary::after {
  content: "+";
  flex: none;
  font-family: var(--mono); font-size: 20px; line-height: 1;
  color: var(--faint);
  transition: color .22s var(--ease);
}
.sx__i[open] summary::after { content: "–"; color: var(--alarm); }
.sx__i:hover summary::after { color: var(--cyan); }

.sx__a { padding: 0 0 26px 48px; max-width: 68ch; }
.sx__a p { font-size: 15.5px; color: var(--muted); margin-bottom: 16px; }
.sx__a em { font-style: italic; color: var(--ink); }

.sx__cta {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--cyan);
  border-bottom: 1px solid currentColor;
  padding-bottom: 3px;
  transition: gap .22s var(--ease);
}
.sx__cta::after { content: "→"; }
.sx__cta:hover { gap: 13px; }

/* ---------- Secciones ---------- */
.sec { padding: 112px 0; }
.sec--soft { background: var(--soft); }
.sec--dark { background: var(--ink-deep); color: var(--on-dark-mute); }
.sec--dark h2, .sec--dark h3 { color: #fff; }

.sec__grid {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}
.sec__grid > .label { padding-top: 9px; }

.prose { max-width: 62ch; }
.prose h2 { font-size: clamp(1.9rem, 4.1vw, 3rem); margin-bottom: 22px; }
.prose p { color: var(--muted); margin-bottom: 18px; }
.prose p:last-child { margin-bottom: 0; }
.prose em { font-style: italic; color: var(--ink); }
.prose--light p { color: var(--on-dark-mute); }
.prose--light em { color: #fff; }

.h2--wide { font-size: clamp(2rem, 5vw, 3.4rem); margin: 14px 0 0; color: #fff; }

/* ---------- El pico ---------- */
.spike { margin: 52px 0 68px; }
.spike__svg { display: block; width: 100%; height: 210px; }
.spike__line { fill: none; stroke: var(--alarm); stroke-width: 2; stroke-linejoin: round; }
.js .spike__line { stroke-dasharray: 2600; stroke-dashoffset: 2600; }
.js .spike__line.is-drawn { animation: draw 1.9s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

.spike__cap {
  max-width: var(--shell); margin: 0 auto; padding: 18px 26px 0;
  font-family: var(--mono); font-size: 11.5px; color: var(--alarm); letter-spacing: .02em;
}

.risks {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  border-top: 1px solid var(--rule-dark);
}
.risk { padding: 30px 26px 30px 0; border-right: 1px solid var(--rule-dark); }
.risk:last-child { border-right: none; padding-right: 0; }
.risk:not(:first-child) { padding-left: 26px; }
.risk h3 { margin-bottom: 9px; font-size: 1rem; }
.risk p { font-size: 14.5px; }

/* ---------- Los cuatro frentes: ficha técnica, no tarjetas ---------- */
.fronts {
  display: grid; grid-template-columns: repeat(2, 1fr);
  margin-top: 56px;
  border-top: 1px solid var(--rule);
}
.front {
  padding: 34px 34px 34px 0;
  border-bottom: 1px solid var(--rule);
  border-right: 1px solid var(--rule);
}
.front:nth-child(even) { padding-right: 0; padding-left: 34px; border-right: none; }
.front__tag {
  font-family: var(--mono); font-size: 11px; font-weight: 500;
  letter-spacing: .11em; text-transform: uppercase; color: var(--cyan);
  margin-bottom: 16px;
}
.front__q {
  font-family: var(--display); font-weight: 600; letter-spacing: -.02em;
  font-size: clamp(1.15rem, 2.1vw, 1.5rem); line-height: 1.15;
  margin-bottom: 12px; text-wrap: balance;
}
.front__d { font-size: 15px; color: var(--muted); max-width: 46ch; }

/* ---------- El caso ---------- */
.case {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 0; margin-top: 48px;
  border-top: 1px solid var(--rule);
}
.case__col { padding: 32px 36px 34px 0; }
.case__col--real {
  padding: 32px 0 34px 36px;
  border-left: 1px solid var(--rule);
}
.case__label {
  font-family: var(--mono); font-size: 11px; font-weight: 500;
  letter-spacing: .11em; text-transform: uppercase; color: var(--faint);
  margin-bottom: 16px;
}
.case__label--real { color: var(--cyan); }
.case__text { color: var(--muted); font-size: 15.5px; margin-bottom: 16px; }
.case__text strong { color: var(--ink); font-weight: 600; }

.reads { margin: 20px 0; border-top: 1px solid var(--rule-soft); }
.reads li {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 10px 0; border-bottom: 1px solid var(--rule-soft);
  font-family: var(--mono); font-size: 12.5px;
}
.reads li span:first-child { color: var(--faint); }
.reads li span:last-child { color: var(--ink); font-weight: 500; font-variant-numeric: tabular-nums; }

.case__verdict {
  font-family: var(--display); font-weight: 600; font-size: 1.1rem;
  letter-spacing: -.02em; color: var(--ink);
}

.punch {
  max-width: 30ch;
  margin: 62px 0 18px;
  font-family: var(--display); font-weight: 700;
  font-size: clamp(1.5rem, 3.4vw, 2.4rem); line-height: 1.14; letter-spacing: -.03em;
  border-left: 3px solid var(--cyan); padding-left: 26px;
  text-wrap: balance;
}
.case__note { font-family: var(--mono); font-size: 11.5px; color: var(--faint); padding-left: 29px; }

/* ---------- Para quién ---------- */
.fit {
  display: grid; grid-template-columns: 1fr 1fr;
  margin-top: 52px; border-top: 1px solid var(--rule);
}
.fit__col { padding: 32px 36px 8px 0; }
.fit__col--no { padding: 32px 0 8px 36px; border-left: 1px solid var(--rule); }
.fit__head {
  font-family: var(--mono); font-size: 11px; font-weight: 500;
  letter-spacing: .11em; text-transform: uppercase; margin-bottom: 20px;
}
.fit__col--yes .fit__head { color: var(--cyan); }
.fit__col--no  .fit__head { color: var(--faint); }
.fit li {
  position: relative; padding: 0 0 16px 26px;
  font-size: 15.5px; color: var(--muted);
}
.fit li::before {
  position: absolute; left: 0; top: 0;
  font-family: var(--mono); font-size: 14px; line-height: 1.6;
}
.fit__col--yes li::before { content: "+"; color: var(--cyan); }
.fit__col--no  li::before { content: "–"; color: var(--faint); }

/* ---------- Método: pasos sobre la misma línea ---------- */
.steps {
  display: grid; grid-template-columns: repeat(4, 1fr);
  max-width: var(--shell); margin: 62px auto 0; padding: 0 26px;
  position: relative;
}
.steps::before {
  content: ""; position: absolute; left: 26px; right: 26px; top: 7px;
  height: 1px; background: var(--rule-dark);
}
.steps li { position: relative; padding: 30px 26px 0 0; }
.steps li::before {
  content: ""; position: absolute; left: 0; top: 3px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--cyan-lt);
}
.steps__n {
  display: block; font-family: var(--mono); font-size: 11.5px; font-weight: 500;
  letter-spacing: .1em; color: var(--cyan-lt); margin-bottom: 10px;
}
.steps h3 { font-size: .98rem; margin-bottom: 7px; }
.steps p { font-size: 14px; color: var(--on-dark-mute); }

/* ---------- Contacto ---------- */
.contact { display: grid; grid-template-columns: 1fr 460px; gap: 68px; align-items: start; }
.contact__intro .label { display: block; margin-bottom: 14px; }
.contact__intro h2 { font-size: clamp(1.9rem, 4.1vw, 3rem); margin-bottom: 22px; }
.contact__lead { color: var(--muted); max-width: 52ch; margin-bottom: 16px; }

.chans { margin-top: 34px; border-top: 1px solid var(--rule); }
.chan {
  display: flex; align-items: baseline; gap: 18px;
  padding: 17px 0; border-bottom: 1px solid var(--rule);
  transition: padding-left .2s var(--ease);
}
.chan:hover { padding-left: 8px; }
.chan__k {
  font-family: var(--mono); font-size: 11px; letter-spacing: .11em;
  text-transform: uppercase; color: var(--faint); min-width: 92px;
}
.chan__v { font-size: 16px; font-weight: 500; }
.chan:hover .chan__v { color: var(--cyan); }

.form { background: var(--soft); padding: 34px 32px; }
.form__note { font-family: var(--mono); font-size: 11.5px; color: var(--faint); margin-bottom: 24px; line-height: 1.6; }

.f { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; }
.f label { font-size: 13.5px; font-weight: 600; }
.f input, .f select, .f textarea {
  width: 100%; padding: 13px 14px;
  background: #fff; border: 1px solid var(--rule);
  font-size: 15px;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.f input::placeholder, .f textarea::placeholder { color: var(--faint); }
.f input:focus, .f select:focus, .f textarea:focus {
  outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(14,127,174,.14);
}
.f textarea { resize: vertical; min-height: 96px; }
.f.err input, .f.err select, .f.err textarea { border-color: #C4482A; box-shadow: 0 0 0 3px rgba(196,72,42,.12); }

.form__status { margin-top: 14px; font-size: 14px; font-weight: 500; min-height: 21px; }
.form__status.bad { color: #A93A20; }
.form__status.ok  { color: #0E7FAE; }

/* ---------- Footer ---------- */
.ft { background: var(--ink-deep); color: var(--on-dark-mute); padding: 62px 0 0; }
.ft__also {
  display: grid; grid-template-columns: 1fr auto; gap: 24px 48px; align-items: baseline;
  padding-bottom: 34px; border-bottom: 1px solid var(--rule-dark);
  font-size: 15px;
}
.ft__also strong { color: #fff; font-weight: 600; }
.ft__also a { color: var(--cyan-lt); font-weight: 500; }
.ft__also a:hover { text-decoration: underline; }

.ft__end { display: grid; gap: 20px; padding-top: 34px; padding-bottom: 56px; }
.ft__logo { height: 30px; width: auto; opacity: .9; }
.ft__links { display: flex; flex-wrap: wrap; gap: 10px 30px; font-size: 14.5px; }
.ft__links a:hover { color: var(--cyan-lt); }
.ft__legal { font-family: var(--mono); font-size: 11.5px; color: #63718A; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .contact { grid-template-columns: 1fr; gap: 48px; }
  .cover { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); row-gap: 34px; }
  .steps::before { display: none; }
}

@media (max-width: 860px) {
  .burger { display: flex; }
  .hd .btn--sm { display: none; }
  .nav {
    position: fixed; inset: 74px 0 auto 0;
    background: #fff; border-bottom: 1px solid var(--rule);
    max-height: 0; overflow: hidden; transition: max-height .35s var(--ease);
  }
  .nav.is-open { max-height: 78vh; overflow-y: auto; }
  .nav ul { flex-direction: column; align-items: stretch; gap: 0; padding: 6px 26px 20px; }
  .nav li { border-bottom: 1px solid var(--rule-soft); }
  .nav li:last-child { border-bottom: none; }
  .nav a { display: block; padding: 15px 0; font-size: 16px; }

  .sec { padding: 78px 0; }
  .sec__grid { grid-template-columns: 1fr; gap: 16px; }
  .sec__grid > .label { padding-top: 0; }

  .fronts, .case, .fit { grid-template-columns: 1fr; }
  .front, .front:nth-child(even) { padding: 28px 0; border-right: none; }
  .case__col, .case__col--real, .fit__col, .fit__col--no {
    padding: 28px 0; border-left: none;
  }
  .case__col--real, .fit__col--no { border-top: 1px solid var(--rule); }
  .risks { grid-template-columns: 1fr; }
  .risk, .risk:not(:first-child) {
    padding: 24px 0; border-right: none; border-bottom: 1px solid var(--rule-dark);
  }
  .risk:last-child { border-bottom: none; }

  .hero { padding-top: 120px; }
  .hero__cta { padding-bottom: 54px; }
  .hero__cta .btn { flex: 1 1 100%; }
  .cover { margin-top: 36px; grid-template-columns: 1fr; }
  .cover li { padding: 14px 0; }
  .hero__h { max-width: none; }
  .sx__i summary { gap: 12px; }
  .sx__i summary::before { width: 22px; }
  .sx__a { padding-left: 34px; }
  .trace__marks li:nth-child(n+4) { display: none; }
  .spike__svg { height: 150px; }
  .punch { padding-left: 20px; margin-top: 44px; }
  .case__note { padding-left: 23px; }
  .ft__also { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .js .trace__sweep { display: none; }
  .js .spike__line { stroke-dashoffset: 0; }
}
