/* ============================================================
   Veltis Group — landing · v3 "global"
   Lenguaje visual aprobado por los socios (referencia de Marcelo):
   índigo→cian, Plus Jakarta Sans + Inter, fondo espacio profundo,
   tarjetas redondeadas con glow, blobs difuminados, navbar glass.
   Bilingüe EN/ES · autocontenida (cero requests externos).
   ============================================================ */

@font-face { font-family: 'Plus Jakarta Sans'; src: url('/assets/fonts/PlusJakartaSans-600.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Plus Jakarta Sans'; src: url('/assets/fonts/PlusJakartaSans-700.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Plus Jakarta Sans'; src: url('/assets/fonts/PlusJakartaSans-800.woff2') format('woff2'); font-weight: 800; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/assets/fonts/Inter-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/assets/fonts/Inter-500.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/assets/fonts/Inter-600.woff2') format('woff2'); font-weight: 600; font-display: swap; }

/* ---------- tokens: tema claro ---------- */
:root {
  --brand-400: #818CF8;
  --brand-500: #6366F1;
  --brand-600: #4F46E5;
  --brand-700: #4338CA;
  --cyan: #06B6D4;
  --cyan-bright: #22D3EE;

  --bg: #F8FAFC;            /* slate-50 */
  --surface: #FFFFFF;
  --surface-2: #F1F5F9;     /* slate-100 */
  --ink: #0F172A;           /* slate-900 */
  --ink-soft: #475569;      /* slate-600 */
  --ink-faint: #64748B;     /* slate-500 */
  --line: #E2E8F0;          /* slate-200 */
  --line-strong: #CBD5E1;   /* slate-300 */

  --accent: var(--brand-600);
  --accent-ink: #FFFFFF;
  --btn-bg: var(--brand-600);
  --grad-a: #4F46E5;
  --grad-b: #0E7490; /* cian oscurecido: el extremo del degradado de texto debe pasar AA sobre fondo claro */
  --blob-a: rgba(99, 102, 241, 0.10);
  --blob-b: rgba(34, 211, 238, 0.10);
  --grid-line: rgba(99, 102, 241, 0.05);
  --glass: rgba(255, 255, 255, 0.55);
  --shadow-card: 0 1px 2px rgba(15, 23, 42, 0.05), 0 10px 30px -16px rgba(15, 23, 42, 0.18);
  --shadow-lift: 0 4px 8px rgba(15, 23, 42, 0.06), 0 24px 48px -16px rgba(15, 23, 42, 0.25);
  --glow: 0 0 0 rgba(0, 0, 0, 0);
  --nav-bg: rgba(255, 255, 255, 0.8);

  --ff-display: 'Plus Jakarta Sans', 'Segoe UI', system-ui, sans-serif;
  --ff-body: 'Inter', 'Segoe UI', system-ui, sans-serif;

  --w: 1200px;
  --r-lg: 16px;
  --r-md: 10px;

  color-scheme: light;
}

/* ---------- tokens: tema oscuro (sistema, salvo fijado en claro) ---------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0B0F19;
    --surface: #111827;
    --surface-2: #1E293B;
    --ink: #F1F5F9;
    --ink-soft: #94A3B8;
    --ink-faint: #94A3B8;
    --line: #1E293B;
    --line-strong: #334155;
    --accent: var(--brand-400);
    --btn-bg: var(--brand-600);
    --grad-a: #818CF8;
    --grad-b: #22D3EE;
    --blob-a: rgba(99, 102, 241, 0.20);
    --blob-b: rgba(34, 211, 238, 0.10);
    --grid-line: rgba(129, 140, 248, 0.06);
    --glass: rgba(17, 24, 39, 0.55);
    --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 32px -16px rgba(0, 0, 0, 0.6);
    --shadow-lift: 0 4px 8px rgba(0, 0, 0, 0.4), 0 26px 52px -16px rgba(0, 0, 0, 0.7);
    --glow: 0 0 24px rgba(99, 102, 241, 0.16);
    --nav-bg: rgba(11, 15, 25, 0.8);
    color-scheme: dark;
  }
}

/* ---------- tokens: tema oscuro fijado con el toggle ---------- */
:root[data-theme="dark"] {
  --bg: #0B0F19;
  --surface: #111827;
  --surface-2: #1E293B;
  --ink: #F1F5F9;
  --ink-soft: #94A3B8;
  --ink-faint: #94A3B8;
  --line: #1E293B;
  --line-strong: #334155;
  --accent: var(--brand-400);
  --btn-bg: var(--brand-600);
  --grad-a: #818CF8;
  --grad-b: #22D3EE;
  --blob-a: rgba(99, 102, 241, 0.20);
  --blob-b: rgba(34, 211, 238, 0.10);
  --grid-line: rgba(129, 140, 248, 0.06);
  --glass: rgba(17, 24, 39, 0.55);
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 32px -16px rgba(0, 0, 0, 0.6);
  --shadow-lift: 0 4px 8px rgba(0, 0, 0, 0.4), 0 26px 52px -16px rgba(0, 0, 0, 0.7);
  --glow: 0 0 24px rgba(99, 102, 241, 0.16);
  --nav-bg: rgba(11, 15, 25, 0.8);
  color-scheme: dark;
}

/* ---------- base ---------- */
* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--ff-body);
  font-size: 16.5px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: var(--w); margin: 0 auto; padding: 0 24px; }

h1, h2, h3, h4 { font-family: var(--ff-display); line-height: 1.12; text-wrap: balance; }
h1 { font-size: clamp(2.5rem, 5.6vw, 4.3rem); font-weight: 800; letter-spacing: -0.03em; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.7rem); font-weight: 700; letter-spacing: -0.02em; }
h3 { font-size: 1.3rem; font-weight: 700; letter-spacing: -0.01em; }
p  { max-width: 64ch; }

