/* ============================================
   Base — Reset, Typography, Layout
   ============================================ */

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

html {
  font-size: var(--font-size-base);
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: var(--line-height);
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
  line-height: var(--line-height-tight);
  font-weight: 600;
}

h3 {
  font-size: var(--font-size-lg);
}

h4 {
  font-size: var(--font-size-base);
  font-weight: 600;
}

p {
  margin-bottom: var(--space-xs);
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover {
  text-decoration-thickness: 2px;
}

ul, ol {
  padding-left: var(--space-md);
}

li {
  margin-bottom: var(--space-2xs);
}

li:last-child {
  margin-bottom: 0;
}

strong, b {
  font-weight: 600;
}

/* Layout container */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-xs);
}

@media (min-width: 481px) {
  .container {
    padding: 0 var(--space-sm);
  }
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-sm);
  background: var(--brand-primary);
  color: #fff;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--border-radius-sm);
  z-index: 1000;
  font-weight: 600;
  text-decoration: none;
}

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