/* global.css — tipografía base, botones, utilidades */

/* Fuentes self-hosted (sin peticiones a terceros, compatible con CSP estricta) */
@font-face {
  font-family: "Fraunces";
  src: url("../assets/fonts/fraunces-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "DM Sans";
  src: url("../assets/fonts/dm-sans-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

body { background: var(--color-paper); color: var(--color-ink); }

/* Headings — display serif, escala intencional */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 500;         /* Fraunces 500 = carácter sin gritar */
  line-height: var(--leading-tight);
  color: var(--color-ink);
  letter-spacing: -0.02em;
}
h1 { font-size: clamp(var(--text-4xl), 5vw, var(--text-6xl)); margin-bottom: var(--space-4); }
h2 { font-size: clamp(var(--text-3xl), 4vw, var(--text-5xl)); margin-bottom: var(--space-3); }
h3 { font-size: clamp(var(--text-2xl), 2.5vw, var(--text-3xl)); margin-bottom: var(--space-2); }
h4 { font-size: var(--text-xl); margin-bottom: var(--space-2); }

/* Paragraphs — body sans, medida legible */
p { font-family: var(--font-body); font-size: var(--text-base); line-height: var(--leading-relaxed); color: var(--color-ink-muted); max-width: 70ch; }
.lead { font-size: var(--text-lg); line-height: var(--leading-snug); color: var(--color-ink); max-width: 60ch; font-weight: 400; }
.text-muted { color: var(--color-ink-muted); }
.text-sm { font-size: var(--text-sm); }
.text-xs { font-size: var(--text-xs); }

/* Links inline */
a.inline-link { color: var(--color-forest); text-decoration: underline; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a.inline-link:hover { color: var(--color-forest-light); }

/* Buttons — sistema coherente */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-8);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 600;
  line-height: 1;
  border-radius: var(--radius-full);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-out);
  white-space: nowrap;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* Primary — bosque profundo, acción principal sobre fondos claros */
.btn--primary {
  background: var(--color-forest);
  color: var(--color-paper);
  border-color: var(--color-forest);
}
.btn--primary:hover:not(:disabled) {
  background: var(--color-forest-light);
  border-color: var(--color-forest-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Secondary — contorno bosque */
.btn--secondary {
  background: transparent;
  color: var(--color-forest);
  border-color: var(--color-forest);
}
.btn--secondary:hover:not(:disabled) {
  background: var(--color-forest-pale);
  border-color: var(--color-forest);
  transform: translateY(-2px);
}

/* Ghost — transparente con borde arena */
.btn--ghost {
  background: transparent;
  color: var(--color-forest);
  border-color: var(--color-sand-dark);
}
.btn--ghost:hover:not(:disabled) {
  background: var(--color-sand);
  border-color: var(--color-sand);
  color: var(--color-forest);
}

/* Outline — bosque, para acciones terciarias */
.btn--outline {
  background: transparent;
  color: var(--color-forest);
  border-color: var(--color-forest);
}
.btn--outline:hover:not(:disabled) {
  background: var(--color-forest-pale);
  border-color: var(--color-forest);
}

/* Section utility */
.section { padding-block: var(--space-20); }
.section--tight { padding-block: var(--space-12); }
.section--alt { background: var(--color-white); }
.section--sand { background: var(--color-sand-pale); }
.section__header { text-align: left; max-width: 70ch; margin-bottom: var(--space-12); }
.section__eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 400;
  color: var(--color-terracotta-dark);
  margin-bottom: var(--space-3);
}
.section__title { margin-bottom: var(--space-3); }
.section__lead { font-size: var(--text-lg); line-height: var(--leading-relaxed); color: var(--color-ink-muted); }

/* Divider sutil */
.divider {
  width: 60px;
  height: 2px;
  background: var(--color-terracotta);
  border-radius: 2px;
  margin-block: var(--space-6);
}

/* Imagen responsive */
.img-cover { width: 100%; height: 100%; object-fit: cover; }