:root {
  --primary-color: #0a1128;
  --secondary-color: crimson;
  --white-color: #fff;
  --light-grey-color: #eee;
  --grey-color: #7e7878;
  --menu-height: 11rem;
  --gap: 3rem;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 62.5%;
  scroll-behavior: smooth;
}

body {
  font-family: "Open Sans", sans-serif;
  font-size: 2.3rem;
  color: var(--primary-color);
  line-height: 1.5;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Montserrat", sans-serif;
}

h1 {
  font-size: 6rem;
  text-transform: uppercase;
}

h2 {
  font-size: 6rem;
  margin-bottom: 5rem;
  text-transform: uppercase;
  line-height: 1.2;
}

h3 {
  font-size: 4.5rem;
}

h4 {
  font-size: 4rem;
}

h5 {
  font-size: 3.5rem;
}

h6 {
  font-size: 3rem;
}

a {
  text-decoration: none;
}

p {
  margin-bottom: 3rem;
}

table {
  min-width: 66rem;
  width: 100%;
  border-collapse: collapse;
}

caption {
  font-size: 1.6rem;
  font-style: italic;
  text-align: left;
  margin-bottom: 1rem;
}

td,
th {
  white-space: nowrap;
  padding: 1rem;
  text-align: left;
  border: 0.1rem solid var(--light-grey-color);
}

thead tr {
  background-color: var(--light-grey-color);
}

tfoot tr {
  background-color: var(--light-grey-color);
}

.main-content {
  max-width: 120rem;
  margin: 0 auto;
  padding: 8rem var(--gap);
}

.menu {
  position: fixed;
  top: 0;
  width: 100%;
  height: var(--menu-height);
  border-bottom: 0.1rem solid var(--light-grey-color);
  z-index: 1;
}

.menu-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0;
  padding-bottom: 0;
}

.menu-content ul {
  list-style: none;
  display: flex;
}

.logo {
  padding: 1rem;
}

.menu-content ul li a {
  display: block;
  padding: 2rem;
  font-size: 1.8rem;
  color: var(--primary-color);
  position: relative;
}

.menu-content ul li a::after {
  content: "";
  position: absolute;
  bottom: 1rem;
  left: 50%;
  width: 0;
  height: 0.2rem;
  background: crimson;
  transition: all 300ms ease-in-out;
}

.menu-content ul li a:hover::after {
  width: 50%;
  left: 25%;
}

.menu-spacing {
  height: var(--menu-height);
}

.main-bg {
  background-image: url("../img/main-bg.svg");
  background-size: cover;
  background-position: center center;
  color: var(--white-color);
}

.white-bg {
  background-color: var(--white-color);
  color: var(--primary-color);
}

.section {
  min-height: 100vh;
  scroll-margin-top: var(--menu-height);
}

.intro-content {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: var(--gap);
  min-height: 100vh;
}

.intro-text-content,
.intro-img {
  display: flex;
  flex-flow: column wrap;
  justify-content: center;
}

.intro-img img {
  max-width: 100%;
  height: auto;
}

.top3-content {
  max-width: 64rem;
  display: flex;
  /* flex-flow: column wrap; */
  flex-direction: column;
  flex-wrap: nowrap;
  justify-content: center;
  min-height: 100vh;
  text-align: center;
}

.jobs-content {
  display: flex;
  flex-flow: column wrap;
  justify-content: center;
  min-height: 100vh;
}

.grid-main-heading {
  margin-bottom: 1rem;
}
.grid-description {
  padding-bottom: 8rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
  counter-reset: grid-counter;
}

.grid h3 {
  font-size: 3rem;
  position: relative;
  padding-left: 6rem;
  padding-bottom: 2rem;
}

.grid h3::before {
  counter-increment: grid-counter;
  content: counter(grid-counter);
  position: absolute;
  font-size: 8rem;
  font-style: italic;
  top: -4rem;
  left: -1rem;
  transform: rotate(5deg);
}

.gallery-img {
  width: 100%;
  max-width: 36rem;
  max-height: 36rem;
  overflow: hidden;
}

