/* Sistema compartido de Alistec Ingeniería -- lo usan todas las páginas del sitio.
   Cada página trae ADEMÁS sus propios estilos puntuales (hero, secciones propias) en su <style>. */

:root {
  --bg: #0B1520;
  --bg-alt: #0E1B29;
  --surface: #121F2E;
  --surface-2: #16273A;
  --border: #22384F;
  --border-soft: #1A2C3F;
  --text: #E9EEF3;
  --text-muted: #90A5BA;
  --text-faint: #5E7488;
  --blue: #5EC2E8;
  --blue-dim: #2E7CA6;
  --blue-wash: rgba(94, 194, 232, 0.1);
  --amber: #E8A33D;
  --amber-dim: #B87F26;
  --amber-wash: rgba(232, 163, 61, 0.12);
  --green: #4CC38A;
  --shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.6);
  --font-display: "Bahnschrift", "Segoe UI Semibold", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Cascadia Code", "Consolas", "SF Mono", ui-monospace, monospace;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #F2F6F9;
    --bg-alt: #E9F0F5;
    --surface: #FFFFFF;
    --surface-2: #F6FAFC;
    --border: #D6E2EA;
    --border-soft: #E3ECF2;
    --text: #0E1B29;
    --text-muted: #51697D;
    --text-faint: #8298AB;
    --blue: #1C7EA8;
    --blue-dim: #0F5C7D;
    --blue-wash: rgba(28, 126, 168, 0.08);
    --amber: #B87317;
    --amber-dim: #925A10;
    --amber-wash: rgba(184, 115, 23, 0.1);
    --green: #1E8F63;
    --shadow: 0 20px 60px -24px rgba(14, 27, 41, 0.25);
  }
}

:root[data-theme="dark"] {
  --bg: #0B1520;
  --bg-alt: #0E1B29;
  --surface: #121F2E;
  --surface-2: #16273A;
  --border: #22384F;
  --border-soft: #1A2C3F;
  --text: #E9EEF3;
  --text-muted: #90A5BA;
  --text-faint: #5E7488;
  --blue: #5EC2E8;
  --blue-dim: #2E7CA6;
  --blue-wash: rgba(94, 194, 232, 0.1);
  --amber: #E8A33D;
  --amber-dim: #B87F26;
  --amber-wash: rgba(232, 163, 61, 0.12);
  --green: #4CC38A;
  --shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.6);
}

:root[data-theme="light"] {
  --bg: #F2F6F9;
  --bg-alt: #E9F0F5;
  --surface: #FFFFFF;
  --surface-2: #F6FAFC;
  --border: #D6E2EA;
  --border-soft: #E3ECF2;
  --text: #0E1B29;
  --text-muted: #51697D;
  --text-faint: #8298AB;
  --blue: #1C7EA8;
  --blue-dim: #0F5C7D;
  --blue-wash: rgba(28, 126, 168, 0.08);
  --amber: #B87317;
  --amber-dim: #925A10;
  --amber-wash: rgba(184, 115, 23, 0.1);
  --green: #1E8F63;
  --shadow: 0 20px 60px -24px rgba(14, 27, 41, 0.25);
}

* { box-sizing: border-box; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  margin: 0;
}

.wrap {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 28px;
}

a { color: inherit; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--blue-dim);
}

h1, h2, h3 {
  font-family: var(--font-display);
  text-wrap: balance;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0;
}

/* ---------- Header ---------- */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-soft);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.logo-ring { flex-shrink: 0; }
.ring-spin {
  transform-origin: 22px 22px;
  animation: ringspin 9s linear infinite;
}
@keyframes ringspin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .ring-spin { animation: none; }
}
.tagline {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  color: var(--amber);
}
.brand-word {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  line-height: 1.05;
  letter-spacing: 0.02em;
  color: var(--text);
}
.brand-word span { color: var(--blue); }
.brand-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1;
  letter-spacing: 0.18em;
  color: var(--text-faint);
  text-transform: uppercase;
  display: block;
  margin-top: -1px;
}
nav.links {
  display: flex;
  gap: 28px;
  font-size: 14.5px;
  color: var(--text-muted);
}
nav.links a { text-decoration: none; }
nav.links a:hover, nav.links a:focus-visible { color: var(--text); }
nav.links a.current { color: var(--text); }
.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 7px;
  border: 1px solid var(--blue-dim);
  color: var(--blue);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.nav-cta:hover, .nav-cta:focus-visible { background: var(--blue-wash); }

