/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Karla', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: hsl(273, 4%, 51%);
  overflow-x: hidden;
}

.container {
  max-width: 1110px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Typography */
h1, h2, h3 {
  font-family: 'DM Serif Display', serif;
  font-weight: 400;
  color: hsl(270, 9%, 17%);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 14px 28px;
  text-decoration: none;
  font-family: 'Karla', sans-serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  border: 2px solid;
  transition: all 0.3s ease;
  cursor: pointer;
}

.btn--primary {
  background-color: transparent;
  color: white;
  border-color: white;
}

.btn--primary:hover {
  background-color: white;
  color: hsl(256, 26%, 20%);
}

.btn--secondary {
  background-color: transparent;
  color: hsl(270, 9%, 17%);
  border-color: hsl(270, 9%, 17%);
}

.btn--secondary:hover {
  background-color: hsl(270, 9%, 17%);
  color: white;
}

/* Header */
.header {
  background-color: white;
  position: relative;
  z-index: 1000;
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
}

.logo img {
  height: 18px;
}

.nav-list {
  display: flex;
  list-style: none;
  align-items: center;
  gap: 26px;
}

.nav-link {
  text-decoration: none;
  color: hsl(273, 4%, 51%);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  transition: color 0.3s ease;
}

.nav-link:hover {
  color: hsl(270, 9%, 17%);
}

.nav-link--cta {
  padding: 12px 28px;
  border: 2px solid hsl(270, 9%, 17%);
  color: hsl(270, 9%, 17%);
}

.nav-link--cta:hover {
  background-color: hsl(270, 9%, 17%);
  color: white;
}

.mobile-nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1001;
}

.close-icon {
  display: none;
}

.mobile-nav {
  display: none;
  position: fixed;
  top: 80px;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: hsl(270, 9%, 17%);
  background-image: url('./images/bg-pattern-mobile-nav.svg');
  background-repeat: no-repeat;
  background-position: bottom right;
  background-size: 375px auto;
  z-index: 999;
  padding: 40px 24px;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
}

.mobile-nav.active {
  transform: translateX(0);
}

.mobile-nav-list {
  list-style: none;
}

.mobile-nav-list li {
  margin-bottom: 40px;
}

