/* ============================================================
   FocusFlow Base Styles
   Global reset, typography system, element defaults
   ============================================================ */

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

/* ── HTML ── */
html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* ── Body ── */
body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Typography Utility Classes ── */

.text-hero {
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.04em;
  color: var(--text-primary);
}

.text-h1 {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.03em;
}

.text-h2 {
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.text-h3 {
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: -0.01em;
}

.text-body {
  font-size: 0.9375rem;
  font-weight: 400;
  line-height: 1.65;
  letter-spacing: -0.005em;
}

.text-body-sm {
  font-size: 0.8125rem;
  font-weight: 400;
  line-height: 1.55;
  letter-spacing: 0;
}

.text-caption {
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.text-number-lg {
  font-size: 2.5rem;
  font-weight: 700;
  font-feature-settings: 'tnum';
  letter-spacing: -0.03em;
}

.text-number-xl {
  font-size: 4rem;
  font-weight: 700;
  font-feature-settings: 'tnum';
  letter-spacing: -0.05em;
}

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

a:hover {
  color: var(--accent-secondary);
}

a:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ── Selection ── */
::selection {
  background: var(--accent-primary);
  color: white;
}

::-moz-selection {
  background: var(--accent-primary);
  color: white;
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--bg-hover);
  border-radius: var(--radius-full);
}

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

/* Firefox scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--bg-hover) transparent;
}

/* ── Images ── */
img {
  max-width: 100%;
  display: block;
}

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

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

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

/* ── Table ── */
table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* ── Focus Visible ── */
:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}

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