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

/* Remove default margin/padding and inherit font styles  */
* {
  margin: 0;
  padding: 0;
  font: inherit;
}

/* Remove list styles on ul, ol elements with a list role, which suggests default styling will be removed */
ul[role="list"],
ol[role="list"] {
  list-style: none;
}

/* Set core root defaults */
html:focus-within {
  scroll-behavior: smooth;
}

html,
body {
  height: 100%;
}

/* Set core body defaults */
body {
  text-rendering: optimizeSpeed;
  line-height: 1.5;
  overflow-x: hidden;
}

/* A elements that don't have a class get default styles */
a:not([class]) {
  text-decoration-skip-ink: auto;
}

/* Make images easier to work with */
img,
picture,
svg {
  max-width: 100%;
  display: block;
}

/* Remove all animations, transitions and smooth scroll for people that prefer not to see them */
@media (prefers-reduced-motion: reduce) {
  html:focus-within {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/*================
Globals
=================*/

:target {
  scroll-margin-block-start: 5rem;
}

body {
  width: 100%;
}

body > .container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/*================
Base Banner Styles
=================*/

.banner {
  padding-inline: 1rem;
}

/*================
Base Navbar Styles
=================*/

.navbar {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 4rem;
  padding-block: 0.5rem;
  padding-inline: 1rem;
}

.logo {
  max-height: 4rem;
}

.nav-end {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-inline-start: auto;
}

@media (max-width: 60em) {
  .nav-end > *:not(#nav-button, .menu-overlay, #primary-navigation) {
    display: none;
  }
}

#nav-button {
  display: flex;
  position: relative;
  z-index: 100;
  margin-inline-start: auto;
  border: none;
  background: none;
  pointer-events: auto;
  cursor: pointer;
}

#nav-button .line {
  transition: transform 300ms ease 300ms, opacity 0ms 300ms, rotate 300ms,
    fill 300ms;
  transform-origin: center;
}

#nav-button[aria-expanded="true"] .line {
  transition: transform 300ms ease, opacity 0ms 300ms, rotate 300ms 300ms,
    fill 300ms;
}

#nav-button[aria-expanded="true"] .top {
  transform: translateY(25%);
  rotate: 45deg;
}

#nav-button[aria-expanded="true"] .middle {
  opacity: 0;
}

#nav-button[aria-expanded="true"] .bottom {
  transform: translateY(-25%);
  rotate: -45deg;
}

.menu-overlay {
  position: fixed;
  inset: 0;
}

.menu-overlay:not([data-state="open"]) {
  display: none;
}

.menu-overlay[data-state="open"] {
  pointer-events: all;
}

#primary-navigation {
  display: none;
  visibility: hidden;
}

#primary-navigation[data-state="open"] {
  display: block;
  visibility: visible;
}

/*================
Base Content Pane Styles
=================*/

body > .container > .content-wrapper {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.body-content {
  flex-grow: 1;
  display: flex;
  align-items: stretch;
}

:is(.leftbody, .rightbody) {
  flex-shrink: 0;
}

.mainbody {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-width: 100%;
  width: 100%;
  padding-inline: 1rem;
}

@media (min-width: 961px) {
  :is(.leftbody, .rightbody) {
    width: 22.5rem;
  }
}

@media (max-width: 60em) {
  .body-content {
    flex-direction: column;
  }

  .mainbody {
    order: -1;
  }
}

/*================
Base Footer Styles
=================*/

body > .container > footer {
  margin-block-start: auto;
}

footer > .footer-wrapper {
  position: relative;
  margin-block-start: 3rem;
}

/*================
Utility Classes
=================*/

.show-desktop-only {
  display: none;
}

@media (min-width: 60em) {
  .show-mobile-only {
    display: none;
  }

  .show-desktop-only {
    display: block;
  }
}

.container-narrow {
  max-width: var(--container-narrow);
  margin-inline: auto;
}

.container-normal {
  max-width: var(--container-normal);
  margin-inline: auto;
}

.container-wide {
  max-width: var(--container-wide);
  margin-inline: auto;
}

.escape-fw {
  box-shadow: 0 0 0 100vmax var(--bg-util-color);
  clip-path: inset(0 -100vmax);
}

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

.flow > * + * {
  margin-block-start: var(--flow-space, 1rem);
}
