/* ==========================================================================
   centro-IDE · Hoja de estilos de la web corporativa
   Sin build step. Vanilla CSS con custom properties.

   IDENTIDAD: los tokens de :root definen la direccion visual activa.
   Direccion activa: B "Tinta y tiza" (soberania-tech).
   Alternativas A y C documentadas al final del bloque de tokens:
   para probarlas, basta con sustituir los valores de :root.
   ========================================================================== */

/* ---------- Fuentes self-hosted (Space Grotesk, licencia OFL) ---------- */

@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../assets/fonts/space-grotesk-latin-500.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../assets/fonts/space-grotesk-latin-700.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Tokens de identidad ---------- */

:root {
  /* Direccion B · "Tinta y tiza" — tinta azul profunda + papel calido +
     verde academico + amarillo tiza. Institucional pero cercana. */
  --ink: #182A44;          /* tinta: fondos oscuros y texto de titulares */
  --ink-soft: #223C63;     /* tinta secundaria: superficies sobre --ink */
  --paper: #F9F7F2;        /* papel calido: fondo general */
  --surface: #FFFFFF;      /* tarjetas */
  --text: #2A3442;         /* texto de parrafo sobre papel (AA holgado) */
  --text-light: #F4F1EA;   /* texto sobre tinta */
  --muted: #5A6472;        /* texto secundario sobre papel (AA) */
  --muted-light: #C4CBD8;  /* texto secundario sobre tinta (AA) */
  --accent: #1E7A55;       /* verde academico: botones y enlaces (AA con blanco y con papel) */
  --accent-strong: #16603F;/* hover / activo */
  --chalk: #FFD166;        /* amarillo tiza: realces sobre tinta */
  --border: #E4E0D6;

  /* Tipografia */
  --font-display: 'Space Grotesk', 'Segoe UI', system-ui, sans-serif;
  --font-body: system-ui, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'Cascadia Code', Consolas, 'SF Mono', Menlo, monospace;

  /* Ritmo */
  --radius: 10px;
  --radius-s: 6px;
  --container: 68rem;
  --container-narrow: 44rem;

  /*
    Direccion A · "Pizarra" (escolar-calida):
      --ink:#22403A; --ink-soft:#2E524B; --paper:#FBF8F1; --accent:#B4552D;
      --accent-strong:#93401F; --chalk:#F2C14E; --border:#E7E1D2;
      display: 'Fraunces' o 'Bitter' (serif) en vez de Space Grotesk.

    Direccion C · "Laboratorio" (tech-clara):
      --ink:#101418; --ink-soft:#1C232B; --paper:#FFFFFF; --accent:#0E63B8;
      --accent-strong:#0A4A8A; --chalk:#7FD1AE; --border:#E3E6EA;
      display: 'Inter Tight' o 'IBM Plex Sans'; acentos mono mas presentes.
  */
}

/* ---------- Reset minimo ---------- */

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; height: auto; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  color: var(--ink);
  margin: 0 0 0.6em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.1rem, 5.5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); }
h3 { font-size: 1.35rem; }

p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.3em; }

a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-strong); }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

/* Foco visible siempre (WCAG 2.4.7) */
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}
.hero :focus-visible,
.section-band :focus-visible,
.section-contact :focus-visible,
.site-footer :focus-visible {
  outline-color: var(--chalk);
}

/* ---------- Utilidades ---------- */

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 1.25rem;
}
.container-narrow { max-width: var(--container-narrow); }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--text-light);
  padding: 0.75rem 1.25rem;
  z-index: 100;
  border-radius: 0 0 var(--radius-s) 0;
}
.skip-link:focus {
  left: 0;
  color: var(--chalk);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  color: var(--accent-strong);
  margin-bottom: 0.75rem;
}
.eyebrow-light { color: var(--chalk); }

/* ---------- Marca: wordmark + keycap ---------- */

.wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--ink);
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.keycap {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.88em;
  background: var(--ink);
  color: var(--chalk);
  padding: 0.08em 0.35em 0.12em;
  border-radius: var(--radius-s);
  box-shadow: 0 2px 0 var(--accent-strong);
  display: inline-block;
  transform: translateY(-0.05em);
}

.keycap-invert {
  background: var(--chalk);
  color: var(--ink);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.35);
}

/* ---------- Cabecera ---------- */

.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.85rem;
  flex-wrap: wrap;
}

.brand { text-decoration: none; }

.site-nav ul {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
}

.site-nav a {
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.98rem;
}
.site-nav a:hover { color: var(--accent-strong); text-decoration: underline; }

.nav-cta {
  background: var(--accent);
  color: #fff !important;
  padding: 0.45rem 1rem;
  border-radius: var(--radius-s);
}
.nav-cta:hover { background: var(--accent-strong); text-decoration: none !important; }

.nav-toggle {
  display: none;
  font: inherit;
  font-weight: 600;
  background: none;
  border: 2px solid var(--ink);
  border-radius: var(--radius-s);
  color: var(--ink);
  padding: 0.35rem 0.8rem;
  cursor: pointer;
  align-items: center;
  gap: 0.5rem;
}

.nav-toggle-bar {
  width: 1.1em;
  height: 2px;
  background: currentColor;
  box-shadow: 0 -5px 0 currentColor, 0 5px 0 currentColor;
}

