:root {
  --bg: #000510;
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.9);
  --cyan: #02dbee;
  --teal: #01738f;
  --content: 1620px;
  --gutter: clamp(24px, 6.25vw, 150px);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: Avenir, "Avenir Next", Montserrat, Verdana, sans-serif;
  line-height: 1.45;
}

a {
  color: inherit;
}

.site-header {
  display: flex;
  align-items: center;
  min-height: clamp(88px, 8.5vw, 120px);
  padding: 28px var(--gutter);
  background: #000510;
}

.brand {
  display: inline-flex;
}

.brand img {
  width: clamp(176px, 15.2vw, 292px);
  height: auto;
}

.hero {
  min-height: clamp(520px, 31.25vw, 600px);
  display: flex;
  align-items: center;
  padding: 72px var(--gutter);
  background:
    linear-gradient(90deg, rgba(0, 5, 16, 0.88) 0%, rgba(0, 5, 16, 0.58) 38%, rgba(0, 5, 16, 0.04) 72%),
    url("hero-nebula.jpg") center / cover no-repeat;
}

.hero__content {
  width: min(860px, 100%);
}

.hero h1 {
  max-width: 760px;
  margin: 0 0 28px;
  font-size: clamp(44px, 4vw, 64px);
  line-height: 1.2;
  letter-spacing: 0;
}

.hero p,
.section-heading p,
.service p,
.cta p,
.site-footer p {
  margin: 0;
  font-size: clamp(21px, 1.65vw, 30px);
  line-height: 1.4;
  color: var(--muted);
}

.services {
  padding: clamp(72px, 8.4vw, 160px) var(--gutter) clamp(90px, 8.4vw, 150px);
  background: #000510;
}

.section-heading {
  width: min(860px, 100%);
  margin: 0 auto clamp(84px, 8.6vw, 165px);
  text-align: center;
}

.section-heading h2 {
  margin: 0 0 28px;
  text-transform: uppercase;
  font-size: clamp(44px, 4vw, 64px);
  line-height: 1.1;
  letter-spacing: 0;
}

.service-grid {
  width: min(var(--content), 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(42px, 6vw, 112px);
  align-items: start;
}

.service {
  min-width: 0;
}

.service__title {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 44px;
  margin-bottom: 24px;
}

.service h3 {
  margin: 0;
  font-size: clamp(24px, 1.8vw, 32px);
  line-height: 1.2;
  letter-spacing: 0;
}

.service__title img {
  width: 33px;
  height: 33px;
  flex: 0 0 auto;
}

.service--featured {
  padding: 24px 32px 30px;
  border-radius: 22px;
  background: linear-gradient(105deg, var(--cyan) 0%, var(--teal) 100%);
}

.service--featured p {
  color: #fff;
}

.cta {
  min-height: clamp(180px, 14.6vw, 280px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 42px var(--gutter);
  text-align: center;
  background: linear-gradient(105deg, var(--cyan) 0%, var(--teal) 100%);
}

.cta p {
  width: min(1160px, 100%);
  color: #fff;
}

.cta a {
  text-decoration: none;
}

.cta a:hover,
.cta a:focus-visible {
  text-decoration: underline;
}

.site-footer {
  min-height: 89px;
  display: flex;
  align-items: center;
  padding: 24px var(--gutter);
  background:
    linear-gradient(rgba(0, 5, 16, 0.22), rgba(0, 5, 16, 0.22)),
    url("footer-stars.png") center / cover no-repeat;
}

.site-footer p {
  width: min(var(--content), 100%);
}

.back-to-top {
  position: fixed;
  right: clamp(20px, 6.6vw, 160px);
  bottom: 24px;
  width: clamp(64px, 5.2vw, 100px);
  aspect-ratio: 1.5625;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(105deg, var(--cyan) 0%, var(--teal) 100%);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
}

.back-to-top img {
  width: 42%;
  height: auto;
}

@media (max-width: 1024px) {
  .hero {
    min-height: 560px;
    background:
      linear-gradient(90deg, rgba(0, 5, 16, 0.9) 0%, rgba(0, 5, 16, 0.62) 54%, rgba(0, 5, 16, 0.16) 100%),
      url("hero-nebula.jpg") 58% center / cover no-repeat;
  }

  .section-heading {
    margin-bottom: 72px;
  }

  .service-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 48px;
  }

  .service--featured {
    grid-column: 1 / -1;
    width: min(560px, 100%);
    justify-self: center;
  }
}

@media (max-width: 680px) {
  :root {
    --gutter: 22px;
  }

  .site-header {
    min-height: 80px;
    padding-block: 22px;
  }

  .hero {
    min-height: 560px;
    align-items: flex-end;
    padding-block: 56px;
    background:
      linear-gradient(180deg, rgba(0, 5, 16, 0.1) 0%, rgba(0, 5, 16, 0.78) 56%, rgba(0, 5, 16, 0.96) 100%),
      url("hero-nebula.jpg") 67% center / cover no-repeat;
  }

  .hero h1,
  .section-heading h2 {
    font-size: clamp(38px, 11vw, 48px);
  }

  .hero p,
  .section-heading p,
  .service p,
  .cta p,
  .site-footer p {
    font-size: 20px;
  }

  .services {
    padding-block: 64px 78px;
  }

  .section-heading {
    margin-bottom: 54px;
    text-align: left;
  }

  .service-grid {
    grid-template-columns: 1fr;
    gap: 38px;
  }

  .service__title {
    gap: 16px;
    margin-bottom: 16px;
  }

  .service--featured {
    width: 100%;
    padding: 24px;
    border-radius: 16px;
  }

  .cta {
    justify-content: flex-start;
    min-height: 210px;
    text-align: left;
  }

  .site-footer {
    align-items: flex-start;
    padding-block: 26px 72px;
  }

  .back-to-top {
    right: 18px;
    bottom: 18px;
  }
}
