@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;600;700&display=swap");

:root {
  --color-gray-100: hsl(220, 12%, 98%);
  --color-gray-200: hsl(220, 12%, 90%);
  --color-gray-300: hsl(220, 12%, 85%);
  --color-gray-400: hsl(220, 12%, 65%);
  --color-gray-500: hsl(220, 12%, 45%);

  --color-dark-100: hsl(240, 10%, 15%);
  --color-dark-200: hsl(240, 10%, 12%);
  --color-dark-300: hsl(240, 10%, 9%);
  --color-dark-400: hsl(240, 10%, 6%);
  --color-dark-500: hsl(240, 10%, 3%);

  --color-blue-100: hsl(217, 80%, 65%);
  --color-blue-200: hsl(217, 80%, 60%);
  --color-blue-300: hsl(217, 80%, 55%);
  --color-blue-400: hsl(217, 80%, 50%);
  --color-blue-500: hsl(217, 80%, 45%);

  --shadow-small: rgba(0, 0, 0, 0.1) 0px 1px 3px 0px,
    rgba(0, 0, 0, 0.06) 0px 1px 2px 0px;
  --shadow-medium: rgba(0, 0, 0, 0.1) 0px 4px 6px -1px,
    rgba(0, 0, 0, 0.06) 0px 2px 4px -1px;
  --shadow-large: rgba(0, 0, 0, 0.1) 0px 10px 15px -3px,
    rgba(0, 0, 0, 0.05) 0px 4px 6px -2px;
  --shadow-extra: rgba(0, 0, 0, 0.1) 0px 20px 25px -5px,
    rgba(0, 0, 0, 0.04) 0px 10px 10px -5px;
}

