/**
 * base.css
 * ----------------------------------------------------------------------------
 * Global reset and foundational element styles.
 *
 * This file owns the *default* appearance of raw HTML elements (body, h1,
 * a, button, input, etc). It never defines a class and never lays out a
 * page region — that is layout.css's job. Keeping resets separate from
 * layout and components means any future module can drop plain HTML in and
 * have it already look like part of the product.
 */

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

html {
  -webkit-text-size-adjust: 100%;
  color-scheme: light dark;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--color-ink);
  background: var(--color-bg);
  transition: background-color var(--duration-base) var(--ease-standard),
    color var(--duration-base) var(--ease-standard);
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  margin: 0 0 var(--space-3);
  color: var(--color-ink);
}

h1 {
  font-size: var(--text-2xl);
  font-weight: 700;
}
h2 {
  font-size: var(--text-xl);
  font-weight: 700;
}
h3 {
  font-size: var(--text-lg);
  font-weight: 600;
}
h4 {
  font-size: var(--text-md);
  font-weight: 600;
}

p {
  margin: 0 0 var(--space-3);
  color: var(--color-ink-muted);
}

a {
  color: var(--color-primary);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

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

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

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

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

/* A single, consistent focus style used by every interactive element in the
   product. Never remove an outline without replacing it with this. */
:focus-visible {
  outline: 2px solid var(--color-focus-ring);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* Utility for visually hiding content while keeping it available to screen
   readers (used for skip links, labels, live regions). */
.visually-hidden {
  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 link: hidden until focused, then jumps above the header. */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  z-index: 1000;
  padding: var(--space-2) var(--space-4);
  background: var(--color-primary);
  color: var(--color-primary-ink);
  border-radius: var(--radius-sm);
  transition: top var(--duration-fast) var(--ease-standard);
}
.skip-link:focus {
  top: var(--space-2);
}

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