/** Fonts */

/** Roca One */

@font-face {
  font-display: swap;
  font-family: RocaOne-Rg;
  font-style: normal;
  font-weight: normal;
  src: url("./fonts/RocaOne-Rg.woff2") format("woff2");
}

/** Space Grotesk */

@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("https://fonts.gstatic.com/s/spacegrotesk/v21/V8mDoQDjQSkFtoMM3T6r8E7mPb54C-s0.woff2")
    format("woff2");
  unicode-range:
    U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1,
    U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329,
    U+1EA0-1EF9, U+20AB;
}

@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("https://fonts.gstatic.com/s/spacegrotesk/v21/V8mDoQDjQSkFtoMM3T6r8E7mPb94C-s0.woff2")
    format("woff2");
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
    U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
    U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("https://fonts.gstatic.com/s/spacegrotesk/v21/V8mDoQDjQSkFtoMM3T6r8E7mPbF4Cw.woff2")
    format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212,
    U+2215, U+FEFF, U+FFFD;
}

/** Root */

:root {
  /** Colors */
  --color-body-100: #a9beba;
  --color-body-200: #819c97;
  --color-body-300: #607874;
  --color-body-400: #40524f;
  --color-body-500: #2d3c39;
  --color-body-600: #191e1d;
  --color-green-100: #e5fff9;
  --color-green-200: #b2ffee;
  --color-green-300: #1dfaca;
  --color-green-400: #0ddaae;
  --color-green-500: #00c49a;
  --color-yellow-100: #fdf7e7;
  --color-yellow-200: #fae7b7;
  --color-yellow-300: #f3c658;
  --color-yellow-400: #f0b526;

  /** Sizes */
  --size-container: 1200px;
  --size-footer: 85px;
  --size-header: 110px;
}

/** Base Tags */

* {
  -webkit-tap-highlight-color: transparent;
  box-sizing: border-box;
}

html {
  font-family: "Space Grotesk", sans-serif;
}

body {
  color: var(--color-body-400);
  margin: 0;
}

svg {
  --size: 100%;

  display: block;
  fill: currentcolor;
  height: var(--size);
  overflow: visible;
  width: var(--size);
}

a,
button {
  &:focus-visible {
    outline-color: var(--color-yellow-400);
    outline-offset: 0.25rem;
  }
}

/** Base Components */

/** Link */

.link {
  color: black;
  text-decoration: none;

  @media (hover: hover) {
    &:hover {
      text-decoration: underline;
    }
  }
}

/** Text */

.text {
  line-height: 1.6;
  margin: 0 0 1rem;
  max-width: 70ch;

  &:last-child {
    margin-bottom: 0;
  }
}

.text--center {
  margin-left: auto;
  margin-right: auto;
  max-width: 50ch;
  text-align: center;
}

.text--sm {
  font-size: 0.875rem;
  line-height: calc(1.25 / 0.875);
}

/** Title */

.title {
  color: var(--color-body-600);
  font-family: RocaOne-Rg, serif;
  font-size: 3rem;
  font-weight: normal;
  line-height: 1;
  margin: 0 0 2rem;
}

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

