/* ==========================================================================
   Base elements. LAYOUT FILE.
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--ah-white);
  color: var(--ah-text);
  font-family: var(--ah-font);
  font-size: var(--ah-body);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  /* Nothing may make the page scroll sideways on phones (clip keeps sticky elements working). */
  overflow-x: clip;
}

/* The footer fills the rest of the page, so there is never a white strip above it. */
.ah-main {
  flex: 1 0 auto;
}

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 800;
  color: var(--ah-text);
  text-wrap: balance;
}

h1 {
  font-size: var(--ah-h1);
  line-height: 1.08;
  letter-spacing: -1.4px;
}

h2 {
  font-size: var(--ah-h2);
  line-height: 1.2;
  letter-spacing: -0.6px;
}

h3 {
  font-size: 22px;
  line-height: 1.3;
}

p {
  margin: 0;
}

a {
  color: var(--ah-orange-text);
}

img,
svg,
video {
  max-width: 100%;
  height: auto;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--ah-orange);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

.screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.ah-skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 1000;
  padding: 12px 18px;
  border-radius: var(--ah-radius-button);
  background: var(--ah-white);
  color: var(--ah-orange-text);
  font-weight: 700;
}

.ah-skip-link:focus {
  top: 16px;
}

@media (max-width: 900px) {
  body {
    font-size: var(--ah-body-mobile);
  }

  h1 {
    font-size: var(--ah-h1-mobile);
    line-height: 1.1;
    letter-spacing: -1px;
  }

  h2 {
    font-size: var(--ah-h2-mobile);
  }

  h3 {
    font-size: 19px;
  }
}
