/* ==========================================================================
   Mining AI — Base: tokens de diseño, reset, tipografía y utilidades
   ========================================================================== */

:root {
  /* Colores oficiales de marca (Guía de Marca Mining AI) */
  --brand-navy: #0b1f3b;         /* Azul Profundo: Confianza, Autoridad, Conocimiento */
  --brand-blue: #0066ff;         /* Azul Tecnológico: Innovación, Inteligencia Digital */
  --brand-cyan: #00d2e6;         /* Cian Inteligente: Claridad, Precisión, Conexión */
  --brand-grey: #a7b1c2;         /* Gris Mineral: Equilibrio, Profesionalismo, Neutralidad */
  --brand-white: #ffffff;
  --brand-green: #00b873;        /* Verde ESG: Sostenibilidad, Vida, Desarrollo */
  --brand-copper: #c6923f;       /* Cobre Minero: Valor, Riqueza, Futuro */

  /* Derivados para UI y fondos */
  --navy-950: #050d1a;
  --navy-900: #08162b;
  --navy-850: #0b1f3b;           /* Base Azul Profundo */
  --navy-800: #122847;
  --navy-700: #19355c;
  --tech-blue: var(--brand-blue);
  --tech-blue-soft: rgba(0, 102, 255, 0.16);
  --tech-cyan: var(--brand-cyan);
  --tech-cyan-soft: rgba(0, 210, 230, 0.14);

  --grey-50: #f6f8fb;
  --grey-100: #edf1f7;
  --grey-200: #dbe2ec;
  --grey-300: #c1ccdc;
  --grey-500: #7d899d;
  --grey-600: #57657a;
  --grey-700: #334155;
  --ink: #071324;

  /* Tipografía */
  --font-display: "Inter Tight", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", Menlo, Consolas, monospace;

  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-base: 1rem;
  --fs-md: 1.125rem;
  --fs-lg: clamp(1.15rem, 1rem + 0.5vw, 1.375rem);
  --fs-xl: clamp(1.5rem, 1.2rem + 1.2vw, 2.25rem);
  --fs-2xl: clamp(2rem, 1.4rem + 2.6vw, 3.5rem);
  --fs-3xl: clamp(2.5rem, 1.6rem + 4vw, 5rem);
  --fs-display: clamp(2.6rem, 1.4rem + 5.6vw, 6.75rem);

  /* Espaciado y layout */
  --container: 1360px;
  --gutter: clamp(1.25rem, 0.6rem + 3vw, 4rem);
  --section-y: clamp(5rem, 3rem + 8vw, 11rem);
  --radius-sm: 6px;
  --radius: 14px;
  --radius-lg: 22px;
  --header-h: 96px;

  /* Movimiento */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur: 0.9s;
}

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

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

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

body.is-dark { background: var(--navy-900); color: var(--grey-100); }

img, picture, svg, video, canvas { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p, figure, blockquote { margin: 0; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

p { text-wrap: pretty; }

::selection { background: var(--brand-blue); color: #fff; }

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

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

.section { padding-block: var(--section-y); position: relative; }

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

.skip-link {
  position: absolute;
  left: 1rem; top: -100px;
  z-index: 1000;
  padding: 0.75rem 1.25rem;
  background: var(--brand-blue);
  color: #fff;
  border-radius: var(--radius-sm);
  font-weight: 600;
}
.skip-link:focus { top: 1rem; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.eyebrow::before {
  content: "";
  width: 28px; height: 2px;
  background: var(--brand-cyan);
  flex: none;
}
.eyebrow--plain::before { display: none; }

.index-num {
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--brand-cyan);
}

.display { font-size: var(--fs-display); line-height: 0.96; letter-spacing: -0.035em; }
.h-xl { font-size: var(--fs-3xl); }
.h-lg { font-size: var(--fs-2xl); }
.h-md { font-size: var(--fs-xl); line-height: 1.1; }
.lead { font-size: var(--fs-lg); line-height: 1.55; color: var(--grey-600); max-width: 46ch; }
.is-dark .lead, .on-dark .lead { color: rgba(238, 240, 243, 0.72); }
.text-cyan { color: var(--brand-cyan); }
.text-blue { color: var(--brand-blue); }
.text-copper { color: var(--brand-copper); }
.text-green { color: var(--brand-green); }
.text-grey { color: var(--brand-grey); }
.upper { text-transform: uppercase; }

/* ---------- Animaciones de aparición (solo con JS activo) ---------- */
.js [data-reveal] {
  opacity: 0;
  transform: translate3d(0, 36px, 0);
  transition:
    opacity var(--dur) var(--ease-out),
    transform var(--dur) var(--ease-out);
  transition-delay: var(--delay, 0s);
  will-change: opacity, transform;
}
.js [data-reveal="fade"] { transform: none; }
.js [data-reveal="left"] { transform: translate3d(-40px, 0, 0); }
.js [data-reveal="scale"] { transform: scale(0.96); }
.js [data-reveal].is-visible { opacity: 1; transform: none; }

/* Líneas de titular que se descubren */
.js .line-mask { display: block; overflow: hidden; padding-bottom: 0.08em; }
.js .line-mask > span {
  display: block;
  transform: translate3d(0, 105%, 0);
  transition: transform 1.1s var(--ease-out);
  transition-delay: var(--delay, 0s);
}
.js .is-visible .line-mask > span,
.js .line-mask.is-visible > span { transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .js [data-reveal], .js .line-mask > span { opacity: 1; transform: none; }
}
