/* ==========================================================================
   JILX · jilxco.com — hoja de estilos
   Sin build. Sistema: monocromo cálido (pergamino / grafito) con un solo acento,
   el azul eléctrico del logo. Plano: sin sombras, sin degradados en la UI.
   Tipografía: Space Grotesk 300 para titulares (voz ligera), IBM Plex Mono para
   etiquetas, botones y cifras. Píldoras en botones y nav; tarjetas de 12 px.
   ========================================================================== */

/* ---------- Fuentes (autoalojadas, subconjunto latino) ---------- */
@font-face { font-family: "Space Grotesk"; font-style: normal; font-weight: 300 700; font-display: swap; src: url("/fonts/space-grotesk-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/ibm-plex-mono-400-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/ibm-plex-mono-500-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ---------- Tokens ---------- */
:root {
  --paper: #e9e7e1;      /* lienzo pergamino */
  --bone: #f4f3ef;       /* tarjetas claras */
  --white: #ffffff;
  --ink: #151719;        /* escenario oscuro */
  --ink-2: #1c2024;      /* negro del logo: nav, tarjetas sobre oscuro */
  --ink-3: #0d0e10;      /* footer */
  --text: #16181b;
  --muted: #5f635f;
  --dim: #9a9c94;
  --line: #cfcdc4;
  --line-soft: #dddbd3;
  --line-dark: #2c3036;
  --on-dark: #f3f2ee;
  --on-dark-muted: #b9bcb6;
  --on-dark-dim: #7f837e;
  --acc: #007cfc;        /* azul del logo */
  --acc-2: #02f0ff;      /* cian del logo: solo canvas y detalles */
  --acc-dark: #0062c9;
  --wa: #25d366;
  --font: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --wrap: 1200px;
  --pad: clamp(20px, 4vw, 40px);
  --sec: clamp(80px, 10vw, 128px);
  --r-card: 12px; --r-img: 16px; --r-nav: 64px; --r-in: 6px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
html, body { overflow-x: clip; }
body { margin: 0; background: var(--ink); color: var(--text); font-family: var(--font); font-size: 16px; line-height: 1.55; letter-spacing: -.01em; -webkit-font-smoothing: antialiased; text-wrap: pretty; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 3px; }
h1, h2, h3, h4, p, figure, dl, dd { margin: 0; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
ul, ol { margin: 0; padding: 0; list-style: none; }
.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-link { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 16px; background: var(--acc); color: #fff; border-radius: 999px; font-family: var(--mono); font-size: 12px; }
.skip-link:focus { top: 12px; }

/* ---------- Layout ---------- */
.page { min-height: 100vh; display: flex; flex-direction: column; background: var(--paper); }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; }
.section { padding: var(--sec) var(--pad); background: var(--paper); color: var(--text); }
.section--bone { background: var(--bone); }
.section--ink { background: var(--ink); color: var(--on-dark); }
.section--ink-2 { background: var(--ink-2); color: var(--on-dark); }
.stack { display: flex; flex-direction: column; gap: clamp(40px, 5vw, 64px); }
.stack--sm { gap: 24px; }
.head { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 40px; align-items: end; }
.head__title { display: flex; flex-direction: column; gap: 16px; }
.head__copy { max-width: 56ch; justify-self: end; }
@media (max-width: 860px) { .head { grid-template-columns: 1fr; gap: 20px; } .head__copy { justify-self: start; } }

/* ---------- Tipografía ---------- */
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 12px; font-weight: 400; letter-spacing: .1em; text-transform: uppercase; color: var(--acc); }
.eyebrow--muted { color: var(--muted); }
.section--ink .eyebrow--muted, .on-dark .eyebrow--muted { color: var(--on-dark-dim); }
.display { font-weight: 300; letter-spacing: -.03em; line-height: .95; text-wrap: balance; }
.display--hero { font-size: clamp(46px, 8vw, 104px); line-height: .92; }
.display--lg { font-size: clamp(34px, 4.6vw, 60px); line-height: 1; }
.display--md { font-size: clamp(28px, 3.4vw, 44px); line-height: 1.05; }
.display strong { font-weight: 400; }
.display .acc { color: var(--acc); }
.h3 { font-size: 22px; font-weight: 400; letter-spacing: -.02em; line-height: 1.2; }
.copy { font-size: 16px; line-height: 1.6; color: var(--muted); max-width: 56ch; }
.copy--lg { font-size: clamp(17px, 1.6vw, 20px); line-height: 1.5; }
.copy--sm { font-size: 14px; }
.section--ink .copy, .section--ink-2 .copy, .on-dark .copy { color: var(--on-dark-muted); }
.stat-num { font-family: var(--mono); font-weight: 500; font-size: clamp(36px, 4vw, 52px); line-height: 1; letter-spacing: -.02em; }
.tag { font-family: var(--mono); font-size: 12px; letter-spacing: .04em; color: var(--muted); }
.section--ink .tag, .on-dark .tag { color: var(--on-dark-dim); }

/* ---------- Botones ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 48px; padding: 0 22px; border-radius: 999px; border: 1px solid transparent; font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; transition: background-color .2s ease, color .2s ease, border-color .2s ease; }
.btn--acc { background: var(--acc); color: #fff; }
.btn--acc:hover { background: var(--acc-dark); color: #fff; }
.btn--light { background: var(--bone); color: var(--ink); }
.btn--light:hover { background: var(--acc); color: #fff; }
.btn--ghost { border-color: var(--line-dark); color: var(--on-dark); }
.btn--ghost:hover { border-color: var(--on-dark); color: var(--on-dark); }
.btn--ghost-ink { border-color: var(--text); color: var(--text); }
.btn--ghost-ink:hover { background: var(--text); color: var(--on-dark); }
.btn--lg { height: 56px; padding: 0 28px; }
.btn--sm { height: 40px; padding: 0 18px; font-size: 11px; }
.btn--text { border: 0; color: var(--muted); }
.btn--text:hover { color: var(--text); }
.btn .arr { font-size: 14px; }
.link { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--text); border-bottom: 1px solid var(--line); padding-bottom: 6px; transition: color .2s ease, border-color .2s ease; }
.link:hover { color: var(--acc); border-color: var(--acc); }
.section--ink .link, .on-dark .link { color: var(--on-dark); border-color: var(--line-dark); }
.section--ink .link:hover, .on-dark .link:hover { color: var(--acc-2); border-color: var(--acc-2); }
@media (max-width: 560px) { .btn { width: 100%; } .btn--sm { width: auto; } }

/* ---------- Nav flotante ---------- */
.nav { position: sticky; top: 0; z-index: 40; display: flex; justify-content: center; padding: 20px clamp(12px, 3vw, 32px); pointer-events: none; }
.nav__bar { pointer-events: auto; position: relative; width: 100%; max-width: var(--wrap); display: flex; align-items: center; justify-content: space-between; gap: 20px; background: rgba(28, 32, 36, .88); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); color: var(--on-dark); border-radius: var(--r-nav); padding: 10px 10px 10px 24px; }
.nav__brand { display: inline-flex; align-items: center; }
.nav__brand img { height: 30px; width: auto; }
.nav__menu { display: flex; align-items: center; gap: 24px; font-family: var(--mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.nav__menu > a { color: var(--on-dark-muted); padding: 6px 0; }
.nav__menu > a:hover { color: var(--on-dark); }
.nav__menu .btn { margin-left: 8px; }
.nav__menu .btn--light { color: var(--ink); }
.nav__menu .btn--light:hover { color: #fff; }
.nav__toggle { display: none; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: var(--ink); color: var(--on-dark); position: relative; flex: none; }
.nav__toggle span, .nav__toggle span::before, .nav__toggle span::after { content: ""; position: absolute; left: 12px; width: 20px; height: 2px; background: currentColor; transition: transform .2s ease, background-color .2s ease; }
.nav__toggle span { top: 21px; } .nav__toggle span::before { left: 0; top: -6px; } .nav__toggle span::after { left: 0; top: 6px; }
.nav__toggle[aria-expanded="true"] span { background: transparent; }
.nav__toggle[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }
@media (max-width: 820px) {
  .nav__toggle { display: block; }
  .nav__menu { display: none; position: absolute; left: 0; right: 0; top: calc(100% + 10px); flex-direction: column; align-items: stretch; gap: 0; background: var(--ink-2); border-radius: 24px; padding: 8px 24px 20px; font-size: 14px; }
  .nav__menu.is-open { display: flex; }
  .nav__menu > a { padding: 14px 0; border-bottom: 1px solid var(--line-dark); }
  .nav__menu .btn { margin: 16px 0 0; width: 100%; }
}

/* ---------- Hero ---------- */
.hero { position: relative; background: var(--ink); color: var(--on-dark); padding: clamp(56px, 9vw, 120px) var(--pad) clamp(64px, 8vw, 96px); overflow: hidden; }
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .9; }
.hero__grid { position: relative; display: flex; flex-direction: column; gap: clamp(32px, 4vw, 48px); }
.hero__title { max-width: 14ch; }
.hero__foot { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 40px; align-items: end; }
.hero__actions { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.hero__meta { display: flex; flex-wrap: wrap; gap: 10px 28px; padding-top: 24px; border-top: 1px solid var(--line-dark); font-family: var(--mono); font-size: 12px; letter-spacing: .04em; color: var(--on-dark-dim); }
@media (max-width: 860px) { .hero__foot { grid-template-columns: 1fr; gap: 24px; } }

/* ---------- Capacidades ---------- */
.caps { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.cap { background: var(--bone); border-radius: var(--r-card); padding: 28px; display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.cap__num { font-family: var(--mono); font-size: 12px; letter-spacing: .1em; color: var(--acc); }
.cap ul { display: flex; flex-direction: column; gap: 8px; font-size: 15px; color: var(--muted); }
.cap li { display: flex; gap: 10px; align-items: baseline; }
.cap li::before { content: "—"; font-family: var(--mono); color: var(--dim); flex: none; }

/* ---------- Evidencia (stats) ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line-dark); border: 1px solid var(--line-dark); border-radius: var(--r-card); overflow: hidden; }
.stat { background: var(--ink); padding: 28px 24px; display: flex; flex-direction: column; gap: 10px; }
.stat__label { font-family: var(--mono); font-size: 12px; letter-spacing: .06em; color: var(--on-dark-dim); }
.stat--acc .stat-num { color: var(--acc-2); }
.lifecycle { display: flex; flex-wrap: wrap; gap: 8px; }
.lifecycle li { font-family: var(--mono); font-size: 12px; letter-spacing: .04em; padding: 8px 14px; border: 1px solid var(--line-dark); border-radius: 999px; color: var(--on-dark-muted); }

@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Proceso ---------- */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.step { border-top: 1px solid var(--line); padding-top: 20px; display: flex; flex-direction: column; gap: 12px; }
.step__num { font-family: var(--mono); font-size: 12px; letter-spacing: .1em; color: var(--acc); }

/* ---------- Proyectos ---------- */
.cases { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; }
.case { background: var(--white); border-radius: var(--r-card); padding: 16px 16px 24px; display: flex; flex-direction: column; gap: 20px; color: var(--text); min-width: 0; }
.case__img { border-radius: var(--r-img); overflow: hidden; aspect-ratio: 4 / 3; background: var(--bone); }
.case__img img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform .5s ease; }
.case:hover .case__img img { transform: scale(1.02); }
.case__body { display: flex; flex-direction: column; gap: 12px; padding: 0 8px; }
.case__meta { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: center; }
.case__stack { display: flex; flex-wrap: wrap; gap: 6px; }
.case__stack li { font-family: var(--mono); font-size: 11px; letter-spacing: .04em; padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); }
/* Sectores bajo NDA: texto + carrusel de sectores */
.nda { display: grid; gap: 28px; margin-top: 48px; padding: 36px 0 32px; border-radius: var(--r-card); background: var(--ink-2); color: var(--on-dark); overflow: hidden; }
.nda__head { padding: 0 36px; max-width: 64ch; }
.nda .display { color: var(--on-dark); margin: 10px 0 14px; }
.nda .copy { color: var(--on-dark-muted); }
.marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee__track { display: flex; gap: 10px; width: max-content; list-style: none; margin: 0; padding: 0 5px; animation: marquee 64s linear infinite; }
.marquee--reverse .marquee__track { animation-direction: reverse; animation-duration: 74s; }
.marquee__track li { flex: none; display: inline-flex; align-items: center; gap: 12px; height: 44px; padding: 0 18px; border: 1px solid var(--line-dark); border-radius: 999px; font-family: var(--mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--on-dark); white-space: nowrap; }
.marquee__track li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--acc); }
@keyframes marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee { mask-image: none; -webkit-mask-image: none; } .marquee__track { animation: none; width: auto; flex-wrap: wrap; padding: 0 36px; } }
@media (max-width: 860px) { .nda { padding: 28px 0 24px; } .nda__head { padding: 0 24px; } .marquee__track li { height: 40px; padding: 0 14px; font-size: 11px; } }
.trust { display: flex; flex-wrap: wrap; gap: 16px 40px; align-items: center; padding: 28px 0 0; border-top: 1px solid var(--line); }
.trust img { height: 44px; width: auto; }
.trust__label { font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-right: 8px; }

/* ---------- Contacto ---------- */
.contact { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 64px); align-items: start; }
.contact__rows { display: flex; flex-direction: column; border-top: 1px solid var(--line-dark); }
.contact__row { display: grid; grid-template-columns: 110px 1fr; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line-dark); font-size: 15px; }
.contact__row .tag { padding-top: 2px; }
.contact__row a:hover { color: var(--acc-2); }
.form { display: flex; flex-direction: column; gap: 24px; background: var(--ink-2); padding: clamp(20px, 3vw, 32px); border-radius: var(--r-card); border: 1px solid var(--line-dark); min-width: 0; }
.form__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field > span { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--on-dark-dim); }
.field input, .field textarea { width: 100%; height: 46px; padding: 0 14px; background: var(--ink); border: 1px solid var(--line-dark); border-radius: var(--r-in); color: var(--on-dark); font-size: 15px; min-width: 0; color-scheme: dark; }
.field textarea { height: auto; padding: 12px 14px; min-height: 130px; resize: vertical; line-height: 1.5; }
.field input::placeholder, .field textarea::placeholder { color: var(--on-dark-dim); }
.field input:focus, .field textarea:focus { outline: 2px solid var(--acc); outline-offset: -1px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chips label { position: relative; }
.chips input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chips span { display: inline-flex; align-items: center; height: 38px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-dark); font-family: var(--mono); font-size: 12px; letter-spacing: .04em; color: var(--on-dark-muted); cursor: pointer; transition: background-color .15s ease, color .15s ease; }
.chips input:checked + span { background: var(--on-dark); color: var(--ink); border-color: var(--on-dark); }
.chips input:focus-visible + span { outline: 2px solid var(--acc); outline-offset: 3px; }
.form__hint { font-size: 13px; color: var(--on-dark-dim); line-height: 1.5; }
.form__footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.form__status { font-size: 14px; color: var(--acc-2); }
.form__status:empty { display: none; }
.form__success { display: flex; flex-direction: column; gap: 20px; background: var(--ink-2); border: 1px solid var(--acc); padding: clamp(28px, 4vw, 48px); border-radius: var(--r-card); min-height: 360px; justify-content: center; }
.form__success__actions { display: flex; gap: 12px; flex-wrap: wrap; }
.honeypot { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }
@media (max-width: 900px) { .contact { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .contact__row { grid-template-columns: 92px 1fr; } .form__footer .btn { width: 100%; } }

/* ---------- Footer ---------- */
.footer { margin-top: auto; background: var(--ink-3); color: var(--on-dark-muted); padding: clamp(48px, 6vw, 72px) var(--pad) 32px; }
.footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
.footer__brand { display: flex; flex-direction: column; gap: 16px; }
.footer__brand img { height: 36px; width: auto; align-self: flex-start; }
.footer__brand p { font-size: 14px; max-width: 40ch; line-height: 1.6; }
.footer__col { display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.footer__col .eyebrow { font-size: 11px; color: var(--on-dark-dim); }
.footer__col a:hover { color: var(--on-dark); }
.footer__bottom { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line-dark); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--on-dark-dim); }
@media (max-width: 760px) { .footer__grid { grid-template-columns: 1fr 1fr; } .footer__brand { grid-column: span 2; } }
@media (max-width: 460px) { .footer__grid { grid-template-columns: 1fr; } .footer__brand { grid-column: span 1; } }

/* ---------- WhatsApp flotante ---------- */
.whatsapp { position: fixed; right: 20px; bottom: 20px; z-index: 50; display: inline-flex; align-items: center; gap: 10px; height: 48px; padding: 0 18px; background: var(--ink-2); color: var(--on-dark); border: 1px solid var(--line-dark); border-radius: 999px; font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; transition: border-color .2s ease; }
.whatsapp::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--wa); }
.whatsapp:hover { border-color: var(--on-dark); color: var(--on-dark); }

/* ---------- Animación de entrada ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s cubic-bezier(.83, 0, .17, 1), transform .6s cubic-bezier(.83, 0, .17, 1); }
  .js .reveal.is-visible { opacity: 1; transform: none; }
}
@media print { .nav, .whatsapp, .skip-link, .hero__canvas { display: none !important; } body, .page { background: #fff; color: #000; } }
