/* ============================================
   home-products — the homepage hero with Giant Swarm's two products
   side by side (templates/home.html). Loaded by that template through
   require_css, not from base.html.

   Same visual language as the Agent Platform restyle draft
   (ap-min.css): Giant Swarm Black, a CSS glow standing in for
   artwork, large regular-weight type. The display size steps outside
   the type scale on purpose, as there - body text stays at
   --text-base.

     .gs-hp-hero           section, dark
     .gs-hp-art            glow + dot texture
     .gs-hp-hero__head     umbrella headline left, line + CTA right
     .gs-hp-products       the two product cards
     .gs-hp-product        one card (--ap: the Agent Platform)
     .gs-hp-product__btn   each card's button (gs-btn--inverted)
     .gs-hp-stats          stats row inside the platform stack card
     .gs-hp-logos          customer logos, the hero's last row
   ============================================ */

.gs-hp-hero {
  /* Page-only display size, see the header comment. */
  --hp-display: clamp(2.6rem, 4.7vw, 4.25rem);
  --hp-line-dark: rgba(255, 255, 255, 0.12);
  position: relative;
  overflow: hidden;
  background: var(--color-bg-darkest);
  color: var(--color-fg-on-dark);
  padding: 9.5rem 0 4.5rem; /* top clears the fixed header */
}

.gs-hp-hero__wrap {
  position: relative;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.gs-hp-kicker {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.75rem; /* label, not body text */
  font-weight: var(--weight-medium);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-fg-muted-on-dark);
}

/* ─── Art: glows in the CI colours over a dot field ──────────── */

.gs-hp-art {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(40% 55% at 85% 25%, rgba(255, 119, 0, 0.32), transparent 70%),
    radial-gradient(40% 50% at 70% 80%, rgba(246, 89, 84, 0.22), transparent 70%),
    radial-gradient(55% 70% at 0% 100%, rgba(0, 159, 255, 0.2), transparent 70%);
}

.gs-hp-art::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.5;
  background-image: radial-gradient(rgba(255, 255, 255, 0.35) 1px, transparent 1.2px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(70% 80% at 75% 35%, #000 10%, transparent 75%);
  mask-image: radial-gradient(70% 80% at 75% 35%, #000 10%, transparent 75%);
}

/* ─── Head ────────────────────────────────────────────────── */

.gs-hp-hero__head {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: 4rem;
  align-items: end;
  margin-bottom: 3.5rem;
}

.gs-hp-hero__title {
  margin: 1.5rem 0 0;
  font-size: var(--hp-display);
  font-weight: var(--weight-regular);
  line-height: 1.12;
  letter-spacing: -0.04em;
  color: var(--color-fg-on-dark);
  text-wrap: balance;
}

.gs-hp-hero__side {
  display: grid;
  gap: 1.5rem;
  justify-items: start;
}

.gs-hp-hero__side p {
  margin: 0;
  max-width: 30rem;
  color: var(--color-fg-muted-on-dark);
}

/* ─── The two products ────────────────────────────────────── */

.gs-hp-products {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.gs-hp-product {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  border-radius: 22px;
  padding: 2.25rem 2.25rem 0;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 0 0 1px var(--hp-line-dark);
}

/* The new product carries a warm tint from the CTA gradient's colours,
   so the two cards read as siblings that are not the same thing. */
.gs-hp-product--ap {
  background: linear-gradient(160deg, rgba(255, 119, 0, 0.12), rgba(246, 89, 84, 0.06) 40%, rgba(255, 255, 255, 0.03));
  box-shadow: inset 0 0 0 1px rgba(255, 154, 87, 0.35);
}

.gs-hp-product__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.gs-hp-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: var(--color-brand-accent);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: var(--weight-medium);
  line-height: 1.4;
}

.gs-hp-product__title {
  margin: 0;
  font-size: var(--text-h3);
  font-weight: var(--weight-regular);
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--color-fg-on-dark);
}

.gs-hp-product__sub {
  margin: 0;
  font-weight: var(--weight-medium);
  color: var(--color-fg-on-dark);
}

.gs-hp-product__desc {
  margin: 0;
  max-width: 40ch;
  color: var(--color-fg-muted-on-dark);
}

/* Each card's way in is a button, not a text link: the products are
   the two main paths from the homepage. White (inverted) so the
   gradient stays with Book a Demo, the one primary CTA. */
.gs-hp-product__btn {
  align-self: start;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.gs-hp-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: var(--weight-medium);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-fg-muted-on-dark);
}

.gs-hp-meta li::before {
  content: "/ ";
  color: var(--color-brand-accent);
}

.gs-hp-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin: auto 0 0;
  padding: 1.25rem 0 2.25rem;
  list-style: none;
  border-top: 1px solid var(--hp-line-dark);
}

.gs-hp-stats__value {
  display: block;
  font-size: var(--text-h4);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--color-fg-on-dark);
}

.gs-hp-stats__label {
  display: block;
  margin-top: 0.3rem;
  font-size: var(--text-sm);
  line-height: 1.3;
  color: var(--color-fg-muted-on-dark);
}

.gs-hp-product__shot {
  margin-top: auto;
  padding-top: 0.75rem;
}

