@font-face {
  font-display: swap;
  font-family: "Space Mono";
  font-style: normal;
  font-weight: 700;
  src: url("../assets/fonts/space-mono-v17-latin-700.woff2") format("woff2");
}

@font-face {
  font-display: swap;
  font-family: "Lexend Deca";
  font-style: normal;
  font-weight: 400;
  src: url("../assets/fonts/lexend-deca-v25-latin-regular.woff2") format("woff2");
}

:root {
  --clr-primary-300: hsl(39 100% 94%); /* light yellow yellow */
  --clr-primary-400: hsl(40 97% 58%); /* yellow */

  --clr-neutral-100: hsl(0 0% 100%); /* white */
  --clr-neutral-200: hsl(214 37% 96%); /* snow */
  --clr-neutral-300: hsl(212 41% 93%); /* light grey */
  --clr-neutral-400: hsl(217 12% 62%); /* dim grey */
  --clr-neutral-500: hsl(216 17% 35%); /* dark navy */
  --clr-neutral-600: hsl(215 14% 23%);

  --ff-base: "Lexend Deca", sans-serif;
  --ff-accent: "Space Mono", Monospace;

  --fs-400: calc(15 / 16 * 1rem);
  --fs-450: calc(20 / 16 * 1rem);
  --fs-500: calc(24 / 16 * 1rem);
  --fs-550: calc(32 / 16 * 1rem);
  --fs-600: calc(40 / 16 * 1rem);
  --fs-700: calc(48 / 16 * 1rem);
  --fs-800: calc(56 / 16 * 1rem);

  --fs-heading-lg: var(--fs-600); /* 40 */
  --fs-heading-md: var(--fs-550); /* 32 */
  --fs-heading-sm-md: var(--fs-500); /* 24 */
  --fs-heading-sm: var(--fs-450); /* 20 */

  --fw-regular: 400;
  --fw-bold: 700;

  @media (width > 45em) {
    --fs-heading-lg: var(--fs-800); /* 56 */
    --fs-heading-md: var(--fs-700); /* 48 */
    --fs-heading-sm-md: var(--fs-600); /* 24 */
    --fs-heading-sm: var(--fs-500); /* 24 */
  }
}

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

html {
  /* stops mobile browsers from try to adjust text sizes for mobile */
  text-size-adjust: none;
  -webkit-text-size-adjust: none;

  /* stop macOS from rendering fonts thicker */
  -webkit-font-smoothing: antialiased;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    interpolate-size: allow-keywords;
  }
}

h1,
.h1,
h2,
.h2,
h3,
.h3,
h4,
.h4 {
  line-height: 1.1;
}

body,
h1,
h2,
h3,
p,
dl,
dd,
figure,
blockquote {
  margin: 0;
}

ul[role="list"],
ol[role="list"] {
  list-style: none;
  padding: 0;
}

body {
  min-height: 100vh;
  line-height: 1.7;
}

input,
button,
textarea,
select {
  font: inherit;
}

img,
picture {
  max-inline-size: 100%;
  display: block;
}

/* ******** GENERAL STYLES ******** */
body {
  font-family: var(--ff-base);
  font-size: var(--fs-400);
  font-weight: var(--fw-regular);
  text-align: center;
  color: var(--clr-neutral-400);

  @media (width > 70em) {
    text-align: left;
  }
}

main {
  overflow-x: hidden;
}

a {
  font-family: var(--ff-accent);
  color: inherit;
  text-decoration: none;
}

a:hover,
a:focus-visible {
  color: var(--clr-primary-400);
}

h1,
h2,
h3,
h4,
.heading {
  font-family: var(--ff-accent);
  font-weight: var(--fw-bold);
  color: var(--clr-neutral-500);
  text-wrap: balance;
}

section img {
  margin-inline: auto;
}

p {
  max-width: 48ch;
  margin-inline: auto;

  @media (width > 70em) {
    margin-inline: 0;
  }
}

