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

html,
body,
h1,
h2,
h3,
p,
figure,
blockquote,
dl,
dd,
ul,
ol {
  margin: 0;
}

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

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

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

/* Base */
html {
  -webkit-text-size-adjust: 100%;
}

/* The [hidden] attribute must always win, even against classes like
   .btn-block that set their own `display`. Equal-specificity author
   rules can otherwise override the UA stylesheet's [hidden] rule. */
[hidden] {
  display: none !important;
}

body {
  background: var(--color-bg);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
  min-height: 100vh;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.15;
}

h1 {
  font-size: clamp(1.9rem, 5vw + 1rem, 3rem);
}

h2 {
  font-size: clamp(1.4rem, 3vw + 1rem, 2rem);
}

h3 {
  font-size: 1.15rem;
}

a {
  color: var(--color-ink);
}

a:not([class]) {
  color: var(--color-ink);
  text-decoration-color: var(--color-accent);
  text-decoration-thickness: 2px;
}

/* Visible focus state everywhere — never rely on the browser default
   being good enough across all elements. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
[tabindex]:focus-visible {
  outline: var(--focus-ring);
  outline-offset: 2px;
}

/* Utility: visually hidden but available to screen readers */
.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;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -3rem;
  background: var(--color-accent);
  color: var(--color-on-accent);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius);
  z-index: 100;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: var(--space-4);
}

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

main {
  display: block;
}

.section {
  padding-block: var(--space-7);
}

.section--tight {
  padding-block: var(--space-6);
}