a { color: var(--accent); text-decoration: none; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--brand-500); outline-offset: 3px; border-radius: 4px; }

::selection { background: var(--brand-500); color: #fff; }

.eyebrow {
  font-family: var(--ff-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

.grad {
  background: linear-gradient(92deg, var(--grad-a), var(--grad-b));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- navbar ---------- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  background: var(--nav-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s, box-shadow .25s;
}
.topbar.scrolled { border-bottom-color: var(--line); box-shadow: 0 4px 20px -12px rgba(15, 23, 42, 0.15); }
.topbar-in { display: flex; align-items: center; gap: 20px; height: 72px; }

.wordmark {
  font-family: var(--ff-display); font-weight: 800; font-size: 1.3rem;
  letter-spacing: -0.02em; color: var(--ink); white-space: nowrap;
}
.wordmark b { color: var(--brand-500); font-weight: 800; }

.nav { display: flex; gap: 26px; margin-left: auto; align-items: center; }
.nav a { color: var(--ink-soft); font-weight: 500; font-size: 0.92rem; position: relative; }
.nav a:hover { color: var(--accent); }
.nav a::after {
  content: ''; position: absolute; left: 0; bottom: -5px; height: 2px; width: 0;
  background: var(--brand-500); transition: width .25s ease-out;
}
.nav a:hover::after { width: 100%; }

.iconbtn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 10px;
  border: 1px solid var(--line); background: transparent; color: var(--ink-soft);
  cursor: pointer; transition: color .15s, border-color .15s, background .15s;
}
.iconbtn:hover { color: var(--accent); border-color: var(--brand-500); }

.langlink {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 600; font-size: 0.8rem; letter-spacing: 0.06em;
  color: var(--ink-soft); border: 1px solid var(--line); border-radius: 10px;
  padding: 8px 12px; transition: color .15s, border-color .15s;
}
.langlink:hover { color: var(--accent); border-color: var(--brand-500); }

.ticon-sun { display: none; }
:root[data-eff="dark"] .ticon-sun { display: inline; }
:root[data-eff="dark"] .ticon-moon { display: none; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 0.95rem;
  padding: 11px 22px; border-radius: var(--r-md);
  border: 1px solid transparent;
  transition: background .2s, color .2s, border-color .2s, box-shadow .2s;
}
.btn-solid { background: var(--btn-bg); color: var(--accent-ink); box-shadow: 0 10px 24px -10px rgba(79, 70, 229, 0.5); }
.btn-solid:hover { background: var(--brand-700); }
:root[data-theme="dark"] .btn-solid:hover { background: var(--brand-400); color: #0B0F19; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn-solid:hover { background: var(--brand-400); color: #0B0F19; } }
.btn-ghost { border-color: var(--line-strong); color: var(--ink); background: var(--surface); }
.btn-ghost:hover { border-color: var(--brand-500); color: var(--accent); }
.btn-lg { padding: 15px 30px; font-size: 1rem; }

/* el CTA y el enlace de idioma dentro del nav no heredan color ni subrayado de .nav a */
.nav a.btn-solid, .nav a.btn-solid:hover { color: var(--accent-ink); }
.nav a.btn::after, .nav a.langlink::after { display: none; }

/* menú móvil */
.menubtn, .mob-theme { display: none; }
.mobile-menu {
  display: none;
  position: absolute; top: 72px; left: 0; right: 0;
  background: var(--surface); border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-lift);
  padding: 12px 24px 20px;
}
.mobile-menu.open { display: block; }
/* si el viewport se ensancha con el menú abierto, el panel no debe quedar huérfano */
@media (min-width: 701px) { .mobile-menu { display: none !important; } }
.mobile-menu a {
  display: block; padding: 13px 10px; border-radius: 10px;
  color: var(--ink-soft); font-weight: 500;
}
.mobile-menu a:hover { background: var(--surface-2); color: var(--accent); }
.mobile-menu .mm-cta { color: var(--accent); font-weight: 600; border-top: 1px solid var(--line); margin-top: 8px; padding-top: 16px; }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding-top: 176px; padding-bottom: 120px;
  min-height: 88vh; display: flex; align-items: center;
}
.blob { position: absolute; border-radius: 50%; pointer-events: none; filter: blur(90px); }
.blob-a { top: -12%; right: -6%; width: 46vw; height: 46vw; background: var(--blob-a); }
.blob-b { bottom: -14%; left: -10%; width: 38vw; height: 38vw; background: var(--blob-b); }
@media (prefers-reduced-motion: no-preference) {
  .blob-a { animation: pulse-slow 5s cubic-bezier(0.4, 0, 0.6, 1) infinite; }
}
@keyframes pulse-slow { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }

.hero-grid {
  position: relative; z-index: 1; width: 100%;
  display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr);
  gap: 56px; align-items: center;
}
.hero-copy .lede { margin-top: 26px; font-size: 1.18rem; color: var(--ink-soft); }
.cta-row { display: flex; gap: 14px; margin-top: 40px; flex-wrap: wrap; }

.badge {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-soft);
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--glass);
  backdrop-filter: blur(6px);
  padding: 8px 16px; margin-bottom: 30px;
}
.badge-dot { position: relative; width: 8px; height: 8px; flex-shrink: 0; }
.badge-dot::before {
  content: ''; position: absolute; inset: 0; border-radius: 999px; background: var(--brand-500);
}
@media (prefers-reduced-motion: no-preference) {
  .badge-dot::after {
    content: ''; position: absolute; inset: 0; border-radius: 999px; background: var(--brand-500);
    opacity: 0.7; animation: ping 1.6s cubic-bezier(0, 0, 0.2, 1) infinite;
  }
}
@keyframes ping { 75%, 100% { transform: scale(2.4); opacity: 0; } }

