/* ==========================================================================
   Sueño Industrial — 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-blue: #00a4e5;
  --color-blue-dark: #0089c2;
  --color-blue-light: #52c2ec;
  --color-blue-pale: #9fdbf3;
  --color-navy: #19496c;
  --color-navy-deep: #143a56;
  --color-steel: #376175;

  /* Fondos */
  --color-ink: #1a1413;
  --color-ink-2: #2a2321;
  --color-white: #ffffff;
  --color-paper: #f8f8f7;
  --color-frost: #f6fafc;

  /* Texto y líneas */
  --color-heading: #1a1413;
  --color-text: #221c1b;
  --color-muted: #625a58;
  --color-muted-light: #b3aaa7;
  --color-line: #e7eaec;

  /* Tipografía */
  --font-base: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --fs-xs: 0.75rem;
  --fs-sm: 0.9375rem;
  --fs-base: 1rem;
  --fs-md: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem);
  --fs-h2: clamp(1.75rem, 1.25rem + 2vw, 2.75rem);
  --fs-h1: clamp(2.5rem, 1.6rem + 3.4vw, 4.25rem);

  /* Espaciado y layout */
  --container: 1280px;
  --gutter: clamp(1rem, 0.5rem + 2.5vw, 2.5rem);
  --section-y: clamp(4rem, 2.5rem + 5.5vw, 7rem);
  --radius-sm: 4px;
  --radius: 8px;
  --radius-lg: 12px;
  --radius-pill: 999px;

  /* Sombras y movimiento */
  --shadow-card: 0 1px 2px rgba(26, 20, 19, .05), 0 14px 34px -20px rgba(26, 20, 19, .28);
  --shadow-card-hover: 0 2px 4px rgba(26, 20, 19, .06), 0 28px 50px -22px rgba(26, 20, 19, .42);
  --ease: cubic-bezier(.22, .61, .36, 1);
  --header-h: 84px;
}

/* ---------- 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 { color: var(--color-heading); 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-blue);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection { background: var(--color-blue); 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-ink);
  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); }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.icon {
  width: 1.25em;
  height: 1.25em;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- 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;
  }
}
