/* Paleta oficial SCEI (documento maestro de marca, 23 oct 2026) */
:root {
  --base: #10263B;        /* azul profundo: estructural */
  --base-deep: #081523;
  --accent: #2C6BED;      /* azul eléctrico: acento principal */
  --light: #EEF4F7;       /* fondo claro / texto */
  --text: #EEF4F7;
  --muted: #A7B6C4;
  --surface: rgba(238, 244, 247, 0.04);
  --border: rgba(238, 244, 247, 0.10);
  --focus: #5B93F7;
  /* Acentos por línea de negocio */
  --consulting: #8D3C55;  /* vino técnico (bordes y elementos grandes) */
  --consulting-text: #D27A93; /* vino aclarado solo para texto: 5.1:1 sobre el azul base */
  --digital: #1AA6A6;     /* turquesa */
  --erp: #B58A00;         /* dorado mineral */
  --radius: 16px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--base-deep);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

h1, h2, h3 { line-height: 1.15; margin: 0 0 0.75rem; font-weight: 700; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.25rem, 6vw, 3.75rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1rem; }
.muted { color: var(--muted); }
.section-lead { max-width: 640px; margin-bottom: 0; }
section[id] { scroll-margin-top: 68px; }

.gradient-text {
  background: linear-gradient(90deg, #5B93F7 0%, var(--accent) 50%, var(--digital) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #5B93F7;
  margin-bottom: 1rem;
}

/* Encabezado */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 20;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(8, 21, 35, 0.7);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: 0.22em;
  color: var(--light);
  text-decoration: none;
}
/* Símbolo provisional: se reemplaza por el vectorial oficial */
.brand-mark {
  width: 14px;
  height: 14px;
  border: 2px solid var(--accent);
  border-radius: 3px;
  transform: rotate(45deg);
  box-shadow: 0 0 14px rgba(44, 107, 237, 0.6);
}
.brand-small { font-size: 0.9rem; }

.nav { display: flex; align-items: center; gap: 24px; }
.nav a:not(.btn) {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}
.nav a:not(.btn):hover { color: var(--light); }

/* Botones */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.85rem 1.5rem;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 30px -10px rgba(44, 107, 237, 0.7);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
/* El hover solo eleva: el fondo se mantiene para conservar el contraste del texto blanco */
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px -10px rgba(44, 107, 237, 0.95);
}
.btn-small { min-height: 40px; padding: 0.55rem 1.1rem; font-size: 0.9rem; box-shadow: none; }
.btn-ghost {
  background: rgba(238, 244, 247, 0.04);
  border: 1px solid var(--border);
  color: var(--light);
  box-shadow: none;
}
.btn-ghost:hover {
  background: rgba(44, 107, 237, 0.14);
  border-color: rgba(44, 107, 237, 0.5);
  box-shadow: none;
}
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 2rem;
}

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 120px 0 80px;
  overflow: hidden;
  isolation: isolate;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: url("assets/hero-bg.svg") center / cover no-repeat;
}
.hero::before {
  /* Cuadrícula animada con transform (GPU). inset negativo evita huecos al desplazarse */
  content: "";
  position: absolute;
  inset: -64px;
  z-index: -1;
  background-image: linear-gradient(rgba(238, 244, 247, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(238, 244, 247, 0.05) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at 30% 40%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 30% 40%, #000 20%, transparent 75%);
  will-change: transform;
  animation: drift 40s linear infinite;
}
@keyframes drift {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(64px, 64px, 0); }
}
.hero-content { max-width: 760px; }
.lead {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--muted);
  max-width: 620px;
}

/* Entrada del hero: se dispara al mostrarse #content */
@keyframes rise {
  from { opacity: 0; translate: 0 18px; }
  to { opacity: 1; translate: 0 0; }
}
.hero .eyebrow { animation: rise 0.6s var(--ease) 0.05s both; }
.hero h1 { animation: rise 0.75s var(--ease) 0.12s both; }
.hero .lead { animation: rise 0.6s var(--ease) 0.3s both; }
.hero .actions { animation: rise 0.6s var(--ease) 0.45s both; }

