/* ============================================================
   01Academy · Base
   Vivid+Co Design System — Prismatic Light Through Obsidian
   ============================================================ */

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 24px);
  background-color: var(--color-obsidian);
  color-scheme: dark;
}

body {
  font-family: var(--font-neue-montreal);
  font-size: var(--text-body);
  line-height: var(--lh-body);
  font-weight: var(--font-weight-regular);
  color: var(--color-bone-white);
  background-color: var(--color-obsidian);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01" on;
  overflow-x: hidden;
}

body.is-locked {
  overflow: hidden;
}

/* Headings: Deliberate refusal of bold — weight 400 is default */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-neue-montreal);
  font-weight: var(--font-weight-regular);
  line-height: var(--lh-head);
  letter-spacing: -0.01em;
  color: var(--color-bone-white);
  text-wrap: balance;
  font-feature-settings: "ss01" on;
}

h1 {
  font-size: var(--fs-h1);
  line-height: var(--lh-tight);
  letter-spacing: -0.02em;
}

h2 {
  font-size: var(--fs-h2);
  letter-spacing: -0.015em;
  line-height: 1.08;
}

h3 {
  font-size: var(--fs-h3);
  letter-spacing: -0.01em;
}

/* Weight 700 is reserved exclusively for 36px subheadings */
h4 {
  font-size: var(--fs-h4);
  font-weight: var(--font-weight-bold);
  line-height: var(--leading-heading);
}

p {
  text-wrap: pretty;
  color: var(--color-bone-white);
}

strong, b {
  font-weight: var(--font-weight-bold);
}

/* --- Focus visible --- */
:focus-visible {
  outline: 1px solid var(--color-bone-white);
  outline-offset: 3px;
  border-radius: var(--radius-xs);
}

::selection {
  background: var(--color-graphite-veil);
  color: var(--color-bone-white);
}

/* --- Scrollbar --- */
@supports (scrollbar-color: auto) {
  html {
    scrollbar-color: var(--color-ash-border) var(--color-obsidian);
  }
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-obsidian);
}

::-webkit-scrollbar-thumb {
  background: var(--color-ash-border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-graphite-veil);
}

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