@media (max-width: 760px) {
  nav.links { display: none; }
}

/* ---------- Hero (estructura compartida; cada pagina define su contenido) ---------- */
.hero {
  padding: 88px 0 90px;
  position: relative;
  overflow: hidden;
  border-top: none;
}
.hero-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
  position: relative;
  z-index: 1;
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
}
.hero h1 {
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.06;
  margin: 18px 0 22px;
}
.hero h1 em {
  font-style: normal;
  color: var(--blue);
}
.hero p.lead {
  font-size: 17.5px;
  color: var(--text-muted);
  max-width: 54ch;
  margin: 0 0 32px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 22px;
  border-radius: 8px;
  font-size: 14.5px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--blue);
  color: #06141F;
}
.btn-primary:hover { background: #7ED0EF; }
.btn-ghost {
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover { background: var(--surface-2); }

/* live monitoring tile (screenshots reales de Argos 360) */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-soft);
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-faint);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.panel-body { padding: 6px 6px 14px; }
.panel-shot { padding: 0; }
.panel-shot img { display: block; width: 100%; height: auto; }
.panel-demo {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--text-faint);
}
.panel-demo::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--text-faint);
}

/* ---------- Section shell ---------- */
section { padding: 84px 0; border-top: 1px solid var(--border-soft); }
.section-head { max-width: 62ch; margin-bottom: 44px; }
.section-head.center { max-width: 62ch; margin-left: auto; margin-right: auto; text-align: center; }
.section-head h2 { font-size: clamp(26px, 3.4vw, 36px); margin-top: 14px; }
.section-head p { color: var(--text-muted); font-size: 15.5px; margin-top: 12px; }

/* ---------- Services / feature card grid ---------- */
.svc-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
@media (max-width: 900px) { .svc-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .svc-grid { grid-template-columns: 1fr; } }
.svc-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.svc-card:hover { border-color: var(--blue-dim); transform: translateY(-2px); }
.svc-icon {
  width: 38px; height: 38px;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--blue);
}
.svc-card h3 { font-size: 16.5px; font-weight: 700; }
.svc-card p { font-size: 13.8px; color: var(--text-muted); margin: 0; }

.svc-card.has-photo { padding: 0; gap: 0; overflow: hidden; }
.svc-card.has-photo .icon-tile { border-radius: 0; }
.svc-card-body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 10px; }

/* ---------- Numbered differentiator grid ---------- */
.diff-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 820px) { .diff-grid { grid-template-columns: 1fr; } }
.diff-card { display: flex; flex-direction: column; gap: 12px; }
.diff-num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-faint);
}
.diff-card h3 { font-size: 18px; }
.diff-card p { color: var(--text-muted); font-size: 14.5px; margin: 0; }

/* ---------- Simple icon+label list (equipos, industrias, etc.) ---------- */
.prod-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  list-style: none;
  margin: 0;
  padding: 0;
}
@media (max-width: 760px) { .prod-list { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .prod-list { grid-template-columns: 1fr; } }
.prod-item {
  padding: 20px 20px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
}
.prod-item svg { color: var(--blue); flex-shrink: 0; }

.see-more {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 28px;
  font-size: 14.5px; font-weight: 600;
  color: var(--blue);
  text-decoration: none;
}
.see-more:hover, .see-more:focus-visible { color: var(--text); }
.see-more svg { transition: transform 0.15s ease; }
.see-more:hover svg { transform: translateX(3px); }

/* ---------- Preguntas frecuentes ---------- */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 74ch;
}
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 4px 22px;
}
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-family: var(--font-display);
  font-size: 16.5px;
  font-weight: 600;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .faq-plus {
  flex: 0 0 auto;
  width: 22px; height: 22px;
  position: relative;
  color: var(--blue);
}
.faq-item summary .faq-plus::before, .faq-item summary .faq-plus::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  background: currentColor;
  transform: translate(-50%, -50%);
  transition: transform 0.15s ease;
}
.faq-item summary .faq-plus::before { width: 14px; height: 1.6px; }
.faq-item summary .faq-plus::after { width: 1.6px; height: 14px; }
.faq-item[open] summary .faq-plus::after { transform: translate(-50%, -50%) rotate(90deg); opacity: 0; }
.faq-item p { color: var(--text-muted); padding: 0 0 20px; margin: -6px 0 0; max-width: 62ch; }

