/* Home background layering */
body.is-home {
  background-color: #000;
  --hero-image: url("assets/misty-woods-winter.jpg");
  --scroll-overlay: 0;
}

body.is-home::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image: var(--hero-image);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

body.is-home::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(to bottom,
      rgba(0, 0, 0, 0) 10%,
      rgba(0, 0, 0, 0.55) 60%,
      rgba(0, 0, 0, 1) 100%),
    linear-gradient(rgba(0, 0, 0, var(--scroll-overlay)),
      rgba(0, 0, 0, var(--scroll-overlay)));
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
  pointer-events: none;
  transition: background 0.2s ease-out;
}

/* Strip theme backgrounds so the hero image stays visible */
body.is-home .md-container,
body.is-home .md-main,
body.is-home .md-main__inner,
body.is-home .md-content,
body.is-home .md-content__inner,
body.is-home .md-footer,
body.is-home .md-footer-meta {
  background: transparent !important;
}

/* Keep header clear until overlay reaches full opacity */
body.is-home .md-header,
body.is-home .md-tabs {
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none;
  transition: background .25s ease, box-shadow .25s ease, backdrop-filter .25s ease;
}

body.is-home.is-scrolled .md-header,
body.is-home.is-scrolled {
  background: rgba(0, 0, 0, .55) !important;
  backdrop-filter: saturate(140%) blur(8px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, .25);
}

/* Hero */
.hero {
  padding: clamp(4rem, 8vw, 7rem) 1rem 3.5rem;
  text-align: center;
  position: relative;
}

.hero__inner {
  max-width: 980px;
  margin: 0 auto;
}

.hero h1 {
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  margin: 0 0 .5rem;
}

.hero__lead {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  opacity: .9;
}

.hero__cta {
  margin-top: 1rem;
}

.hero__cta .md-button+.md-button {
  margin-left: .5rem;
}

.scroll-indicator {
  position: absolute;
  left: 50%;
  bottom: 1.25rem;
  transform: translate(-50%, 0);
  font-size: 1.9rem;
  color: rgba(255, 255, 255, .7);
  opacity: .85;
  animation: scroll-indicator-bob 2.4s ease-in-out infinite;
  pointer-events: auto;
  transition: opacity .3s ease, transform .3s ease;
  cursor: pointer;
}

@keyframes scroll-indicator-bob {

  0%,
  100% {
    transform: translate(-50%, 0);
  }

  50% {
    transform: translate(-50%, 10px);
  }
}

body.is-home.is-scrolled .scroll-indicator {
  opacity: 0;
  transform: translate(-50%, 16px);
}

.scroll-indicator:hover,
.scroll-indicator:focus {
  color: rgba(255, 255, 255, .92);
  opacity: 1;
}

@media (max-width: 480px) {
  .scroll-indicator {
    bottom: .75rem;
    font-size: 1.6rem;
  }
}

/* Intro pitch */
.pitch {
  padding: clamp(3rem, 7vw, 4.5rem) 1rem;
  max-width: 960px;
  margin: clamp(2rem, 6vw, 3rem) auto 0;
}

.pitch__grid {
  display: grid;
  gap: 1.75rem;
}

@media (min-width: 720px) {
  .pitch__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.pitch h2 {
  margin: 0 0 .5rem;
  font-size: clamp(1.45rem, 2.1vw, 1.85rem);
}

.pitch p {
  margin: 0;
  opacity: .87;
  line-height: 1.7;
}

/* Feature sections revealed after one viewport scroll */
.feature-block {
  max-width: 1080px;
  margin: clamp(2.5rem, 6vw, 4rem) auto 0;
  padding: clamp(3rem, 7vw, 5rem) clamp(1.5rem, 4vw, 3rem);
  opacity: 0;
  transform: translateY(60px);
  transition: opacity .6s ease, transform .6s ease;
  pointer-events: none;
  visibility: hidden;
  background: linear-gradient(155deg, rgba(12, 26, 54, .85), rgba(6, 10, 22, .92));
  border: 1px solid rgba(86, 173, 255, .18);
  border-radius: 1.1rem;
  backdrop-filter: blur(10px);
  box-shadow: 0 32px 70px rgba(6, 12, 26, .62);
  color: #f2f6ff;
}

body.features-visible .feature-block {
  opacity: 1;
  transform: none;
  pointer-events: auto;
  visibility: visible;
}

body.features-visible .feature-block--clients {
  transition-delay: .08s;
}

body.features-visible .feature-block--infra {
  transition-delay: .16s;
}

/* Headline inside each feature block */
.feature-block h2 {
  text-align: center;
  margin: 0 0 2.5rem;
  font-size: clamp(1.55rem, 2.4vw, 2.05rem);
  letter-spacing: .015em;
  color: #ffffff;
}

.feature-block__grid {
  display: grid;
  gap: 1.65rem 1.9rem;
}

@media (min-width: 720px) {
  .feature-block__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Individual feature card layout */
.feature-card {
  background: linear-gradient(150deg, rgba(18, 34, 64, .92), rgba(6, 8, 20, .95));
  border: 1px solid rgba(120, 204, 255, .24);
  border-radius: 1rem;
  padding: 1.75rem 1.9rem;
  min-height: 100%;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.1rem;
  align-items: start;
  box-shadow: 0 15px 36px rgba(0, 0, 0, .32);
  backdrop-filter: blur(5px);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.feature-card>div {
  display: grid;
  gap: .55rem;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 26px 52px rgba(0, 0, 0, .5);
  border-color: rgba(146, 219, 255, .34);
}

/* Feature icon bubble */
.feature-card__icon {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, .25), rgba(255, 255, 255, .07));
  color: #f5f8ff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .24);
}

.feature-card h3 {
  margin: 0;
  font-size: 1.18rem;
  letter-spacing: .01em;
  color: #ffffff;
}

.feature-card p {
  margin: 0;
  opacity: .94;
  line-height: 1.62;
}

/* Highlight product names inside the copy */
.feature-card p strong {
  color: #ffffff;
}

/* Mobile tweaks */
@media (max-width: 420px) {
  .hero {
    padding-top: 5rem;
  }

  .hero__cta .md-button {
    display: inline-block;
    width: 100%;
  }

  .hero__cta .md-button+.md-button {
    margin: .5rem 0 0;
    margin-left: 0;
  }
}