/* =====================================================================
   BASE STYLES
   =====================================================================
   Resets, global typography, and the page-level background treatment.
   Loaded after tokens.css, before component/page-specific styles.
   ===================================================================== */

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--text-primary);
  background:
    linear-gradient(rgba(255,255,255,0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.018) 1px, transparent 1px),
    radial-gradient(circle at 8% -10%, rgba(var(--color-primary-rgb), 0.20), transparent 36%),
    radial-gradient(circle at 92% 12%, rgba(var(--color-secondary-rgb), 0.10), transparent 32%),
    radial-gradient(circle at 52% 105%, rgba(var(--color-primary-rgb), 0.08), transparent 30%),
    var(--bg-deepest);
  background-size: 44px 44px, 44px 44px, auto, auto, auto;
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

/* Custom scrollbar — small detail that reinforces the "premium SaaS" feel */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
}
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.2); }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.2;
  margin: 0 0 0.5em;
  color: var(--text-primary);
}

h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-base); }

p { margin: 0 0 1em; color: var(--text-secondary); }

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover { color: var(--color-secondary); }

small, .text-sm { font-size: var(--text-sm); }
.text-xs { font-size: var(--text-xs); }
.text-muted { color: var(--text-muted) !important; }
.text-secondary-arena { color: var(--text-secondary) !important; }
.font-mono { font-family: var(--font-mono); }

/* Visible keyboard focus everywhere — accessibility floor, never remove */
:focus-visible {
  outline: 2px solid var(--color-secondary);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Respect reduced-motion preferences site-wide */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

.container-arena {
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: 0 24px;
}

::selection {
  color: #06111f;
  background: var(--color-secondary);
}
