/* =========================================================
   JONRORA TECHNOLOGIES — base.css
   Tokens de diseño, tipografía local, reset y utilidades.
   ========================================================= */

@font-face {
  font-family: "Manrope";
  src: url("../assets/fonts/manrope-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "DM Sans";
  src: url("../assets/fonts/dm-sans-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 1000;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Paleta corporativa */
  --c-navy-950: #061224;
  --c-navy-900: #0b1f3a;   /* azul marino */
  --c-navy-800: #142b46;   /* azul profundo */
  --c-navy-700: #1e3a5f;
  --c-blue: #0866f5;       /* azul eléctrico */
  --c-blue-600: #0658d6;   /* azul para texto sobre claro (AA) */
  --c-cyan: #15d6d0;       /* turquesa */
  --c-white: #ffffff;
  --c-mist: #f4f7fa;       /* gris claro */

  --c-ink: #0b1f3a;
  --c-muted: #4a5d75;
  --c-line: #dce4ee;
  --c-on-dark: #eaf1fa;
  --c-on-dark-muted: #aec0d6;
  --c-line-dark: rgba(174, 192, 214, 0.2);

  /* Tipografía */
  --f-display: "Manrope", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --f-body: "DM Sans", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;

  /* Geometría */
  --r-s: 10px;
  --r-m: 16px;
  --r-l: 24px;
  --container: 1200px;
  --gutter: clamp(20px, 4vw, 40px);
  --header-h: 76px;

  /* Sombras y movimiento */
  --shadow-1: 0 1px 2px rgba(11, 31, 58, 0.06), 0 10px 30px rgba(11, 31, 58, 0.07);
  --shadow-2: 0 30px 70px rgba(11, 31, 58, 0.18);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

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

body {
  margin: 0;
  font-family: var(--f-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--c-ink);
  background: var(--c-white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3, h4 {
  font-family: var(--f-display);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.12;
  margin: 0;
  text-wrap: balance;
}
p { margin: 0 0 1em; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }

/* Foco visible (WCAG 2.2: 2.4.7 / 2.4.11) */
:focus-visible {
  outline: 3px solid var(--c-blue);
  outline-offset: 3px;
  border-radius: 4px;
}
.on-dark :focus-visible { outline-color: var(--c-cyan); }

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

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: fixed;
  top: -100px; left: 16px;
  z-index: 200;
  padding: 12px 18px;
  background: var(--c-white);
  color: var(--c-navy-900);
  font-weight: 700;
  border-radius: var(--r-s);
  box-shadow: var(--shadow-2);
}
.skip-link:focus { top: 16px; }

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

.icon {
  width: 1.25em; height: 1.25em;
  fill: none; stroke: currentColor;
  stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
  flex: none;
}
.icon--sm { width: 1em; height: 1em; }

/* Animaciones de entrada: solo se ocultan si hay JS (init.js añade .js) */
.js .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.js .reveal.d1 { transition-delay: 80ms; }
.js .reveal.d2 { transition-delay: 160ms; }
.js .reveal.d3 { transition-delay: 240ms; }
.js .reveal.d4 { transition-delay: 320ms; }
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .js .reveal { opacity: 1; transform: none; }
}