/* ******** COMPOSITION / LAYOUT ******** */
.wrapper {
  --wrapper-padding: 2rem;

  max-inline-size: 80em;
  margin-inline: auto;
  padding-inline: var(--wrapper-padding);

  @media (width > 45em) {
    --wrapper-padding: 4rem;
  }

  @media (width > 90em) {
    overflow: hidden;
  }
}

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

.flow-content--sm {
  --flow-spacer: 1.5rem;
}

.flow-content--md {
  --flow-spacer: 2.5rem;
}

.flow-content--lg {
  --flow-spacer: 3rem;
}

.flex-flow {
  display: flex;
  gap: var(--flex-gap, 1rem);
}

.flex-gap-lg {
  --flex-gap: 2rem;
}

.align-center {
  align-items: center;
}

.justify-center {
  justify-content: center;
}

.justify-self-center {
  justify-self: center;
}

.justify-space-between {
  justify-content: space-between;
}

.margin-left-auto {
  margin-inline-start: auto;
}

.margin-inline-center {
  margin-inline: auto;
}

.grid-stack {
  display: grid;
  grid-template-areas: "stack";
  align-items: center;
}

.grid-stack > * {
  grid-area: stack;
}

.grid-flow {
  display: grid;
  gap: var(--grid-gap, 1rem);
}

.grid-flow--sm {
  --grid-gap: 2rem;
}

.grid-flow--lg {
  --grid-gap: 9rem;
}

@media (width > 70em) {
  .grid-2-col {
    grid-template-columns: 1fr 1fr;
  }

  .grid-3-col {
    --grid-3-col-size: repeat(3, 1fr);
    grid-template-columns: var(--grid-3-col-size);
  }

  .grid-order-1 {
    order: 1;
  }
}

/* ******** UTILITIES ******** */
.visually-hidden:not(:focus):not(:active) {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0); /* Legacy property for Internet Explorer */
  clip-path: inset(50%);
  white-space: nowrap;
}

.hidden {
  display: none;
}

.bg-200 {
  background: var(--clr-neutral-200);
}

.bg-500-circles {
  background: url(./assets/patterns/semi-circles.svg), var(--clr-neutral-500);
  background-repeat: no-repeat;
  background-position: right bottom;
}

.bg-600 {
  background: var(--clr-neutral-600);
}

.br-circle {
  border-radius: 50%;
}

.padding-lg {
  padding-block: 6rem; /* 96px */
}

.padding-md {
  padding-block: 4.5rem; /* 72px */
}

.text-clr-100 {
  color: var(--clr-neutral-100);
}

.fs-heading-sm {
  font-size: var(--fs-heading-sm);
}

.fs-heading-sm-md {
  font-size: var(--fs-heading-sm-md);
}

.fs-heading-md {
  font-size: var(--fs-heading-md);
}

.fs-heading-lg {
  font-size: var(--fs-heading-lg);
}

.fs-heading-lg,
.fs-heading-md {
  max-width: 20ch;
  margin-inline: auto;
}

.text-center {
  text-align: center;
}

/* ******** COMPONENTS ******** */
.button {
  cursor: pointer;
  display: inline-block;
  text-decoration: none;
  color: var(--fg, var(--clr-neutral-100));
  background: var(--bg, var(--clr-primary-400));
  padding-inline: 2.5em;
  padding-block: 0.875em;
  border: 3px solid var(--clr-primary-400);
}

.button:hover,
.button:focus-visible {
  --bg: transparent;
}

/* ******** BLOCK - HEADER & NAV ******** */
.header-primary {
  --_header-height: 77px;

  padding-block: 1rem;
  position: relative;

  @media (width < 45em) {
    gap: 0;
    padding-block: 1.5rem;
  }
}

.header-primary .nav-primary {
  flex: 1;

  @media (width < 45em) {
    color: var(--clr-neutral-100);
    background: var(--clr-neutral-500);
    flex-direction: column;

    padding-block: 4rem;
    padding-inline: 2rem;
    height: calc(100dvh - var(--_header-height));

    position: absolute;
    top: 100%;
    left: 0;
    right: 30%;
    z-index: 999;

    display: none;
    opacity: 0;
    transform: translateX(-100%);

    @media (prefers-reduced-motion: no-preference) {
      transition:
        display 300ms allow-discrete,
        opacity 300ms,
        transform 300ms;
    }
  }
}

