/* ===== VARIABLES ===== */
:root {
  --dark-blue: rgb(15,20,42);
}

/* ===== BASE STYLES ===== */
html {
  background: linear-gradient(to right, rgb(39,59,123), rgb(20,29,63));
  overscroll-behavior: none;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: white;
}

* {
  font-family: 'Roboto', sans-serif;
}

/* ===== COMPONENTS ===== */
button {
  max-height: 4rem;
  border: 1px solid white;
  border-radius: 2rem;
  padding: 1rem 1.5rem;
  color: white;
  font-weight: bold;
  font-size: 1.5rem;
  background-color: transparent;
  cursor: pointer;
  &:hover {
    border: 1px solid var(--dark-blue);
    background-color: white;
    color: var(--dark-blue);
  }
}

section {
  width: 100%;
  padding: calc(1 / 8 * 100vh) calc(1 / 15 * 100vw);
  height: auto;
  box-sizing: border-box;
  p {
    width: 100%;
    box-sizing: border-box;
    word-wrap: break-word;
  }
  &.dark {
    background-color: var(--dark-blue);
    color: white;
  }
}

/* ===== ANIMATIONS ===== */
@keyframes slideInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.css-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--dark-blue);
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 1s ease-in-out infinite;
}

/* ===== HERO SECTION ===== */
#hero {
  width: 100%;
  height: 100vh;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-image: url('./homepage background mobile.jpeg');
}

#hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: absolute;
  top: 10%;
  left: 50%;
  transform: translateX(-50%);
  height: auto;
  width: 80%;
  img {
    max-width: 100%;
    height: auto;
  }
}

#hero-text {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  align-self: center;
  p {
    font-size: 1.65rem;
    margin: .25rem;
    color: white;
    text-align: right;
    white-space: nowrap;
    opacity: 0;
    transform: translateY(20px);
    animation: slideInUp 0.8s ease-out forwards;
  }
  p:nth-child(1) {
    animation-delay: 0.1s;
  }
  p:nth-child(2) {
    animation-delay: 0.3s;
  }
  p:nth-child(3) {
    animation-delay: 0.5s;
  }
  button {
    margin-top: 1.5rem;
    opacity: 0;
    transform: translateY(20px);
    animation: slideInUp 0.8s ease-out forwards;
    animation-delay: 0.7s;
  }
}

/* ===== NAVIGATION ===== */
#sticky-header {
  width: 100%;
  background-color: var(--dark-blue);
  position: sticky;
  top: 0;
  z-index: 1000;
}

#sticky-header nav {
  padding-left: calc(1/15 * 100%);
  padding-right: calc(1/15 * 100%);
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 2rem;
}

#logo-link {
  display: flex;
  align-items: center;
}

#nav-logo {
  height: 40px;
  width: auto;
  filter: brightness(0) invert(1);
}

#sticky-header nav ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
  gap: 1rem;
}

#sticky-header nav ul li {
  margin: 0;
}

#sticky-header nav ul li a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  transition: color 0.3s ease;
}

#sticky-header nav ul li a:hover {
  color: #ccc;
}

#sticky-header nav ul li.delimiter {
  color: white;
  opacity: 0.6;
  font-weight: 300;
}

#social-icons {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.social-link {
  color: white;
  font-size: 1.2rem;
  font-weight: bold;
  text-decoration: none;
  transition: color 0.3s ease;
}

.social-link:hover {
  color: #ccc;
}


/* ===== CAREERS SECTION ===== */
.careers-tagline-list {
  margin-top: 2rem;
}

.careers-tagline {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 2rem;
  img {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    object-fit: cover;
  }
}

.careers-tagline-content {
  flex: 1;
  h3 {
    margin: 0 0 0.5rem 0;
  }
  p {
    margin: 0;
  }
}

/* ===== BRANDS SECTION ===== */
#brands {
  .brands-content {
    display: flex;
    box-sizing: border-box;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    p {
      max-width: 50%;
    }
    img {
      width: 35%;
      flex-shrink: 0;
    }
  }
}

/* ===== AFFILIATES SECTION ===== */
#affiliates {
  .affiliates-content {
    display: flex;
    box-sizing: border-box;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    p {
      max-width: 50%;
    }
    img {
      max-height: 5rem;
      width: auto;
      flex-shrink: 0;
    }
  }
}

/* ===== CONTACT SECTION ===== */
#contact {
  .contact-container {
    display: flex;
    box-sizing: border-box;
    width: 100%;
    align-items: flex-start;
    justify-content: space-between;
    gap: 2rem;
  }

  .contact-info {
    flex: 1;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    svg {
      width: 24px;
      height: 24px;
      color: var(--dark-blue);
      margin-top: 0.25rem;
      flex-shrink: 0;
    }
    p {
      margin: 0;
      line-height: 1.6;
    }
  }

  .contact-logo {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    img {
      max-width: 300px;
      max-height: 350px;
      width: auto;
      height: auto;
      object-fit: contain;
    }
  }

  .contact-form {
    flex: 1;
    form {
      display: flex;
      flex-direction: column;
      gap: 1rem;
    }

    input, textarea {
      padding: 1rem;
      border: 1px solid #ddd;
      border-radius: 0.5rem;
      font-size: 1rem;
      font-family: 'Roboto', sans-serif;
      &:focus {
        outline: none;
        border-color: var(--dark-blue);
      }
    }

    textarea {
      resize: vertical;
      min-height: 120px;
    }

    .form-submit {
      display: flex;
      align-items: center;
      gap: 1rem;
      button {
        background-color: var(--dark-blue);
        border-color: var(--dark-blue);
        color: white;
        &:hover {
          background-color: white;
          color: var(--dark-blue);
        }
      }
    }

    #formError {
      color: #e74c3c;
      text-align: center;
      margin-top: 1rem;
    }

    #formSuccess {
      color: #2ecc71;
      text-align: center;
      margin-top: 1rem;
    }
  }
}

/* ===== DESKTOP MEDIA QUERIES ===== */
@media (orientation: landscape) {
  #hero {
    background-image: url('./homepage background desktop.jpeg');
  }

  #hero-content {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    height: auto;
    width: 60%;
    top: 10%;
    left: 10%;
    transform: none;
  }
}

@media (min-width: 769px) {
  .careers-tagline:nth-child(2) { margin-left: 5rem; }
  .careers-tagline:nth-child(3) { margin-left: 10rem; }
  .careers-tagline:nth-child(4) { margin-left: 15rem; }
  .careers-tagline:nth-child(5) { margin-left: 20rem; }
}

/* ===== MOBILE MEDIA QUERIES ===== */
@media (max-width: 768px) {
  #sticky-header nav ul {
    display: none;
  }

  #contact {
    .contact-container {
      flex-direction: column;
      align-items: center;
      gap: 2rem;
    }

    .contact-info, .contact-logo, .contact-form {
      width: 100%;
    }

    .contact-logo {
      img {
        max-width: 150px;
      }
    }

    .contact-form {
      .form-submit {
        justify-content: center;
      }
    }
  }

  #brands {
    .brands-content {
      flex-direction: column;
      align-items: center;
      gap: 1.5rem;
      p {
        max-width: 100%;
      }
      img {
        width: 70%;
      }
    }
  }

  #affiliates {
    .affiliates-content {
      flex-direction: column;
      align-items: center;
      gap: 1.5rem;
      p {
        max-width: 100%;
      }
    }
  }
}