/* Landing de Gateway. Sin estilos en línea ni scripts: la CSP del gateway solo permite esta hoja,
   las imágenes y las fuentes propias.
   Paleta: verde pino (marca), ámbar (acento, solo donde hay que actuar) y papel frío.
   Tipografía: Bricolage Grotesque (titulares) + Instrument Sans (texto), autoalojadas. */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/fonts/bricolage.woff2") format("woff2");
  font-weight: 500 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Instrument Sans";
  src: url("/fonts/instrument.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #10201c;
  --paper: #f6f7f4;
  --pine: #0e5a4e;
  --pine-deep: #0a3f37;
  --amber: #ffc21a;
  --mist: #e8eee9;
  --line: #d3dbd5;
  --muted: #4f5f59;
  --ok: #0e7a4f;
  --ok-bg: #d9f1e4;
  --wait: #8a5a00;
  --wait-bg: #fff0c4;
  --idle: #4f5f59;
  --idle-bg: #e4e9e5;

  --display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --text: "Instrument Sans", "Segoe UI", system-ui, sans-serif;
  --gutter: max(20px, calc((100vw - 1160px) / 2));
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 76px; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.65 var(--text);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: var(--pine); }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }

:focus-visible { outline: 3px solid var(--pine); outline-offset: 3px; border-radius: 4px; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 30; background: var(--ink); color: #fff;
  padding: 10px 16px; border-radius: 8px; text-decoration: none;
}
.skip:focus { top: 12px; }

/* ── Cabecera ───────────────────────────────────────────────────────────── */

.top { position: sticky; top: 0; z-index: 20; background: rgb(246 247 244 / 94%); border-bottom: 1px solid var(--line); backdrop-filter: blur(8px); }
.top-row { display: flex; justify-content: space-between; align-items: center; padding: 12px var(--gutter); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font: 700 21px/1 var(--display); letter-spacing: -0.01em; }
.menu { display: flex; align-items: center; gap: 26px; }
.menu a:not(.btn) { color: var(--ink); text-decoration: none; font-size: 15px; font-weight: 500; }
.menu a:not(.btn):hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; text-decoration-color: var(--amber); }

/* ── Botones ────────────────────────────────────────────────────────────── */

.btn {
  display: inline-block; padding: 14px 26px; border-radius: 10px; text-decoration: none;
  font: 600 16px/1.2 var(--text); border: 2px solid transparent; transition: background-color 0.15s, color 0.15s;
}
.btn-sm { padding: 10px 18px; font-size: 15px; }
.btn-pine { background: var(--pine); color: #fff; }
.btn-pine:hover { background: var(--pine-deep); }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: #000; }
.textlink { font-weight: 600; color: var(--ink); text-decoration: underline; text-decoration-thickness: 3px; text-decoration-color: var(--amber); text-underline-offset: 6px; }
.textlink:hover { text-decoration-color: var(--pine); }

/* ── Inicio ─────────────────────────────────────────────────────────────── */

.hero { padding: 84px 0 0; }
.hero-row { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); gap: 72px; align-items: center; padding: 0 var(--gutter); }
.kicker { font-size: 15px; font-weight: 600; color: var(--pine); margin-bottom: 18px; }
h1 { font: 700 clamp(38px, 5.6vw, 70px)/1.02 var(--display); letter-spacing: -0.03em; max-width: 14ch; text-wrap: balance; }
.lead { margin-top: 26px; font-size: 20px; line-height: 1.6; color: var(--muted); max-width: 48ch; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 30px; margin-top: 36px; }

.live { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 22px 24px 18px; box-shadow: 0 24px 50px -28px rgb(16 32 28 / 35%); }
.live-head { display: flex; align-items: center; gap: 10px; font: 700 15px/1 var(--display); padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.live-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px var(--ok-bg); }
.live-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 15px 0; border-bottom: 1px solid var(--mist); }
.live-list li:last-child { border-bottom: 0; }
.live-name { font-weight: 500; }
.live figcaption { margin-top: 6px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 13px; line-height: 1.5; color: var(--muted); }

.chip { display: inline-block; padding: 4px 11px; border-radius: 50px; font: 600 13px/1.3 var(--text); font-style: normal; white-space: nowrap; }
.chip.ok { background: var(--ok-bg); color: var(--ok); }
.chip.wait { background: var(--wait-bg); color: var(--wait); }
.chip.idle { background: var(--idle-bg); color: var(--idle); }