.title--sm {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

/** Header */

.header {
  backdrop-filter: blur(0); /** 8px */
  background-color: rgb(255 255 255 / 0%); /** 80% */
  border-bottom: 1px solid rgb(0 0 0 / 0%); /** 5% */
  left: 0;
  position: fixed;
  top: 0;
  transition: 400ms cubic-bezier(0, 0, 0, 1);
  transition-property: backdrop-filter, background-color, border-color;
  width: 100%;
  z-index: 1;

  .mobile-nav-is-active &,
  .no-js & {
    backdrop-filter: blur(8px) !important;
    background-color: rgb(255 255 255 / 80%) !important;
    border-color: rgb(0 0 0 / 5%) !important;
  }
}

.header__container {
  align-items: center;
  display: flex;
  height: var(--size-header);
  justify-content: space-between;

  .no-js & {
    @media screen and (width < 880px) {
      flex-direction: column;
      justify-content: center;
    }
  }
}

/** Logo */

.logo {
  background-image: url("./images/logo-black.svg");
  background-position: center top;
  background-repeat: no-repeat;
  display: block;
  height: 40px;
  width: 155px;
}

/** Mobile Nav Button */

.mobile-nav-button {
  --size: 2rem;
  --size-bar: 3px;

  appearance: none;
  background: none;
  border: 0;
  cursor: pointer;
  height: var(--size);
  padding: 0;
  position: relative;
  width: var(--size);

  .no-js & {
    display: none;
  }

  @media screen and (width >= 880px) {
    display: none;
  }

  &::after,
  &::before {
    background-color: var(--color-body-600);
    content: "";
    height: var(--size-bar);
    left: 0;
    position: absolute;
    transition: transform 400ms cubic-bezier(0, 0, 0, 1);
    width: 100%;
  }

  &::after {
    bottom: 0;
    transform: translateY(-0.5rem);
  }

  &::before {
    top: 0;
    transform: translateY(0.5rem);
  }

  .mobile-nav-is-active & {
    &::after {
      transform: translateY(calc((var(--size) / -2 - var(--size-bar) / -2)))
        rotate(-45deg);
    }

    &::before {
      transform: translateY(calc((var(--size) / 2 - var(--size-bar) / 2)))
        rotate(45deg);
    }
  }
}

/** Nav */

.nav__list {
  align-items: center;
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;

  .nav--vertical & {
    flex-direction: column;
  }
}

.nav__item {
  &:not(:last-child) {
    margin: 0 2rem 0 0;

    .nav--vertical & {
      margin: 0 0 2rem;
    }
  }
}

.nav__link {
  color: var(--color-body-400);
  font-size: 1.25rem;
  padding-bottom: 0.25rem;
  position: relative;
  text-decoration: none;
  transition: color 400ms cubic-bezier(0, 0, 0, 1);

  @media (hover: hover) {
    &:hover {
      color: var(--color-body-600);
    }
  }

  &.is-active {
    color: var(--color-body-600);

    &::before {
      background-color: var(--color-body-600);
      width: 100%;
    }
  }

  &::before {
    background-color: transparent;
    bottom: 0;
    content: "";
    height: 0.125rem;
    left: 0;
    position: absolute;
    transition: 400ms cubic-bezier(0, 0, 0, 1);
    transition-property: background-color, width;
    width: 0;
  }

  .nav--lg & {
    font-size: 2rem;
  }
}

/** Desktop Nav */

.desktop-nav {
  display: none;

  .no-js & {
    display: block;
  }

  @media screen and (width >= 880px) {
    display: block;
  }
}

/** Mobile Nav */

.mobile-nav {
  align-items: center;
  backdrop-filter: blur(8px);
  background-color: rgb(255 255 255 / 80%);
  display: flex;
  inset: 0;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  position: fixed;
  top: var(--size-header);
  transition: opacity 400ms cubic-bezier(0, 0, 0, 1);

  .mobile-nav-is-active & {
    opacity: 1;
    pointer-events: initial;
  }

  @media screen and (width >= 880px) {
    display: none;
  }

  .nav__list {
    transform: scale(0.8);
    transition: transform 400ms cubic-bezier(0, 0, 0, 1);

    .mobile-nav-is-active & {
      transform: scale(1);
    }
  }
}

/** Btn */

.btn {
  --size: 3rem;

  align-items: center;
  appearance: none;
  border: 0;
  border-radius: calc(var(--size) / 2);
  cursor: pointer;
  display: flex;
  height: var(--size);
  justify-content: center;
  min-width: 16rem;
  padding: 0 calc(var(--size) / 2);
  position: relative;
  text-decoration: none;
  white-space: nowrap;
  width: fit-content;

  &::before {
    border-radius: calc(var(--size) / 2);
    content: "";
    height: 100%;
    left: 0;
    position: absolute;
    top: 0;
    transition: 400ms cubic-bezier(0, 0, 0, 1);
    transition-property: background-color, transform;
    width: 100%;
  }

  @media (hover: hover) {
    &:hover {
      &::before {
        transform: scale(1.05);
      }
    }
  }

  span,
  svg {
    position: relative;
  }

  svg {
    --size: 1rem;

    &:first-child {
      margin-right: 0.5rem;
    }

    &:last-child {
      margin-left: 0.5rem;
    }
  }
}

.btn--body {
  color: white;

  &::before {
    background-color: var(--color-body-500);
  }

  @media (hover: hover) {
    &:hover {
      &::before {
        background-color: var(--color-body-600);
      }
    }
  }
}

.btn--green {
  color: var(--color-body-600);

  &::before {
    background-color: var(--color-green-200);
  }

  @media (hover: hover) {
    &:hover {
      &::before {
        background-color: var(--color-green-300);
      }
    }
  }
}

.btn--yellow {
  color: var(--color-body-600);

  &::before {
    background-color: var(--color-yellow-200);
  }

  @media (hover: hover) {
    &:hover {
      &::before {
        background-color: var(--color-yellow-300);
      }
    }
  }
}

.btns {
  align-items: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin-top: 2rem;

  .btn:not(:last-child) {
    margin: 0 0 1rem;
  }

  @media screen and (width >= 880px) {
    flex-direction: row;

    .btn:not(:last-child) {
      margin: 0 1rem 0 0;
    }
  }
}

/** Section */

.section {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100vh;
  padding: calc(var(--size-header) + 4rem) 0 4rem;
  position: relative;

  &:last-of-type {
    min-height: calc(100vh - var(--size-footer));
  }

  @media screen and (width >= 1060px) {
    &:not(:last-child) {
      padding: calc(var(--size-header) + 8rem) 0 8rem;
    }
  }
}

/** Container */

.container {
  margin-left: auto;
  margin-right: auto;
  max-width: var(--size-container);
  padding-left: 2rem;
  padding-right: 2rem;
}

/** Row */

.row {
  @media screen and (width >= 1060px) {
    display: flex;
    justify-content: space-between;
  }
}

/** Col */

.col {
  @media screen and (width < 1060px) {
    &:not(:last-child) {
      margin-bottom: 2rem;
    }
  }

  @media screen and (width >= 1060px) {
    &:not(:last-child) {
      margin-right: 2rem;
    }
  }
}

/** Team */

.team {
  margin: 2rem 0 4rem;
  overflow: hidden;
  position: relative;

  @media screen and (width >= 880px) {
    margin: 4rem 0 8rem;
  }
}

.team__container {
  align-items: center;
  display: flex;
  margin-left: 50%;
  transition: transform 400ms cubic-bezier(0, 0, 0, 1);
  width: 1440px;

  .no-js & {
    transform: translateX(-50%);
  }

  @media screen and (width >= 1440px) {
    transform: translateX(-50%) !important;
  }
}

.team__member {
  text-align: center;
  width: calc(1440px / 7);

  img {
    filter: contrast(0) grayscale(1);
    height: auto;
    pointer-events: none;
    user-select: none;
    width: 100%;
  }
}

.team__name {
  font-weight: bold;
}

.team__role {
  font-size: 0.875rem;
  line-height: calc(1.25 / 0.875);
}

.team__next,
.team__prev {
  --size: 2rem;

  appearance: none;
  background: none;
  border: 0;
  cursor: pointer;
  height: var(--size);
  opacity: 0;
  padding: 0;
  pointer-events: none;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  transition: opacity 400ms cubic-bezier(0, 0, 0, 1);
  width: var(--size);

  &.is-active {
    opacity: 0.5;
    pointer-events: initial;

    @media (hover: hover) {
      &:hover {
        opacity: 1;
      }
    }
  }

  @media screen and (width >= 1440px) {
    display: none;
  }
}

.team__next {
  right: 2rem;
}

.team__prev {
  left: 2rem;
}

/** Card */

.card {
  backdrop-filter: blur(8px);
  background-color: rgb(255 255 255 / 50%);
  border: 1px solid rgb(0 0 0 / 5%);
  border-radius: 2rem;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 1.5rem;
}

.card__icon {
  --size: 3rem;

  align-items: center;
  border-radius: calc(var(--size) / 2);
  color: rgb(0 0 0 / 50%);
  display: flex;
  height: var(--size);
  justify-content: center;
  margin-bottom: 1.5rem;
  width: var(--size);

  .card--green & {
    background-color: var(--color-green-400);
  }

  .card--yellow & {
    background-color: var(--color-yellow-400);
  }

  /* stylelint-disable no-descending-specificity */
  svg {
    --size: 50%;
  }
  /* stylelint-enable no-descending-specificity */
}

.card__text {
  flex-grow: 1;
  margin-bottom: 1.5rem;
}

.card__list {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
}

.card__item {
  align-items: center;
  color: var(--color-body-600);
  display: flex;

  &:not(:last-child) {
    margin-bottom: 0.5rem;
  }

  /* stylelint-disable no-descending-specificity */
  svg {
    --size: 1rem;

    color: var(--color-green-400);
    margin-right: 0.5rem;
  }
  /* stylelint-enable no-descending-specificity */
}

.card__btn {
  width: 100%;
}

/** Footer */

.footer {
  backdrop-filter: blur(8px);
  background-color: rgb(255 255 255 / 80%);
  border-top: 1px solid rgb(0 0 0 / 5%);
  padding: 2rem 0;
}

/** Codeshare */

.codeshare {
  /** Bypass A11Y contrast check, by using a transparent pixel: */
  background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAEElEQVR4AQEFAPr/AAAAAAAABQABZHiVOAAAAABJRU5ErkJggg==");
  color: var(--color-body-200);
  font-family: RocaOne-Rg, serif;
  font-size: 150vh;
  left: 0;
  line-height: 1;
  opacity: 0.1;
  position: fixed;
  top: 0;
  transition: 1000ms cubic-bezier(0, 0, 0, 1);
  transition-property: color, transform;
  user-select: none;

  [data-section="about"] & {
    color: var(--color-yellow-400);
  }

  [data-section="solutions"] & {
    color: var(--color-green-400);
  }
}