/* pieza de vidrio flotante */
.hero-tile { position: relative; }
@media (prefers-reduced-motion: no-preference) {
  .hero-tile { animation: float 6s ease-in-out infinite; }
}
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.hero-tile-in {
  aspect-ratio: 1; max-width: 400px; margin: 0 auto;
  border-radius: 24px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lift), var(--glow);
  backdrop-filter: blur(20px);
  display: flex; align-items: center; justify-content: center;
  background-image:
    linear-gradient(135deg, rgba(99, 102, 241, 0.14), rgba(34, 211, 238, 0.14)),
    repeating-linear-gradient(0deg, var(--grid-line) 0 1px, transparent 1px 28px),
    repeating-linear-gradient(90deg, var(--grid-line) 0 1px, transparent 1px 28px);
}
.hero-tile svg { width: 62%; height: 62%; color: var(--brand-500); opacity: 0.55; }

/* ---------- secciones ---------- */
.section { padding: 104px 0; }
.section-alt { background: var(--surface); border-block: 1px solid var(--line); }
.section-lede { color: var(--ink-soft); margin-top: 16px; font-size: 1.06rem; }

.sec-head { max-width: 720px; }
.sec-head.centered { margin-inline: auto; text-align: center; }
.sec-head.centered p { margin-inline: auto; }

/* trama de grid para el método */
.section-grid-bg {
  background-image:
    repeating-linear-gradient(0deg, var(--grid-line) 0 1px, transparent 1px 36px),
    repeating-linear-gradient(90deg, var(--grid-line) 0 1px, transparent 1px 36px);
}

/* ---------- tarjetas ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
}
@media (prefers-reduced-motion: no-preference) {
  .card { transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
  .card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift), var(--glow); border-color: rgba(99, 102, 241, 0.45); }
}

.icon-tile {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 12px;
  background: var(--surface-2); color: var(--accent);
  margin-bottom: 22px;
  transition: background .25s, color .25s;
}
.card:hover .icon-tile { background: var(--accent); color: #fff; }

/* servicios */
.svc-grid { margin-top: 52px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px; }
.svc { padding: 34px 32px; }
.svc h3 { margin-bottom: 12px; }
.svc p { color: var(--ink-soft); font-size: 0.95rem; }