/* Riel: tu sistema → Gateway → bancos */
.rail { display: flex; align-items: center; gap: 0; margin: 76px var(--gutter) 0; padding: 22px 0 0; }
.rail-node { flex: none; display: inline-flex; align-items: center; gap: 10px; padding: 12px 20px; border: 2px solid var(--ink); border-radius: 12px; background: var(--paper); font: 700 16px/1 var(--display); }
.rail-core { background: var(--pine); border-color: var(--pine); color: #fff; }
.rail-line { flex: 1 1 auto; height: 0; border-top: 3px dashed var(--amber); min-width: 24px; }

/* ── Bloques ────────────────────────────────────────────────────────────── */

.block { padding: 112px 0; }
.alt { background: var(--mist); }
.split { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 72px; padding: 0 var(--gutter); align-items: start; }
.split-head { position: sticky; top: 100px; }
h2 { font: 700 clamp(28px, 3.4vw, 42px)/1.08 var(--display); letter-spacing: -0.025em; text-wrap: balance; }
.split-head p { margin-top: 16px; color: var(--muted); max-width: 34ch; }
h3 { font: 700 20px/1.25 var(--display); letter-spacing: -0.01em; }

.rows li { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 6fr); gap: 8px 36px; padding: 24px 0; border-top: 1px solid var(--line); }
.rows li:last-child { border-bottom: 1px solid var(--line); }
.rows p { color: var(--muted); }

/* ── Acompañamiento ─────────────────────────────────────────────────────── */

.care-head { padding: 0 var(--gutter); max-width: calc(760px + 2 * var(--gutter)); }
.care-head p { margin-top: 18px; color: var(--muted); font-size: 19px; max-width: 60ch; }
.care { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin: 48px var(--gutter) 0; }
.care li { background: var(--paper); border-left: 4px solid var(--pine); border-radius: 4px 14px 14px 4px; padding: 24px 26px 26px; }
.care li p { margin-top: 8px; color: var(--muted); }
.care-note { margin: 36px var(--gutter) 0; font: 600 18px/1.5 var(--display); color: var(--pine); max-width: 60ch; }

/* ── Control (bloque oscuro) ────────────────────────────────────────────── */

