:root {
  /* Colors */
  --Dark-Gray: hsl(0, 0%, 63%);
  --Black: hsl(0, 0%, 0%);
  --White: hsl(0, 0%, 100%);
  --Very-Dark-Gray: hsl(0, 0%, 27%);
  --background: hsl(0, 5%, 92%);

  /* Font weight */
  --fw-regular: 500;
  --fw-semi-bold: 600;
  --fw-bold: 700;

  /* Transitions */
  --transition-fast: 0.3s ease;
  --transition-normal: 0.5s ease-in-out;
}

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

html {
  font-size: 16px;
  font-family: "League Spartan", sans-serif;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  min-height: 100vh;
  background-color: var(--background);
}

/* Skip link for accessibility */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--Black);
  color: var(--White);
  padding: 8px;
  z-index: 100;
  text-decoration: none;
  border-radius: 0 0 4px 4px;
}

.skip-link:focus {
  top: 0;
}

main {
  width: 98vw;
  max-width: 1440px;
  height: 800px;
}

.header {
  position: relative;
}

.nav {
  display: flex;
  flex-direction: row-reverse;
  gap: 3.5rem;
  margin-top: 3.9rem;
  margin-left: 3.9rem;
  z-index: 1;
  position: absolute;
}

.nav__hamburger--mobile,
.nav__close--mobile {
  display: none;
  cursor: pointer;
  background: transparent;
  border: none;
  padding: 0;
}

.nav__hamburger--mobile:focus,
.nav__close--mobile:focus {
  outline: 2px solid var(--White);
  outline-offset: 2px;
}

.nav__list {
  display: flex;
  flex-direction: row;
  list-style-type: none;
  gap: 2rem;
}

.nav__list a {
  color: white;
  text-decoration: none;
  cursor: pointer;
  position: relative;
}

.nav__list a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -0.5rem;
  height: 3px;
  width: 70%;
  transform: translateX(-50%) scaleX(0);
  transform-origin: center;
  background-color: white;
  transition: width var(--transition-fast);
}

.nav__list a:hover::after,
.nav__list a:focus::after {
  transform: translateX(-50%) scaleX(1);
}

.carousel {
  overflow: hidden;
  z-index: 0;
}

.carousel__slides {
  display: flex;
  transition: transform var(--transition-normal);
  width: 100%;
}

.carousel__slide {
  flex: 0 0 100%;
  display: grid;
  grid-template-rows: 1fr;
  grid-template-columns: 60% 40%;
  transition: transform var(--transition-normal);
}

.carousel__image-main {
  min-height: 100%;
  height: 100%;
  width: 100%;
  object-fit: cover;
  display: block;
}

.carousel__content {
  position: relative;
  background-color: var(--White);
  padding-inline: 6.2rem;
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  justify-content: center;
  flex-shrink: 0;
  width: 100%;
  height: 100%;
}

.carousel__title {
  font-size: 3rem;
  font-weight: var(--fw-semi-bold);
  letter-spacing: -2px;
}

.carousel__paragraph {
  margin-top: 1.1rem;
  margin-bottom: 1.5rem;
  padding-right: 0.9rem;
  color: var(--Dark-Gray);
  line-height: 22px;
  font-weight: var(--fw-regular);
  font-size: 0.9rem;
}

.carousel__button {
  text-transform: uppercase;
  text-decoration: none;
  color: var(--Black);
  letter-spacing: 11px;
  font-size: 0.9rem;
  margin-bottom: 3rem;
  cursor: pointer;
}

.carousel__button::after {
  content: url("./images/icon-arrow.svg");
  margin-left: 1rem;
}

.carousel__button:hover,
.carousel__button:focus {
  color: var(--Dark-Gray);
}

.carousel__controls {
  position: absolute;
  width: 160px;
  height: 80px;
  background-color: black;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-inline: 1.5rem;
  cursor: pointer;
}

.carousel__controls--desktop {
  bottom: 0;
  left: 0;
}

.carousel__controls--mobile {
  display: none;
}

.carousel__btn {
  background: transparent;
  border: none;
  padding: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel__btn:focus {
  outline: 2px solid var(--White);
  outline-offset: 2px;
}

.carousel__btn img {
  pointer-events: none;
}

.about {
  display: flex;
  flex-direction: row;
}

.about__text {
  background-color: var(--White);
  padding-inline: 3rem;
  padding-top: 4.2rem;
  padding-bottom: 3.6rem;
}

.about__title {
  letter-spacing: 6.6px;
  text-transform: uppercase;
  font-weight: var(--fw-bold);
}

.about__description {
  letter-spacing: -0.33px;
  color: var(--Dark-Gray);
  line-height: 22px;
  margin-top: 1rem;
}

/* Attribution styles moved from inline */
.attribution {
  font-size: 11px;
  text-align: center;
  margin-top: 1rem;
}

.attribution a {
  color: hsl(228, 45%, 44%);
}

/* Responsive styles */
@media screen and (max-width: 1281px) {
  body {
    background-color: white;
  }

  main {
    max-width: 700px;
    margin-bottom: 1rem;
    height: 100%;
  }

  .nav {
    width: 100%;
    height: 100%;
    height: 110px;
    margin: 0;
  }

  .nav__logo-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 7rem;
    margin-left: 1.5rem;
  }

  .nav__hamburger--mobile {
    display: block;
  }

  .nav__hamburger--mobile:focus,
  .nav__close--mobile:focus {
    outline: 2px solid var(--Black);
    outline-offset: 2px;
  }

  .nav__list-container {
    display: none;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    z-index: 10;
    position: absolute;
    height: 100%;
    width: 100%;
    gap: 3rem;
    background-color: white;
  }

  .nav__list a {
    color: black;
    cursor: pointer;
    position: relative;
  }

  .nav__list a::after {
    background-color: black;
  }

  .nav__list a:hover::after,
  .nav__list a:focus::after {
    transform: translateX(-50%) scaleX(1);
  }

  .nav__close--mobile {
    display: block;
  }

  .nav__logo {
    height: auto;
    max-height: 14px;
    width: auto;
  }

  .carousel__slide {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 50% 50%;
  }

  .carousel__image {
    min-height: 360px;
    height: 100%;
    position: relative;
  }

  .carousel__controls--mobile {
    display: flex;
    bottom: 0;
    right: 0;
  }

  .carousel__btn:focus {
    outline: 2px solid var(--White);
    outline-offset: 2px;
  }

  .about {
    flex-direction: column;
  }

  .carousel__content {
    padding-inline: 2rem;
    height: 100%;
  }

  .carousel__controls--desktop {
    display: none;
  }

  .carousel__title {
    font-size: 2.5rem;
    margin-top: 3.7rem;
  }

  .carousel__paragraph {
    letter-spacing: -0.33px;
    margin-bottom: 2.5rem;
  }

  .about__text {
    padding-inline: 2rem;
  }

  .about__title {
    font-size: 0.8rem;
  }

  .about__description {
    padding-right: 0.3rem;
  }
}
