/* ==========================================================================
   6 Sigma · base: tokens, reset, tipografía, utilidades
   ========================================================================== */

:root {
  /* Paleta (valores iniciales del brief; ajustar con el logotipo oficial) */
  --green: #126A38;          /* verde principal: CTA, foco, acentos */
  --green-hover: #0D5A2E;
  --green-2: #569830;        /* verde secundario: detalles y gráficos */
  --green-soft: #E7F0E5;     /* fondos de acento muy suaves */
  --green-line: #C9DCC4;
  --ink: #171917;            /* negro carbón: títulos y texto principal */
  --ink-2: #4A524C;          /* texto secundario (7.6:1 sobre --canvas) */
  --ink-3: #6B746D;          /* texto terciario (4.7:1 sobre --canvas) */
  --canvas: #F6F8F5;         /* blanco suave: fondo general */
  --panel: #FFFFFF;          /* tarjetas */
  --line: #DFE5DD;           /* bordes suaves */
  --line-strong: #A9B5AB;    /* bordes de controles (3.1:1) */

  --dark: #131814;           /* secciones oscuras, teñidas de verde */
  --dark-2: #1B221D;
  --dark-line: #2C362F;
  --on-dark: #EEF2EC;
  --on-dark-2: #A9B6AB;      /* 8.2:1 sobre --dark */
  --green-on-dark: #7DBB57;  /* verde legible sobre fondo oscuro */

  /* Tipografía */
  --f-display: "Sora", "Segoe UI", system-ui, sans-serif;
  --f-body: "Instrument Sans", "Segoe UI", system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", monospace;

  /* Ritmo */
  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --section: clamp(84px, 11vw, 148px);
  --r-sm: 10px;
  --r: 16px;
  --r-lg: 24px;

  /* Movimiento: dos curvas reutilizadas en todo el sitio */
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);

  --shadow-1: 0 1px 2px rgba(23, 25, 23, .05), 0 4px 14px rgba(23, 25, 23, .05);
  --shadow-2: 0 2px 6px rgba(23, 25, 23, .06), 0 18px 48px rgba(23, 25, 23, .10);
  --shadow-3: 0 30px 80px rgba(18, 40, 26, .18);

  --header-h: 72px;
}

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

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

body {
  margin: 0;
  overflow-x: hidden;
  overflow-x: clip;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  animation: page-in .7s var(--ease-out) both;
}
@keyframes page-in { from { opacity: 0; } }

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }

h1, h2, h3 {
  font-family: var(--f-display);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -.025em;
  margin: 0;
  text-wrap: balance;
}
h2 { font-size: clamp(2rem, 4.4vw, 3.4rem); max-width: 18ch; }
h3 { font-size: 1.3rem; letter-spacing: -.015em; line-height: 1.2; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

.mono {
  font-family: var(--f-mono);
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.wrap {
  width: min(var(--wrap), 100% - 2 * var(--gutter));
  margin-inline: auto;
}

.sr-only {
  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 {
  position: fixed;
  top: 12px; left: 12px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--ink);
  color: #fff;
  border-radius: var(--r-sm);
  transform: translateY(-160%);
  transition: transform .3s var(--ease-out);
}
.skip:focus { transform: none; }

:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
  border-radius: 6px;
}
.dark :focus-visible { outline-color: var(--green-on-dark); }

main:focus { outline: none; }

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

/* Capa ambiental fija: retícula de puntos muy tenue y un halo lento */
.ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: radial-gradient(rgba(18, 106, 56, .07) 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 70%);
          mask-image: linear-gradient(180deg, #000 0%, transparent 70%);
}
.ambient::after {
  content: "";
  position: absolute;
  width: 70vmax; height: 70vmax;
  top: -30vmax; right: -25vmax;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(86, 152, 48, .10), transparent 65%);
  animation: drift 60s var(--ease-io) -12s infinite alternate;
}
@keyframes drift { to { transform: translate(-12vmax, 10vmax) scale(1.08); } }

/* Pausa global de animaciones en pestañas ocultas */
body.paused *, body.paused *::before, body.paused *::after { animation-play-state: paused !important; }
