/* ==========================================================================
   IPGN · Amalio de la Peña — estilos del sitio
   Tokens tomados del sistema de diseño IPGN (project/ds/ipgn/tokens.json)
   ========================================================================== */

:root {
  /* Color */
  --surface-100: #fbf8f5;
  --surface-200: #f1eae1;
  --ink: #34413e;
  --ink-soft: #f3ede6;      /* ink sobre fondo oscuro */
  --ink-muted: #5d6862;     /* etiquetas: pasa 4.5:1 sobre surface-100/200 */
  --ink-muted-dark: #abb5af;
  --coral: #e86b50;
  --on-coral: #ffffff;
  --lavanda: #9eb0d7;
  --border: #e4dcd2;

  /* Tipografía */
  --font-display: 'Bricolage Grotesque', system-ui, sans-serif;
  --font-sans: 'Outfit', system-ui, sans-serif;
  --font-mono: 'DM Mono', ui-monospace, monospace;

  /* Espaciado */
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 40px;

  /* Radios */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 28px;

  --container: 1200px;
  --gutter: 32px;
}

/* Base ------------------------------------------------------------------- */

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--surface-100);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }

a { color: var(--ink); }
a:hover { color: var(--coral); }

h1, h2, h3, p, figure, blockquote { margin: 0; }

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

.skip-link {
  position: absolute;
  left: var(--space-2);
  top: -100px;
  background: var(--ink);
  color: var(--surface-100);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  z-index: 10;
}
.skip-link:focus { top: var(--space-2); color: var(--surface-100); }

/* Layout ----------------------------------------------------------------- */

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.section { padding-top: 96px; padding-bottom: 80px; }

.band {
  background: var(--surface-200);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.band--dark { background: var(--ink); color: var(--ink-soft); border: 0; }
.band--lavanda { background: var(--lavanda); color: var(--ink); border: 0; }

.stack { display: flex; flex-direction: column; }

.section-head {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  max-width: 720px;
}

.split {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 56px;
}

.grid {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: repeat(auto-fit, minmax(min(var(--min, 300px), 100%), 1fr));
}

/* Tipografía ------------------------------------------------------------- */

.eyebrow {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.eyebrow--coral { color: var(--coral); font-weight: 700; }
.eyebrow--lavanda { color: var(--lavanda); }

.display-lg,
.display-sm {
  font-family: var(--font-display);
  font-weight: 700;
  text-wrap: balance;
}
.display-lg { font-size: clamp(40px, 5.6vw, 64px); line-height: 1.05; }
.display-sm { font-size: 40px; line-height: 1.1; }

.heading {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 24px;
  line-height: 1.2;
}

.title-card {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 28px;
  line-height: 1.2;
}

.lead { font-size: 20px; text-wrap: pretty; }
.text-sm { font-size: 16px; }
.pretty { text-wrap: pretty; }

.c-coral { color: var(--coral); }
.c-lavanda { color: var(--lavanda); }

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

.btn {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 19px;
  line-height: 1.2;
  text-decoration: none;
  transition: filter .15s ease, transform .15s ease;
}
.btn:hover { filter: brightness(0.94); }
.btn:active { transform: translateY(1px); }

.btn--coral, .btn--coral:hover { background: var(--coral); color: var(--on-coral); }
.btn--ink, .btn--ink:hover { background: var(--ink); color: var(--surface-100); }
.btn--sm { padding: 12px 22px; }

.link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 12px 4px;
  font-weight: 500;
}
.link--strong { font-weight: 600; }

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

.site-header { border-bottom: 1px solid var(--border); }

.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding-top: 20px;
  padding-bottom: 20px;
}

.site-header__logo img { height: 84px; width: auto; border-radius: var(--radius-md); }

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 28px;
  font-size: 16px;
}
.site-nav a:not(.btn) { text-decoration: none; padding: 12px 0; }

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

.hero { padding-top: 72px; padding-bottom: 64px; }
.hero__copy { flex: 1 1 440px; min-width: 0; gap: var(--space-3); }
.hero__copy h1 { max-width: 660px; }
.hero__copy .lead { max-width: 600px; }
.hero__media { flex: 1 1 380px; min-width: 0; display: flex; justify-content: center; }
.hero__media img {
  width: 100%;
  max-width: 460px;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center top;
  border-radius: var(--radius-lg);
}

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }

