/* =========================================================
   station-os-website / css/main.css
   ---------------------------------------------------------
   Sistema de diseño único para todo el sitio corporativo.
   Un solo archivo CSS a propósito: sin build step, mínimas
   solicitudes HTTP, carga instantánea (objetivo Lighthouse >95).

   Paleta = identidad de marca real de StationOS (idéntica a la
   ya usada en app.station-os.com, ver dashboard/css/brand.css):
   fondo casi negro + gradiente cian->verde azulado como acento,
   nunca un azul genérico inventado para este sitio.
   ========================================================= */

/* Geist (MIT, Vercel) - self-hosted, 2 weights only, used exclusively for
   headings (h1-h4, brand wordmark, eyebrows). Body text stays on the
   system font stack on purpose - it's instant (zero network request)
   and headings are where a distinctive typeface actually earns its
   weight, literally and in page-load cost. font-display:swap avoids
   blocking text render while the ~46KB files load. */
@font-face {
  font-family: "Geist";
  src: url("../assets/fonts/Geist-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist";
  src: url("../assets/fonts/Geist-Bold.woff2") format("woff2");
  font-weight: 700 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #0b0b0b;
  --bg-raised: #111214;
  --surface: #16171a;
  --surface-2: #1c1e22;
  --border: #24262b;
  --border-soft: #1a1b1e;
  --text: #e5e7eb;
  --text-dim: #9ca3af;
  --text-faint: #8a919b;

  --accent: #00d4ff;
  --accent-2: #00e6a8;
  --accent-soft: rgba(0, 212, 255, 0.12);
  --accent-line: rgba(0, 212, 255, 0.28);

  --mono: ui-monospace, "SF Mono", "Cascadia Code", "JetBrains Mono", Consolas, monospace;
  --sans: -apple-system, "Segoe UI", "Inter", system-ui, sans-serif;
  --display: "Geist", var(--sans);

  --max-width: 1220px;
  --radius: 12px;
  --radius-sm: 8px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--accent-soft); color: var(--text); }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* Visible focus for every interactive element - keyboard navigation
   must never lose track of where it is, especially on a near-black
   background where a faint default outline can disappear entirely. */
a:focus-visible, button:focus-visible, input:focus-visible,
textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 200;
  background: var(--accent);
  color: #06110f;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 16px; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 28px;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.75rem, 6vw, 5.25rem); line-height: 1.03; font-weight: 800; letter-spacing: -0.03em; }
h2 { font-size: clamp(2rem, 4vw, 3.1rem); line-height: 1.1; letter-spacing: -0.025em; }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); line-height: 1.3; font-weight: 600; }
p { margin: 0; color: var(--text-dim); }
.lede { font-size: clamp(1.1rem, 2vw, 1.35rem); line-height: 1.55; color: var(--text-dim); max-width: 62ch; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
}
.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px 2px var(--accent);
}

.gradient-text {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Layout helpers ---------- */
.section { padding: 128px 0; position: relative; }
.section-tight { padding: 88px 0; }
@media (max-width: 720px) {
  .section { padding: 76px 0; }
  .section-tight { padding: 56px 0; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 13px 26px;
  border-radius: 999px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease), background 0.25s var(--ease);
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  color: #06110f;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 28px -8px var(--accent-line); }
.btn-outline {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn-outline:hover { border-color: var(--accent-line); color: var(--accent); }
.btn-row { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px;
  background: rgba(11, 11, 11, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-soft);
}
.nav-brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; font-size: 1.05rem; }
.nav-brand img { width: 26px; height: 26px; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 34px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-dim);
}
.nav-links a { transition: color 0.2s var(--ease); position: relative; }
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}
.nav-actions { display: flex; align-items: center; gap: 12px; }
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  width: 44px; height: 44px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.2s var(--ease);
}
.nav-toggle:hover { border-color: var(--accent-line); }
@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .nav-actions .btn-outline { display: none; }
}
.nav-mobile {
  display: none;
  position: fixed;
  top: 66px; left: 0; right: 0;
  z-index: 99;
  background: var(--bg-raised);
  border-bottom: 1px solid var(--border);
  padding: 20px 28px 28px;
  flex-direction: column;
  gap: 18px;
}
.nav-mobile.open { display: flex; }
.nav-mobile a { font-size: 1.05rem; color: var(--text-dim); }
.nav-mobile a.active { color: var(--accent); }

/* ---------- Luz direccional del Hero (Visual Signature) ----------
   Una sola fuente, nunca dos manchas simétricas sin relación con el
   contenido. La luz emana desde donde empieza la información -- cerca
   del nodo del eyebrow -- y se apaga hacia el resto de la pantalla.
   Sin blur pesado ni formas redondas decorativas: un degradado radial,
   quieto, con origen y dirección claros. */
