/* Reset + base typography + shared primitives (buttons, kickers, containers). */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: var(--text-base);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  display: flex;
  flex-direction: column;
}

body.is-modal-open {
  overflow: hidden;
}

h1,
h2,
h3,
p {
  margin: 0;
  font-weight: 400;
}

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

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

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

img,
svg {
  display: block;
}

:focus {
  outline: none;
}

:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: var(--radius-sm);
}

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

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Small uppercase mono label used for kickers and metadata. */
.kicker {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-mono);
  text-transform: uppercase;
  color: var(--ink-soft);
}

.kicker--accent {
  color: var(--accent);
}

/* Pill buttons. */
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 28px;
  border-radius: var(--radius-pill);
  background: var(--ink);
  color: var(--bg);
  font-size: var(--text-base);
  letter-spacing: var(--tracking-tight);
  white-space: nowrap;
  transition:
    background-color var(--duration) var(--ease),
    color var(--duration) var(--ease),
    transform var(--duration) var(--ease);
}

.pill:hover {
  background: #2a2a27;
}

.pill:active {
  transform: translateY(1px);
}

.pill:focus-visible {
  border-radius: var(--radius-pill);
}

.pill__arrow {
  width: 14px;
  height: 14px;
  transition: transform var(--duration) var(--ease);
}

.pill:hover .pill__arrow {
  transform: translateX(3px);
}

.pill--ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line-strong);
}

.pill--ghost:hover {
  background: var(--bg-elevated);
  border-color: var(--ink);
}

/* Plain text links/buttons in the header and modal. */
.text-button {
  font-size: var(--text-sm);
  color: var(--ink-soft);
  padding: 8px 6px;
  min-height: 44px;
  min-width: 44px;
  border-bottom: 1px solid transparent;
  transition:
    color var(--duration) var(--ease),
    border-color var(--duration) var(--ease);
}

.text-button:hover {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

.text-button:disabled {
  color: var(--ink-muted);
  cursor: default;
  border-bottom-color: transparent;
}

/* Footer */
.footer {
  margin-top: auto;
  border-top: 1px solid var(--line);
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  padding-block: 28px;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.04em;
  color: var(--ink-muted);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Shared readable text, keyboard access, and pending states. */
p { text-wrap: pretty; }
.kicker, .filters__status, .filter__count, .modal__nav-hint { font-variant-numeric: tabular-nums; }
button:disabled { cursor: default; }
.pill:disabled { opacity: .65; transform: none; }
.skip-link { position: fixed; top: 12px; left: 12px; z-index: 10; padding: 12px 18px; background: var(--ink); color: white; border-radius: var(--radius); transform: translateY(-200%); }
.skip-link:focus { transform: translateY(0); }