.header-primary .nav-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  top: var(--_header-height);
  background-color: hsl(0 0 0 / 0.5);
  z-index: 998;
}

body:has([aria-expanded="true"]) {
  overflow: hidden;
}

.header-primary:has([aria-expanded="true"]) .nav-primary {
  display: flex;
  opacity: 1;
  transform: translateX(0%);

  @starting-style {
    opacity: 0;
    transform: translateX(-100%);
  }
}

.header-primary:has([aria-expanded="true"]) .nav-backdrop {
  display: block;
}

.nav-primary__list {
  --flex-gap: 2rem;

  margin-inline-start: clamp(0.5rem, 4vw, 3.75rem);

  @media (width < 45em) {
    height: 100%;
    margin: 0;
    flex-direction: column;
    align-items: flex-start;

    & li:has(.button) {
      margin-block-start: auto;
      margin-inline: 0;
      width: 100%;

      & .button {
        width: 100%;
      }
    }
  }
}

@media (width < 45em) {
  .header-primary .menu-toggle-btn {
    display: inline-block;
    background: none;
    border: 0;
    cursor: pointer;
  }

  .header-primary .logo {
    margin-inline: auto;
  }
}

/* ******** BLOCK - FOOTER ******** */
.footer-primary .logo path {
  fill: var(--clr-neutral-100);
}

.footer-primary li:hover path {
  fill: var(--clr-neutral-300);
}

.footer-primary__inner {
  gap: 3.5rem;

  @media (width < 45em) {
    gap: 1rem;
  }
}

.footer-primary .nav-secondary__list {
  margin-inline-start: clamp(0.5rem, 4vw, 3.75rem);

  @media (width < 45em) {
    margin-inline-start: 0;
  }
}

@media (width < 45em) {
  .footer-primary__inner .content,
  .nav-secondary__list {
    flex-direction: column;
  }
}

.footer-primary .social-links {
  margin-inline-start: auto;

  @media (width < 45em) {
    margin-inline-end: auto;
    margin-block-start: 3rem;
  }
}

@media (width > 70em) {
  .signup__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .signup__inner > * {
    margin: 0;
  }
}

/* ******** BLOCK - HERO ******** */
.hero__img {
  max-height: 42rem;
  inline-size: 100%;
  object-fit: cover;
}

.hero__content {
  --flow-spacer: 1.5rem;
  width: 100%;
}

.hero__content .fs-heading-lg {
  @media (width > 70em) {
    margin-inline: 0;
  }
}

.hero__content .button {
  margin-block-start: 2rem;
}

.hero--secondary {
  @media (width > 45em) {
    text-align: left;
  }

  &::after {
    right: -40px;
    bottom: unset;
  }
}

/* ******** BLOCK - FEATURES ******** */
.features__sm {
  --flow-spacer: 1.5rem;
  --grid-gap: 3rem;
}

@media (45em < width < 70em) {
  .features__sm .content {
    display: flex;
    gap: 5rem;
    text-align: left;
    align-items: start;
    max-width: 40rem;
    margin-inline: auto;
  }

  .features__sm .content > * {
    margin-block-start: 0;
  }
}

@media (width > 70em) {
  .features__sm img {
    margin: 0;
  }
}

.features__lg {
  --grid-gap: 7.5rem;
  --flow-spacer: 2rem;
}

.features__lg .feature {
  --grid-gap: 3.5rem;

  @media (width > 70em) {
    --grid-gap: 5rem;
  }
}

/* ******** BLOCK - VALUES (COUNTER) ******** */
.values {
  counter-reset: value;
}

.value-counter-wrapper {
  counter-increment: value;
}

.value-counter-wrapper::after {
  content: "0" counter(value);
  font-family: var(--ff-accent);
  font-size: var(--fs-500);
  color: var(--clr-neutral-500);
  background-color: var(--clr-primary-400);
  padding: 2rem;
  border-radius: 50%;
}