*,
*::before,
*::after {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  list-style: none;
  list-style-type: none;
  text-decoration: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

html {
  font-size: 100%;
  box-sizing: inherit;
  scroll-behavior: smooth;
  height: -webkit-fill-available;
}

body {
  font-family: "Roboto", ui-sans-serif, sans-serif;
  font-size: clamp(1rem, 2vw, 1.125rem);
  font-weight: 400;
  line-height: 1.5;
  color: var(--color-gray-100);
  background-color: var(--color-dark-500);
}

main,
section {
  overflow: hidden;
}

a,
button {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  border: none;
  outline: none;
  color: inherit;
  background: unset;
}

h1,
h2,
h3,
h4,
h5 {
  font-family: inherit;
  line-height: 1.25;
  text-wrap: balance;
  word-wrap: break-word;
}

p,
li {
  font-family: inherit;
  line-height: 1.5;
  text-wrap: pretty;
  word-wrap: break-word;
}

img,
svg,
picture {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
  object-fit: cover;
  background-size: cover;
  background-repeat: no-repeat;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
}

.section {
  padding-block: 6rem 3rem;
}

.container {
  max-width: 75rem;
  height: auto;
  margin-inline: auto;
  padding-inline: 1.5rem;
}

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

.truncate {
  display: -webkit-box;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.title {
  &-small {
    font-family: inherit;
    font-size: clamp(1.75rem, 4vw, 2.35rem);
    font-weight: 700;
    line-height: 1.25;
  }
  &-medium {
    font-family: inherit;
    font-size: clamp(2.15rem, 5vw, 3.15rem);
    font-weight: 700;
    line-height: 1.15;
  }
  &-large {
    font-family: inherit;
    font-size: clamp(2.65rem, 6vw, 4rem);
    font-weight: 700;
    line-height: 1.15;
  }
}

.text {
  &-small {
    font-family: inherit;
    font-size: 0.85rem;
    line-height: 1.5;
  }
  &-base {
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.5;
  }
  &-medium {
    font-family: inherit;
    font-size: 1.15rem;
    line-height: 1.5;
  }
  &-large {
    font-family: inherit;
    font-size: 1.3rem;
    line-height: 1.5;
  }
  &-upper {
    text-transform: uppercase;
  }
  &-lower {
    text-transform: lowercase;
  }
  &-capital {
    text-transform: capitalize;
  }
}

.font {
  &-light {
    font-weight: 300;
  }
  &-normal {
    font-weight: 400;
  }
  &-medium {
    font-weight: 500;
  }
  &-semi {
    font-weight: 600;
  }
  &-bold {
    font-weight: 700;
  }
}

.btn {
  display: inline-flex;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.5;
  align-items: center;
  white-space: nowrap;
  text-align: center;
  justify-content: center;
  vertical-align: middle;
  column-gap: 0.35rem;
  padding-block: 0.5rem;
  padding-inline: 1.25rem;
  border-radius: 3rem;
  transition: all 0.25s ease;

  &-primary {
    color: var(--color-gray-100);
    background-color: var(--color-blue-300);
    box-shadow: var(--shadow-medium);
  }

  &-neutral {
    color: var(--color-dark-300);
    background-color: var(--color-gray-100);
    box-shadow: var(--shadow-medium);
  }

  &-darken {
    color: var(--color-gray-100);
    background-color: var(--color-dark-100);
    box-shadow: var(--shadow-medium);
  }
}

// Header section
.header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  width: 100%;
  height: auto;
  margin: 0 auto;
  transition: all 0.35s ease;

  &.on-scroll {
    background-color: var(--color-dark-400);
    box-shadow: var(--shadow-medium);
  }
}

.navbar {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: baseline;
  column-gap: 1rem;
  width: 100%;
  height: 4rem;
  margin-inline: auto;
}

.brand {
  font-family: inherit;
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.5;
  text-transform: uppercase;
  color: var(--color-gray-100);
}

.menu {
  position: fixed;
  top: -100%;
  left: 0;
  width: 100%;
  height: auto;
  overflow: hidden;
  padding-block: 4rem;
  background-color: var(--color-dark-400);
  box-shadow: var(--shadow-medium);
  transition: all 0.3s ease;

  &.is-active {
    top: 0;
    left: 0;
  }

  &-inner {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    row-gap: 1.25rem;
  }

  &-link {
    font-family: inherit;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.5;
    text-transform: uppercase;
    color: var(--color-gray-100);
  }

  &-block {
    margin-left: auto;
  }

  // Media query breakpoint
  @media screen and (min-width: 48rem) {
    position: relative;
    top: initial;
    width: auto;
    padding: 0;
    margin-left: auto;
    background: unset;
    box-shadow: unset;
    transition: unset;

    &-inner {
      display: flex;
      flex-direction: row;
      column-gap: 2rem;
      margin-inline: auto;
    }

    &-link {
      text-transform: capitalize;
    }

    &-block {
      margin-left: 2rem;
    }
  }
}

.burger {
  cursor: pointer;
  position: relative;
  display: block;
  order: -1;
  z-index: 10;
  width: 1.5rem;
  height: 1rem;
  user-select: none;
  visibility: visible;

  // Media query breakpoint
  @media screen and (min-width: 48rem) {
    display: none;
    visibility: hidden;
  }

  &-line {
    position: absolute;
    display: block;
    left: 0;
    opacity: 1;
    width: 100%;
    height: 2px;
    background-color: var(--color-gray-100);
    transition: all 0.25s ease;

    &:nth-child(1) {
      top: 0px;
    }
    &:nth-child(2) {
      top: 0.5rem;
      width: 70%;
    }
    &:nth-child(3) {
      top: 1rem;
    }
  }

  &.is-active &-line {
    &:nth-child(1) {
      top: 0.5rem;
      transform: rotate(135deg);
    }
    &:nth-child(2) {
      left: -1rem;
      opacity: 0;
    }
    &:nth-child(3) {
      top: 0.5rem;
      transform: rotate(-135deg);
    }
  }
}

.overlay {
  position: fixed;
  display: none;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  opacity: 0.5;
  background-color: black;
  transition: all 0.3s ease;

  &.is-active {
    display: block;
  }
}

// Banner section
.banner {
  &-column {
    position: relative;
    display: grid;
    align-items: center;
    row-gap: 3rem;
    column-gap: 2rem;

    // Media query breakpoint
    @media screen and (min-width: 48rem) {
      grid-template-columns: repeat(2, minmax(0, 1fr));
      justify-content: center;
      margin-top: 4rem;
    }

    @media screen and (min-width: 64rem) {
      grid-template-columns: 1fr max-content;
      column-gap: 4rem;
    }
  }

  &-image {
    display: block;
    max-width: 16rem;
    height: auto;
    object-fit: cover;
    justify-self: center;

    // Media query breakpoint
    @media screen and (min-width: 48rem) {
      max-width: 20rem;
      order: 1;
    }

    @media screen and (min-width: 64rem) {
      max-width: 24rem;
      margin-right: 5rem;
    }
  }

  &-inner {
    display: flex;
    flex-direction: column;
    align-items: baseline;
    row-gap: 1.5rem;
  }

  &-link {
    position: absolute;
    display: grid;
    top: 30%;
    right: 1.5rem;
    justify-items: center;
    row-gap: 0.5rem;
    visibility: hidden;

    // Media query breakpoint
    @media screen and (min-width: 64rem) {
      visibility: visible;
    }

    & > * {
      font-size: 1.25rem;
      line-height: inherit;
      color: var(--color-gray-100);
    }

    &::before,
    &::after {
      content: "";
      position: absolute;
      width: 4rem;
      height: 1.5px;
      transform: rotate(90deg);
      background: var(--color-gray-100);
    }

    &::before {
      top: -3rem;
    }

    &::after {
      bottom: -3rem;
    }
  }
}
