/* ==========================================================
   MGM Lab — Estilos base: tokens, reset, tipografía, layout
   ========================================================== */
:root {
  /* Paleta de marca MGM: #12464F, #13853A, #454240, #FFFFFF (+ tonos derivados) */
  --navy-950: #0a2c32;
  --navy-900: #12464f;
  --navy-800: #1a5a65;
  --blue: #1a6b73;
  --blue-700: #12464f;
  --blue-100: #e3f0f1;
  --teal: #6cc686;
  --teal-700: #0f6e30;
  --teal-100: #e6f3ea;
  --green: #13853a;
  --green-600: #13853a;
  --green-700: #0f6e30;
  --green-100: #e2f2e7;
  --danger: #c62f3a;
  --danger-100: #fdecee;

  --ink: #454240;
  --muted: #5a5653;
  --line: #d6dcd9;
  --bg: #ffffff;
  --bg-soft: #ebf1ee;

  --font-head: "Montserrat", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --font-body: "Figtree", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;

  --radius: 18px;
  --radius-sm: 12px;
  --shadow-sm: 0 1px 2px rgba(10, 36, 41, 0.10), 0 3px 10px rgba(10, 36, 41, 0.08);
  --shadow-md: 0 12px 32px -12px rgba(10, 36, 41, 0.22);
  --shadow-lg: 0 32px 64px -28px rgba(10, 36, 41, 0.4);

  --container: 1160px;
  --header-h: 72px;
  --section-y: clamp(64px, 9vw, 112px);
  --ease: cubic-bezier(0.22, 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(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; display: block; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p, figure { margin: 0; }
a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--blue-700); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 3px;
  border-radius: 6px;
}

[hidden] { display: none !important; }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--navy-900); color: #fff; padding: 10px 16px; border-radius: 8px;
  transition: top 0.2s;
}
.skip-link:focus { top: 12px; color: #fff; }

/* Tipografía */
h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--navy-900);
  letter-spacing: -0.02em;
  line-height: 1.15;
}
h1 { font-size: clamp(2.1rem, 4.6vw, 3.5rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.55rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 700; letter-spacing: -0.01em; line-height: 1.25; }

.lead { font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: var(--muted); max-width: 56ch; }
.eyebrow {
  font-family: var(--font-head);
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--teal-700);
  margin-bottom: 14px;
}
.eyebrow--light { color: var(--teal); }

/* Layout */
.container { width: min(100% - 40px, var(--container)); margin-inline: auto; }
.container--narrow { width: min(100% - 40px, 820px); }

.section { padding-block: var(--section-y); }
.section--soft { background: var(--bg-soft); }
.section--dark { background: var(--navy-900); color: #d5e6e8; position: relative; overflow: hidden; }
.section--dark h2, .section--dark h3 { color: #fff; }

.section__head { max-width: 760px; margin-bottom: clamp(32px, 5vw, 56px); }
.section__head--light .section__lead { color: #b9d0d3; }
.section__lead { margin-top: 18px; font-size: 1.15rem; color: var(--muted); max-width: 62ch; }

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

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font-head); font-weight: 700; font-size: 0.98rem; letter-spacing: -0.005em;
  line-height: 1.2; text-align: center; text-decoration: none;
  padding: 14px 24px; border-radius: 999px; border: 2px solid transparent;
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), background-color 0.18s, border-color 0.18s, color 0.18s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn--primary { background: var(--green); color: #fff; box-shadow: 0 8px 22px -10px rgba(19, 133, 58, 0.75); }
.btn--primary:hover { background: #0f6e30; color: #fff; box-shadow: 0 12px 26px -10px rgba(19, 133, 58, 0.85); }
.btn--ghost { background: transparent; color: var(--navy-900); border-color: #9aa39f; }
.btn--ghost:hover { border-color: var(--blue); color: var(--blue-700); background: #fff; }
.btn--lg { padding: 17px 30px; font-size: 1.04rem; }
.btn--sm { padding: 10px 18px; font-size: 0.9rem; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.65; pointer-events: none; transform: none; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 100; height: var(--header-h);
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: saturate(1.4) blur(10px); backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); box-shadow: 0 6px 20px -16px rgba(10, 36, 41, 0.35); }
.header__inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--navy-900); }
.brand:hover { color: var(--navy-900); }
.brand__name { font-family: var(--font-head); font-weight: 800; font-size: 1.25rem; letter-spacing: -0.02em; }
.brand__name b { color: var(--blue); font-weight: 800; }
.brand--light, .brand--light:hover { color: #fff; }
.brand--light .brand__name b { color: var(--teal); }

.nav { display: flex; align-items: center; gap: 28px; }
.nav__list { display: flex; gap: 26px; }
.nav__list a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: 0.97rem; padding: 6px 0; position: relative; }
.nav__list a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--teal);
  transform: scaleX(0); transform-origin: left; transition: transform 0.25s var(--ease);
}
.nav__list a:hover { color: var(--navy-900); }
.nav__list a:hover::after { transform: scaleX(1); }

.nav-toggle {
  display: none; width: 44px; height: 44px; align-items: center; justify-content: center;
  background: transparent; border: 1px solid var(--line); border-radius: 12px; color: var(--navy-900);
}
.nav-toggle .icon { width: 24px; height: 24px; }

/* Revelado sutil (solo si JS está activo) */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.js .reveal.is-visible { opacity: 1; 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 .reveal { opacity: 1; transform: none; }
}