/* ---------- Final CTA band ---------- */
.cta-band {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.cta-band h2 { font-size: clamp(24px, 3vw, 32px); max-width: 20ch; }
.cta-band p { color: var(--text-muted); margin-top: 10px; max-width: 42ch; }

footer {
  border-top: 1px solid var(--border-soft);
  padding: 40px 0 56px;
}
.foot-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.foot-links { display: flex; gap: 22px; font-size: 13.5px; color: var(--text-muted); }
.foot-links a { text-decoration: none; }
.foot-links a:hover { color: var(--text); }
.foot-meta { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-faint); margin-top: 18px; }

/* ---------- Bloque de detalle con icono grande (servicios/industrias sin foto todavia) ---------- */
.feature-row {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 48px;
  align-items: center;
}
.feature-row.rev { grid-template-columns: 1.15fr 0.85fr; }
.feature-row.rev .feature-visual, .feature-row.rev .feature-shot { order: 2; }
@media (max-width: 900px) {
  .feature-row, .feature-row.rev { grid-template-columns: 1fr; }
  .feature-row.rev .feature-visual, .feature-row.rev .feature-shot { order: 0; }
}
.feature-text ul { margin: 18px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; }
.feature-text li { display: flex; gap: 10px; font-size: 14.5px; color: var(--text-muted); align-items: flex-start; }
.feature-text li svg { color: var(--green); flex-shrink: 0; margin-top: 2px; }

.icon-tile {
  aspect-ratio: 4 / 3;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: linear-gradient(160deg, var(--blue-wash), transparent 60%), var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.icon-tile svg { color: var(--blue); width: 34%; height: 34%; }

/* Variante con foto real (banco gratuito) -- la insignia conecta la foto con el mismo
   lenguaje de iconos que usa el resto del sitio, en vez de dejarla suelta. */
.icon-tile.has-photo { display: block; }
.icon-tile.has-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-badge {
  position: absolute;
  bottom: 14px; left: 14px;
  width: 44px; height: 44px;
  border-radius: 10px;
  background: color-mix(in srgb, #06141F 55%, transparent);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,.18);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
}
.photo-badge svg { width: 20px; height: 20px; }
.photo-credit {
  position: absolute;
  bottom: 8px; right: 10px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: rgba(255,255,255,.55);
  text-decoration: none;
}
a.photo-credit:hover { color: rgba(255,255,255,.85); text-decoration: underline; }

/* ---------- Boton flotante de WhatsApp ---------- */
.whatsapp-float {
  position: fixed;
  right: 20px; bottom: 20px;
  z-index: 60;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: #25D366;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px -6px rgba(0,0,0,.4);
  transition: transform 0.15s ease;
}
.whatsapp-float:hover, .whatsapp-float:focus-visible { transform: scale(1.06); }
.whatsapp-float svg { width: 30px; height: 30px; }

[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
[data-reveal].in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
}

/* ---------- CTA fija en movil (inyectada por site.js en todas las paginas) ---------- */
.sticky-cta-bar { display: none; }
@media (max-width: 760px) {
  .sticky-cta-bar {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 55;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
    background: var(--surface);
    border-top: 1px solid var(--border);
    box-shadow: 0 -8px 24px -12px rgba(0, 0, 0, 0.35);
  }
  .sticky-cta-bar .btn { width: 100%; justify-content: center; }
  body.has-sticky-cta { padding-bottom: 78px; }
  /* sube el boton de WhatsApp para que no quede tapado por la barra fija */
  body.has-sticky-cta .whatsapp-float { bottom: 92px; }
}
