/*
 * Reset, page frame, header and footer.
 */

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

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

body {
  margin: 0;
  background: var(--c-white);
  color: var(--c-text);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: 24px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
figure,
blockquote {
  margin: 0;
  padding: 0;
  font-weight: 400;
}

ul,
ol {
  list-style: none;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--c-blue);
  outline-offset: 3px;
}

.container {
  width: min(var(--container), 100% - 2 * var(--margin));
  margin-inline: auto;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: var(--margin);
  top: -100px;
  z-index: 100;
  padding: 8px 14px;
  background: var(--c-black);
  color: var(--c-white);
  font-size: var(--fs-link);
  font-weight: 600;
}
.skip-link:focus {
  top: 12px;
}

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

.site-header {
  position: relative;
  z-index: 20;
  height: var(--header-h);
  background: var(--c-white);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.site-header__logo {
  color: var(--c-blue);
}
.site-header__logo svg {
  width: 197.6px;
  height: 24px;
}

.site-nav__list {
  display: flex;
  gap: 60px;
}
.site-nav a {
  display: block;
  font-size: var(--fs-link);
  font-weight: 600;
  line-height: 24px;
  text-transform: uppercase;
  transition: color 0.2s;
}
/* The mockup shows no active state: the current page keeps the default colour */
.site-nav a:hover {
  color: var(--c-blue);
}

.site-header__burger {
  display: none;
}

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

.site-footer {
  position: relative;
  overflow: hidden;
  background: var(--c-sky);
  font-size: var(--fs-label);
  font-weight: 500;
  line-height: 24px;
}

/* Columns start at 0 / 357 / 730 / 955px of the 1240px container */
.site-footer__cols {
  display: grid;
  grid-template-columns: 28.79% 30.08% 18.145% 1fr;
  padding-top: 29px;
  min-height: 197px;
}

.site-footer__col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}
.site-footer__col:first-child {
  gap: 16px;
}

/* First line of every column: 40px box with a 60px line, as in the mockup */
.site-footer__lead,
.site-footer__list li:first-child {
  height: 40px;
  line-height: 60px;
  white-space: nowrap;
}

.site-footer__caps {
  text-transform: uppercase;
}

.site-footer__cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.site-footer__cta svg {
  flex: none;
  margin-left: 3px;
  transition: transform 0.25s var(--ease);
}
.site-footer__cta:hover svg {
  transform: translate(2px, -2px);
}

.site-footer__list {
  white-space: nowrap;
}
.site-footer a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.site-footer__copy {
  margin-top: 212px;
  font-size: 18px;
  font-weight: 400;
  line-height: 60px;
}

/* The logo spans the container and sinks 7% of its height under the page edge */
.site-footer__logo {
  margin-top: 21px;
  margin-bottom: -0.86%;
  color: var(--c-black);
}
.site-footer__logo svg {
  width: 100%;
  height: auto;
}

/* ---------- Provisional small-screen rules (no mobile mockup yet) ---------- */

/* Below the mockup width the last column has no room for its longest link on one line */
@media (max-width: 1200px) {
  .site-footer__list {
    white-space: normal;
  }
  .site-footer__list li:first-child {
    height: auto;
    min-height: 40px;
    padding-top: 18px;
    line-height: 24px;
  }
}

@media (max-width: 900px) {
  .site-footer__cols {
    grid-template-columns: 1fr 1fr;
    row-gap: 40px;
  }
  .site-footer__copy {
    margin-top: 80px;
  }
}

@media (max-width: 700px) {
  :root {
    --header-h: 72px;
  }
  .site-header__logo svg {
    width: 148px;
    height: 18px;
  }
  .site-header__burger {
    position: relative;
    z-index: 2;
    display: block;
    width: 32px;
    height: 32px;
  }
  .site-header__burger span:not(.screen-reader-text) {
    position: absolute;
    left: 4px;
    right: 4px;
    height: 2px;
    background: var(--c-black);
    transition: transform 0.3s var(--ease);
  }
  .site-header__burger span:nth-child(2) {
    top: 12px;
  }
  .site-header__burger span:nth-child(3) {
    top: 20px;
  }
  .site-header__burger[aria-expanded="true"] span:nth-child(2) {
    transform: translateY(4px) rotate(45deg);
  }
  .site-header__burger[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-4px) rotate(-45deg);
  }
  .site-nav {
    position: fixed;
    inset: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    padding: 0 var(--margin);
    background: var(--c-white);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
  }
  .site-nav.is-open {
    opacity: 1;
    visibility: visible;
  }
  .site-nav__list {
    flex-direction: column;
    gap: 28px;
  }
  .site-nav a {
    font-size: 28px;
    line-height: 36px;
  }
}

@media (max-width: 560px) {
  .site-footer__cols {
    grid-template-columns: 1fr;
  }
}
