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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font);
  font-optical-sizing: auto;
  font-size: var(--text-base);
  line-height: 1.45;
  letter-spacing: -0.006em;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;   /* sin "rebote" que delate que es web */
  isolation: isolate;
}

/* Resplandor fijo de marca + flama. Sin blur: no cuesta al hacer scroll. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60% 40% at 100% 0%, color-mix(in oklab, var(--brand) 16%, transparent), transparent 70%),
    radial-gradient(50% 35% at 0% 100%, color-mix(in oklab, var(--flame) 9%, transparent), transparent 70%);
}

h1, h2, h3 { margin: 0; letter-spacing: -0.022em; line-height: 1.15; }
h1 { font-size: var(--text-xl); font-weight: 800; }
h2 { font-size: var(--text-lg); font-weight: 700; }
h3 { font-size: var(--text-base); font-weight: 700; }
p { margin: 0; }
a { color: var(--flame-ink); text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }

:focus-visible { outline: 2px solid var(--flame); outline-offset: 2px; }

.muted { color: var(--muted); }
.inline-icon { display: inline-block; width: 1.1em; height: 1.1em; vertical-align: -0.2em; }
.small { font-size: var(--text-sm); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.noscript { padding: 24px; text-align: center; color: var(--muted); }

/* Mientras carga el JS: el fondo ya es el de la app, sin flash blanco. */
.app-loading::after {
  content: "";
  position: fixed;
  left: 50%; top: 50%;
  width: 28px; height: 28px;
  margin: -14px 0 0 -14px;
  border-radius: 50%;
  border: 3px solid var(--soft);
  border-top-color: var(--flame);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

@keyframes rise-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.enter { animation: rise-in 500ms var(--ease-out-expo) both; }


/* `hidden` gana siempre, aunque el componente declare display: flex o grid. */
[hidden] { display: none !important; }
