:root {
  --ink: #0b1020;
  --ink-soft: #161d33;
  --paper: #f7f8fc;
  --muted: #6b7280;
  --line: #e6e8f0;
  --accent: #4f6bff;
  --accent-2: #00d4b3;
  --white: #ffffff;
  --radius: 16px;
  --maxw: 1080px;
  /* Spacing scale — fluid */
  --space-xs: 0.75rem;
  --space-sm: clamp(1rem, 2vw, 1.5rem);
  --space-md: clamp(1.75rem, 4vw, 2.75rem);
  --space-lg: clamp(3rem, 7vw, 5rem);
  --space-xl: clamp(4.5rem, 10vw, 7.5rem);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* Keyboard focus — WCAG AA visible focus */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- Header ---------- */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 248, 252, 0.85);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: 1.05rem;
}
.brand img { height: 32px; width: auto; display: block; }
.foot .brand img { height: 34px; }
.nav-links { display: flex; gap: 28px; font-size: 0.92rem; color: var(--muted); }
.nav-links a:hover { color: var(--ink); }
.nav-cta {
  background: var(--ink);
  color: #fff;
  padding: 9px 18px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
}
.nav-cta:hover { background: var(--ink-soft); }
@media (max-width: 720px) { .nav-links { display: none; } }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 96px 0 84px;
  background:
    radial-gradient(800px 400px at 80% -10%, rgba(79,107,255,0.12), transparent),
    radial-gradient(700px 360px at 0% 10%, rgba(0,212,179,0.10), transparent);
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.02em;
  color: var(--accent);
  background: rgba(79,107,255,0.10);
  padding: 6px 14px; border-radius: 999px;
  margin-bottom: 22px;
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent-2); }
.hero h1 {
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 800;
  max-width: 720px;
}
.hero h1 span { color: var(--accent); }
.hero p.lead {
  margin-top: 22px;
  font-size: 1.12rem;
  color: var(--muted);
  max-width: 600px;
}
.hero-actions { margin-top: 34px; display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 24px; border-radius: 12px;
  font-weight: 600; font-size: 0.98rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(11,16,32,0.25); }
.btn-ghost { background: var(--white); color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Sections ---------- */
section.block { padding: var(--space-xl) 0; }
.section-head { max-width: 640px; margin-bottom: var(--space-lg); }
.section-head h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.3rem);
  letter-spacing: -0.02em; font-weight: 800;
}
.section-head p { margin-top: 14px; color: var(--muted); font-size: 1.05rem; }

/* ---------- Servicios: editorial split ---------- */
.split {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}
.split-head h2 { font-size: clamp(1.6rem, 3.5vw, 2.3rem); letter-spacing: -0.02em; font-weight: 800; }
.split-head p { margin-top: 14px; color: var(--muted); font-size: 1.05rem; }
@media (min-width: 861px) { .split-head { position: sticky; top: 96px; } }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: var(--space-md); } }

.features { list-style: none; display: flex; flex-direction: column; }
.feature {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-sm);
  padding: var(--space-md) 0;
  border-top: 1px solid var(--line);
}
.feature:first-child { border-top: 0; padding-top: 0; }
.feature:last-child { padding-bottom: 0; }
.feature-num {
  font-size: 0.85rem; font-weight: 700; letter-spacing: 0.06em;
  color: var(--accent); font-variant-numeric: tabular-nums;
  padding-top: 0.4rem;
}
.feature h3 { font-size: 1.2rem; letter-spacing: -0.01em; margin-bottom: 6px; }
.feature p { color: var(--muted); font-size: 0.98rem; }

/* ---------- Soluciones: featured + supporting ---------- */
.solutions { display: flex; flex-direction: column; gap: var(--space-sm); }
.sol-feature {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
  padding: clamp(1.5rem, 4vw, 2.75rem);
}
.sol-feature-media {
  background: linear-gradient(135deg, rgba(79,107,255,0.10), rgba(0,212,179,0.10));
  border: 1px solid var(--line);
  border-radius: 12px;
  aspect-ratio: 16 / 10;
  display: grid; place-items: center;
  padding: clamp(1.5rem, 4vw, 3rem);
}
.sol-feature-media img { width: 100%; max-width: 280px; height: auto; object-fit: contain; }
.sol-feature-body h3 { font-size: clamp(1.3rem, 2.5vw, 1.6rem); letter-spacing: -0.02em; margin: 12px 0 10px; }
.sol-feature-body p { color: var(--muted); font-size: 1rem; }
@media (max-width: 720px) { .sol-feature { grid-template-columns: 1fr; } }

