/* The hero uses the same type, colors and spacing as the rest of the site. */

/* Home: the hero is the whole page, so the page ground matches it and the
   hero fills the viewport — no white strip below at any zoom level. */
body.home {
  background: #f5f7fb;
}

body.home .hero.hero-dark {
  min-height: 100svh;
}

.hero.hero-dark {
  padding: 112px 0 56px;
  min-height: min(720px, calc(100svh - 56px));
  background: var(--hero-bg);
  isolation: isolate;
}
.hero-dark::before {
  width: 720px;
  height: 720px;
  top: -80px;
  right: -140px;
  background: var(--hero-glow);
  filter: none;
  opacity: 1;
}
.hero-dark::after {
  display: none;
}
.hero-dark > .container {
  width: 100%;
}
.hero-dark .hero-content {
  position: relative; /* the logo is positioned against this box */
  grid-template-columns: minmax(0, 1fr) minmax(0, 500px);
  gap: 32px;
  align-items: start;
  text-align: left;
}
.hero-dark .hero-text {
  position: relative;
  z-index: 2;
  align-self: end; /* CTA bottom-aligned with the last card; the logo can sit above the headline */
}
.hero-dark .hero-text h1 {
  font-size: clamp(42px, 4.2vw, 60px);
  font-weight: 500;
  letter-spacing: -0.052em;
  line-height: 1.12;
  margin-bottom: 26px;
}
.hero-dark .hero-text h1 > span {
  color: var(--hero-muted);
}
.hero-dark .hero-text p {
  max-width: 470px;
  margin: 0 0 30px;
  font-size: 17px;
  line-height: 1.7;
}
.hero-dark .hero-cta {
  gap: 12px;
  justify-content: flex-start;
  flex-direction: row;
}
.hero-dark .hero-cta .btn {
  gap: 18px;
  min-height: 52px;
  width: auto;
  padding: 14px 21px;
  font-size: 14px;
}
.hero-dark .btn span {
  font-size: 18px;
}

/* "See how it works" sits a little further from the primary button. */
#productPreviewCta {
  margin-left: 6px;
}
/* Storyline: the three step cards (the logo floats free, see .hero-art) */
.hero-story {
  position: static;
}

/* The logo floats over the hero, above the headline (percent offsets are of
   the hero content box). */
.hero-art {
  position: absolute;
  left: 9.9%;
  top: 2.2%;
  width: 252px; /* 10% smaller */
  max-width: none;
  margin: 0;
  z-index: 1;
}

.hero-story-cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  align-content: center; /* cards size to their content and centre in the column */
  gap: 24px;
  min-height: 600px;     /* unchanged: the column still sets the hero's height */
}

.hero-story-card {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 20px;
  padding: 32px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  box-shadow: var(--shadow-md);
}


/* The step number is a quiet serif figure, with a hairline separating it
   from the copy rather than a filled badge. */
.hero-story-num {
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: 0.01em;
  color: var(--hero-muted);
  font-variant-numeric: lining-nums;
}

.hero-story-text {
  padding-left: 20px;
  border-left: 1px solid var(--border-color);
}

.hero-story-text h3 {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.hero-story-text p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-secondary);
}

.hero-story-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent-bg);
  color: var(--accent);
}

.hero-story-icon svg {
  width: 26px;
  height: 26px;
}
.hero-logo-stage {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  border-radius: 32%;
  cursor: pointer;
}
.is-ready .hero-logo-stage {
  cursor: grab;
}
.is-ready .hero-logo-stage.is-dragging {
  cursor: grabbing;
}
.hero-logo-stage canvas,
.hero-logo-fallback {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  transition: opacity 0.3s ease;
}
/* Nothing shows until the 3D scene is ready; the static logo appears only
   when WebGL or the module fails (.is-fallback). */
.hero-logo-stage canvas,
.hero-logo-fallback {
  opacity: 0;
}
.is-ready .hero-logo-stage canvas {
  opacity: 1;
}
.is-fallback .hero-logo-fallback {
  opacity: 1;
}
@media (max-width: 1100px) and (min-width: 801px) {
  .hero-dark .hero-text h1 {
    font-size: clamp(36px, 4.15vw, 46px);
  }
}
@media (max-width: 800px) {
  .hero.hero-dark {
    padding: 112px 0 44px;
    min-height: auto;
  }
  .hero-dark .hero-content {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .hero-dark .hero-text {
    max-width: 580px;
  }
  .hero-dark .hero-text h1 {
    font-size: clamp(38px, 6.7vw, 54px);
  }
  .hero-dark .hero-text p {
    max-width: 500px;
    font-size: 16px;
  }
  .hero-art {
    position: relative;
    left: auto;
    top: auto;
    width: 100%;
    max-width: 260px;
    margin: 0 auto 24px; /* centred in the column, not hung off the left */
  }
}
@media (max-width: 480px) {
  .hero.hero-dark {
    padding-top: 104px;
    padding-bottom: 28px;
  }
  .hero-dark .hero-text h1 {
    font-size: clamp(31px, 8.2vw, 39px);
    margin-bottom: 22px;
  }
  .hero-dark .hero-text p {
    margin-bottom: 24px;
  }
  .hero-dark .hero-cta {
    gap: 10px;
  }
  .hero-dark .hero-cta .btn {
    padding: 12px 15px;
    gap: 12px;
    font-size: 12px;
    min-height: 48px;
  }
  .hero-art {
    max-width: 160px; /* the logo stays a mark, not the whole screen */
  }
}
@media (max-width: 359px) {
  .hero-dark .hero-cta {
    gap: 8px;
  }
  .hero-dark .hero-cta .btn {
    padding-inline: 10px;
    gap: 8px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .hero-logo-stage canvas,
  .hero-logo-fallback {
    transition: none;
  }
}