.gallery-img img {
  transition: all 300ms ease-in-out;
}

.gallery-img img:hover {
  transform: translate(-3%, 3%) scale(1.2) rotate(5deg);
}

.responsive-table {
  overflow: hidden;
  overflow-x: auto;
}

.contact-form {
  grid-column: span 2;
}

.form-grid {
  border: none;
  display: flex;
  flex-flow: row;
  flex-wrap: wrap;
  gap: var(--gap);
}

.form-grid legend {
  font-style: italic;
  font-size: 2rem;
  margin-bottom: 1rem;
}

.form-group {
  flex: 1 1 auto;
}

.form-group label {
  display: block;
  margin-bottom: 1rem;
}

.form-group input,
.form-group textarea {
  border: none;
  width: 100%;
  background-color: var(--white-color);
  padding: 1.5rem 2rem;
  font-size: 3rem;
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
  box-shadow: 0 0 1rem 0.2rem var(--secondary-color);
}

.form-group textarea {
  min-height: 30rem;
}

.full-width {
  width: 100%;
}

.form-group button {
  border: 0.5rem solid var(--white-color);
  background: none;
  color: var(--white-color);
  padding: 1.5rem 2rem;
  font-size: 3rem;
  cursor: pointer;
  transition: all 300ms ease-in-out;
}

.form-group button:hover {
  background-color: var(--white-color);
  color: var(--primary-color);
}

.form-group ::placeholder {
  color: var(--grey-color);
}

.footer {
  text-align: center;
  font-size: 2rem;
  padding: 2rem;
}

.footer p,
.footer a {
  margin: 0;
}

.close-menu {
  display: none;
}

.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background-color: var(--white-color);
  color: var(--primary-color);
  width: 5rem;
  height: 5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  transform-origin: center;
  rotate: -90deg;
  font-size: 5rem;
  font-weight: bold;
  border: solid 0.1rem;
}

@media (max-height: 576px) {
  .section {
    scroll-margin-top: 0;
  }

  .menu-spacing {
    display: none;
  }

  .menu {
    display: none;
  }

  .close-menu-label::after {
    content: "☰";
    position: fixed;
    z-index: 2;
    top: 2rem;
    right: 2rem;
    background-color: var(--primary-color);
    color: var(--white-color);
    font-size: 3rem;
    line-height: 3rem;
    width: 3rem;
    height: 3rem;
    text-align: center;
    padding: 0.5rem;
    cursor: pointer;
  }

  .close-menu:checked ~ .menu {
    display: block;
  }

  .close-menu:checked ~ .close-menu-label::after {
    content: "×";
  }
}

@media (max-width: 800px) {
  td,
  th {
    padding: 0.5rem;
    font-size: 1.4rem;
  }

  .intro-content,
  .grid {
    grid-template-columns: 1fr;
  }

  .gallery-img {
    width: 100%;
    max-width: 100%;
    max-height: 100%;
  }

  .gallery-img img {
    width: 100%;
  }

  .section {
    scroll-margin-top: 0;
  }

  .menu-spacing {
    display: none;
  }

  .menu {
    height: 100%;
    bottom: 0;
    text-align: center;
    display: none;
  }

  .menu-content {
    height: 100vh;
  }

  .menu-content,
  .menu-content ul {
    flex-direction: column;
    justify-content: center;
  }

  .menu-content ul li a {
    font-size: 3rem;
  }

  .close-menu-label::after {
    content: "☰";
    position: fixed;
    z-index: 2;
    top: 2rem;
    right: 2rem;
    background-color: var(--primary-color);
    color: var(--white-color);
    font-size: 3rem;
    line-height: 3rem;
    width: 3rem;
    height: 3rem;
    text-align: center;
    padding: 0.5rem;
    cursor: pointer;
  }

  .close-menu:checked ~ .menu {
    display: block;
  }

  .close-menu:checked ~ .close-menu-label::after {
    content: "×";
  }
}

@media (max-height: 575px) and (max-width: 799px) {
  .logo {
    padding: 0;
  }

  .menu-content ul li a {
    padding: 0;
  }
}

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

  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