.sol-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-sm); }
@media (max-width: 860px) { .sol-grid { grid-template-columns: 1fr; } }

/* ---------- Nosotros: trust columns ---------- */
.trust { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.5rem, 4vw, 3rem); }
.trust-item { padding-left: var(--space-sm); border-left: 2px solid var(--accent); }
.trust-item h3 { font-size: 1.1rem; letter-spacing: -0.01em; margin-bottom: 8px; }
.trust-item p { color: var(--muted); font-size: 0.96rem; }
@media (max-width: 760px) {
  .trust { grid-template-columns: 1fr; }
  .trust-item { border-left: 0; border-top: 2px solid var(--accent); padding-left: 0; padding-top: var(--space-sm); }
}

/* Alternate section background */
section.block.alt {
  background: linear-gradient(180deg, #eef1fb 0%, var(--paper) 100%);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

/* Solution card tag pill */
.card .tag {
  display: inline-block;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(79,107,255,0.10);
  padding: 4px 10px; border-radius: 999px;
  margin-bottom: 14px;
}

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(11,16,32,0.08); border-color: transparent; }
.card h3 { font-size: 1.15rem; letter-spacing: -0.01em; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 0.96rem; }
.card-link {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 16px; font-weight: 600; font-size: 0.9rem;
  color: var(--accent);
  transition: gap 0.15s ease;
}
.card-link:hover { gap: 11px; }

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--ink);
  color: #fff;
  border-radius: 24px;
  padding: 56px 48px;
  text-align: center;
  background-image: radial-gradient(600px 240px at 50% 0%, rgba(79,107,255,0.35), transparent);
}
.cta-band h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); letter-spacing: -0.02em; }
.cta-band p { color: #aeb6d4; margin-top: 14px; font-size: 1.05rem; }
.cta-band .btn-primary { background: #fff; color: var(--ink); margin-top: 28px; }
.cta-band .btn-primary:hover { box-shadow: 0 12px 30px rgba(0,0,0,0.4); }

/* ---------- Footer ---------- */
footer {
  border-top: 1px solid var(--line);
  padding: 48px 0 40px;
  margin-top: 40px;
}
.foot {
  display: flex; justify-content: space-between; align-items: flex-start;
  flex-wrap: wrap; gap: 28px;
}
.foot .brand { margin-bottom: 12px; }
.foot p { color: var(--muted); font-size: 0.9rem; max-width: 320px; }
.foot-links { display: flex; gap: 26px; font-size: 0.92rem; color: var(--muted); }
.foot-links a:hover { color: var(--ink); }
.foot-bottom {
  margin-top: 34px; padding-top: 22px; border-top: 1px solid var(--line);
  font-size: 0.85rem; color: var(--muted);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
}

/* ---------- Legal pages ---------- */
.legal { padding: 64px 0 40px; }
.legal .wrap { max-width: 760px; }
.legal h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); letter-spacing: -0.02em; margin-bottom: 8px; }
.legal .updated { color: var(--muted); font-size: 0.9rem; margin-bottom: 40px; }
.legal h2 { font-size: 1.25rem; margin: 36px 0 12px; letter-spacing: -0.01em; }
.legal p, .legal li { color: #2b3245; font-size: 1rem; margin-bottom: 12px; }
.legal ul { padding-left: 22px; }
.legal a { color: var(--accent); }
.legal a:hover { text-decoration: underline; }
.back {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--muted); font-size: 0.9rem; margin-bottom: 28px;
}
.back:hover { color: var(--ink); }

/* ---------- Reduced motion ---------- */
@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;
  }
  .card:hover, .btn-primary:hover { transform: none; }
}
