/* ============================================================
   VADAI · Claude en tu Empresa
   base.css — tokens, reset, tipografía, primitivas
   ------------------------------------------------------------
   ⚠️ PLACEHOLDER DE MARCA: todo el branding vive en :root.
   Cambia estas 6 variables y la identidad completa cambia.
   ============================================================ */

:root {
  /* ——— MARCA VADAI ———————————————————————————————
     --brand-accent es el color oficial (#00A0DB). Se usa para todo lo
     GRÁFICO: gradientes, barras, bordes, puntos, iconos.

     --brand-accent-deep es el mismo tono oscurecido. Se usa donde hay
     TEXTO: botones con texto blanco y texto de color sobre fondo claro.
     Motivo: #00A0DB con blanco encima da 2.8:1 de contraste y reprueba
     WCAG AA (mínimo 4.5:1). El deep da 5.4:1. Misma familia, legible.
     ————————————————————————————————————————————————— */
  --brand-ink: #0A1A2F;          /* navy casi negro — titulares y botón primario */
  --brand-accent: #00A0DB;       /* ★ COLOR OFICIAL VADAI */
  --brand-accent-2: #4FC6EE;     /* cian claro — extremo claro del gradiente */
  --brand-accent-deep: #006E96;  /* variante legible con texto blanco */
  --brand-accent-soft: #DFF4FC;  /* fondo de pills y realces */
  --brand-lime: #C6F24E;         /* acento secundario (estilo referencia) */
  --brand-lime-ink: #24340A;     /* texto sobre lima */
  --brand-signal: #00A0DB;       /* data-viz principal */
  --brand-signal-soft: #D2EEFB;
  --brand-success: #12A150;

  /* —— GRADIENTES ————————————————————————————————— */
  /* brillos MUY sutiles (antes casi blanqueaban las esquinas y el texto blanco
     se perdía). El extremo claro es un azul real, no casi-blanco: sigue leyéndose
     como degradado pero con contraste para el texto blanco encima. */
  --grad-panel:
    radial-gradient(110% 85% at 20% -15%, rgba(255,255,255,.13) 0%, rgba(255,255,255,0) 46%),
    radial-gradient(75% 55% at 92% 2%, rgba(255,255,255,.07) 0%, rgba(255,255,255,0) 50%),
    linear-gradient(158deg, #1AACE0 0%, #00A0DB 30%, #0079AD 66%, #005E82 100%);
  --grad-soft: linear-gradient(180deg, #EFFAFE 0%, #FFFFFF 100%);
  --grad-text: linear-gradient(92deg, #006E96, #00A0DB);

  /* —— SUPERFICIES ——————————————————————————————— */
  --c-canvas: #FFFFFF;
  --c-surface: #EAF4FA;
  --c-surface-2: #D8EAF3;
  --c-line: #D2E3EC;
  --c-line-strong: #B3D0DE;

  /* —— TEXTO ————————————————————————————————————— */
  --c-text: #072835;
  --c-text-2: #4E6572;
  --c-text-3: #859AA6;

  /* —— TIPOGRAFÍA ————————————————————————————————— */
  --f-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
  --f-display: "Anton", "Inter", sans-serif;   /* titulares gigantes estilo referencia */

  --t-display: clamp(3rem, 7vw, 6rem);
  --t-h1: clamp(2.4rem, 5.2vw, 4.1rem);
  --t-h2: clamp(1.85rem, 3.5vw, 2.8rem);
  --t-h3: clamp(1.3rem, 2vw, 1.65rem);
  --t-body: clamp(1.12rem, 1.3vw, 1.26rem);
  --t-small: 1.05rem;
  --t-micro: 0.92rem;

  /* —— ESPACIO ————————————————————————————————————— */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px;
  --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 64px;
  --s-9: 96px; --s-10: 128px; --s-11: 176px;

  --radius-s: 8px;
  --radius-m: 14px;
  --radius-l: 22px;
  --radius-xl: 32px;

  /* —— PROFUNDIDAD (sombras teñidas de azul, como la referencia) ——— */
  --sh-1: 0 1px 2px rgba(0,80,115,.07), 0 3px 10px rgba(0,80,115,.07);
  --sh-2: 0 2px 6px rgba(0,80,115,.08), 0 14px 34px rgba(0,80,115,.12);
  --sh-3: 0 4px 12px rgba(0,80,115,.10), 0 30px 70px rgba(0,80,115,.18);
  --sh-blue: 0 14px 34px rgba(0,160,219,.28);

  /* —— MOVIMIENTO ————————————————————————————————— */
  --e-out: cubic-bezier(.22, 1, .36, 1);
  --e-in-out: cubic-bezier(.65, 0, .35, 1);
  --e-spring: cubic-bezier(.34, 1.56, .64, 1);
  --d-fast: .18s;
  --d-mid: .38s;
  --d-slow: .72s;

  --wrap: 1180px;
  --wrap-narrow: 760px;
}

/* ————————————————————————————————— reset ————— */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
/* en mobile agrandamos todo el texto (los tokens en rem crecen con el root) */
@media (max-width: 600px) { html { font-size: 17.5px; } }
@media (max-width: 380px) { html { font-size: 17px; } }

body {
  font-family: var(--f-sans);
  font-size: var(--t-body);
  line-height: 1.6;
  color: var(--c-text);
  background: var(--c-canvas);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "cv02","cv03","cv04","ss01";
  overflow-x: hidden;
}

img, svg, video, canvas { display: block; max-width: 100%; }
/* [hidden] debe ganarle a cualquier display de nuestras clases */
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; padding: 0; }

:focus-visible {
  outline: 2px solid var(--brand-accent);
  outline-offset: 3px;
  border-radius: 4px;
}

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

/* ————————————————————————— tipografía base ————— */
h1, h2, h3, h4 {
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.028em;
  text-wrap: balance;
}
h1 { font-size: var(--t-h1); }
h2 { font-size: var(--t-h2); }
h3 { font-size: var(--t-h3); letter-spacing: -0.018em; line-height: 1.25; }

.display {
  font-size: var(--t-display);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

/* ——— titular gigante estilo referencia (Anton, mayúsculas) ——— */
.display-xl {
  font-family: var(--f-display);
  font-weight: 400;
  text-transform: uppercase;
  line-height: .92;
  letter-spacing: -0.005em;
  text-wrap: balance;
}
.h-mega {
  font-family: var(--f-display);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0;
  line-height: .95;
}

.lede {
  font-size: clamp(1.05rem, 1.5vw, 1.3rem);
  line-height: 1.5;
  color: var(--c-text-2);
  letter-spacing: -0.012em;
  text-wrap: pretty;
}

.eyebrow {
  font-size: var(--t-micro);
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--c-text-3);
}

.muted { color: var(--c-text-2); }
.tiny { font-size: var(--t-small); color: var(--c-text-2); }
.mono { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }

/* ————————————————————————————— layout ————————— */
.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.wrap-narrow { width: min(100% - 2.5rem, var(--wrap-narrow)); margin-inline: auto; }

.section { padding-block: clamp(var(--s-9), 12vh, var(--s-11)); position: relative; }
.section--tight { padding-block: var(--s-9); }

/* ritmo de la página: secciones blancas y teñidas alternadas.
   Sin esto todo es blanco sobre blanco y no se distingue dónde acaba una y empieza otra. */
.section--tint { background: var(--c-surface); border-block: 1px solid var(--c-line); }

.stack > * + * { margin-top: var(--s-4); }
.stack-lg > * + * { margin-top: var(--s-6); }

/* ————————————————————————————— botones ———————— */
.btn {
  --btn-bg: var(--brand-ink);
  --btn-fg: #fff;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  padding: 15px 28px;
  border-radius: 100px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: 0.97rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition: transform var(--d-fast) var(--e-out),
              box-shadow var(--d-mid) var(--e-out),
              background var(--d-fast) ease;
  will-change: transform;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--sh-2); }
.btn:active { transform: translateY(0) scale(.985); }

/* el botón lleva un disco con flecha, como la referencia */
.btn__disc {
  display: grid; place-items: center;
  width: 26px; height: 26px; border-radius: 50%;
  background: rgba(255,255,255,.18);
  font-size: 11px; line-height: 1;
  margin-right: -12px; margin-left: 4px;
  transition: transform var(--d-mid) var(--e-out), background var(--d-fast);
}
.btn:hover .btn__disc { transform: translateX(3px); background: rgba(255,255,255,.28); }

.btn--accent { --btn-bg: var(--brand-accent-deep); box-shadow: var(--sh-blue); }
.btn--accent:hover { --btn-bg: #005E82; box-shadow: 0 18px 40px rgba(0,160,219,.34); }

.btn--lg { padding: 19px 34px; font-size: 1.05rem; }

/* acento lima (estilo referencia) — para CTAs secundarios de mucho contraste */
.btn--lime { --btn-bg: var(--brand-lime); --btn-fg: var(--brand-lime-ink); box-shadow: 0 12px 30px rgba(198,242,78,.35); }
.btn--lime:hover { --btn-bg: #d2f76a; box-shadow: 0 16px 36px rgba(198,242,78,.42); }
.btn--lime .btn__disc { background: var(--brand-ink); color: var(--brand-lime); }

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--c-text);
  border: 1px solid var(--c-line-strong);
}
.btn--ghost:hover { --btn-bg: var(--c-surface); box-shadow: none; }

/* botón blanco sobre panel azul */
.btn--white { --btn-bg: #fff; --btn-fg: var(--brand-ink); box-shadow: 0 12px 30px rgba(3,60,80,.24); }
.btn--white .btn__disc { background: var(--brand-accent-deep); color: #fff; }
.btn--white:hover { --btn-bg: #fff; box-shadow: 0 18px 38px rgba(3,60,80,.3); }

.btn__arrow { transition: transform var(--d-mid) var(--e-out); }
.btn:hover .btn__arrow { transform: translateX(3px); }

/* enlace fantasma (escape hatch del diagnóstico) */
.link-ghost {
  font-size: var(--t-small);
  color: var(--c-text-3);
  border-bottom: 1px solid transparent;
  transition: color var(--d-fast), border-color var(--d-fast);
}
.link-ghost:hover { color: var(--c-text); border-bottom-color: var(--c-line-strong); }

/* ————————————————————————————— piezas ————————— */
.card {
  background: var(--c-canvas);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-l);
  padding: var(--s-6);
}

.pill {
  display: inline-flex; align-items: center; gap: var(--s-2);
  padding: 6px 14px;
  border: 1px solid var(--c-line);
  border-radius: 100px;
  font-size: var(--t-small);
  background: var(--c-canvas);
}

/* ——— pill de sección (como la referencia: punto azul + texto) ——— */
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 16px 7px 8px;
  border-radius: 100px;
  background: var(--brand-accent-soft);
  color: var(--brand-accent-deep);
  font-size: var(--t-small);
  font-weight: 450;
  letter-spacing: -.01em;
}
.badge::before {
  content: ""; width: 18px; height: 18px; border-radius: 50%;
  background: var(--brand-accent);
  box-shadow: inset 0 0 0 4px rgba(255,255,255,.85);
}
.badge--on-blue { background: rgba(255,255,255,.18); color: #fff; backdrop-filter: blur(6px); }
.badge--on-blue::before { background: #fff; box-shadow: inset 0 0 0 4px rgba(0,160,219,.9); }

/* ——— panel de gradiente azul ——— */
.panel {
  position: relative;
  border-radius: clamp(22px, 3vw, 36px);
  background: var(--grad-panel);
  color: #fff;
  overflow: hidden;
  isolation: isolate;
}
.panel::after {           /* rayos de luz suaves */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(102deg, rgba(255,255,255,.16) 0%, rgba(255,255,255,0) 26%),
    linear-gradient(78deg, rgba(255,255,255,.12) 40%, rgba(255,255,255,0) 62%);
  pointer-events: none;
}
.panel h1, .panel h2, .panel h3 { color: #fff; }
.panel .muted, .panel .tiny { color: rgba(255,255,255,.78); }

/* texto con gradiente para resaltar una frase */
.grad-text {
  background: var(--grad-text);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}

.rule { height: 1px; background: var(--c-line); border: 0; }

/* logo VADAI oficial (wordmark). Va en todas las páginas. */
.brand { display: inline-flex; align-items: center; }
.brand__logo { height: 26px; width: auto; display: block; }

/* ————————————————————— revelado al hacer scroll ————— */
.reveal { opacity: 0; transform: translateY(18px); }
html.no-anim .reveal, .reveal.is-in { opacity: 1; transform: none; }
.reveal.is-in { transition: opacity .8s var(--e-out), transform .8s var(--e-out); }

/* ————————————————————————— accesibilidad ————— */
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; top: -60px; left: var(--s-4); z-index: 200;
  background: var(--brand-ink); color: #fff;
  padding: 10px 18px; border-radius: 100px; font-size: var(--t-small);
  transition: top var(--d-mid) var(--e-out);
}
.skip-link:focus { top: var(--s-4); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
}