.mobile-nav-link {
  text-decoration: none;
  color: white;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.mobile-nav-link--cta {
  display: inline-block;
  padding: 16px 0;
  border: 2px solid white;
  text-align: center;
  width: 100%;
}

/* Hero Section */
.hero {
  background-color: hsl(256, 26%, 20%);
  color: white;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 600px;
  left: 0;
  width: 195px;
  height: 451px;
  background-image: url('./images/bg-pattern-intro-left-desktop.svg');
  background-repeat: no-repeat;
  z-index: 1;
}

.hero::after {
  content: '';
  position: absolute;
  top: -80px;
  right: 0;
  width: 436px;
  height: 593px;
  background-image: url('./images/bg-pattern-intro-right-desktop.svg');
  background-repeat: no-repeat;
  z-index: 1;
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 540px;
  gap: 30px;
  align-items: center;
  padding: 105px 0;
  position: relative;
  z-index: 2;
}

.hero-text::before {
  content: '';
  display: block;
  width: 150px;
  height: 1px;
  background-color: white;
  margin-bottom: 63px;
}

.hero-title {
  font-size: 72px;
  line-height: 1;
  color: white;
  margin-bottom: 27px;
}

.hero-description {
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 32px;
}

.hero-image {
  position: relative;
  z-index: 2;
}

.hero-img {
  width: 100%;
  height: auto;
  display: block;
}

.mobile-img {
  display: none;
}

/* Features Section */
.features {
  padding: 300px 0 150px;
  position: relative;
}

.features::before {
  content: '';
  position: absolute;
  top: 250px;
  left: 100px;
  width: 150px;
  height: 1px;
  background-color: hsl(273, 4%, 51%);
}

.features-title {
  font-size: 72px;
  line-height: 1;
  text-align: left;
  margin-bottom: 96px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.feature {
  text-align: center;
}

.feature-icon {
  margin-bottom: 32px;
}

.feature-title {
  font-size: 28px;
  line-height: 1.2;
  margin-bottom: 16px;
}

.feature-description {
  font-size: 16px;
  line-height: 1.6;
}

/* CTA Section */
.cta {
  margin-bottom: 150px;
}

.cta-content {
  background-color: hsl(256, 26%, 20%);
  background-image: url('./images/bg-pattern-how-we-work-desktop.svg');
  background-repeat: no-repeat;
  background-position: right center;
  padding: 69px 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cta-title {
  font-size: 56px;
  line-height: 1;
  color: white;
  max-width: 475px;
}

/* Footer */
.footer {
  background-color: hsl(0, 0%, 98%);
  background-image: url('./images/bg-pattern-footer-desktop.svg');
  background-repeat: no-repeat;
  background-position: top left;
  padding: 64px 0;
}

.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 36px;
  border-bottom: 1px solid hsl(273, 4%, 51%);
  margin-bottom: 48px;
}

.social-links {
  display: flex;
  gap: 16px;
}

.social-link {
  transition: all 0.3s ease;
  display: inline-block;
}

.social-link:hover {
  transform: scale(1.1);
}

.social-link:hover img {
  filter: brightness(0) saturate(100%) invert(11%) sepia(16%) saturate(1851%) hue-rotate(244deg) brightness(95%) contrast(90%);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}

.footer-column-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: hsl(273, 4%, 51%);
  margin-bottom: 36px;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 16px;
}

.footer-link {
  text-decoration: none;
  color: hsl(270, 9%, 17%);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  transition: color 0.3s ease;
}

.footer-link:hover {
  color: hsl(256, 26%, 20%);
}

/* Attribution */
.attribution {
  font-size: 11px;
  text-align: center;
  padding: 20px 0;
}

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

/* Mobile Styles */
@media (max-width: 768px) {
  .container {
    padding: 0 24px;
  }

  /* Mobile Navigation */
  .nav {
    display: none;
  }

  .mobile-nav-toggle {
    display: block;
  }

  .mobile-nav.active {
    display: block;
    transform: translateX(0);
  }

  .mobile-nav-toggle.active .hamburger-icon {
    display: none;
  }

  .mobile-nav-toggle.active .close-icon {
    display: block;
  }

  /* Hero Mobile */
  .hero {
    text-align: center;
  }

  .hero::before {
    display: none;
  }

  .hero::after {
    display: none;
  }

  .hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 168px;
    height: 165px;
    background-image: url('./images/bg-pattern-intro-left-mobile.svg');
    background-repeat: no-repeat;
    z-index: 1;
  }

  .hero::after {
    content: '';
    position: absolute;
    bottom: -178px;
    right: 0;
    width: 124px;
    height: 330px;
    background-image: url('./images/bg-pattern-intro-right-mobile.svg');
    background-repeat: no-repeat;
    z-index: 1;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 93px;
    padding: 93px 0 93px;
    text-align: center;
  }

  .hero-text {
    order: 2;
  }

  .hero-image {
    order: 1;
  }

  .hero-text::before {
    display: none;
  }

  .hero-title {
    font-size: 48px;
    line-height: 1;
    margin-bottom: 16px;
  }

  .hero-description {
    margin-bottom: 32px;
  }

  .desktop-img {
    display: none;
  }

  .mobile-img {
    display: block;
  }

  /* Features Mobile */
  .features {
    padding: 140px 0 140px;
    text-align: center;
  }

  .features::before {
    top: 80px;
  }

  .features-title {
    font-size: 48px;
    margin-bottom: 80px;
    text-align: center;
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 56px;
  }

  /* CTA Mobile */
  .cta-content {
    background-image: url('./images/bg-pattern-how-we-work-mobile.svg');
    background-position: right top;
    padding: 72px 24px;
    flex-direction: column;
    text-align: center;
    gap: 40px;
  }

  .cta-title {
    font-size: 40px;
    max-width: none;
  }

  /* Footer Mobile */
  .footer {
    background-image: url('./images/bg-pattern-footer-mobile.svg');
    text-align: center;
  }

  .footer-top {
    flex-direction: column;
    gap: 32px;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }
}
