/* ============================================================
   Retornex — web pública · capa 1: tipografía, tokens, base
   ------------------------------------------------------------
   Mundo visual: "panel de instrumento". Fondo navy profundo
   derivado del navy de marca, filetes de 1px como gramática
   estructural, marcas de esquina de plano técnico, y color
   ESTRICTAMENTE semántico — la misma ley que rige la aplicación
   operativa: el color clasifica, nunca decora.
   ============================================================ */

/* ---------- Tipografía (autoalojada: sin llamadas a terceros) ---------- */

@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url('../fonts/archivo-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+2074, U+20AC, U+2122, U+2191,
    U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url('../fonts/archivo-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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'InterVar';
  font-style: normal;
  font-weight: 400 700;
  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+2074, U+20AC, U+2122, U+2191,
    U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'InterVar';
  font-style: normal;
  font-weight: 400 700;
  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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Tokens ---------- */

:root {
  /* Campo nocturno — el navy de marca #0D2D45 es el peldaño medio */
  --night: #04121c;
  --night-raised: #0a2032;
  --navy: #0d2d45;
  --navy-hi: #164a6b;

  /* Lienzo de trabajo — heredado literalmente de la aplicación */
  --paper: #eceff2;
  --paper-raised: #ffffff;
  --paper-sunken: #e2e7ec;

  /* Tinta */
  --on-night: #edf4f8;
  --on-night-2: #9fb6c6;
  --on-night-3: #6d8698;
  --on-paper: #0f1e29;
  --on-paper-2: #4a5966;
  --on-paper-3: #5c6b78;

  /* Filetes */
  --rule: rgba(159, 182, 198, 0.17);
  --rule-soft: rgba(159, 182, 198, 0.09);
  --rule-strong: rgba(159, 182, 198, 0.34);
  --rule-paper: #d3dce4;
  --rule-paper-soft: #e4e9ee;

  /* Semántica de estado — los mismos significados que la aplicación */
  --ok: #31a059;          /* cuadra / confirmado — verde de marca */
  --ok-bright: #4bc97a;   /* el mismo verde, legible sobre campo nocturno */
  --ok-field: rgba(49, 160, 89, 0.14);
  --review: #e0a82e;      /* requiere criterio */
  --review-field: rgba(224, 168, 46, 0.14);
  --ambig: #a97ada;       /* ambigua */
  --ambig-field: rgba(169, 122, 218, 0.14);
  --none: #7d92a3;        /* sin enlace */
  --none-field: rgba(125, 146, 163, 0.14);
  --alert: #e2604c;       /* diferencia / rechazo */

  /* Tipo */
  --display: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --text: 'InterVar', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    Helvetica, Arial, sans-serif;

  /* Ritmo */
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --shell: 1280px;
  --band: clamp(5rem, 9vw, 8.5rem);
  --band-tight: clamp(3.5rem, 6vw, 5.5rem);

  /* Movimiento — una sola curva para toda la web */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

/* ---------- Reset acotado ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
}

body {
  margin: 0;
  background: var(--night);
  color: var(--on-night);
  font-family: var(--text);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
p,
figure,
blockquote,
ul,
ol,
dl,
dd {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

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

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

a {
  color: inherit;
  text-decoration-color: color-mix(in srgb, currentColor 40%, transparent);
  text-underline-offset: 0.24em;
  text-decoration-thickness: 1px;
}

/* ---------- Superficies del navegador: también son diseño ---------- */

::selection {
  background: var(--ok);
  color: #041a0d;
}

:root {
  caret-color: var(--ok-bright);
  scrollbar-color: #1b3d55 var(--night);
  scrollbar-width: thin;
  accent-color: var(--ok);
  color-scheme: dark;
}

::-webkit-scrollbar {
  width: 11px;
  height: 11px;
}
::-webkit-scrollbar-track {
  background: var(--night);
}
::-webkit-scrollbar-thumb {
  background: #1b3d55;
  border: 3px solid var(--night);
  border-radius: 99px;
}
::-webkit-scrollbar-thumb:hover {
  background: #2a5878;
}

:focus-visible {
  outline: 2px solid var(--ok-bright);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- Escala tipográfica ---------- */

.display {
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.02;
  text-wrap: balance;
}

.h1 {
  font-size: clamp(2.05rem, 4.05vw, 3.7rem);
}

.h2 {
  font-size: clamp(1.85rem, 3.3vw, 3.05rem);
}

.h3 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.15rem, 1.5vw, 1.3rem);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.lead {
  font-size: clamp(1.075rem, 1.35vw, 1.2rem);
  line-height: 1.58;
  color: var(--on-night-2);
  max-width: 60ch;
  text-wrap: pretty;
}

.prose {
  max-width: 68ch;
  text-wrap: pretty;
}

.micro {
  font-size: 0.7rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--on-night-3);
}

.num {
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1, 'cv05' 1;
}

/* ---------- Utilidades de estructura ---------- */

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

.band--tight {
  padding-block: var(--band-tight);
}

.band--paper {
  background: var(--paper);
  color: var(--on-paper);
}

.band--paper .lead {
  color: var(--on-paper-2);
}

.band--paper .micro {
  color: var(--on-paper-3);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.lead--after {
  margin-top: 1.15rem;
}

.factrail--after {
  margin-top: 1.85rem;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  background: var(--ok);
  color: #041a0d;
  padding: 0.7rem 1.1rem;
  border-radius: 3px;
  font-weight: 600;
  transition: top 0.2s var(--ease);
}
.skip:focus {
  top: 1rem;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
