/* ==========================================================================
   GMA Company — base.css
   Variables de diseño, fuente, reset y utilidades generales.
   ========================================================================== */

/* ---------- Fuente (autohospedada: sin dependencias externas) ---------- */
@font-face {
  font-family: "Manrope";
  src: url("../fonts/manrope-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

/* ---------- Variables de diseño ---------- */
:root {
  /* Colores de marca */
  --color-red: #c81214;
  --color-red-dark: #a10e10;
  --color-ink: #111314;
  --color-dark: #202526;
  --color-darker: #151819;
  --color-white: #ffffff;
  --color-cream: #f7f7f4;
  --color-mist: #eaf0ed;
  --color-text: #1b1e1f;
  --color-muted: #63696b;
  --color-muted-light: #b6bcbd;
  --color-line: #dde2df;
  --color-line-dark: #323435;

  /* Tipografía */
  --font-base: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-base: 1rem;
  --fs-md: clamp(1.05rem, 0.95rem + 0.4vw, 1.25rem);
  --fs-lg: clamp(1.25rem, 1.05rem + 0.9vw, 1.75rem);
  --fs-h2: clamp(1.75rem, 1.25rem + 2vw, 2.75rem);
  --fs-h1: clamp(2.5rem, 1.5rem + 4.6vw, 5.25rem);

  /* Espaciado y layout */
  --container: 1220px;
  --gutter: clamp(1rem, 0.5rem + 2.5vw, 2.75rem);
  --section-y: clamp(4rem, 2.5rem + 6vw, 8rem);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  /* Sombras y movimiento */
  --shadow-card: 0 1px 2px rgba(17, 19, 20, .04), 0 10px 30px -12px rgba(17, 19, 20, .14);
  --shadow-card-hover: 0 2px 4px rgba(17, 19, 20, .05), 0 24px 48px -18px rgba(17, 19, 20, .28);
  --ease: cubic-bezier(.22, .61, .36, 1);
  --header-h: 76px;
}

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

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

body {
  font-family: var(--font-base);
  font-size: var(--fs-base);
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body.is-locked { overflow: hidden; }

img,
picture,
svg { display: block; max-width: 100%; }

img { height: auto; }

a { color: inherit; text-decoration: none; }

ul,
ol { padding: 0; list-style: none; }

h1, h2, h3 { line-height: 1.12; font-weight: 600; letter-spacing: -0.02em; text-wrap: balance; }

p { text-wrap: pretty; }

address { font-style: normal; }

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

figure { margin: 0; }

/* Foco visible y accesible */
:focus-visible {
  outline: 3px solid var(--color-red);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection { background: var(--color-red); color: var(--color-white); }

/* ---------- Utilidades ---------- */
.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 1000;
  padding: .75rem 1.25rem;
  background: var(--color-red);
  color: var(--color-white);
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 1rem; }

.text-muted { color: var(--color-muted); }
.text-muted-light { color: var(--color-muted-light); }

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