/* Revelado al hacer scroll. Sin soporte de view(), el contenido se ve normal */
@keyframes reveal {
  from { opacity: 0; translate: 0 28px; }
  to { opacity: 1; translate: 0 0; }
}
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .reveal {
      animation: reveal linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 35%;
    }
  }
}

/* Secciones */
.section { padding: 110px 0; position: relative; }
.section + .section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(900px, 90%);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(44, 107, 237, 0.5), rgba(26, 166, 166, 0.4), transparent);
}
.section-alt {
  background:
    radial-gradient(ellipse at 90% 0%, rgba(44, 107, 237, 0.10), transparent 60%),
    var(--base);
}

/* Problema: chips con el mismo lenguaje visual */
.pain-list {
  list-style: none;
  padding: 0;
  margin: 2rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.pain-list li {
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.5rem 1rem;
}

/* Tarjetas de línea de negocio */
.cards {
  list-style: none;
  padding: 0;
  margin: 3rem 0 0;
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr;
}
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform 0.25s ease, background 0.25s ease;
  overflow: hidden;
}
/* Franja superior de color de la línea, sin deformarse en las esquinas */
.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--line);
}
.card:hover,
.card:focus-within {
  transform: translateY(-4px);
  background: rgba(238, 244, 247, 0.07);
}
.card p { color: var(--muted); }
.card-consulting { --line: var(--consulting); --line-text: var(--consulting-text); }
.card-digital { --line: var(--digital); --line-text: var(--digital); }
.card-erp { --line: var(--erp); --line-text: var(--erp); }
.card-tag {
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--line-text);
  margin-bottom: 1rem;
}
.card-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: auto;
  color: var(--light);
  font-weight: 600;
  text-decoration: none;
}
.card-link:hover { color: var(--line-text); }

/* Seguridad */
.split {
  display: grid;
  gap: 48px;
  grid-template-columns: 1fr;
  align-items: center;
}
.checks {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}
.checks li {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 20px;
}
.checks li::before {
  content: "";
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--light);
  opacity: 0.7;
  box-shadow: 0 0 12px rgba(238, 244, 247, 0.4);
}

/* Conversión: selector de línea */
.cta { text-align: center; background: radial-gradient(ellipse at 50% 100%, rgba(44, 107, 237, 0.35), transparent 60%); }
.picker {
  list-style: none;
  padding: 0;
  margin: 2.5rem auto 2rem;
  display: grid;
  gap: 12px;
  max-width: 560px;
  text-align: left;
}
.pick {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  padding: 0 20px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--line);
  color: var(--light);
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease;
}
.pick:hover { background: rgba(238, 244, 247, 0.08); transform: translateX(4px); }
.pick-name { font-weight: 600; }
.pick-line {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--line-text);
}
.pick-consulting { --line: var(--consulting); --line-text: var(--consulting-text); }
.pick-digital { --line: var(--digital); --line-text: var(--digital); }
.pick-erp { --line: var(--erp); --line-text: var(--erp); }

/* Pie */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  color: var(--muted);
  font-size: 0.875rem;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.site-footer p { margin: 0; }

/* Estados de carga y aviso */
.state {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  text-align: center;
  color: var(--muted);
  background: var(--base-deep);
}

/* Móvil */
@media (max-width: 640px) {
  .section { padding: 72px 0; }
  .hero { padding-top: 110px; }
  .actions .btn { flex: 1 1 100%; }
  .nav a:not(.btn) { display: none; }
}

@media (min-width: 720px) {
  .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .split { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero::before { animation: none; }
  .hero .eyebrow, .hero h1, .hero .lead, .hero .actions { animation: none; }
  .btn, .card, .pick, .nav a:not(.btn) { transition: none; }
  .reveal { animation: none !important; }
}
