/* =====================================================================
   GEXIA — Sistema de diseño global
   Una sola familia tipográfica: Inter (400 · 500 · 600 · 700 · 800).
   Superficies claras y oscuras con los mismos tokens semánticos.
   Lo usan la portada y, más adelante, todas las páginas internas.
   ===================================================================== */

/* Inter alojada en el propio sitio (SIL Open Font License 1.1).
   Evita enviar la IP de los visitantes a Google Fonts. */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url('../fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url('../fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }


:root {
  /* ---- Paleta base ---- */
  --night: #050b1a;          /* noche de sala de control (derivada del azul del símbolo) */
  --night-2: #0b1530;
  --night-3: #111d3d;
  --paper: #ffffff;
  --paper-2: #f3f5f9;
  --ink: #0a1022;            /* 18.9:1 sobre blanco */
  --ink-2: #4a5468;          /* 7.0:1 sobre --paper-2 */
  --ink-3: #5f6878;          /* 5.2:1 sobre --paper-2 */
  --snow: #eef2fa;           /* 17.5:1 sobre --night */
  --snow-2: #a7b3cb;         /* 9.3:1 */
  --snow-3: #8592ad;         /* 5.8:1 sobre --night-2 */
  --blue: #0047b3;           /* acción sobre claro · 7.5:1 */
  --blue-bright: #6aa1ff;    /* acción sobre oscuro · 7.0:1 */

  /* ---- Señales (colores del símbolo GEXIA) ---- */
  --event: #f65f18;          /* evento / alerta · naranja del símbolo */
  --event-ink: #b9430c;      /* el mismo naranja legible sobre claro · 5.0:1 */
  --action: #3ccf7a;         /* acción resuelta sobre oscuro · 9.7:1 */
  --action-ink: #027d38;     /* verde del símbolo sobre claro · 4.8:1 */
  --g-yellow: #fada57;
  --g-navy: #042e80;

  /* ---- Tipografía: Inter en todo el sitio ---- */
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --fs-display: clamp(2.25rem, 1.45rem + 2.1vw, 3.5rem);   /* 36 → 56 */
  --fs-h2: clamp(2rem, 1.35rem + 2vw, 3.125rem);            /* 32 → 50 */
  --fs-h3: clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem);          /* 20 → 24 */
  --fs-lead: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem);       /* 17 → 20 */
  --fs-body: 1.0625rem;                                     /* 17 */
  --fs-small: 0.9375rem;                                    /* 15 */
  --fs-label: 0.75rem;                                      /* 12 · etiquetas en mayúsculas */

  /* ---- Espacio, forma y movimiento ---- */
  --gutter: clamp(20px, 4vw, 56px);
  --max: 1360px;
  --section-y: clamp(4.5rem, 9vw, 8rem);
  --sheet-r: clamp(20px, 3vw, 36px);   /* radio de las "hojas" que se superponen */
  --r-s: 10px; --r-m: 16px; --r-l: 24px;
  --nav-h: 64px;
  --ease: cubic-bezier(0.2, 0.75, 0.15, 1);
}

/* ---------- Superficies: cada sección elige una ---------- */
.on-dark {
  --bg: var(--night); --surface: var(--night-2); --surface-2: var(--night-3);
  --fg: var(--snow); --fg-2: var(--snow-2); --fg-3: var(--snow-3);
  --hair: rgba(167, 179, 203, 0.14); --hair-2: rgba(167, 179, 203, 0.26);
  --link: var(--blue-bright); --ev: var(--event); --ac: var(--action);
  background: var(--bg); color: var(--fg); color-scheme: dark;
}
.on-light, .on-paper {
  --bg: var(--paper); --surface: var(--paper-2); --surface-2: #e8ecf3;
  --fg: var(--ink); --fg-2: var(--ink-2); --fg-3: var(--ink-3);
  --hair: rgba(10, 16, 34, 0.10); --hair-2: rgba(10, 16, 34, 0.18);
  --link: var(--blue); --ev: var(--event-ink); --ac: var(--action-ink);
  background: var(--bg); color: var(--fg); color-scheme: light;
}
.on-paper { --bg: var(--paper-2); --surface: var(--paper); }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-h) + 16px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0; background: var(--night); color: var(--ink);
  font-family: var(--font); font-size: var(--fs-body); line-height: 1.6;
  font-optical-sizing: auto; font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg, video { display: block; max-width: 100%; }
h1, h2, h3, h4, p, ul, ol, figure, blockquote, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--link, var(--blue)); outline-offset: 3px; border-radius: 8px; }
.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; }