/* Cifras ----------------------------------------------------------------- */

.stats { --min: 260px; gap: 32px; padding-top: var(--space-4); padding-bottom: var(--space-4); }
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat__value { font-family: var(--font-display); font-weight: 700; font-size: 40px; line-height: 1.1; }

/* Servicios -------------------------------------------------------------- */

.services { --min: 440px; }

.card {
  background: var(--surface-200);
  border-radius: var(--radius-md);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.card__num { font-family: var(--font-mono); font-size: 14px; font-weight: 500; color: var(--ink-muted); }

/* Cursos ----------------------------------------------------------------- */

.course {
  background: var(--surface-100);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.course img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.course__body { padding: 28px; display: flex; flex-direction: column; gap: 12px; flex: 1; }

/* Método ----------------------------------------------------------------- */

.method { padding-top: 96px; padding-bottom: 88px; gap: 48px; }
.section-head--wide { max-width: none; }
.section-head--wide p { max-width: 720px; }
.principles { --min: 260px; gap: 40px 32px; }
.principle { display: flex; flex-direction: column; gap: var(--space-1); }
.principle .heading { color: var(--lavanda); }
.gallery { --min: 300px; }
.gallery img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius-lg); }

/* Trayectoria ------------------------------------------------------------ */

.about__media { flex: 1 1 360px; min-width: 0; display: flex; justify-content: center; }
.about__media img {
  width: 100%;
  max-width: 440px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center 20%;
  border-radius: var(--radius-lg);
}
.about__copy { flex: 1 1 440px; min-width: 0; gap: 20px; }

/* Clientes --------------------------------------------------------------- */

.clients { padding-top: 64px; padding-bottom: 64px; gap: 32px; }
.clients h2 { font-family: var(--font-display); font-weight: 700; font-size: 28px; line-height: 1.2; }
.logos { --min: 240px; gap: var(--space-2); list-style: none; margin: 0; padding: 0; }
.logos img { width: 100%; aspect-ratio: 9 / 5; object-fit: cover; border-radius: var(--radius-md); }

/* Testimonios ------------------------------------------------------------ */

.quote {
  background: var(--surface-200);
  border-radius: var(--radius-md);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.quote blockquote { font-size: 16px; line-height: 1.5; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.quote figcaption { display: flex; align-items: center; gap: 14px; font-size: 15px; line-height: 1.35; color: var(--ink-muted); }
.quote__name { color: var(--ink); font-weight: 600; font-size: 16px; }
.quote__avatar {
  flex: none;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--lavanda);
}

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

.contact { padding-top: 88px; padding-bottom: 88px; gap: 48px; }
.contact__copy { flex: 1 1 440px; min-width: 0; gap: 20px; }
.contact__copy .lead { max-width: 732px; }
.contact__list { margin: 0; padding-left: 1.2em; font-size: 18px; display: flex; flex-direction: column; gap: 4px; }
.contact__list a { color: var(--ink); }
.contact__media { flex: 1 1 440px; min-width: 0; display: flex; justify-content: center; }
.contact__media img { width: 100%; height: auto; }

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

.site-footer { background: var(--ink); color: var(--ink-soft); }
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding-top: 32px;
  padding-bottom: 32px;
  font-size: 15px;
  color: var(--ink-muted-dark);
}
.site-footer a { color: var(--ink-muted-dark); }
.site-footer a:hover { color: var(--coral); }

/* Textos legales --------------------------------------------------------- */

.legal { padding-top: 72px; padding-bottom: 88px; max-width: 820px; gap: 20px; }
.legal h1 { margin-bottom: var(--space-1); }
.legal h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 26px;
  line-height: 1.2;
  margin-top: var(--space-3);
}
.legal p, .legal li { text-wrap: pretty; }
.legal ul { margin: 0; padding-left: 1.2em; display: flex; flex-direction: column; gap: 6px; }
.legal__updated { font-family: var(--font-mono); font-size: 14px; color: var(--ink-muted); }

/* Responsive ------------------------------------------------------------- */

@media (max-width: 640px) {
  :root { --gutter: 16px; }
  .section, .method { padding-top: 64px; padding-bottom: 56px; }
  .hero { padding-top: 40px; }
  .contact { padding-top: 64px; padding-bottom: 64px; }
  .display-sm, .stat__value { font-size: 32px; }
  .site-header__logo img { height: 64px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
