/* ==========================================================================
   Page-specific layouts: home hero, about, services, process, industries,
   work, insights, contact, legal
   ========================================================================== */

/* ---------- Home: hero ---------- */

.hero {
  position: relative;
  display: grid;
  grid-template-rows: 1fr auto;
  min-height: 100vh;
  min-height: 100svh;
  padding-top: var(--header-h);
  background: var(--paper);
  color: var(--ink);
  overflow: hidden;
  isolation: isolate;
}

/* six faint column rules: the page grid, made visible */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image: linear-gradient(90deg, rgba(16, 28, 53, 0.06) 1px, transparent 1px);
  background-size: calc((100% - 2 * var(--gutter)) / 6) 100%;
  background-position: var(--gutter) 0;
  -webkit-mask-image: linear-gradient(#000 55%, transparent 98%);
  mask-image: linear-gradient(#000 55%, transparent 98%);
  pointer-events: none;
}

.hero__scene {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.hero__canvas {
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1.2s ease;
}

.hero__scene.is-ready .hero__canvas {
  opacity: 1;
}

.hero__fallback {
  display: none;
  position: absolute;
  right: 2%;
  top: 14%;
  width: 56%;
  height: 76%;
}

.hero__scene.is-fallback .hero__fallback,
.no-js .hero__fallback {
  display: block;
}

.hero__scene.is-fallback .hero__canvas,
.hero__scene.is-fallback .hero__stations,
.no-js .hero__canvas,
.no-js .hero__stations {
  display: none;
}

.hero__fallback-line {
  fill: none;
  stroke: var(--blue);
  stroke-width: 3;
}

.hero__fallback-head {
  fill: none;
  stroke: var(--amber);
  stroke-width: 3;
}

.hero__fallback-nodes circle {
  fill: var(--paper);
  stroke: var(--navy);
  stroke-width: 2;
}

.hero__stations li {
  position: absolute;
  left: 0;
  top: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: -0.55rem 0 0 1.1rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--navy);
  opacity: 0;
  transition: opacity 0.7s ease;
  will-change: transform;
}

.hero__stations li::before {
  content: '';
  width: 1.1rem;
  height: 1px;
  background: currentColor;
  opacity: 0.5;
}

.hero__stations li.is-on {
  opacity: 1;
}

.hero__stations li:last-child {
  color: #9A6A00;
}

.hero__inner {
  position: relative;
  align-self: center;
  display: grid;
  justify-items: start;
  gap: clamp(1.25rem, 2.3vw, 2rem);
  padding-block: clamp(2rem, 6vh, 4.5rem);
}

.hero__line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.07em;
  margin-bottom: -0.07em;
}

.hero__line > span {
  display: block;
}

/* the last line steps out of the column: it stands out */
.hero__line--shift {
  padding-left: 1.05em;
}

.hero__equation {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 1rem;
  margin-top: 0.4rem;
  padding: 0.75rem 1.15rem;
  background: var(--navy);
  color: var(--paper);
  font-family: var(--font-display);
  font-size: clamp(0.75rem, 1.05vw, 0.95rem);
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.hero__equation-arrow {
  width: clamp(2.5rem, 6vw, 6rem);
  height: 1rem;
  fill: none;
  stroke: var(--amber);
  stroke-width: 1.5;
  overflow: visible;
}

.hero__lead {
  max-width: 31em;
  color: var(--ink-2);
}

.hero__actions {
  margin-top: 0.4rem;
}

.hero__foot {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  padding-bottom: clamp(1.25rem, 3vh, 2.25rem);
}

.hero__scroll {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  min-height: 44px;
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.hero__scroll-line {
  position: relative;
  width: 3rem;
  height: 1px;
  background: var(--rule-strong);
  overflow: hidden;
}

.hero__scroll-line::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--blue);
  animation: scroll-cue 2.4s var(--ease-in-out) infinite;
}

@keyframes scroll-cue {
  0% { transform: translateX(-101%); }
  55%, 100% { transform: translateX(101%); }
}

.hero__note {
  max-width: 21em;
}

/* hidden until the entrance sequence runs (JS + motion only) */
.js:not(.no-motion):not(.no-gsap) .hero__line > span {
  transform: translateY(108%);
}

.js:not(.no-motion):not(.no-gsap) [data-hero-item] {
  opacity: 0;
}

/* small laptops and landscape tablets: keep the copy clear of the start of the line */
@media (min-width: 900px) and (max-width: 1199px) {
  .hero__lead {
    max-width: 23em;
  }
}

@media (max-width: 899px) {
  .hero {
    grid-template-rows: auto auto auto;
    min-height: 0;
  }

  .hero__inner {
    order: 1;
    padding-block: 2.25rem 1rem;
  }

  /* the scene becomes its own band beneath the copy */
  .hero__scene {
    position: relative;
    inset: auto;
    z-index: 0;
    order: 2;
    height: clamp(18rem, 82vw, 30rem);
  }

  .hero__fallback {
    inset: 8% 6%;
    width: auto;
    height: auto;
  }

  .hero__foot {
    order: 3;
    padding-top: 0.5rem;
  }

  .hero__stations li {
    font-size: 0.5625rem;
    margin-left: 0.7rem;
  }

  .hero__stations li::before {
    width: 0.6rem;
  }
}

@media (max-width: 767px) {
  .hero__title {
    font-size: clamp(2.1rem, 11.4vw, 4.2rem);
  }

  .hero__line--shift {
    padding-left: 0.6em;
  }

  .hero__scroll {
    display: none;
  }

  .hero__equation {
    gap: 0.4rem 0.6rem;
    padding: 0.7rem 0.9rem;
    font-size: 0.6875rem;
    letter-spacing: 0.1em;
  }

  .hero__equation-arrow {
    width: 1.75rem;
  }
}