/* ******** BLOCK - FAQ ACCORDION ******** */
.faq__wrapper {
  @media (width < 70em) {
    flex-direction: column;
    text-align: left;
  }
}

.faq__content {
  --flow-spacer: 1rem;

  flex-basis: 60%;
  justify-self: center;
}

.faq__content details {
  --flow-spacer: 1.5rem;

  padding: 2rem 2.5rem;
  cursor: pointer;
  & p {
    max-width: 100%;
  }

  & ::marker {
    color: var(--clr-primary-400);
  }
}

.faq__content details::details-content {
  --animation-time: 500ms;

  block-size: 0;
  overflow: hidden;
  transition:
    block-size var(--animation-time) ease-out,
    content-visibility var(--animation-time) allow-discrete;

  @media (prefers-reduced-motion: reduce) {
    transition: none;
  }
}

.faq__content details[open]::details-content {
  block-size: auto;
}

/* ******** BLOCK - JOBS LIST ******** */
.job-list .job {
  padding: 2rem 3.5rem;
  color: var(--clr-neutral-500);
  text-align: left;

  @media (width < 45em) {
    text-align: center;
    flex-direction: column;
  }
}

/* ******** BLOCK - LOCATIONS ******** */
.locations {
  --grid-gap: 1rem;
}

.locations .map {
  width: 100%;
}

.locations .heading {
  background: var(--clr-primary-300);
  padding: 1rem;
}

.cta {
  --grid-3-col-size: 1fr 1fr 0.5fr;
}

/* ******** EXCEPTIONS - DECORATIVE PATTERNS ******** */
.hero {
  position: relative;

  &::after {
    @media (width > 45em) {
      content: url(./assets/patterns/white-circles.svg);
      position: absolute;
      right: -20px;
      bottom: 25px;
    }

    @media (width > 70em) {
      bottom: 25%;
    }
  }
}

.decoration-hero {
  @media (width > 70em) {
    display: flex;
    align-items: start;
    justify-content: center;
    gap: 1.5rem;
    transform: translateX(calc(-1 * (var(--wrapper-padding) * 2 + 4rem)));

    &:before {
      content: url(./assets/patterns/line.svg);
      transform: translateY(100%);
    }
  }
}

.decoration-hero .arrow {
  position: absolute;
  left: -250px;
  bottom: 24px;

  @media (width > 45em) {
    left: -120px;
  }

  @media (width > 70em) {
    position: unset;
    transform: translateY(20%);
  }
}

.decoration-arrow-left {
  position: relative;

  &::after {
    content: url(./assets/patterns/left-downward-arrow.svg);
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
  }
}

.decoration-arrow-left--upward::after {
  content: url(./assets/patterns/left-upward-arrow.svg);
}

.decoration-arrow-left--top::after {
  bottom: unset;
  left: 30%;
  top: 0;

  @media (width > 45em) {
    top: 20%;
    left: 50%;
  }
}

.decoration-arrow-right {
  position: relative;

  &::after {
    content: url(./assets/patterns/right-arrow.svg);
    position: absolute;
    top: 0;
    right: 25%;

    @media (width > 45em) {
      right: 50%;
    }
  }
}

@media (width > 70em) {
  .decoration-line {
    position: relative;

    &::after,
    &::before {
      content: "";
      position: absolute;
      width: 100%;
      height: 20px;
      background-color: var(--clr-neutral-300);
      top: calc(50% - 10px);
      z-index: -1;
    }

    &::before {
      right: 60%;
    }

    &::after {
      left: 25%;
    }
  }
}

@media (45em < width < 70em) {
  .decoration-line,
  .decoration-line--tablet {
    position: relative;
  }

  .decoration-line::before,
  .decoration-line--tablet::before {
    content: "";
    position: absolute;
    height: 100%;
    width: 20px;
    background-color: var(--clr-neutral-300);
    left: calc(50% - 10px);
    bottom: calc(100% - 1px);
    z-index: -1;
  }
}