/* Only the top of the start page shows; it hints at the product rather
   than explaining it - the Agent Platform page does that. */
.gs-hp-product__shot img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 6.2;
  object-fit: cover;
  object-position: left top;
  border-radius: 12px 12px 0 0;
  box-shadow: 0 0 0 1px var(--hp-line-dark);
}

/* The screenshot opens the shared lightbox (gs-ap-shot, gallery.js), as
   on the Agent Platform page; head and caption feed the dialog only. */
.gs-hp-product__shot.gs-ap-shot {
  display: block;
}

.gs-hp-product__shot .gs-ap-shot__head,
.gs-hp-product__shot .gs-ap-shot__caption {
  display: none;
}

/* One screenshot: just the image and the close button, no arrows or
   caption row. */
.gs-ap-lightbox--bare .gs-ap-lightbox__bar {
  display: none;
}

.gs-ap-lightbox--bare .gs-ap-lightbox__img {
  max-height: 88vh;
}

.gs-hp-product__shot .gs-ap-shot__trigger {
  margin-top: 0;
  border-radius: 12px 12px 0 0;
  box-shadow: 0 0 0 1px var(--hp-line-dark);
}

/* The shared logo pill sits on our darker background here. */
.gs-hp-hero .gs-customer-logos--pill {
  --gs-customer-logos-bg: var(--color-bg-darkest);
  position: relative;
}

/* ─── Customer logos: the hero's last row ──────────────────── */

/* A hairline across both cards, the label on the left, the logos
   spread over the rest so the row ends on the cards' right edge. */
.gs-hp-logos {
  display: flex;
  align-items: center;
  gap: clamp(1.25rem, 3vw, 3rem);
  margin-top: 4rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--hp-line-dark, var(--apm-line-dark));
}

.gs-hp-logos__label {
  flex: none;
  max-width: 11rem;
  line-height: 1.6;
}

/* Short vertical rule between label and logos, fading out at both
   ends, so the label reads as a caption to the row and not as part of
   the cards above. */
.gs-hp-logos__divider {
  flex: none;
  width: 1px;
  height: 2.5rem;
  background: linear-gradient(transparent, rgba(255, 255, 255, 0.3), transparent);
}

/* One line on every desktop width: the gaps shrink first, then the
   logos themselves (object-fit keeps their shape). */
.gs-hp-logos__row {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(0.75rem, 2vw, 2rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.gs-hp-logos__row li {
  min-width: 0;
}

/* Every logo in solid white, whatever colour its file is. Heights go
   by shape so the logos read the same size: wide wordmarks 24px, the
   stacked Börse Stuttgart logo and the Telekom mark taller. */
.gs-hp-logos__row img {
  display: block;
  height: 24px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.7;
}


.gs-hp-logos__row img.gs-hp-logos__img--stacked {
  height: 32px;
}

.gs-hp-logos__row img.gs-hp-logos__img--mark {
  height: 38px;
}

/* The Vodafone wordmark is thin and reads small next to the others. */
.gs-hp-logos__row img[src*="vodafone"] {
  height: 29px;
}

/* Looping variant (--marquee): the row is in the markup twice, inside
   a track that fades out at both ends; both copies slide left by their
   own width, so the loop is seamless. One pass every 24s, linear. */
.gs-hp-logos__track {
  flex: 1;
  min-width: 0;
  display: flex;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 12%, #000 88%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 12%, #000 88%, transparent 100%);
}

.gs-hp-logos--marquee .gs-hp-logos__row {
  flex: none;
  justify-content: flex-start;
  gap: 4.75rem;
  padding-right: 4.75rem; /* the same gap between the two copies */
  animation: gs-hp-logos-loop 24s linear infinite;
}

.gs-hp-logos--marquee .gs-hp-logos__row img {
  max-width: none;
  opacity: 0.78;
}

@keyframes gs-hp-logos-loop {
  to { transform: translateX(-100%); }
}

@media (prefers-reduced-motion: reduce) {
  .gs-hp-logos--marquee .gs-hp-logos__row {
    animation: none;
  }
}

/* ─── Mobile ──────────────────────────────────────────────── */

@media (max-width: 900px) {
  .gs-hp-hero {
    padding: 7.5rem 0 3rem;
  }

  .gs-hp-hero__head,
  .gs-hp-products {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .gs-hp-hero__head {
    margin-bottom: 2.5rem;
  }

  .gs-hp-product {
    padding: 1.75rem 1.5rem 0;
  }

  .gs-hp-product__title {
    font-size: var(--text-h4);
  }

  .gs-hp-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .gs-hp-logos {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
    margin-top: 3rem;
    padding-top: 2rem;
  }

  .gs-hp-logos__label {
    max-width: none;
  }

  .gs-hp-logos__divider {
    display: none;
  }

  .gs-hp-logos__row {
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 1.5rem 2.25rem;
  }

  .gs-hp-logos__track {
    width: 100%;
  }

  .gs-hp-logos--marquee .gs-hp-logos__row {
    flex-wrap: nowrap;
    gap: 4rem;
    padding-right: 4rem;
  }
}
