/* =============================================================
   boards.solutions — Base Styles
   Reset, typography defaults, global utilities.
   No component or layout rules in this file.
   ============================================================= */

/* ============================================================
   Box Model Reset
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

/* ============================================================
   Document Base
   ============================================================ */
html {
  scroll-behavior: smooth;
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-family-base);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  color: var(--color-text-primary);
  background-color: var(--color-surface-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

/* ============================================================
   Media Defaults
   ============================================================ */
img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

/* ============================================================
   Form Element Inheritance
   ============================================================ */
input, button, textarea, select {
  font: inherit;
}

/* ============================================================
   Text Overflow
   ============================================================ */
p, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}

/* ============================================================
   List Reset (semantic lists with role)
   ============================================================ */
[role="list"] {
  list-style: none;
  padding: 0;
}

/* ============================================================
   Link Base
   ============================================================ */
a {
  color: inherit;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

/* ============================================================
   Focus Management — WCAG 2.4.11
   ============================================================ */
:focus-visible {
  outline: 3px solid var(--color-border-focus);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

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

/* ============================================================
   Skip Link
   ============================================================ */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  z-index: var(--z-toast);
  padding: var(--space-3) var(--space-6);
  background: var(--color-brand-primary);
  color: var(--color-text-inverse);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  text-decoration: none;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  transition: top var(--transition-fast);
  white-space: nowrap;
}

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

/* ============================================================
   Screenreader-Only Utility
   ============================================================ */
.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;
}

/* ============================================================
   Typography Scale (mobile-first base sizes)
   ============================================================ */
h1 {
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  letter-spacing: -0.025em;
}

h2 {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  letter-spacing: -0.02em;
}

h3 {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-snug);
}

h4 {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-snug);
}

h5 {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-normal);
}

h6 {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-normal);
}

small {
  font-size: var(--font-size-sm);
}

/* ============================================================
   Reduced Motion — global override (all transitions & animations)
   ============================================================ */
@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;
  }
}
