/* MARK AI · Base + reset */

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

html {
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--lh-normal);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'ss01', 'cv11';
  min-height: 100dvh;
  overflow-x: hidden;
}

/* Atmospheric glow desde el top — único elemento decorativo */
body::before {
  content: '';
  position: fixed;
  inset: 0 0 auto 0;
  height: 80vh;
  background: var(--grad-brand-glow);
  pointer-events: none;
  z-index: 0;
  opacity: 0.9;
}

/* Texto */
h1, h2, h3, h4, h5 {
  margin: 0;
  font-weight: var(--fw-semibold);
  letter-spacing: var(--tracking-tight);
  line-height: var(--lh-tight);
  color: var(--ink);
  text-wrap: balance;
}

h1 { font-size: var(--text-3xl); }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); line-height: var(--lh-snug); }

p {
  margin: 0;
  text-wrap: pretty;
  max-width: 65ch;
  color: var(--ink-soft);
}

a {
  color: var(--brand-blue-hi);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-out-quart);
}
a:hover { color: var(--ink); }

/* Focus visible — solo cuando viene del teclado */
:focus { outline: none; }
:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: var(--radius-sm);
}

/* Selección */
::selection {
  background: oklch(0.62 0.22 290 / 0.35);
  color: var(--ink);
}

/* Scrollbar (Firefox + Webkit) */
* { scrollbar-width: thin; scrollbar-color: var(--line-hi) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
  background: var(--line-hi);
  border-radius: var(--radius-full);
  border: 2px solid var(--bg);
}
*::-webkit-scrollbar-thumb:hover { background: var(--brand-blue); }

/* Utilities */
.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;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--space-5);
}
@media (min-width: 768px) {
  .container { padding-inline: var(--space-8); }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 200ms !important;
    transition-timing-function: ease !important;
    scroll-behavior: auto !important;
  }
}