.hero-glow {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 900px 640px at 16% 10%, var(--accent-soft), transparent 62%);
}

/* ---------- Hero entrance (page-load, not scroll-triggered - the hero
   is already in view on arrival, so .reveal's IntersectionObserver
   never fires for it without a real scroll). Staggered via inline
   --delay per element so the eyebrow, headline and CTAs settle in
   sequence rather than all at once. */
.hero-in {
  opacity: 0;
  transform: translateY(18px);
  animation: hero-in 0.8s var(--ease) forwards;
  animation-delay: var(--delay, 0s);
}
@keyframes hero-in {
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-in { animation: none; opacity: 1; transform: none; }
}

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease), background 0.3s var(--ease);
}
.card:hover { border-color: var(--accent-line); background: var(--surface-2); transform: translateY(-2px); }
.card-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
  font-size: 1.2rem;
}
.card h3 { margin-bottom: 10px; }
.card p { font-size: 0.95rem; }

/* ---------- Continuidad narrativa (v2) ----------
   Reemplaza el patrón v1 de <hr class="divider"> entre secciones -- una
   línea dura lee como "aquí termina un bloque", exactamente lo opuesto
   de una historia continua. En su lugar: una veta vertical, delgada y
   casi invisible, que atraviesa el espacio entre secciones -- el mismo
   lenguaje del .flow (línea + nodos), pero para la página completa, no
   solo para pasos numerados. No es decorativa: es la señal visual de
   que cada sección responde a la anterior, no de que empieza de cero. */
.seam {
  position: relative;
  height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.seam::before {
  content: "";
  width: 1px;
  height: 100%;
  background: linear-gradient(180deg, transparent, var(--border) 30%, var(--border) 70%, transparent);
}
.seam-node {
  position: absolute;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px 2px var(--accent);
  opacity: 0.55;
}
@media (max-width: 720px) { .seam { height: 64px; } }

/* ---------- Lista conectada (reemplaza grid de cards para catálogos
   reales -- un producto, una capacidad -- sin encerrar cada uno en una
   caja independiente). Cada fila es una línea, no un bloque. */
.connected-list { display: flex; flex-direction: column; max-width: 680px; }
.connected-list-row {
  display: flex;
  align-items: baseline;
  gap: 18px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border-soft);
}
.connected-list-row:last-child { border-bottom: none; }
.connected-list-row .connector-node { margin-top: 2px; }
.connected-list-row h4 {
  font-family: var(--display);
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  min-width: 148px;
  flex-shrink: 0;
}
.connected-list-row p { font-size: 0.95rem; margin: 0; }

/* ---------- Prosa de principios (reemplaza grid de cards para ideas
   paralelas y cortas -- mismo tratamiento tipográfico que el Manifiesto,
   nunca una caja con borde). ---------- */
.principle-list { display: flex; flex-direction: column; max-width: 680px; margin: 0 auto; }
.principle-row { padding: 22px 0; border-bottom: 1px solid var(--border-soft); }
.principle-row:last-child { border-bottom: none; }
.principle-row h4 { font-family: var(--display); font-size: 1.1rem; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.principle-row p { font-size: 0.97rem; }

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  transition-delay: var(--delay, 0s);
}
.reveal.in-view { opacity: 1; transform: translateY(0); }
/* Stagger .flow steps so they settle in sequence rather than as one flat
   block - a considered, small-scale detail, not a new animation language.
   Capped at 5 steps; flows longer than that repeat the last delay rather
   than growing the wait indefinitely. */
.flow > .reveal:nth-child(1) { --delay: 0s; }
.flow > .reveal:nth-child(2) { --delay: 0.06s; }
.flow > .reveal:nth-child(3) { --delay: 0.12s; }
.flow > .reveal:nth-child(4) { --delay: 0.18s; }
.flow > .reveal:nth-child(5) { --delay: 0.24s; }
.flow > .reveal:nth-child(n+6) { --delay: 0.3s; }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--border-soft);
  padding: 56px 0 40px;
}
.footer-top {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; }
.footer-brand img { width: 24px; height: 24px; }
.footer-cols { display: flex; gap: 64px; flex-wrap: wrap; }
.footer-col h4 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-faint); font-weight: 600; margin-bottom: 16px; }
.footer-col a { display: block; font-size: 0.9rem; color: var(--text-dim); margin-bottom: 12px; transition: color 0.2s var(--ease); }
.footer-col a:hover { color: var(--text); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 24px;
  border-top: 1px solid var(--border-soft);
  font-size: 0.82rem;
  color: var(--text-faint);
}
@media (max-width: 620px) {
  /* Below this width two short columns (Product/Company) fit side by
     side while Resources/Legal wrap alone - an unintentional-looking
     2-1-1 stack. Force one clean column instead. */
  .footer-cols { flex-direction: column; gap: 32px; }
}

