@font-face {
  font-family: "DB Helvethaica X";
  src: url("../assets/fonts/db-helvethaica-x.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Font Awesome 5 Free";
  src: url("../assets/fonts/fa-solid-900.woff2") format("woff2");
  font-style: normal;
  font-weight: 900;
  font-display: block;
}

:root {
  --navy: #072b5f;
  --navy-hover: #003b90;
  --teal: #094747;
  --teal-hover: #0e5959;
  --focus: #b65c00;
  --card: #ffffffd6;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 280px;
  color: var(--navy);
  background: #b2dfef url("../assets/images/canvas-background.webp") top center repeat;
  font-family: "DB Helvethaica X", Tahoma, sans-serif;
  font-size: 22px;
  line-height: 1.5;
}

::selection {
  color: white;
  background: var(--navy);
}

a,
button {
  -webkit-tap-highlight-color: #072b5f26;
}

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

.skip-link {
  position: absolute;
  z-index: 10;
  top: 8px;
  left: 12px;
  padding: 8px 18px;
  color: var(--navy);
  background: white;
  border-radius: 5px;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  background: linear-gradient(340deg, #323a93e3 0%, #1284c6e3 100%);
}

.header-inner {
  max-width: 1365px;
  margin-inline: auto;
  padding: 10px;
}

.brand {
  display: block;
  width: 196px;
}

.brand img {
  display: block;
  width: 100%;
  height: auto;
}

.main-content {
  min-height: 1333px;
  padding: 125px 20px 645px;
}

.main-content:focus {
  outline: none;
}

h1 {
  margin: 0 0 70px;
  font-size: 72px;
  font-weight: 600;
  line-height: 1;
  text-align: center;
  text-wrap: balance;
}

.login-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 20px;
  max-width: 976px;
  margin-inline: auto;
}

.login-card {
  min-width: 0;
  min-height: 421px;
  padding: 10px 10px 30px;
  border-radius: 15px;
  background: var(--card);
  text-align: center;
  transition: background-color 180ms ease-out;
}

.login-card:hover,
.login-card:focus-within {
  background: white;
}

.icon {
  display: inline-block;
  font-family: "Font Awesome 5 Free";
  font-style: normal;
  font-weight: 900;
  line-height: 1;
  -webkit-font-smoothing: antialiased;
}

.icon-doctor::before {
  content: "\f0f0";
}

.icon-users::before {
  content: "\f0c0";
}

.icon-external::before {
  content: "\f35d";
}

.audience-icon {
  display: block;
  margin: 25px auto 32px;
  font-size: 50px;
}

.login-card h2 {
  margin: 0 0 20px;
  font-size: 28px;
  font-weight: 600;
  line-height: 1;
  text-wrap: balance;
}

.staff-description {
  margin: 0 0 20px;
  font-size: 21px;
  font-weight: 500;
  line-height: 1;
}

.login-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  max-width: 100%;
  min-height: 48px;
  padding: 12px 24px;
  color: white;
  background: var(--navy);
  border-radius: 100px;
  font-size: 21px;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  transition: background-color 180ms ease-out;
}

.login-link .icon {
  flex: 0 0 auto;
}

.login-link:hover {
  background: var(--navy-hover);
}

.login-link:active {
  background: var(--navy);
}

.external-options {
  margin: 0;
  padding: 0;
  list-style: none;
}

.external-options li+li {
  margin-top: 16px;
}

.external-options p {
  position: relative;
  margin: 0 0 8px;
  padding-left: 51px;
  text-align: left;
  font-weight: 500;
}

.external-options p::before {
  position: absolute;
  left: 30px;
  content: "•";
}

.login-link-pavilion {
  background: var(--teal);
}

.login-link-pavilion:hover {
  background: var(--teal-hover);
}

.login-link-pavilion:active {
  background: var(--teal);
}

.site-footer {
  padding: 8px 20px 9px;
  color: white;
  background: var(--navy);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 1px;
  text-align: center;
}

.site-footer p {
  margin: 0;
}

.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 4px;
  color: white;
  background: var(--navy);
  cursor: pointer;
}

.back-to-top[hidden] {
  display: none;
}

.back-to-top:hover {
  background: var(--navy-hover);
}

@media (max-width: 1366px) {
  .brand {
    width: 305px;
  }

  .main-content {
    min-height: 0;
    padding: 30px 70px 420px;
  }

  h1 {
    margin-bottom: 40px;
    font-size: 55px;
  }

  .login-options {
    grid-template-columns: 1fr;
    max-width: 1186px;
    gap: 25px;
  }

  .login-card {
    min-height: 0;
  }

  .external-options p {
    padding-left: 41px;
  }

  .external-options p::before {
    left: 20px;
  }

  .site-footer {
    padding-block: 20px;
  }
}

@media (max-width: 767px) {
  body {
    background-size: auto 100%;
    background-repeat: no-repeat;
  }

  .header-inner {
    padding-inline: 20px;
  }

  .brand {
    width: 46%;
    min-width: 150px;
    max-width: 250px;
  }

  .main-content {
    padding: 30px 20px 110px;
  }

  h1 {
    margin-bottom: 30px;
    font-size: 36px;
  }

  .login-options {
    gap: 20px;
  }

  .login-card {
    padding: 10px 16px 20px;
  }

  .audience-icon {
    margin-top: 25px;
  }

  .staff-description {
    line-height: 1.3;
  }

  .external-options p {
    padding-left: 22px;
    line-height: 1.3;
  }

  .external-options p::before {
    left: 4px;
  }

  .login-link {
    padding-inline: 18px;
    line-height: 1.2;
  }

  .site-footer {
    padding: 12px 20px;
    font-size: 14px;
  }

  .back-to-top {
    right: 16px;
    bottom: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
