/* ---------- Fonts ---------- */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../assets/fonts/InterVariable.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url('../assets/fonts/InterVariable-Italic.woff2') format('woff2');
}

/* ---------- Base ---------- */

body {
  font-family: var(--font-primary);
  font-size: var(--font-size-base);
  font-weight: var(--weight-regular);
  color: var(--color-text);
  background-color: var(--color-bg);
}

h1,
h2,
h3 {
  letter-spacing: var(--heading-letter-spacing);
  line-height: var(--heading-line-height);
  font-weight: var(--weight-bold);
}

/* ---------- Links ---------- */

a {
  transition: color var(--transition-base);
}

a:hover {
  color: var(--color-accent);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

/* ---------- Page frame ---------- */

html {
  height: 100%;
}

body {
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

/* ---------- Header ---------- */

.site-header {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: var(--header-height);
  padding: 0 var(--space-6);
  background-color: var(--color-bg);
}

.site-header__wordmark {
  font-size: var(--text-md);
  font-weight: var(--weight-bold);
  letter-spacing: var(--heading-letter-spacing);
  color: var(--color-text);
}

/* ---------- Footer ---------- */

.site-footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--space-4);
  min-height: var(--footer-height);
  padding: var(--space-4) var(--space-6);
  font-size: var(--text-sm);
  background-color: var(--color-bg);
}

.site-footer__copyright {
  justify-self: start;
  font-size: var(--text-xs);
}

.site-footer__social {
  justify-self: center;
  display: flex;
  color: var(--color-text);
}

.site-footer__social svg {
  width: 32px;
  height: 32px;
}

.site-footer__legal {
  justify-self: end;
  display: flex;
  gap: var(--space-6);
  font-size: var(--text-xs);
}

@media (max-width: 767px) {
  .site-footer {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: var(--space-4);
    padding: var(--space-6);
    text-align: center;
  }

  .site-footer__copyright,
  .site-footer__social,
  .site-footer__legal {
    justify-self: center;
  }

  .site-footer__copyright {
    order: 3;
  }

  .site-footer__social {
    order: 1;
  }

  .site-footer__legal {
    order: 2;
  }
}

/* ---------- Utilities ---------- */

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

.rule {
  border: 0;
  border-top: 1px solid var(--color-border);
}
