/* ===========================================================================
   ARLUMA · Base — reset, tipografía y utilidades de layout
   =========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + var(--sp-4));
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.65;
  color: var(--text);
  background: var(--ink-900);
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
  overflow-x: hidden;
}

/* Resplandor ambiental fijo: la "luz" de fondo de toda la marca. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(900px 600px at 15% -10%, rgba(var(--brand-rgb), .18), transparent 60%),
    radial-gradient(800px 520px at 85% 0%,  rgba(var(--brand-rgb), .14), transparent 62%);
  pointer-events: none;
  z-index: 0;
}
body > * { position: relative; z-index: 1; }

img, svg, video { display: block; max-width: 100%; height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; padding: 0; }

/* --- Titulares ------------------------------------------------------------ */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.022em;
  text-wrap: balance;
}
h1 { font-size: var(--fs-4xl); }
h2 { font-size: var(--fs-3xl); }
h3 { font-size: var(--fs-xl); }
p  { text-wrap: pretty; }

a { color: var(--brand); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--brand-soft); }

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

::selection { background: var(--brand); color: var(--text-on-brand); }

/* --- Layout --------------------------------------------------------------- */
.container {
  width: min(100% - var(--sp-5) * 2, var(--container));
  margin-inline: auto;
}
.container--narrow { max-width: var(--container-narrow); }

.section { padding-block: var(--sp-9); }
.section--tight { padding-block: var(--sp-7); }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: var(--sp-4);
  margin-bottom: var(--sp-6);
}
.section-head p { color: var(--text-muted); max-width: 58ch; margin-top: var(--sp-2); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: var(--sp-3);
}
.eyebrow::before {
  content: '';
  width: 22px; height: 1px;
  background: var(--brand);
}

.grid { display: grid; gap: var(--sp-5); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); }

.stack   { display: flex; flex-direction: column; gap: var(--sp-4); }
.row     { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; }
.spacer  { flex: 1; }

/* --- Utilidades ------------------------------------------------------------ */
.muted     { color: var(--text-muted); }
.dim       { color: var(--text-dim); }
.text-center { text-align: center; }
.mx-auto   { margin-inline: auto; }
.hide      { display: none !important; }
.nowrap    { white-space: nowrap; }

.lead { font-size: var(--fs-lg); color: var(--text-muted); max-width: 62ch; }

.gradient-text {
  background: var(--grad-aurora);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.divider { height: 1px; background: var(--grad-line); border: 0; margin-block: var(--sp-7); }

.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;
}

.skip-link {
  position: absolute; top: -100px; left: var(--sp-4);
  z-index: var(--z-toast);
  background: var(--brand); color: var(--text-on-brand);
  padding: var(--sp-3) var(--sp-4); border-radius: var(--r-sm);
  font-weight: 600;
}
.skip-link:focus { top: var(--sp-3); }

/* --- Aparición al hacer scroll (activada por core/reveal.js) ---------------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity var(--t-slow), transform var(--t-slow);
}
[data-reveal].is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal] { opacity: 1; transform: none; }
}
