/* Home page hero: the logo, the pitch, the two buttons and the product screenshot on a blurred backdrop of a generated image. */

.zh {
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-top: -2.6rem;
  margin-bottom: 2.5rem;
  padding: 2.6rem 1.5rem 0;
  overflow: hidden;
  text-align: center;
  color: #fff;
  background: #0b0d12;
}

.zh::before {
  content: "";
  position: absolute;
  inset: -2rem;
  background: url("../assets/home/backdrop.webp") center / cover;
  filter: blur(18px) saturate(1.3);
  opacity: 0.55;
}

.zh > * {
  position: relative;
}

.zh__logo {
  display: block;
  width: min(14rem, 60vw);
  height: auto;
  margin: 0 auto 1.4rem;
}

.zh h1 {
  max-width: 42rem;
  margin: 0 auto 0.8rem;
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.08;
  color: inherit;
}

.zh p {
  max-width: 36rem;
  margin: 0 auto 1.4rem;
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.8);
}


.md-typeset .zh a:not(.md-button) {
  color: #5eead4;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.zh__buttons > p {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.7rem;
  max-width: none;
  margin: 0 auto 1rem;
}

.md-typeset .zh__btn {
  display: inline-block;
  margin: 0;
  padding: 0.65rem 1.3rem;
  border: 0;
  border-radius: 0.5rem;
  font-weight: 700;
  text-decoration: none;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  transition: background 0.15s ease;
}

.md-typeset .zh__btn--primary {
  color: #062a26;
  background: #2dd4bf;
}

@media (hover: hover) {
  .md-typeset .zh__btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.2);
  }

  .md-typeset .zh__btn--primary:hover {
    color: #062a26;
    background: #5eead4;
  }
}

.zh .zh__terminal {
  margin-bottom: 0;
  font-size: 0.9rem;
}

.zh__shot {
  display: block;
  width: min(62rem, 92vw);
  margin: 2.2rem auto 3rem;
  border-radius: 0.6rem;
  box-shadow: 0 2rem 5rem rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.15);
}

@keyframes zh-rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

.zh__rise {
  animation: zh-rise 0.8s ease both;
}

.zh__rise--late {
  animation-delay: 0.2s;
}

/* Phone: the header already carries the logo, the buttons stack at full width, and the screenshot spans the width. */

@media (max-width: 600px) {
  .zh {
    padding-top: 1.8rem;
  }

  .zh__logo {
    display: none;
  }

  .zh h1 {
    margin-bottom: 0.6rem;
    font-size: 1.9rem;
  }

  .zh p {
    margin-bottom: 1rem;
    font-size: 0.95rem;
    line-height: 1.5;
  }

  .zh__buttons > p {
    flex-direction: column;
    align-items: stretch;
  }

  .md-typeset .zh__btn {
    text-align: center;
  }

  .zh__shot {
    width: 100%;
    margin: 1.6rem auto 2rem;
  }

  .md-typeset .zhome .grid.cards,
  .md-typeset .zhome .grid.cards > ul {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .zh__rise {
    animation: none;
  }
}

/* Parallax: the backdrop drifts down at 0.35x of the scroll, so the hero glides over it.
   Scroll-driven, so it runs off the main thread; browsers without it keep a still backdrop. */

@keyframes zh-drift {
  to { transform: translateY(525px); }
}

@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    .zh::before {
      will-change: transform;
      animation: zh-drift linear both;
      animation-timeline: scroll(root block);
      animation-range: 0px 1500px;
    }
  }
}

/* Home page body: one centred column under the hero, with what you can make as cards. */

.zhome {
  --zhome-surface: #f3f5f6;
  --zhome-mark: #0d9488;
  max-width: 44rem;
  margin: 0 auto 3rem;
  font-size: 0.85rem;
}

[data-md-color-scheme="slate"] .zhome {
  --zhome-surface: #11151c;
  --zhome-mark: #2dd4bf;
}

.md-typeset .zhome h2 {
  margin: 3.6rem 0 1.1rem;
  font-size: 1.4rem;
  font-weight: 800;
}

.md-typeset .zhome h2::before {
  content: "";
  display: block;
  width: 2rem;
  height: 0.2rem;
  margin-bottom: 0.9rem;
  border-radius: 0.1rem;
  background: var(--zhome-mark);
}

.md-typeset .zhome > h2:first-child {
  margin-top: 1rem;
}

.md-typeset .zhome > p {
  max-width: 38rem;
}

.md-typeset .zhome .grid {
  gap: 0.8rem;
}

.md-typeset .zhome .grid.cards,
.md-typeset .zhome .grid.cards > ul {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 10.5rem), 1fr));
}

.md-typeset .zhome .grid.cards > ul > li {
  border: none;
  border-radius: 0.6rem;
  background: var(--zhome-surface);
}

@media (max-width: 760px) {
  .md-typeset .zhome h2 {
    margin-top: 2.8rem;
    font-size: 1.25rem;
  }
}
