/* Rozier · base: reset, página (nivel 0), utilidades y layout global */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper-0);
  color: var(--ink-900);
  font: 400 var(--fs-body)/1.5 var(--font-ui);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Luz ambiental + grano */
body::before {
  content: "";
  position: fixed;
  inset: -420px auto auto -300px;
  width: 1200px; height: 800px;
  background: radial-gradient(closest-side, var(--ambient), transparent);
  pointer-events: none;
  z-index: 0;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: var(--grain-opacity);
  mix-blend-mode: var(--grain-blend);
  pointer-events: none;
  z-index: 100;
}

[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
/* Foco: solo :focus-visible, anillo de 3px (DESIGN §9). Sin :focus { outline: none }. */
:focus-visible { outline: var(--focus-w) solid var(--focus); outline-offset: 2px; }

svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.sprite { position: absolute; width: 0; height: 0; }

/* Utilidades */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mono {
  font: 500 var(--fs-mono)/1.3 var(--font-mono);
  letter-spacing: var(--track-mono);
  text-transform: uppercase;
  color: var(--ink-500);
}
.mono-ink { font-weight: 400; color: var(--ink-900); }
.hl-risk { color: var(--signal-600); font-weight: inherit; }
.hl-key { color: var(--cobalt-600); font-weight: inherit; }
.muted { color: var(--ink-500); }

/* Colores por cuenta (se aplican a .dot vía --c) */
.acc-apres  { --c: var(--acc-apres); }
.acc-folka  { --c: var(--acc-folka); }
.acc-balama { --c: var(--acc-balama); }

/* Layout */
.app { position: relative; z-index: 1; display: flex; min-height: 100vh; }
.main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding: 36px var(--s-7) 44px;
  max-width: 1184px;
}

/* Entrada escalonada: el orden lo da la posición en .main */
.enter { animation: enter var(--t-enter) var(--ease-out) both; }
.main > .enter:nth-child(2) { animation-delay: calc(1 * var(--stagger)); }
.main > .enter:nth-child(3) { animation-delay: calc(2 * var(--stagger)); }
.main > .enter:nth-child(4) { animation-delay: calc(3 * var(--stagger)); }
.main > * > .enter:nth-child(1) { animation-delay: calc(4 * var(--stagger)); }
.main > * > .enter:nth-child(2) { animation-delay: calc(5 * var(--stagger)); }
@keyframes enter { from { opacity: 0; transform: translateY(12px); } }

@media (max-width: 1240px) {
  .main { padding-inline: var(--s-6); }
}
@media (max-width: 1100px) {
  :root { --fs-greeting: 36px; --fs-row: 22px; --fs-kpi: 56px; }
  .main { gap: 24px; padding: 0 16px calc(120px + env(safe-area-inset-bottom)); margin-inline: auto; max-width: 760px; }
}

/* Movimiento reducido */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition-property: color, background-color, border-color !important;
  }
}
