/* ============================================================
   ACTIVISIONVR — Base Styles & Typography
   Reset, global element styles, and typographic foundations
   ============================================================ */

/* ── Modern CSS Reset ───────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-primary);
  font-size: var(--text-base);
  font-weight: var(--weight-normal);
  line-height: var(--leading-normal);
  color: var(--text-primary);
  background-color: var(--bg-dark);
  overflow-x: hidden;
  min-height: 100vh;
}

/* ── Selection ──────────────────────────────────────── */
::selection {
  background-color: rgba(240, 127, 25, 0.3);
  color: var(--text-primary);
}

::-moz-selection {
  background-color: rgba(240, 127, 25, 0.3);
  color: var(--text-primary);
}

/* ── Custom Scrollbar ───────────────────────────────── */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-deep);
}

::-webkit-scrollbar-thumb {
  background: var(--bg-elevated);
  border-radius: var(--radius-full);
  border: 2px solid var(--bg-deep);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-tertiary);
}

/* Firefox scrollbar */
html {
  scrollbar-width: thin;
  scrollbar-color: var(--bg-elevated) var(--bg-deep);
}

/* ── Focus Styles (Accessibility) ───────────────────── */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

:focus:not(:focus-visible) {
  outline: none;
}

/* ── Typography ─────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--text-primary);
}

h1 {
  font-size: var(--text-7xl);
  font-weight: var(--weight-extrabold);
  letter-spacing: var(--tracking-tighter);
}

h2 {
  font-size: var(--text-5xl);
  font-weight: var(--weight-bold);
}

h3 {
  font-size: var(--text-3xl);
}

h4 {
  font-size: var(--text-2xl);
}

h5 {
  font-size: var(--text-xl);
}

h6 {
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
}

p {
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
  max-width: 72ch;
}

/* Lead paragraph - larger intro text */
p.lead {
  font-size: var(--text-xl);
  line-height: var(--leading-relaxed);
  color: var(--text-secondary);
}

/* Small/caption text */
small,
.text-small {
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
}

.text-xs {
  font-size: var(--text-xs);
  line-height: var(--leading-normal);
  letter-spacing: var(--tracking-wide);
}

/* ── Links ──────────────────────────────────────────── */
a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--primary-light);
}

/* ── Lists ──────────────────────────────────────────── */
ul, ol {
  list-style: none;
}

/* ── Media ──────────────────────────────────────────── */
img, video, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

img {
  font-style: italic; /* alt text styling */
}

/* ── Code ───────────────────────────────────────────── */
code, pre {
  font-family: var(--font-mono);
}

code {
  font-size: 0.875em;
  padding: 0.15em 0.4em;
  background-color: var(--bg-elevated);
  border-radius: var(--radius-sm);
  color: var(--primary-light);
}

pre {
  padding: var(--space-4);
  background-color: var(--bg-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  overflow-x: auto;
}

/* ── Horizontal Rule ────────────────────────────────── */
hr {
  border: none;
  height: 1px;
  background: var(--border-subtle);
  margin: var(--space-8) 0;
}

/* ── Table ──────────────────────────────────────────── */
table {
  width: 100%;
  border-collapse: collapse;
}

/* ── Button Reset ───────────────────────────────────── */
button {
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

/* ── Input Reset ────────────────────────────────────── */
input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

/* ── Utility Text Classes ───────────────────────────── */
.text-gradient {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-primary-color {
  color: var(--primary);
}

.text-accent-blue {
  color: var(--accent-blue);
}

.text-white {
  color: var(--text-primary);
}

.text-muted {
  color: var(--text-secondary);
}

.text-center {
  text-align: center;
}

.text-uppercase {
  text-transform: uppercase;
  letter-spacing: var(--tracking-widest);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
}

.font-mono {
  font-family: var(--font-mono);
}

/* ── Decorative Elements ────────────────────────────── */
.gradient-line {
  height: 3px;
  background: var(--gradient-primary);
  border-radius: var(--radius-full);
}

.gradient-line-thin {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
}

.dot-separator {
  display: inline-block;
  width: 4px;
  height: 4px;
  border-radius: var(--radius-full);
  background: var(--primary);
  margin: 0 var(--space-3);
  vertical-align: middle;
}

/* ── SVG grid pattern background ────────────────────── */
.bg-grid-pattern {
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
}

.bg-dot-pattern {
  background-image: radial-gradient(circle, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 24px 24px;
}

/* ── Screen Reader Only ─────────────────────────────── */
.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 to Content (Accessibility) ────────────────── */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  z-index: var(--z-toast);
  padding: var(--space-3) var(--space-6);
  background: var(--primary);
  color: var(--text-primary);
  font-weight: var(--weight-semibold);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: 0;
}
