/* APEX FLOW SYSTEMS - landing
   Lectura de diseño: landing B2B industrial para compradores técnicos, lenguaje documental
   (la fotografía real manda), CSS nativo. Diales: VARIANCE 6 / MOTION 4 / DENSITY 4.
   Tema único oscuro (bloqueado). Acento único: verde WhatsApp, solo en el CTA principal.
   Radio único: 0 (todo recto). Íconos: Phosphor Icons (MIT), autoalojados en el sprite de index.html. Paleta y fuentes: docs/MARCA-WEB.md. Sin estilos inline (CSP). */

@font-face { font-family: "Roboto"; font-weight: 400; font-style: normal; font-display: swap;
  src: url("../fonts/roboto-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Roboto"; font-weight: 500; font-style: normal; font-display: swap;
  src: url("../fonts/roboto-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Roboto"; font-weight: 700; font-style: normal; font-display: swap;
  src: url("../fonts/roboto-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Roboto Condensed"; font-weight: 700; font-style: normal; font-display: swap;
  src: url("../fonts/roboto-condensed-latin-700-normal.woff2") format("woff2"); }

:root {
  color-scheme: dark;
  /* marca */
  --brand: #2D4760;
  --brand-grey: #A6A6A6;
  --b900: #192735; --b800: #223548; --b700: #2D4760; --b600: #53687D; --b400: #9AA7B3;
  /* tema oscuro del manual */
  --ground: #12181F; --surface: #1A222C; --surface-2: #222C38;
  --ink: #E8EDF2; --ink-2: #AEBCC9; --ink-3: #8796A6;
  --rule: #2B3743; --rule-strong: #3D4B59;
  /* acento único */
  --accent: #25D366; --accent-ink: #0A2716; --accent-hover: #3BE07A;

  --display: "Roboto Condensed", "Arial Narrow", system-ui, sans-serif;
  --body: "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif;
  --max: 1280px;
  --gutter: 16px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  /* capas */
  --z-header: 30; --z-float: 40;
}
@media (min-width: 768px) { :root { --gutter: 40px; } }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--ground); color: var(--ink);
  font-family: var(--body); font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, video, svg { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; margin: 0; text-wrap: balance; letter-spacing: -.01em; }
h2 { font-size: clamp(32px, 4.4vw, 52px); line-height: 1.04; }
h3 { font-size: 21px; line-height: 1.2; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.wrap { max-width: var(--max); margin: 0 auto; padding-inline: var(--gutter); }
.lead { color: var(--ink-2); font-size: 18px; max-width: 58ch; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: var(--ground); padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }

/* ---------- botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 14px 24px; white-space: nowrap;
  font-family: var(--display); font-size: 16px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  text-decoration: none; border: 1.5px solid transparent;
  transition: background-color .25s var(--ease), border-color .25s var(--ease), transform .15s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 22px; height: 22px; flex: none; }
.btn-accent { background: var(--accent); color: var(--accent-ink); }
.btn-accent:hover { background: var(--accent-hover); }
.btn-line { border-color: rgba(232,237,242,.5); color: var(--ink); background: rgba(18,24,31,.35); }
.btn-line:hover { border-color: var(--ink); background: rgba(18,24,31,.6); }

/* ---------- header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: var(--z-header);
  background: linear-gradient(rgba(18,24,31,.85), rgba(18,24,31,0));
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 72px; }
.logo img { width: 156px; height: auto; }
.nav { display: none; }
.nav a { font-family: var(--display); font-size: 14px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); text-decoration: none; }
.nav a:hover { color: var(--ink); }
.header-cta { display: none; min-height: 42px; padding: 8px 16px; font-size: 14px; }
.header-cta svg { width: 20px; height: 20px; }
@media (min-width: 1024px) {
  .logo img { width: 184px; }
  .nav { display: flex; gap: 32px; }
  .header-cta { display: inline-flex; }
}

/* ---------- hero (video) ---------- */
.hero { position: relative; min-height: min(100dvh, 940px); display: grid; align-items: end; overflow: hidden; isolation: isolate; }
.hero-media { position: absolute; inset: 0; z-index: -2; background: var(--b900); }
.hero-media video, .hero-media img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 60% 50%;
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(18,24,31,.92) 0%, rgba(18,24,31,.72) 38%, rgba(18,24,31,.15) 75%),
    linear-gradient(0deg, rgba(18,24,31,.95) 0%, rgba(18,24,31,0) 45%);
}
.hero .wrap { width: 100%; padding-top: 120px; padding-bottom: 72px; }
.hero h1 { font-size: clamp(40px, 5.4vw, 76px); line-height: .98; max-width: 21ch; }
.hero .lead { margin: 22px 0 34px; color: #D3DCE4; max-width: 46ch; font-size: clamp(17px, 1.6vw, 20px); }
.eyebrow { font-family: var(--display); font-size: 13px; letter-spacing: .16em; text-transform: uppercase; color: var(--b400); margin-bottom: 18px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 520px) { .cta-row .btn { flex: 1 1 100%; } }
@media (min-width: 1024px) { .hero .wrap { padding-bottom: 96px; } }

/* ---------- experiencia (foto a sangre + cifra) ---------- */
.experience { position: relative; isolation: isolate; overflow: hidden; }
.experience > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; z-index: -2; }
.experience::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(18,24,31,.55), rgba(18,24,31,.9)); }
.experience .wrap { padding-block: 120px 96px; display: grid; gap: 28px; }
.big-num { font-family: var(--display); font-weight: 700; font-size: clamp(96px, 17vw, 220px); line-height: .82; letter-spacing: -.03em; color: var(--ink); }
.big-num span { color: var(--b400); }
.experience h2 { max-width: 24ch; font-size: clamp(30px, 3.6vw, 46px); }
.experience .lead { color: #D3DCE4; }
@media (min-width: 1024px) {
  .experience .wrap { grid-template-columns: auto 1fr; align-items: end; column-gap: 64px; padding-block: 200px 120px; }
  .experience .big-num { grid-row: span 2; }
}

/* ---------- trabajo (bento de fotos) ---------- */
.section { padding-block: 96px; }
@media (min-width: 1024px) { .section { padding-block: 128px; } }
.section-head { display: grid; gap: 18px; margin-bottom: 48px; }
.work-grid { display: grid; grid-template-columns: 1fr; gap: 36px; }
.shot { margin: 0; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.shot .frame { overflow: hidden; background: var(--surface); flex: 1; aspect-ratio: 4 / 3; }
.shot .frame { position: relative; }
.shot .frame::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(18,24,31,0) 60%, rgba(18,24,31,.35)); transition: opacity .5s var(--ease); }
.shot img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease), filter .8s var(--ease); filter: saturate(.92); }
.shot:hover img { transform: scale(1.05); filter: saturate(1.05); }
.shot:hover .frame::after { opacity: 0; }
.shot figcaption { display: grid; gap: 4px; }
.shot .stage { font-family: var(--display); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--b400); }
.shot strong { font-family: var(--display); font-weight: 700; font-size: clamp(19px, 1.7vw, 23px); line-height: 1.15; color: var(--ink); position: relative; padding-bottom: 8px; width: fit-content; }
.shot strong::after { content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 28px; background: var(--brand); transition: width .5s var(--ease), background-color .5s var(--ease); }
.shot:hover strong::after { width: 100%; background: var(--b400); }
.shot .why { font-size: 15px; line-height: 1.45; color: var(--ink-2); max-width: 46ch; }
@media (min-width: 600px) and (max-width: 899px) {
  .work-grid { grid-template-columns: repeat(2, 1fr); gap: 32px 14px; }
  .shot .frame { aspect-ratio: 4 / 5; }
  .shot.wide { grid-column: span 2; }
  .shot.wide .frame { aspect-ratio: 16 / 10; }
}
@media (min-width: 900px) {
  .work-grid { grid-template-columns: repeat(3, 1fr); grid-auto-rows: 400px; gap: 40px 20px; }
  .shot .frame, .shot.wide .frame { aspect-ratio: auto; }
  .shot.tall { grid-row: span 2; }
  .shot.wide { grid-column: span 2; }
}

