/* Cinco Estudios — base global (Fase 3B, Unidad 2)
   Tokens congelados en docs/DESIGN-SYSTEM.md (3A). Sin framework. */

/* Tipografías self-hosted (OFL) — U2.2 (Fran, 2026-09-03): Inter Tight + Instrument Serif itálica.
   Inter Tight: fuente variable, un archivo cubre 400/500/600.
   Instrument Serif itálica 400: solo display, gesto editorial puntual. */
@font-face {
  font-family: "Inter Tight";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/inter-tight-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Instrument Serif";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/instrument-serif-italic-latin.woff2") format("woff2");
}

:root {
  --green-950: var(--ce-green-950, #0C241B);
  --green-900: var(--ce-green-900, #143528);
  /* 2026-09-11 (Fran): acento de texto #84FCB5 (H1) y color de CTA #D3FF84 (botones).
     Sustituyen en el hero al #9FE870 de 3A; pendiente de registrar en DESIGN-SYSTEM.md
     cuando Fran confirme en Vercel. */
  --accent: var(--ce-accent, #84FCB5);
  --accent-hover: var(--ce-accent-hover, #A6FFCB);
  --accent-deep: var(--ce-accent-deep, #276B44);
  --cta: var(--ce-cta, #D3FF84);
  --cta-hover: var(--ce-cta-hover, #E2FFA6);
  --cream: var(--ce-cream, #F5F1E8);
  --white: var(--ce-white, #FFFFFF);
  --ink: var(--ce-ink, #12211A);
  --muted-l: var(--ce-muted-l, #54655B);
  --muted-d: var(--ce-muted-d, #AFC4B5);
  --line-d: var(--ce-line-d, rgba(245, 241, 232, .14));
  --line-l: var(--ce-line-l, rgba(18, 33, 26, .14));

  --s1: var(--ce-s1, 8px); --s2: var(--ce-s2, 16px); --s3: var(--ce-s3, 24px); --s4: var(--ce-s4, 32px);
  --s5: var(--ce-s5, 48px); --s6: var(--ce-s6, 64px); --s7: var(--ce-s7, 96px); --s8: var(--ce-s8, 128px);
  --radius: var(--ce-radius, 14px);
  --pill: var(--ce-pill, 999px);
  --container: var(--ce-container, 1200px);

  --sans: var(--ce-sans, "Inter Tight", system-ui, -apple-system, "Segoe UI", sans-serif);
  --serif: var(--ce-serif, "Instrument Serif", Georgia, "Times New Roman", serif);
}

/* Reset mínimo */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; }
ul { padding: 0; list-style: none; }
summary { cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }

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

/* Layout */
.wrap { max-width: var(--container); margin: 0 auto; padding: 0 var(--s4); }
:where(.dark) { background: var(--green-950); color: var(--cream); }

/* Tipografía */
h1 {
  font-weight: 400;
  /* 2026-09-11: escala display grande (≈84px a 1800px), más cerca de la referencia. */
  font-size: clamp(3rem, 4.6vw, 5.25rem);
  line-height: 1.02;
  letter-spacing: -.025em;
}
/* H2 de sección: UNA sola definición para todas las secciones (consistencia de tamaño, Fran 2026-09-11). */
h2 {
  font-weight: 400;
  font-size: clamp(2rem, 3.6vw, 3.5rem);
  line-height: 1.08;
  letter-spacing: -.02em;
  text-wrap: pretty;
}
h2 .serif { white-space: nowrap; }
:where(.serif) { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: 0; }
:where(.lead) { font-size: 1.1875rem; line-height: 1.55; max-width: 44ch; }
.muted { color: var(--muted-l); }
.dark .muted { color: var(--muted-d); }

/* Botones: primario (CTA #D3FF84) y secundario outline. */
:where(.btn) {
  display: inline-block;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.2;
  padding: 14px 28px;
  border: 1px solid var(--cta);
  border-radius: var(--pill);
  text-decoration: none;
  background: var(--cta);
  color: var(--ink);
  transition: background .18s ease, border-color .18s ease, color .18s ease;
}
.btn:hover { background: var(--cta-hover); border-color: var(--cta-hover); }
/* Secundario ("Academia"): borde pill blanco siempre visible; hover se llena de blanco y el texto pasa a negro. */
:where(.btn-outline) {
  background: transparent; border-color: var(--white); color: var(--white);
  transition: background .25s ease-in-out, color .25s ease-in-out, border-color .25s ease-in-out;
}
.btn-outline:hover { background: var(--white); border-color: var(--white); color: #000; }
:where(.btn-sm) { font-size: .9375rem; padding: 11px 22px; }
/* Botón sobre superficies claras (secciones crema): pill oscuro, como en la referencia. */
:where(.btn-dark) { background: var(--green-950); border-color: var(--green-950); color: var(--cream); }
.btn-dark:hover { background: var(--green-900); border-color: var(--green-900); }

@media (max-width: 860px) {
  .wrap { padding: 0 var(--s3); }
}

/* ---------- Landings de servicio (2026-09-12): clases compartidas por las páginas de /servicios/ ---------- */
.eyebrow {
  font-size: .8125rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase;
  padding-bottom: 12px; border-bottom: 1px solid currentColor;
}
.lp { padding-top: var(--s7); padding-bottom: var(--s7); }
.lp > .wrap { max-width: none; padding-inline: clamp(24px, 6vw, 112px); }
.lp-head { max-width: 46%; }
.lp-head h2 { margin-top: var(--s4); }
.lp-head .lead { margin-top: var(--s3); }
.dark .lp-head h2 { color: var(--accent); }
.lp-text { max-width: 62ch; }
.lp-text p + p { margin-top: var(--s2); }
.lp-text ul { margin-top: var(--s2); padding-left: 1.3em; list-style: disc; }
.lp-text li { margin-top: 6px; }
.lp-text li::marker { color: var(--accent-deep); }
.dark .lp-text li::marker { color: var(--accent); }
.lp-text a { color: var(--accent-deep); font-weight: 500; }
.dark .lp-text a { color: var(--accent); }
.lp-cta { margin-top: var(--s5); }
.lp-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3) var(--s4); }
.lp-actions .lp-link { margin-top: var(--s5); font-weight: 600; text-decoration: none; color: var(--accent-deep); border-bottom: 2px solid var(--accent-deep); padding-bottom: 2px; }
.dark .lp-actions .lp-link { color: var(--accent); border-bottom-color: var(--accent); }
.lp-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(var(--s5), 8vw, 160px); align-items: start; }
@media (max-width: 960px) {
  .lp { padding-top: var(--s6); padding-bottom: var(--s6); }
  .lp-head { max-width: none; }
  .lp-two { grid-template-columns: 1fr; gap: var(--s5); }
}
