@import "tokens.css";

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

html {
  font-size: var(--font-size-base);
}

body {
  margin: 0;
  font-family: var(--font-sans);
  line-height: var(--line-height-base);
  color: var(--color-text);
  background: var(--color-bg);
}

h1, h2, h3, h4 {
  line-height: 1.2;
  margin: 0 0 var(--space-2);
  color: var(--color-navy);
}

p {
  margin: 0 0 var(--space-2);
}

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

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

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--space-3);
}

/* Narrower reading-width variants of .container — kept as classes rather
   than inline style="" attributes so the site can run under a strict CSP
   with no style-src 'unsafe-inline' exception. */
.container--narrow {
  max-width: 560px;
}

.container--medium {
  max-width: 640px;
  text-align: center;
}

.container--wide {
  max-width: 720px;
}

.section {
  /* padding-block (not the `padding` shorthand) so this never collides
     with .container's horizontal padding when both classes land on the
     same element — the two shorthands used to have equal specificity,
     and whichever was declared later in the cascade wiped out the
     other's left/right padding entirely. */
  padding-block: var(--space-6);
}

@media (max-width: 768px) {
  .section {
    padding-block: var(--space-5);
  }
}

.section--alt {
  background: var(--color-bg-alt);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
