/* ============================================================
   IntegramIA — base.css
   Tokens (claro/oscuro), reset, tipografía, componentes base.
   ============================================================ */

:root {
  /* Marca */
  --ink: #101C3A;
  --coral: #FF6B6B;
  --teal: #4ECDC4;
  --yellow: #FFE66D;
  --paper: #F7FFF7;

  /* Tema claro (por defecto) */
  --bg: #F7FFF7;
  --text: #101C3A;
  --muted: rgba(16, 28, 58, .64);
  --muted-2: rgba(16, 28, 58, .5);
  --card: #FFFFFF;
  --line: rgba(16, 28, 58, .13);
  --line-soft: rgba(16, 28, 58, .08);

  --btn-bg: #101C3A;
  --btn-fg: #F7FFF7;

  --shadow: 0 1px 2px rgba(16, 28, 58, .05), 0 14px 34px -22px rgba(16, 28, 58, .35);
  --shadow-hover: 0 2px 3px rgba(16, 28, 58, .06), 0 20px 40px -22px rgba(16, 28, 58, .45);

  --radius: 18px;
  --radius-lg: 28px;
  --wrap: 1140px;
  --header-h: 70px;

  --font: "Cabinet Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

[data-theme="dark"] {
  --bg: #101C3A;
  --text: #F7FFF7;
  --muted: rgba(247, 255, 247, .74);
  --muted-2: rgba(247, 255, 247, .56);
  --card: #162650;
  --line: rgba(247, 255, 247, .16);
  --line-soft: rgba(247, 255, 247, .09);

  --btn-bg: #F7FFF7;
  --btn-fg: #101C3A;

  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 16px 36px -22px rgba(0, 0, 0, .7);
  --shadow-hover: 0 2px 3px rgba(0, 0, 0, .35), 0 22px 44px -22px rgba(0, 0, 0, .8);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}
html.nofx { scroll-behavior: auto; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

::selection { background: var(--yellow); color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- Tipografía ---------- */
.h1 {
  font-size: clamp(2.35rem, 5.6vw, 4.35rem);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -.028em;
}

.h2 {
  font-size: clamp(1.75rem, 3.6vw, 2.7rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -.022em;
}

.lead {
  font-size: clamp(1.02rem, 1.6vw, 1.18rem);
  color: var(--muted);
  line-height: 1.65;
}

.micro {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
}

.micro .ico { width: 13px; height: 13px; color: var(--coral); }

.accent { color: var(--coral); }

/* ---------- Layout ---------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2rem);
}

.section { padding-block: clamp(4rem, 9vw, 7rem); }
.section--tight { padding-block: clamp(3rem, 6vw, 4.5rem); }

.section-head { max-width: 720px; display: grid; gap: 1rem; }
.section-head--center { margin-inline: auto; text-align: center; justify-items: center; }

/* ---------- Iconos ---------- */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.ico {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.logo { width: 34px; height: 34px; color: var(--coral); flex: none; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  padding: .9rem 1.45rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 500;
  font-size: .97rem;
  line-height: 1;
  white-space: nowrap;
  transition: transform .18s ease, background-color .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease;
}
.btn .ico { width: 17px; height: 17px; }

/* Botones con la firma de marca: sombra dura coral (al pulsar se hunden en la sombra) */
.btn--primary { background: var(--btn-bg); color: var(--btn-fg); box-shadow: 4px 4px 0 var(--coral); }
.btn--primary:hover { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--coral); }

.btn--ghost { border-color: var(--line); color: var(--text); }
.btn--ghost:hover { border-color: var(--muted-2); background: var(--line-soft); }

/* variantes para superficies oscuras (tarjeta hero, tarjeta CTA) */
.btn--light { background: #F7FFF7; color: #101C3A; box-shadow: 4px 4px 0 var(--coral); }
.btn--light:hover { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--coral); }

.btn--outline-light { border-color: rgba(247, 255, 247, .6); color: #F7FFF7; }
.btn--outline-light:hover { border-color: rgba(247, 255, 247, .9); background: rgba(247, 255, 247, .09); }

.btn--sm { padding: .68rem 1.1rem; font-size: .9rem; }
.btn--sm.btn--primary, .btn--sm.btn--light { box-shadow: 3px 3px 0 var(--coral); }
.btn--sm.btn--primary:hover, .btn--sm.btn--light:hover { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--coral); }

/* ---------- Chips ---------- */
/* Chips = etiquetas de especificación, no botones: sin borde ni pastilla */
.chip {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.chip .ico { width: 14px; height: 14px; color: var(--coral); }

/* ---------- Tarjetas ---------- */
.card {
  background: var(--card);
  border: 1px solid rgba(16, 28, 58, .12);
  border-radius: var(--radius);
  padding: clamp(1.25rem, 2.2vw, 1.6rem);
  box-shadow: 0 1px 2px rgba(16, 28, 58, .04);
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}
[data-theme="dark"] .card { box-shadow: none; border-color: rgba(247, 255, 247, .12); }

.card--hover:hover {
  transform: translateY(-3px);
  border-color: var(--line);
  box-shadow: var(--shadow-hover);
}

.card-ico {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  margin-bottom: 1.05rem;
  background: rgba(16, 28, 58, .075);
  color: var(--text);
}
.card-ico .ico { width: 20px; height: 20px; }
[data-theme="dark"] .card-ico { background: rgba(247, 255, 247, .09); }

.card h3 { font-size: 1.06rem; font-weight: 700; letter-spacing: -.01em; margin-bottom: .45rem; }
.card p { font-size: .93rem; color: var(--muted); line-height: 1.6; }

/* ---------- Reveal (animación de entrada) ---------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .55s cubic-bezier(.2, .6, .2, 1), transform .55s cubic-bezier(.2, .6, .2, 1);
  transition-delay: var(--d, 0s);
}
.reveal.in { opacity: 1; transform: none; }

html.nofx .reveal { opacity: 1; transform: none; transition: none; }
html.nofx .hero-star { animation: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-star { animation: none; }
  .btn, .card { transition: none; }
}