/* método: stepper */
.stepper {
  list-style: none; padding: 0; margin: 60px 0 0;
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 0 26px;
}
.mstep-top { display: flex; align-items: center; margin-bottom: 20px; }
.mstep-dot {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: 999px; flex-shrink: 0;
  border: 2px solid var(--brand-500); color: var(--accent);
  background: var(--surface);
  font-family: var(--ff-display); font-size: 1.05rem; font-weight: 700;
  box-shadow: 0 2px 10px -4px rgba(79, 70, 229, 0.4);
}
@media (prefers-reduced-motion: no-preference) {
  .mstep-dot { transition: transform .2s ease; }
  .mstep:hover .mstep-dot { transform: scale(1.08); }
}
.mstep-top::after {
  content: ''; flex: 1; height: 1px; margin-left: 14px;
  background: linear-gradient(90deg, var(--line-strong), transparent);
}
.mstep:last-child .mstep-top::after { display: none; }
.mstep h3 { margin-bottom: 8px; font-size: 1.02rem; }
.mstep p { color: var(--ink-soft); font-size: 0.88rem; }

/* socios */
.partners { margin-top: 52px; display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.partner { padding: 36px 34px; }
.partner-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  border-bottom: 1px solid var(--line); padding-bottom: 18px; margin-bottom: 18px;
}
.partner h3 { font-size: 1.4rem; }
.partner-role { color: var(--accent); font-weight: 500; font-size: 0.85rem; margin-top: 5px; }
.partner p { color: var(--ink-soft); font-size: 0.94rem; }
.linkbtn {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 40px; height: 40px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-faint);
  transition: color .2s, border-color .2s;
}
.linkbtn:hover { color: #0A66C2; border-color: #0A66C2; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 20px 0 0; }
.chips li {
  font-size: 0.74rem; font-weight: 500;
  padding: 6px 12px; border: 1px solid var(--line); border-radius: 8px;
  color: var(--ink-soft); background: var(--surface-2);
}

/* diferenciales */
.diff-grid { margin-top: 52px; display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.diff { padding: 30px 30px; }
.diff h3 { margin-bottom: 10px; font-size: 1.12rem; }
.diff p { color: var(--ink-soft); font-size: 0.95rem; }

/* contacto */
.contact-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 64px; align-items: start; }
.contact-cards { display: grid; gap: 18px; }
.ccard { display: flex; align-items: flex-start; gap: 16px; padding: 24px 24px; }
.ccard .icon-tile { width: 42px; height: 42px; margin-bottom: 0; flex-shrink: 0; }
.ccard-label { font-family: var(--ff-display); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 4px; }
.ccard a { font-weight: 600; color: var(--ink); font-size: 1.02rem; word-break: break-all; }
.ccard a:hover { color: var(--accent); }
.ccard p { font-size: 0.92rem; color: var(--ink-soft); }

/* footer */
.footer { background: var(--surface); border-top: 1px solid var(--line); }
.footer-in {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  padding-top: 30px; padding-bottom: 34px;
  font-size: 0.85rem; color: var(--ink-faint);
}
.footer .wordmark { font-size: 1.05rem; }

/* ---------- revelado (mejora progresiva) ----------
   Por defecto TODO es visible: sin JS, en crawlers o en contextos sin
   viewport, la página se lee completa. html.anim (solo con viewport real,
   IntersectionObserver y sin prefers-reduced-motion) activa la entrada. */
html.anim .reveal {
  opacity: 0; transform: translateY(20px);
  transition: opacity .8s cubic-bezier(0.16, 1, 0.3, 1), transform .8s cubic-bezier(0.16, 1, 0.3, 1);
}
html.anim .reveal.in { opacity: 1; transform: none; }
html.anim .rd-1 { transition-delay: 100ms; }
html.anim .rd-2 { transition-delay: 200ms; }
html.anim .rd-3 { transition-delay: 300ms; }

/* ---------- responsive ---------- */
@media (max-width: 1020px) {
  .stepper { grid-template-columns: 1fr 1fr; gap: 32px 26px; }
  .mstep-top::after { display: none; }
}
@media (max-width: 920px) {
  .hero { padding-top: 140px; padding-bottom: 80px; min-height: 0; }
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .hero-tile { display: none; }
  .svc-grid { grid-template-columns: 1fr; }
  .partners { grid-template-columns: 1fr; }
  .diff-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .section { padding: 72px 0; }
}
@media (max-width: 700px) {
  .nav { display: none; }
  .mob-theme { display: inline-flex; margin-left: auto; }
  .menubtn { display: inline-flex; }
  .stepper { grid-template-columns: 1fr; }
  body { font-size: 16px; }
}
