/*
 * WiseMembers Design System — Base
 * Modern reset + typographic defaults + body baseline.
 * Pulls every value from tokens.css.
 */

@import url('tokens.css');

/* ---------------------------------------------------------------
 * Modern CSS reset (Josh Comeau-style, abridged)
 * ------------------------------------------------------------- */

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

* {
  margin: 0;
}

html,
body {
  height: 100%;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  line-height: var(--text-body-leading);
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

#root,
#__next {
  isolation: isolate;
}

ol,
ul {
  list-style: none;
  padding: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

table {
  border-collapse: collapse;
}

/* ---------------------------------------------------------------
 * Typographic defaults
 * ------------------------------------------------------------- */

html {
  font-family: var(--font-sans);
  font-size: var(--text-body);
  line-height: var(--text-body-leading);
  color: var(--color-text-primary);
  background-color: var(--color-canvas);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-body);
  font-weight: var(--text-body-weight);
  color: var(--color-text-primary);
  background-color: var(--color-canvas);
}

h1 {
  font-size: var(--text-page-title);
  font-weight: var(--text-page-title-weight);
  line-height: var(--text-page-title-leading);
  letter-spacing: var(--tracking-tight);
}

h2 {
  font-size: var(--text-h2);
  font-weight: var(--text-h2-weight);
  line-height: var(--text-h2-leading);
}

h3 {
  font-size: var(--text-h3);
  font-weight: var(--text-h3-weight);
  line-height: var(--text-h3-leading);
}

p {
  font-size: var(--text-body);
  line-height: var(--text-body-leading);
}

small {
  font-size: var(--text-small);
  line-height: var(--text-small-leading);
}

code,
kbd,
pre,
samp {
  font-family: var(--font-mono);
  font-size: var(--text-tiny);
}

/* ---------------------------------------------------------------
 * Type-scale utility classes (use sparingly; prefer semantic tags)
 * ------------------------------------------------------------- */

.text-hero {
  font-size: var(--text-hero);
  font-weight: var(--text-hero-weight);
  line-height: var(--text-hero-leading);
  letter-spacing: var(--tracking-tight);
}

.text-page-title {
  font-size: var(--text-page-title);
  font-weight: var(--text-page-title-weight);
  line-height: var(--text-page-title-leading);
  letter-spacing: var(--tracking-tight);
}

.text-metric {
  font-size: var(--text-metric);
  font-weight: var(--text-metric-weight);
  line-height: var(--text-metric-leading);
  letter-spacing: var(--tracking-tight);
}

.text-h2 {
  font-size: var(--text-h2);
  font-weight: var(--text-h2-weight);
  line-height: var(--text-h2-leading);
}

.text-h3 {
  font-size: var(--text-h3);
  font-weight: var(--text-h3-weight);
  line-height: var(--text-h3-leading);
}

.text-body {
  font-size: var(--text-body);
  font-weight: var(--text-body-weight);
  line-height: var(--text-body-leading);
}

.text-body-strong {
  font-size: var(--text-body-strong);
  font-weight: var(--text-body-strong-weight);
  line-height: var(--text-body-strong-leading);
}

.text-small {
  font-size: var(--text-small);
  font-weight: var(--text-small-weight);
  line-height: var(--text-small-leading);
}

.text-tiny {
  font-size: var(--text-tiny);
  font-weight: var(--text-tiny-weight);
  line-height: var(--text-tiny-leading);
}

.text-label {
  font-size: var(--text-label);
  font-weight: var(--text-label-weight);
  line-height: var(--text-label-leading);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-text-secondary);
}

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

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

/* ---------------------------------------------------------------
 * Focus-visible baseline
 * ------------------------------------------------------------- */

:focus {
  outline: none;
}

:focus-visible {
  outline: var(--focus-outline);
  outline-offset: var(--focus-outline-offset);
  border-radius: var(--radius-sm);
}

/* ---------------------------------------------------------------
 * Selection
 * ------------------------------------------------------------- */

::selection {
  background-color: var(--color-primary-soft);
  color: var(--color-primary-active);
}

/* ---------------------------------------------------------------
 * Reduced motion
 * ------------------------------------------------------------- */

@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;
  }
}

/* ---------------------------------------------------------------
 * Visually hidden (a11y)
 * ------------------------------------------------------------- */

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