/* ---------- Utility ---------- */
.tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-dim);
}
.divider { height: 1px; background: var(--border-soft); border: none; margin: 0; }
/* Screen-reader-only heading: keeps the h1->h2->h3 hierarchy intact for
   assistive tech without adding a visible label the design doesn't call
   for (e.g. Contacto's form/info columns, which read fine visually with
   just the page h1). */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Sequential flow (numbered steps connected by a line) ----------
   Originally built inline on technology.html for the data pipeline; now
   shared because Home's three horizons need the same "ordered steps"
   pattern. Real content only - do not use for unordered content. */
.flow { max-width: 640px; margin: 0 auto; position: relative; }
.flow::before {
  content: "";
  position: absolute;
  left: 27px; top: 8px; bottom: 8px;
  width: 2px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2) 60%, transparent);
  opacity: 0.5;
}
.flow-step { position: relative; padding-left: 76px; margin-bottom: 56px; }
.flow-step:last-child { margin-bottom: 0; }
.flow-node {
  position: absolute;
  left: 0; top: 0;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--accent-line);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono);
  font-weight: 700;
  color: var(--accent);
  box-shadow: 0 0 0 6px var(--bg);
}
.flow-step h3 { margin-bottom: 8px; }
.flow-step p { font-size: 0.95rem; }

/* =========================================================
   Visual Signature -- vocabulario de nodo, luz y conexión.
   Ver la nota de identidad al final de este archivo.
   ========================================================= */

/* ---------- Conector: línea + nodo brillante ----------
   Mismo glow que .eyebrow::before -- reutilizado, no inventado. */
.connector-node {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px 2px var(--accent);
  flex: none;
}

/* ---------- Composición de red (Core + productos, abstracto) ---------- */
.network-viz { width: 100%; max-width: 560px; margin: 0 auto; display: block; }
.network-viz .net-line { stroke: url(#netLineGradient); stroke-width: 1.5; opacity: 0.55; }
.network-viz .net-core { filter: drop-shadow(0 0 24px var(--accent)); }
.network-viz .net-node { fill: var(--bg); stroke: var(--accent-line); stroke-width: 1.5; }
.network-viz .net-node-dot { fill: var(--accent); }
.network-viz .net-label {
  font-family: var(--mono);
  font-size: 11px;
  fill: var(--text-dim);
  text-anchor: middle;
}
.network-viz .net-core-label {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  fill: var(--bg);
  text-anchor: middle;
}

/* ---------- Fondo abstracto "trayectorias de datos" (Tecnología) ----------
   Reemplaza .hero-glow solo donde se use esta clase -- misma capa,
   lenguaje más específico: líneas de luz, no un resplandor genérico. */
.data-trajectory { position: absolute; inset: 0; overflow: hidden; z-index: 0; pointer-events: none; }
.data-trajectory svg { width: 100%; height: 100%; }
.data-trajectory .traj-line { stroke-width: 1; fill: none; }

@media (prefers-reduced-motion: no-preference) {
  .network-viz .net-core { animation: net-pulse 3.5s ease-in-out infinite; }
}
@keyframes net-pulse {
  0%, 100% { filter: drop-shadow(0 0 24px var(--accent)); }
  50% { filter: drop-shadow(0 0 34px var(--accent)); }
}

/* =========================================================
   Nota de identidad -- por qué estos elementos y no otros.

   Un solo nodo respira en todo el sitio: .net-core, en Plataforma,
   donde nada más se mueve al mismo tiempo. Cada otro nodo del sistema
   (.eyebrow::before, .connector-node, .seam-node, .flow-node) comparte
   el mismo color y el mismo glow -- el mismo vocabulario -- pero se
   queda quieto a propósito. Si todos respiraran, ninguno significaría
   nada; la quietud del resto es lo que le da sentido al único que
   respira.

   La luz nunca es doble ni simétrica (.hero-glow, .data-trajectory):
   tiene un origen -- el punto donde empieza la información -- y se
   apaga hacia afuera. Nunca decora una esquina sin relación con el
   contenido.

   Deliberadamente ausentes: partículas, grids de fondo, texturas de
   ruido, glassmorphism sobre fotografía que no existe todavía. Cada
   uno se consideró y se descartó por la misma razón -- no fortalecían
   este vocabulario, solo lo diluían.
   ========================================================= */