/* ---------- productos (grupos) ---------- */
.products { background: var(--surface); }
.prod-groups { display: grid; gap: 56px; }
.prod-group h3 { font-size: clamp(26px, 2.6vw, 32px); padding-bottom: 18px; margin-bottom: 8px; border-bottom: 2px solid var(--brand); }
.prod-group dl { margin: 0; display: grid; }
.prod-group dt { font-weight: 500; color: var(--ink); margin-top: 18px; }
.prod-group dd { margin: 4px 0 0; color: var(--ink-2); font-size: 15px; line-height: 1.5; }
.std { font-family: var(--display); letter-spacing: .04em; color: var(--b400); margin-right: 6px; }
@media (min-width: 900px) { .prod-groups { grid-template-columns: repeat(3, 1fr); gap: 48px; } }
.note { margin-top: 56px; color: var(--ink-3); font-size: 15px; max-width: 70ch; }

/* ---------- servicios (foto + listas) ---------- */
.services-layout { display: grid; gap: 48px; }
.services-photo { margin: 0; overflow: hidden; aspect-ratio: 3 / 4; background: var(--surface); }
.services-photo img { width: 100%; height: 100%; object-fit: cover; }
.services-layout h2 + .lead { margin-top: 18px; }
.svc-cols { display: grid; gap: 40px; margin-top: 40px; }
.svc-col h3 { font-size: 15px; letter-spacing: .12em; text-transform: uppercase; color: var(--b400); margin-bottom: 14px; }
.svc-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.svc-col li { font-size: 18px; line-height: 1.35; }
@media (min-width: 640px) { .svc-cols { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) {
  .services-layout { grid-template-columns: 5fr 7fr; gap: 80px; align-items: center; }
  .svc-cols { grid-template-columns: repeat(3, 1fr); gap: 32px; }
}

/* ---------- sectores (índice tipográfico) ---------- */
.sectors-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.sectors-list li { display: grid; gap: 8px; padding-block: 28px; border-bottom: 1px solid var(--rule); }
.sectors-list strong { font-family: var(--display); font-weight: 700; font-size: clamp(30px, 4.6vw, 60px); line-height: 1; letter-spacing: -.01em; transition: color .3s var(--ease); }
.sectors-list li:hover strong { color: var(--b400); }
.sectors-list span { color: var(--ink-2); max-width: 52ch; }
@media (min-width: 900px) { .sectors-list li { grid-template-columns: 1.1fr 1fr; align-items: center; gap: 40px; } }

/* ---------- proceso (línea de tiempo) ---------- */
.process { background: var(--brand); }
.process h2 { max-width: 18ch; }
.timeline { list-style: none; margin: 56px 0 0; padding: 0; display: grid; gap: 36px; position: relative; }
.timeline li { position: relative; padding-left: 28px; }
.timeline li::before { content: ""; position: absolute; left: 0; top: 8px; width: 11px; height: 11px; background: var(--ink); }
.timeline li::after { content: ""; position: absolute; left: 5px; top: 22px; bottom: -36px; width: 1px; background: rgba(232,237,242,.35); }
.timeline li:last-child::after { display: none; }
.timeline h3 { font-size: 22px; margin-bottom: 8px; }
.timeline p { color: #D3DCE4; font-size: 16px; }
@media (min-width: 900px) {
  .timeline { grid-template-columns: repeat(4, 1fr); gap: 32px; }
  .timeline li { padding: 32px 0 0; }
  .timeline li::before { top: 0; }
  .timeline li::after { left: 16px; right: -32px; top: 5px; bottom: auto; width: auto; height: 1px; }
}

/* ---------- preguntas frecuentes (acordeón nativo, funciona sin JS) ---------- */
.faq-layout { display: grid; gap: 32px; }
.faq-list { border-top: 1px solid var(--rule); }
.faq-item { border-bottom: 1px solid var(--rule); }
.faq-item summary {
  list-style: none; cursor: pointer; display: grid; grid-template-columns: 1fr 24px; gap: 16px; align-items: center;
  padding-block: 22px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: ""; width: 14px; height: 14px; justify-self: end; margin-right: 4px;
  border-right: 2px solid var(--b400); border-bottom: 2px solid var(--b400);
  transform: rotate(45deg) translateY(-4px); transition: transform .3s var(--ease);
}
.faq-item[open] summary::after { transform: rotate(-135deg) translateY(-4px); }
.faq-item summary h3 { font-size: clamp(19px, 1.8vw, 23px); transition: color .25s var(--ease); }
.faq-item summary:hover h3 { color: var(--b400); }
.faq-item p { color: var(--ink-2); padding: 0 40px 24px 0; max-width: 68ch; }
@media (min-width: 1024px) {
  .faq-layout { grid-template-columns: 4fr 8fr; gap: 80px; align-items: start; }
  .faq-layout h2 { position: sticky; top: 96px; }
}

/* ---------- contacto ---------- */
.contact .wrap { display: grid; gap: 48px; }
.contact h2 { font-size: clamp(40px, 6vw, 76px); max-width: 14ch; }
.contact .lead { margin-top: 20px; }
.contact .cta-row { margin-top: 36px; }
.contact-data { margin: 0; display: grid; gap: 22px; align-content: end; }
.contact-data div { display: grid; gap: 2px; }
.contact-data dt { font-size: 14px; color: var(--ink-3); }
.contact-data dd { margin: 0; font-size: 19px; font-weight: 500; overflow-wrap: anywhere; }
.contact-data a { text-decoration: none; border-bottom: 1px solid var(--rule-strong); }
.contact-data a:hover { border-color: var(--ink); }
@media (min-width: 1024px) { .contact .wrap { grid-template-columns: 7fr 4fr; gap: 80px; } }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--rule); padding-block: 40px 104px; color: var(--ink-3); font-size: 14px; }
.site-footer .wrap { display: grid; gap: 20px; align-items: center; }
.site-footer img { width: 168px; height: auto; }
@media (min-width: 900px) { .site-footer { padding-bottom: 40px; } .site-footer .wrap { grid-template-columns: auto 1fr; } .site-footer p { justify-self: end; } }

/* ---------- WhatsApp flotante (móvil) ---------- */
.wsp-float {
  position: fixed; right: 16px; bottom: 16px; z-index: var(--z-float);
  width: 60px; height: 60px; display: grid; place-items: center;
  background: var(--accent); color: var(--accent-ink); box-shadow: 0 8px 24px rgba(8,12,16,.45);
}
.wsp-float svg { width: 32px; height: 32px; }
@media (min-width: 1024px) { .wsp-float { display: none; } }

/* ---------- movimiento ---------- */
@media (prefers-reduced-motion: no-preference) {
  .hero .wrap > * { animation: rise .9s var(--ease) both; }
  .hero .wrap > :nth-child(2) { animation-delay: .08s; }
  .hero .wrap > :nth-child(3) { animation-delay: .16s; }
  .hero .wrap > :nth-child(4) { animation-delay: .24s; }
  .js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
  .js .reveal.is-in { opacity: 1; transform: none; }
}
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-media video { display: none; }
  .shot img, .btn { transition: none; }
}