.control { background: var(--pine); color: #f1f6f3; padding: 112px 0; }
.control h2 { color: #fff; }
.control .split-head p { color: rgb(241 246 243 / 78%); }
.points { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 48px; }
.points li { padding-top: 20px; border-top: 3px solid var(--amber); }
.points h3 { color: #fff; }
.points p { margin-top: 8px; color: rgb(241 246 243 / 80%); font-size: 16px; }

/* ── Panel ──────────────────────────────────────────────────────────────── */

.panel-row { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 80px; align-items: center; padding: 0 var(--gutter); }
.shot { background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; box-shadow: 0 30px 60px -34px rgb(16 32 28 / 40%); }
.shot-bar { display: flex; gap: 7px; padding: 12px 16px; background: var(--mist); border-bottom: 1px solid var(--line); }
.shot-bar i { width: 10px; height: 10px; border-radius: 50%; background: #b9c5be; }
.shot-body { display: grid; grid-template-columns: 150px minmax(0, 1fr); min-height: 270px; }
.shot-side { background: var(--ink); padding: 18px 14px; display: flex; flex-direction: column; gap: 4px; }
.shot-side b { color: #fff; font: 700 15px/1 var(--display); padding: 0 8px 14px; }
.shot-side span { color: #b9c9c2; font-size: 14px; padding: 8px; border-radius: 8px; }
.shot-side span.on { background: var(--pine); color: #fff; }
.shot-main { padding: 18px 20px; }
.shot-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.shot-kpi { border: 1px solid var(--line); border-top: 3px solid var(--pine); border-radius: 8px; padding: 10px; display: grid; gap: 7px; }
.shot-kpi.out { border-top-color: var(--amber); }
.k-line { display: block; height: 6px; width: 50%; background: #cfd8d2; border-radius: 3px; }
.k-val { display: block; height: 12px; width: 75%; background: var(--ink); border-radius: 3px; }
.shot-chart { display: flex; align-items: flex-end; gap: 5px; height: 78px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.shot-chart .b { flex: 1; background: var(--pine); border-radius: 2px 2px 0 0; display: block; }
.h30 { height: 30%; } .h35 { height: 35%; } .h40 { height: 40%; } .h45 { height: 45%; } .h50 { height: 50%; } .h55 { height: 55%; } .h60 { height: 60%; } .h65 { height: 65%; } .h70 { height: 70%; } .h75 { height: 75%; } .h85 { height: 85%; } .h90 { height: 90%; }
.shot-line { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 0; border-top: 1px solid var(--mist); }
.shot-line span { display: block; height: 10px; border-radius: 4px; background: #cfd8d2; }
.w45 { width: 45%; } .w50 { width: 50%; } .w60 { width: 60%; } .w70 { width: 70%; }

.panel-copy .lead-dark { margin-top: 16px; color: var(--muted); max-width: 42ch; }
.plain { margin-top: 28px; }
.plain li { padding: 14px 0 14px 20px; border-top: 1px solid var(--line); position: relative; }
.plain li:last-child { border-bottom: 1px solid var(--line); }
.plain li::before { content: ""; position: absolute; left: 0; top: 26px; width: 8px; height: 8px; border-radius: 2px; background: var(--amber); }

/* ── Pasos ──────────────────────────────────────────────────────────────── */

.steps { counter-reset: s; position: relative; }
.steps::before { content: ""; position: absolute; left: 21px; top: 20px; bottom: 20px; width: 2px; background: var(--pine); opacity: 0.35; }
.steps li { position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 24px; padding: 0 0 36px; }
.steps li:last-child { padding-bottom: 0; }
.num { position: relative; width: 44px; height: 44px; border-radius: 50%; background: var(--pine); color: #fff; display: inline-flex; align-items: center; justify-content: center; font: 700 19px/1 var(--display); }
.steps p { margin-top: 6px; color: var(--muted); max-width: 52ch; }

/* ── Preguntas ──────────────────────────────────────────────────────────── */

.faqs { border-bottom: 1px solid var(--line); }
.faq { border-top: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 22px 48px 22px 0; position: relative; font: 700 19px/1.35 var(--display); letter-spacing: -0.01em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); font: 500 28px/1 var(--text); color: var(--pine); }
.faq[open] summary::after { content: "–"; }
.faq summary:hover { color: var(--pine); }
.faq p { padding: 0 48px 24px 0; color: var(--muted); max-width: 60ch; }

/* ── Contacto y pie ─────────────────────────────────────────────────────── */

.cta { background: var(--amber); color: var(--ink); padding: 96px 0; }
.cta-row { padding: 0 var(--gutter); }
.cta h2 { font-size: clamp(32px, 4.6vw, 58px); max-width: 16ch; }
.cta p { margin: 18px 0 32px; font-size: 19px; max-width: 46ch; }

.foot { background: var(--ink); color: #b9c9c2; padding: 32px 0; font-size: 14.5px; }
.foot-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 14px 40px; padding: 0 var(--gutter); }
.foot-brand { display: flex; align-items: center; gap: 12px; }
.foot-brand strong { color: #fff; }
.foot a { color: var(--amber); text-underline-offset: 3px; }

/* ── Pantallas pequeñas ─────────────────────────────────────────────────── */

@media (max-width: 1000px) {
  .hero { padding-top: 56px; }
  .hero-row, .split, .panel-row { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .split-head { position: static; }
  .block, .control { padding: 76px 0; }
  .points { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .care { grid-template-columns: minmax(0, 1fr); }
  .menu a:not(.btn) { display: none; }
  .rail { margin-top: 56px; }
}

@media (max-width: 620px) {
  .top-row { padding-left: 20px; padding-right: 20px; }
  .rows li { grid-template-columns: minmax(0, 1fr); }
  .lead { font-size: 18px; }
  .rail { flex-direction: column; align-items: flex-start; gap: 0; }
  .rail-line { flex: none; height: 28px; min-width: 0; border-top: 0; border-left: 3px dashed var(--amber); margin-left: 28px; }
  .shot-body { grid-template-columns: 110px minmax(0, 1fr); }
  .shot-side span { font-size: 13px; padding: 7px 6px; }
  .cta, .foot { padding-top: 64px; }
  .foot { padding-top: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
