/* Homepage hero inspired by the animated marquee reference. */
.hero-wrap--marquee {
  --marquee-card-w: clamp(17rem, 25vw, 28rem);
  background: #1f1f1f !important;
  color: #f7f7fa;
  overflow: hidden;
  padding-bottom: clamp(3rem, 5vw, 5rem);
  display: block;
}
.hero--marquee {
  min-height: 0;
  height: auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  background: #1f1f1f;
  color: #f7f7fa;
  padding-top: calc(var(--header-h, 6rem) + clamp(2.5rem, 7vh, 5.5rem));
}
.hero--marquee .hero-marquee__content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex: 0 0 auto;
  justify-content: center;
  padding-top: clamp(3rem, 7vh, 6rem);
  padding-bottom: clamp(6rem, 10vh, 9rem);
  margin-bottom: 0;
  isolation: isolate;
}
.hero--marquee .hero__kicker {
  display: inline-flex;
  align-items: center;
  margin: 0 0 1.15rem;
  padding: .55rem 1rem;
  border: 1px solid rgb(255 255 255 / .22);
  border-radius: 999px;
  color: #d1d1d8;
  background: rgb(255 255 255 / .04);
  font-size: clamp(.78rem, .8vw, .95rem);
  font-weight: 600;
  letter-spacing: 0;
}
.hero--marquee .hero__title {
  margin: 0;
  color: #f8f8fb;
  white-space: normal;
  font-size: clamp(3rem, 6.4vw, 6.4rem);
  line-height: .98;
  letter-spacing: -.065em;
}
.hero--marquee .hero__title-visual {
  display: block;
}
.hero--marquee .hero__title .mask { display: inline-block; overflow: visible; }
.hero--marquee .hero__sep { padding-inline: .16em; color: #6350df; }
.hero--marquee .hero__lead {
  max-width: min(44rem, 90vw);
  margin-top: clamp(1rem, 2vw, 1.65rem);
  color: #c1c1cb;
  font-size: clamp(1rem, 1.35vw, 1.28rem);
  line-height: 1.55;
  letter-spacing: -.025em;
}
.hero--marquee .hero__copy .btn,
.hero--marquee .btn {
  margin-top: clamp(1.4rem, 2.5vw, 2.1rem);
}
.hero--marquee .hero__visual,
.hero--marquee .hero-wrap__bg { display: none !important; }
.hero-marquee {
  position: relative;
  width: 100%;
  height: clamp(10.5rem, 25vw, 19rem);
  overflow: hidden;
  isolation: isolate;
  margin-top: clamp(1rem, 3vh, 2rem);
  flex: 0 0 auto;
  z-index: 1;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 8%, #000 88%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 8%, #000 88%, transparent 100%);
}
.hero-marquee::before,
.hero-marquee::after {
  content: "";
  position: absolute;
  z-index: 2;
  top: 0;
  bottom: 0;
  width: clamp(1.5rem, 7vw, 7rem);
  pointer-events: none;
}
.hero-marquee::before { left: 0; background: linear-gradient(90deg, #1f1f1f, transparent); }
.hero-marquee::after { right: 0; background: linear-gradient(270deg, #1f1f1f, transparent); }
.hero-marquee__track {
  display: flex;
  align-items: center;
  gap: clamp(.8rem, 1.5vw, 1.4rem);
  width: max-content;
  height: 100%;
  padding: .75rem 0;
  animation: synapse-project-marquee 48s linear infinite;
  will-change: transform;
}
.hero-marquee:hover .hero-marquee__track,
.hero-marquee:focus-within .hero-marquee__track { animation-play-state: paused; }
.hero-marquee__card {
  position: relative;
  display: block;
  flex: 0 0 var(--marquee-card-w);
  width: var(--marquee-card-w);
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: clamp(.8rem, 1.5vw, 1.35rem);
  background: #29292f;
  box-shadow: 0 18px 44px rgb(0 0 0 / .34);
  transform: rotate(-1.6deg) translateZ(0);
  transition: transform .45s cubic-bezier(.2,.7,.2,1), box-shadow .45s ease;
}
.hero-marquee__card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .7s cubic-bezier(.2,.7,.2,1);
}
.hero-marquee__card:nth-child(even) { transform: rotate(1.7deg) translateZ(0); }
.hero-marquee__card:nth-child(3n) { transform: rotate(-2.2deg) translateZ(0); }
.hero-marquee__card:hover,
.hero-marquee__card:focus-visible { transform: rotate(0deg) scale(1.025) translateZ(0); box-shadow: 0 22px 52px rgb(0 0 0 / .42); z-index: 3; }
.hero-marquee__card:hover img,
.hero-marquee__card:focus-visible img { transform: scale(1.045); }
.hero-marquee__card::after {
  content: "";
  position: absolute;
  inset: 35% 0 0;
  background: linear-gradient(transparent, rgb(0 0 0 / .66));
  pointer-events: none;
}
.hero-marquee__card span {
  position: absolute;
  z-index: 1;
  inset: auto 1rem .85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: #fff;
  font-size: clamp(.9rem, 1vw, 1.15rem);
  font-weight: 650;
  letter-spacing: -.025em;
}
.hero-marquee__card span b { font-size: 1.2em; font-weight: 500; }
.hero-marquee__card:focus-visible { outline: 3px solid #6350df; outline-offset: -4px; }
.home .header { --fg: #f7f7fa; --scrim: rgb(31 31 31 / .9); }
@keyframes synapse-project-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (max-width: 48em) {
  .hero--marquee { min-height: 0; height: auto; padding-top: calc(var(--header-h, 5rem) + 1.5rem); }
  .hero--marquee .hero-marquee__content { flex: 0 0 auto; padding-inline: var(--gutter, 1.25rem); padding-top: 1.5rem; padding-bottom: 4.5rem; margin-bottom: 0; }
  .hero--marquee .hero__title { font-size: clamp(2.7rem, 11.8vw, 4.7rem); line-height: 1.02; }
  .hero--marquee .hero__title-visual { display: flex; flex-wrap: wrap; justify-content: center; column-gap: .15em; }
  .hero--marquee .hero__sep { display: inline-block; }
  .hero--marquee .hero__lead { font-size: 1rem; max-width: 36rem; }
  .hero-marquee { height: clamp(9.5rem, 38vw, 13rem); margin-top: 1rem; }
  .hero-wrap--marquee { --marquee-card-w: min(72vw, 22rem); }
  .hero-marquee__track { animation-duration: 38s; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-marquee__track { animation: none; }
  .hero-marquee { overflow-x: auto; mask-image: none; -webkit-mask-image: none; }
}


/* Hero reference treatment: featured project cards sit behind the lower hero copy. */
.hero-wrap--marquee {
  position: relative;
  min-height: 100svh;
  padding-bottom: 0;
  isolation: isolate;
}
.hero--marquee {
  position: relative;
  min-height: 100svh;
  height: auto;
  padding-bottom: 0;
}
.hero--marquee .hero-marquee__content {
  position: relative;
  z-index: 4;
  padding-top: clamp(3rem, 6.5vh, 5.5rem);
  padding-bottom: clamp(13rem, 25vh, 19rem);
}
.hero--marquee .hero__lead,
.hero--marquee .hero__kicker,
.hero--marquee .hero__title,
.hero--marquee .btn {
  position: relative;
  z-index: 4;
}
.hero--marquee .hero__lead {
  text-shadow: 0 1px 16px rgb(31 31 31 / .65);
}
.hero--marquee .hero-marquee {
  position: absolute;
  z-index: 2;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: clamp(17rem, 37vh, 25rem);
  margin-top: 0;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, rgb(0 0 0 / .38) 14%, #000 35%, #000 86%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, rgb(0 0 0 / .38) 14%, #000 35%, #000 86%, transparent 100%);
}
.hero--marquee .hero-marquee::before {
  background: linear-gradient(90deg, #1f1f1f 0%, rgb(31 31 31 / .18) 20%, transparent 45%);
}
.hero--marquee .hero-marquee::after {
  background: linear-gradient(270deg, #1f1f1f 0%, rgb(31 31 31 / .18) 20%, transparent 45%);
}
.hero--marquee .hero-marquee__track {
  align-items: center;
  padding-top: 1.4rem;
  padding-bottom: 1.4rem;
}
@media (max-width: 48em) {
  .hero-wrap--marquee,
  .hero--marquee { min-height: 94svh; }
  .hero--marquee .hero-marquee__content {
    padding-top: 1.5rem;
    padding-bottom: clamp(13rem, 29vh, 17rem);
  }
  .hero--marquee .hero__lead {
    position: relative;
    z-index: 4;
    text-shadow: 0 2px 12px rgb(31 31 31 / .9);
  }
  .hero--marquee .hero-marquee {
    height: clamp(15rem, 36vh, 19rem);
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, rgb(0 0 0 / .35) 13%, #000 34%, #000 88%, transparent 100%);
    mask-image: linear-gradient(to bottom, transparent 0%, rgb(0 0 0 / .35) 13%, #000 34%, #000 88%, transparent 100%);
  }
}

/* Final viewport anchoring fix: keep the marquee inside the first viewport so
   its cards rise behind the hero copy instead of being pushed below the fold. */
.hero-wrap--marquee {
  height: 100svh;
  min-height: 100svh;
  padding-bottom: 0 !important;
  overflow: hidden;
}
.hero--marquee {
  height: 100svh !important;
  min-height: 100svh !important;
  max-height: 100svh;
  overflow: hidden;
  padding-top: calc(var(--header-h, 6rem) + clamp(2rem, 5vh, 4rem));
}
.hero--marquee .hero-marquee__content {
  padding-top: clamp(2rem, 4vh, 3.5rem);
  padding-bottom: 0 !important;
  margin-bottom: 0;
}
.hero--marquee .hero-marquee {
  top: auto;
  bottom: 0;
  height: clamp(18rem, 42vh, 25rem);
  z-index: 2;
  margin: 0;
  pointer-events: auto;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, rgb(0 0 0 / .35) 8%, #000 27%, #000 88%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, rgb(0 0 0 / .35) 8%, #000 27%, #000 88%, transparent 100%);
}
.hero--marquee .hero-marquee__content,
.hero--marquee .hero__kicker,
.hero--marquee .hero__title,
.hero--marquee .hero__lead,
.hero--marquee .btn {
  position: relative;
  z-index: 5;
}
@media (max-width: 48em) {
  .hero-wrap--marquee,
  .hero--marquee {
    height: 100svh !important;
    min-height: 100svh !important;
    max-height: 100svh;
  }
  .hero--marquee { padding-top: calc(var(--header-h, 5rem) + 1rem); }
  .hero--marquee .hero-marquee__content {
    padding-top: 1.25rem;
    padding-bottom: 0 !important;
  }
  .hero--marquee .hero__title { font-size: clamp(2.45rem, 10vw, 4rem); }
  .hero--marquee .hero__lead { max-width: 35rem; }
  .hero--marquee .hero-marquee { height: clamp(15rem, 35vh, 19rem); }
}
@media (max-height: 760px) and (min-width: 48.01em) {
  .hero--marquee { padding-top: calc(var(--header-h, 5rem) + 1.5rem); }
  .hero--marquee .hero-marquee__content { padding-top: 1.25rem; }
  .hero--marquee .hero__title { font-size: clamp(3rem, 5.6vw, 5rem); }
  .hero--marquee .hero-marquee { height: 34vh; }
}


/* Definitive hero composition: bring the project cards up behind the copy,
   rather than leaving them cropped at the bottom of the viewport. */
.hero-wrap--marquee {
  position: relative !important;
  height: 100svh !important;
  min-height: 100svh !important;
  overflow: hidden !important;
}
.hero--marquee {
  position: relative !important;
  height: 100svh !important;
  min-height: 100svh !important;
  max-height: 100svh !important;
  overflow: hidden !important;
}
.hero--marquee .hero-marquee {
  position: absolute !important;
  top: 49% !important;
  right: 0 !important;
  bottom: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: auto !important;
  margin: 0 !important;
  z-index: 2 !important;
  overflow: hidden !important;
  -webkit-mask-image: linear-gradient(to bottom, rgb(0 0 0 / .12) 0%, #000 18%, #000 88%, transparent 100%) !important;
  mask-image: linear-gradient(to bottom, rgb(0 0 0 / .12) 0%, #000 18%, #000 88%, transparent 100%) !important;
}
.hero--marquee .hero-marquee__track {
  height: 100% !important;
  align-items: flex-start !important;
  padding-top: clamp(1.25rem, 3vh, 2.5rem) !important;
  padding-bottom: 1.5rem !important;
}
.hero--marquee .hero-marquee__content {
  position: relative !important;
  z-index: 5 !important;
  padding-bottom: 0 !important;
}
.hero--marquee .hero__kicker,
.hero--marquee .hero__title,
.hero--marquee .hero__lead,
.hero--marquee .hero-marquee__content .btn {
  position: relative !important;
  z-index: 6 !important;
}
@media (max-width: 48em) {
  .hero--marquee .hero-marquee {
    top: 61% !important;
    -webkit-mask-image: linear-gradient(to bottom, rgb(0 0 0 / .12) 0%, #000 15%, #000 88%, transparent 100%) !important;
    mask-image: linear-gradient(to bottom, rgb(0 0 0 / .12) 0%, #000 15%, #000 88%, transparent 100%) !important;
  }
  .hero--marquee .hero-marquee__track { padding-top: 1rem !important; }
}

/* Reference-matched marquee overlap: lift cards into the hero content and blur
   the card imagery only where it passes behind the text for contrast. */
.hero--marquee {
  position: relative !important;
  isolation: isolate !important;
  padding-top: 0 !important;
}
.hero--marquee::before {
  content: "";
  position: absolute;
  z-index: 3;
  pointer-events: none;
  top: 25%;
  left: 0;
  right: 0;
  bottom: 12%;
  background: linear-gradient(
    to bottom,
    #1f1f1f 0%,
    rgb(31 31 31 / .94) 14%,
    rgb(31 31 31 / .78) 36%,
    rgb(31 31 31 / .46) 63%,
    rgb(31 31 31 / .10) 100%
  );
  -webkit-backdrop-filter: blur(9px);
  backdrop-filter: blur(9px);
}
.hero--marquee .hero-marquee {
  top: 27% !important;
  bottom: 0 !important;
  height: auto !important;
  z-index: 2 !important;
  -webkit-mask-image: linear-gradient(to bottom, rgb(0 0 0 / .2) 0%, #000 12%, #000 88%, transparent 100%) !important;
  mask-image: linear-gradient(to bottom, rgb(0 0 0 / .2) 0%, #000 12%, #000 88%, transparent 100%) !important;
}
.hero--marquee .hero-marquee__content {
  z-index: 5 !important;
  padding-top: calc(var(--header-h, 6rem) + clamp(3rem, 7vh, 5.5rem)) !important;
  padding-bottom: 0 !important;
}
.hero--marquee .hero__kicker,
.hero--marquee .hero__title,
.hero--marquee .hero__lead,
.hero--marquee .hero-marquee__content .btn {
  position: relative !important;
  z-index: 6 !important;
}
.hero--marquee .hero__lead {
  text-shadow: 0 2px 18px rgb(31 31 31 / .9) !important;
}
@media (max-width: 48em) {
  .hero--marquee::before {
    top: 28%;
    bottom: 8%;
    background: linear-gradient(to bottom, #1f1f1f 0%, rgb(31 31 31 / .94) 24%, rgb(31 31 31 / .72) 55%, rgb(31 31 31 / .12) 100%);
    -webkit-backdrop-filter: blur(7px);
    backdrop-filter: blur(7px);
  }
  .hero--marquee .hero-marquee {
    top: 38% !important;
  }
  .hero--marquee .hero-marquee__content {
    padding-top: calc(var(--header-h, 5rem) + 2.25rem) !important;
  }
}