/* ---------- Tipografía ---------- */
.t-display, .t-h2, .t-h3 { font-family: var(--font); text-wrap: balance; color: var(--fg); }
.t-display { font-size: var(--fs-display); font-weight: 700; line-height: 1.04; letter-spacing: -0.035em; }
.t-h2 { font-size: var(--fs-h2); font-weight: 700; line-height: 1.08; letter-spacing: -0.03em; }
.t-h3 { font-size: var(--fs-h3); font-weight: 600; line-height: 1.25; letter-spacing: -0.018em; }
.t-lead { font-size: var(--fs-lead); line-height: 1.55; color: var(--fg-2); letter-spacing: -0.006em; text-wrap: pretty; }
.t-body { font-size: var(--fs-body); line-height: 1.6; color: var(--fg-2); text-wrap: pretty; }
.t-small { font-size: var(--fs-small); line-height: 1.55; color: var(--fg-2); }
.t-label {
  font-size: var(--fs-label); font-weight: 600; line-height: 1.2; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--fg-3); font-variant-numeric: tabular-nums;
}
.t-strong { color: var(--fg); font-weight: 600; }
.t-num { font-weight: 800; letter-spacing: -0.045em; font-variant-numeric: tabular-nums; line-height: 0.95; }

/* ---------- Layout ---------- */
.wrap { width: min(var(--max), 100% - 2 * var(--gutter)); margin-inline: auto; }
.sec { position: relative; padding-block: var(--section-y); }
/* Cada sección sube sobre la anterior como una hoja: une las secciones sin cortes bruscos */
.sheet { margin-top: calc(-1 * var(--sheet-r)); border-radius: var(--sheet-r) var(--sheet-r) 0 0; z-index: 1; }
.sec-head { display: grid; gap: 1rem; max-width: 44rem; }
.sec-head .t-label { color: var(--fg-3); }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 46px; padding: 0 1.35rem; border-radius: 999px; border: 0; cursor: pointer;
  font: 600 0.96875rem/1 var(--font); letter-spacing: -0.01em; white-space: nowrap;
  transition: transform 220ms var(--ease), background-color 220ms var(--ease), box-shadow 220ms var(--ease), color 220ms;
}
.btn svg { width: 1.05em; height: 1.05em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform 260ms var(--ease); }
.btn:hover svg { transform: translateX(3px); }
.btn:active { transform: scale(0.97); }
.btn-light { background: #fff; color: var(--night); }
.btn-light:hover { box-shadow: 0 8px 30px -6px rgba(106, 161, 255, 0.55); }
.btn-ghost { color: var(--fg); box-shadow: inset 0 0 0 1px var(--hair-2); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1px var(--fg-3); }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: #003a93; box-shadow: 0 10px 30px -10px rgba(0, 71, 179, 0.6); }
.btn-sm { min-height: 36px; padding: 0 1rem; font-size: 0.875rem; }

.link {
  display: inline-flex; align-items: center; gap: 0.35rem; min-height: 44px;
  color: var(--link); font-weight: 600; font-size: var(--fs-small);
}
.link svg { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform 240ms var(--ease); }
.link:hover svg { transform: translateX(3px); }

/* ---------- Marco de captura ---------- */
.shot {
  position: relative; overflow: hidden; border-radius: 12px; background: #0d1630;
  box-shadow: 0 0 0 1px var(--hair-2), 0 40px 80px -36px rgba(5, 11, 26, 0.55);
}
.shot img { width: 100%; height: 100%; object-fit: cover; object-position: top left; }

/* ---------- Aparición progresiva ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity 800ms var(--ease), transform 800ms var(--ease); transition-delay: var(--d, 0ms); }
  .js [data-reveal].is-in { opacity: 1; transform: none; }
}

/* ---------- Pie de página ---------- */
.footer { padding-block: 4.5rem 2rem; font-size: var(--fs-small); }
.footer-grid { display: grid; gap: 2.5rem; grid-template-columns: 1fr; padding-bottom: 3rem; border-bottom: 1px solid var(--hair); }
.footer-brand img { height: 22px; width: auto; }
.footer-brand p { margin-top: 1.25rem; max-width: 22rem; color: var(--fg-2); }
.footer h2 { margin-bottom: 0.9rem; }
.footer li a, .footer address a { display: inline-flex; align-items: center; min-height: 34px; color: var(--fg-2); transition: color 200ms; }
.footer li a:hover, .footer address a:hover { color: var(--fg); }
.footer address { font-style: normal; color: var(--fg-2); line-height: 1.6; display: grid; gap: 0.15rem; }
.footer-social { display: inline-flex; align-items: center; gap: 0.5rem; margin-top: 1rem; min-height: 44px; color: var(--fg-2); }
.footer-social:hover { color: var(--fg); }
.footer-social svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; padding-top: 1.5rem; color: var(--fg-3); font-size: 0.8125rem; }
@media (min-width: 30rem) { .footer-grid { grid-template-columns: repeat(2, 1fr); } .footer-brand { grid-column: 1 / -1; } }
@media (min-width: 48rem) { .footer-grid { grid-template-columns: 1.3fr repeat(2, 1fr); } }
@media (min-width: 72rem) { .footer-grid { grid-template-columns: 1.6fr repeat(4, 1fr); } .footer-brand { grid-column: auto; } }

@media (prefers-reduced-motion: reduce) {
  .btn, .btn svg, .link svg { transition: none; }
}
.footer-legal { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; }
.footer-legal a { color: inherit; }
.footer-legal a:hover { color: var(--fg); }
.footer .footer-sub { margin-top: 1.75rem; }