@media (max-width: 44rem) {
  .nav-toggle { display: inline-flex; }
  .site-nav { display: none; width: 100%; }
  .site-nav.is-open { display: block; }
  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding-block: 0.5rem;
  }
  .site-nav a { display: block; padding: 0.7rem 0.25rem; }
  .nav-cta { text-align: center; margin-top: 0.4rem; }
}

/* ---------- Hero ---------- */

.hero {
  background: var(--ink);
  color: var(--text-light);
  padding-block: clamp(3.5rem, 9vw, 6.5rem);
}

.hero h1 {
  color: var(--text-light);
  max-width: 22ch;
}

.hero-sub {
  font-size: 1.15rem;
  max-width: 54ch;
  color: var(--muted-light);
}
.hero-sub strong { color: var(--chalk); }

.hero-actions {
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
  margin-block: 1.8rem 1.4rem;
}

.hero-tags { margin: 0; }

.tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--chalk);
  border: 1px solid var(--ink-soft);
  background: var(--ink-soft);
  border-radius: 99px;
  padding: 0.25em 0.85em;
  margin: 0 0.4rem 0.4rem 0;
}

/* ---------- Botones ---------- */

.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius-s);
  transition: background-color 0.15s ease, color 0.15s ease;
}

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-strong); color: #fff; }

.btn-ghost {
  color: var(--text-light);
  border: 2px solid var(--muted-light);
}
.btn-ghost:hover { border-color: var(--chalk); color: var(--chalk); }

.btn-chalk { background: var(--chalk); color: var(--ink); font-size: 1.1rem; }
.btn-chalk:hover { background: #ffdd8a; color: var(--ink); }

/* ---------- Secciones ---------- */

.section { padding-block: clamp(3rem, 7vw, 5rem); }

.section-intro {
  max-width: 58ch;
  color: var(--muted);
  font-size: 1.1rem;
}

.section-alt { background: var(--surface); border-block: 1px solid var(--border); }

/* ---------- Tarjetas de producto ---------- */

.cards {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(min(21rem, 100%), 1fr));
  margin-top: 2rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.8rem 1.8rem 1.5rem;
  box-shadow: 0 1px 3px rgba(24, 42, 68, 0.06);
  display: flex;
  flex-direction: column;
}

.card h3 { font-size: 1.5rem; margin-bottom: 0.2em; }

.card-claim {
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--accent-strong);
  font-size: 1.05rem;
  margin-bottom: 0.9em;
}

.card-features {
  padding-left: 0;
  list-style: none;
  margin-block: 0.4rem 1.2rem;
}
.card-features li {
  padding-left: 1.5em;
  position: relative;
  margin-bottom: 0.45em;
}
.card-features li::before {
  content: '✓';
  position: absolute;
  left: 0.2em;
  color: var(--accent);
  font-weight: 700;
}

.card-cta {
  margin-top: auto;
  margin-bottom: 0;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.badge-soon {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  background: var(--paper);
  border: 1px dashed var(--muted);
  color: var(--text);
  border-radius: 99px;
  padding: 0.3em 0.9em;
}

.link-arrow { font-weight: 600; }
.link-arrow::after { content: ' →'; }

/* ---------- Banda de sinergia ---------- */

.section-band {
  background: var(--ink);
  color: var(--text-light);
}
.section-band h2 { color: var(--text-light); }

.sinergia-grid {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: 1fr;
  align-items: center;
  margin-top: 1.5rem;
}
@media (min-width: 56rem) {
  .sinergia-grid { grid-template-columns: 3fr 2fr; }
}

.sinergia-steps {
  counter-reset: paso;
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1.3rem;
}
.sinergia-steps li {
  counter-increment: paso;
  position: relative;
  padding-left: 3.2rem;
  color: var(--muted-light);
}
.sinergia-steps li strong, .sinergia-steps li em { color: var(--text-light); }
.sinergia-steps li::before {
  content: counter(paso);
  position: absolute;
  left: 0;
  top: 0.1em;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  background: var(--chalk);
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 700;
  display: grid;
  place-items: center;
}

.sinergia-lema {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.35rem;
  line-height: 1.4;
  color: var(--chalk);
  border-left: 4px solid var(--chalk);
  padding-left: 1.2rem;
  margin: 0;
}
.sinergia-lema strong { color: #fff; }

/* ---------- Pilares del enfoque ---------- */

.pillars {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(min(18rem, 100%), 1fr));
  margin-top: 2rem;
}

.pillar {
  border-top: 4px solid var(--accent);
  background: var(--surface);
  border-inline: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  border-radius: 0 0 var(--radius) var(--radius);
  padding: 1.5rem 1.5rem 0.8rem;
}
.pillar h3 { font-size: 1.2rem; }
.pillar p { font-size: 0.98rem; color: var(--text); }

/* ---------- Contacto ---------- */

.section-contact {
  background: var(--ink);
  color: var(--text-light);
  text-align: center;
}
.section-contact h2 { color: var(--text-light); }
.section-contact p { color: var(--muted-light); }

.contact-action { margin-block: 1.6rem 1rem; }

.contact-note {
  font-size: 0.9rem;
  font-family: var(--font-mono);
}

/* ---------- Pie ---------- */

.site-footer {
  background: var(--ink);
  border-top: 1px solid var(--ink-soft);
  color: var(--muted-light);
  padding-block: 2.2rem;
  font-size: 0.92rem;
}
.footer-inner p { margin-bottom: 0.35em; }
.wordmark-footer { color: var(--text-light); }
