/* ==========================================================================
   Homepage sections, Forty-Five theme. Loaded by index.html only, after
   styles.css (tokens, primitives, nav, footer).
   ========================================================================== */

/* Hero: one glyph, four operations, then it multiplies
   ========================================================================== */
.hero {
  --band-height: clamp(5rem, 9vh, 7rem);
  position: relative;
  height: 300vh;
  background: var(--night);
}
/* the first fold is the stage plus the services ticker beneath it; both stick
   for the length of the hero so the ticker stays in view while the x multiplies */
.hero-stage {
  position: sticky;
  top: 0;
  height: calc(100vh - var(--band-height));
  height: calc(100svh - var(--band-height));
  overflow: hidden;
}
.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.hero-fallback {
  display: none;
  position: absolute;
  right: 6vw;
  top: 50%;
  width: min(42vw, 620px);
  height: auto;
  transform: translateY(-50%);
}
.no-webgl .hero-canvas { display: none; }
.no-webgl .hero-fallback { display: block; }

.hero-copy {
  position: absolute;
  left: var(--gutter);
  bottom: clamp(3rem, 9vh, 7rem);
  z-index: 2;
  max-width: min(42rem, 48vw);
  pointer-events: none;
  will-change: transform, opacity;
}
.hero-copy a { pointer-events: auto; }
.js-motion .hero-copy:not(.hero-copy--shown) { visibility: hidden; }

.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1.6rem;
  font: 500 0.72rem/1 var(--font-mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--white-60);
}
.hero-eyebrow::before {
  content: "";
  width: 2.25rem;
  height: 1px;
  background: var(--white-40);
}
.hero-title {
  font: 600 clamp(3.1rem, 7.3vw, 8.75rem)/0.9 var(--font-display);
  letter-spacing: -0.048em;
}
.hero-lede {
  max-width: 27rem;
  margin-top: 1.75rem;
  font: 400 clamp(1rem, 0.35vw + 0.92rem, 1.18rem)/1.5 var(--font-display);
  color: var(--white-75);
}
.hero-cta { margin-top: 2.1rem; }

.hero-payoff {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  padding: 0 var(--gutter);
  opacity: 0;
  pointer-events: none;
}
.hero-payoff::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(52% 40% at 50% 50%, rgba(3, 4, 6, 0.82), rgba(3, 4, 6, 0) 100%);
}
.hero-payoff-line {
  position: relative;
  max-width: 15ch;
  font: 600 clamp(2.25rem, 5.2vw, 5.75rem)/0.96 var(--font-display);
  letter-spacing: -0.045em;
  text-align: center;
  text-wrap: balance;
}

@media (max-width: 900px) {
  .hero-copy { max-width: none; right: var(--gutter); top: calc(var(--nav-height) + 1.5rem + 5vh); bottom: auto; }
  .hero-lede { max-width: 22rem; margin-top: 1.25rem; }
  .hero-cta { margin-top: 1.5rem; }
  .hero-fallback { top: auto; right: var(--gutter); bottom: 2rem; width: 52vw; transform: none; }
}
/* narrow but landscape (a short window): the glyph keeps its desktop seat on
   the right, so the copy stays out of its way */
@media (max-width: 900px) and (min-aspect-ratio: 21/20) {
  .hero-copy { max-width: 50vw; }
}
@media (prefers-reduced-motion: reduce) {
  .hero { height: auto; }
  .hero-payoff { display: none; }
}

/* Services band: where the hero hands off
   ========================================================================== */
.services-band {
  position: sticky;
  top: calc(100vh - var(--band-height));
  top: calc(100svh - var(--band-height));
  z-index: 4;
  height: var(--band-height);
  overflow: hidden;
  background: var(--night);
  border-top: 1px solid var(--white-75);
  border-bottom: 1px solid var(--white-75);
}
.services-band-track { display: flex; width: max-content; height: 100%; }
.services-band-item {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  padding: 0 2.5rem 0 0;
  font: 600 clamp(1.5rem, 2.6vw, 2.6rem)/1 var(--font-display);
  letter-spacing: -0.03em;
  white-space: nowrap;
}
.services-band-item::after {
  content: "\00D7";
  font-weight: 300;
  color: var(--white-40);
}
@media (prefers-reduced-motion: no-preference) {
  .services-band-track { animation: services-band-marquee 46s linear infinite; }
}
@keyframes services-band-marquee {
  to { transform: translateX(-50%); }
}

/* Intro: subtract (we've been on the inside)
   ========================================================================== */
.intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2.5rem, 6vw, 7rem);
  align-items: start;
}
.intro-copy { display: grid; gap: 1.4rem; max-width: 34rem; }
.intro-copy .h2 { margin-bottom: 1rem; }
.intro-copy p {
  font: 400 clamp(1.05rem, 0.4vw + 0.95rem, 1.25rem)/1.55 var(--font-display);
  color: var(--white-75);
}
.intro-copy .intro-thesis {
  font-weight: 500;
  font-size: clamp(1.35rem, 1vw + 1.1rem, 1.9rem);
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--paper);
}
.intro-copy .btn { justify-self: start; margin-top: 1rem; }


.intro-media { position: relative; aspect-ratio: 1 / 0.92; }
.intro-photo { position: absolute; }
.intro-photo--wide { top: 0; right: 0; width: 80%; aspect-ratio: 1.92; }
.intro-photo--tall { left: 0; bottom: 0; width: 40%; aspect-ratio: 3 / 4; }

/* the harmony film: muted preview until asked for sound */
.intro-photo--wide.film { z-index: 2; aspect-ratio: 16 / 9; }
@media (max-width: 900px) {
  .intro-grid { grid-template-columns: 1fr; }
  .intro-media { aspect-ratio: 1 / 1.05; }
  .intro-photo--wide { width: 92%; }
  .intro-photo--tall { width: 52%; }
}

/* Partner: add (senior people, the names they've worked inside)
   ========================================================================== */
.partner-top {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(2rem, 5vw, 6rem);
  align-items: end;
  margin-bottom: clamp(3rem, 6vw, 5rem);
}
.partner-lede {
  font: 400 clamp(1.05rem, 0.4vw + 0.95rem, 1.25rem)/1.55 var(--font-display);
  color: var(--white-75);
}

.logo-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  border-top: var(--line);
  border-left: var(--line);
}
.logo-cell {
  position: relative;
  display: grid;
  place-items: center;
  height: clamp(6rem, 10vw, 9rem);
  border-right: var(--line);
  border-bottom: var(--line);
}
.logo-cell::before {
  content: "";
  position: absolute;
  top: -7px;
  left: -7px;
  width: 13px;
  height: 13px;
  background:
    linear-gradient(var(--white-40), var(--white-40)) center / 1px 100% no-repeat,
    linear-gradient(var(--white-40), var(--white-40)) center / 100% 1px no-repeat;
}
/* white, ink-trimmed logos; --w is each mark's width at a 222px cell, sized
   so every mark carries about the same area, and --logo-unit scales it with the cell */
.logo-grid { --logo-unit: min(1.2px, calc((100vw - 2 * var(--gutter)) / 1332)); }
.logo-cell img {
  width: calc(var(--w) * var(--logo-unit));
  max-width: 72%;
  height: auto;
  opacity: 0.55;
  transition: opacity var(--dur) var(--ease);
}
.logo-cell:hover img { opacity: 1; }

@media (max-width: 900px) {
  .partner-top { grid-template-columns: 1fr; }
  .logo-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    --logo-unit: calc((100vw - 2 * var(--gutter)) / 666);
  }
}

/* Values: what we stand for (paper)
   ========================================================================== */
.values-top {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(2rem, 5vw, 6rem);
  align-items: end;
  margin-bottom: clamp(3rem, 6vw, 5rem);
}
.values-top p {
  font: 400 clamp(1.05rem, 0.4vw + 0.95rem, 1.25rem)/1.55 var(--font-display);
  color: var(--black-75);
}
.values-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: var(--line);
}
.value {
  display: grid;
  align-content: start;
  gap: 1rem;
  min-height: clamp(15rem, 24vw, 21rem);
  padding: 1.75rem clamp(1rem, 2vw, 2rem) 2rem;
  border-left: var(--line);
}
.value:first-child { border-left: 0; padding-left: 0; }
.value-index {
  margin-bottom: auto;
  font: 500 0.7rem/1 var(--font-mono);
  letter-spacing: 0.16em;
  color: var(--black-60);
}
.value-title {
  margin-top: clamp(3rem, 6vw, 6rem);
  font: 600 clamp(1.4rem, 1.2vw + 1rem, 2rem)/1.05 var(--font-display);
  letter-spacing: -0.03em;
}
.value-text { font: 400 1.02rem/1.5 var(--font-display); color: var(--black-75); }

@media (max-width: 900px) {
  .values-top { grid-template-columns: 1fr; }
  .values-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .value:nth-child(3) { border-left: 0; padding-left: 0; }
  .value:nth-child(n + 3) { border-top: var(--line); }
}
@media (max-width: 560px) {
  .values-grid { grid-template-columns: 1fr; }
  .value { border-left: 0; padding-left: 0; min-height: 0; }
  .value + .value { border-top: var(--line); }
  .value-title { margin-top: 1.5rem; }
}

/* Solutions: divide (five ways in)
   ========================================================================== */
.solutions-top {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(2rem, 5vw, 6rem);
  align-items: end;
  margin-bottom: clamp(3rem, 6vw, 5rem);
}
.solutions-aside { display: grid; gap: 1.75rem; justify-items: start; }
.solutions-aside p {
  font: 400 clamp(1.05rem, 0.4vw + 0.95rem, 1.25rem)/1.55 var(--font-display);
  color: var(--white-75);
}
.solutions-list { border-top: var(--line); }
.solutions-row {
  position: relative;
  display: grid;
  grid-template-columns: clamp(3rem, 8vw, 7rem) 1fr auto;
  align-items: center;
  padding: clamp(1.25rem, 2.4vw, 2.25rem) 0;
  border-bottom: var(--line);
  overflow: hidden;
}
.solutions-row::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--indigo);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.6s var(--ease);
}
.solutions-index {
  font: 500 0.75rem/1 var(--font-mono);
  letter-spacing: 0.14em;
  color: var(--white-40);
  transition: transform 0.6s var(--ease);
}
.solutions-title {
  font: 600 clamp(2rem, 5vw, 5rem)/1 var(--font-display);
  letter-spacing: -0.045em;
  transition: transform 0.6s var(--ease);
}
.solutions-arrow {
  width: clamp(1.75rem, 3vw, 2.75rem);
  height: auto;
  margin-right: 0.5rem;
  transition: transform 0.6s var(--ease);
}
.solutions-row:hover::before,
.solutions-row:focus-visible::before { transform: scaleY(1); }
.solutions-row:hover .solutions-title,
.solutions-row:hover .solutions-index { transform: translateX(1.25rem); }
.solutions-row:hover .solutions-arrow { transform: rotate(45deg); }
.solutions-row:hover .solutions-index { color: var(--white-75); }
.solutions-row:focus-visible { outline: 1px solid var(--paper); outline-offset: -1px; }
.solutions-list { position: relative; z-index: 0; }

@media (max-width: 900px) {
  .solutions-top { grid-template-columns: 1fr; }
}

/* Partnership: multiply (software that compounds)
   ========================================================================== */
.partnership-title {
  max-width: 15ch;
  font: 600 clamp(2.6rem, 6.2vw, 7rem)/0.94 var(--font-display);
  letter-spacing: -0.048em;
  text-wrap: balance;
}
.partnership-cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.5rem, 3vw, 3.5rem);
  max-width: 58rem;
  margin: clamp(2.5rem, 5vw, 4.5rem) 0 0 auto;
}
.partnership-cols p {
  font: 400 clamp(1rem, 0.3vw + 0.95rem, 1.15rem)/1.6 var(--font-display);
  color: var(--white-75);
}

.gallery {
  margin: clamp(4rem, 8vw, 7rem) calc(-1 * var(--gutter)) 0;
  padding: 1rem var(--gutter);
  overflow: hidden;
  touch-action: pan-y;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}
.gallery--dragging { cursor: grabbing; }
.gallery img { pointer-events: none; -webkit-user-drag: none; }
.gallery-track {
  display: flex;
  gap: clamp(1rem, 2vw, 2rem);
  width: max-content;
  will-change: transform;
}
.gallery-item { width: clamp(16rem, 28vw, 27rem); }
.gallery-item .frame { aspect-ratio: 4 / 5; }
.gallery-caption {
  display: flex;
  justify-content: space-between;
  margin-top: 0.9rem;
  font: 500 0.68rem/1 var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--white-40);
}

@media (max-width: 900px) {
  .partnership-cols { grid-template-columns: 1fr; }
  .gallery-item { width: 74vw; }
}

/* Process: the dial (align, plan, build, multiply)
   ========================================================================== */
.process {
  position: relative;
  height: 420vh;
  background: var(--night);
}
.process-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  column-gap: clamp(1.5rem, 4vw, 4rem);
  padding: calc(var(--nav-height) + 1.5rem) var(--gutter) 2.5rem;
  overflow: hidden;
}
.process-stage .section-head { grid-column: 1 / -1; margin-bottom: 0; }
.process-intro { align-self: center; display: grid; gap: 1.5rem; justify-items: start; }
.process-intro p {
  font: 400 clamp(1.05rem, 0.4vw + 0.95rem, 1.25rem)/1.5 var(--font-display);
  color: var(--white-75);
}

.process-dial {
  position: relative;
  align-self: center;
  justify-self: center;
  width: min(100%, calc(100svh - var(--nav-height) - 8rem));
  aspect-ratio: 1;
}
.process-canvas {
  position: absolute;
  inset: 9%;
  width: 82%;
  height: 82%;
  border-radius: 50%;
}
.process-ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.process-ring-track { stroke: var(--white-10); }
.process-ring-fill { stroke: var(--paper); }
.process-ring-tick { stroke: var(--white-40); }
.process-mark {
  position: absolute;
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  margin: -1.2rem 0 0 -1.2rem;
  border: 1px solid var(--white-25);
  border-radius: 50%;
  background: var(--night);
  font: 400 1.05rem/1 var(--font-display);
  color: var(--white-40);
  transition: color var(--dur-fast), border-color var(--dur-fast);
}
.process-mark--on { color: var(--paper); border-color: var(--paper); }
.process-mark:nth-of-type(1) { left: 50%; top: 0; }
.process-mark:nth-of-type(2) { left: 100%; top: 50%; }
.process-mark:nth-of-type(3) { left: 50%; top: 100%; }
.process-mark:nth-of-type(4) { left: 0; top: 50%; }

.process-steps { position: relative; align-self: center; display: grid; }
.process-step {
  grid-area: 1 / 1;
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  transition: opacity 0.5s var(--ease), transform 0.7s var(--ease), visibility 0s 0.5s;
}
.process-step--on {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 0.5s var(--ease), transform 0.7s var(--ease), visibility 0s;
}
.process-step-index {
  font: 500 0.7rem/1 var(--font-mono);
  letter-spacing: 0.16em;
  color: var(--white-40);
}
.process-step-title {
  display: flex;
  align-items: baseline;
  gap: 0.35em;
  margin: 1.25rem 0 1.25rem;
  font: 600 clamp(2.4rem, 4.4vw, 4.8rem)/1 var(--font-display);
  letter-spacing: -0.045em;
}
.process-step-sign { font-weight: 300; color: var(--indigo-soft); }
.process-step-text {
  max-width: 26rem;
  font: 400 clamp(1rem, 0.3vw + 0.95rem, 1.15rem)/1.6 var(--font-display);
  color: var(--white-75);
}

@media (max-width: 900px) {
  .process-stage {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto 1fr auto;
    row-gap: 1rem;
    padding-bottom: 1.5rem;
  }
  .process-intro p, .process-intro .btn { display: none; }
  .process-intro .h2 { font-size: 2.2rem; }
  .process-dial { width: min(72vw, 40svh); }
  .process-step-title { margin: 0.75rem 0; font-size: 2.2rem; }
  .process-step-text { font-size: 0.98rem; }
}
@media (prefers-reduced-motion: reduce) {
  .process { height: auto; }
  .process-stage { position: relative; height: auto; min-height: 100svh; }
  .process-steps { gap: 2.5rem; }
  .process-step { grid-area: auto; opacity: 1; visibility: visible; transform: none; transition: none; }
}

/* Testimonials: equals (the result)
   ========================================================================== */
.testimonials-grid {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: clamp(2rem, 5vw, 6rem);
}
.quote-stack { display: grid; }
.quote {
  grid-area: 1 / 1;
  display: grid;
  align-content: start;
  gap: 2.25rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.45s var(--ease), transform 0.7s var(--ease), visibility 0s 0.45s;
}
.quote--on {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 0.45s var(--ease) 0.1s, transform 0.7s var(--ease) 0.1s, visibility 0s;
}
.quote-text {
  font: 500 clamp(1.35rem, 1.4vw + 0.9rem, 2.25rem)/1.3 var(--font-display);
  letter-spacing: -0.025em;
  text-wrap: pretty;
}
.quote--long .quote-text { font-size: clamp(1.1rem, 0.7vw + 0.9rem, 1.55rem); line-height: 1.45; }
.quote-author { display: flex; align-items: center; gap: 1rem; }
.quote-avatar {
  width: 3.25rem;
  height: 3.25rem;
  border: 1px solid var(--white-25);
  border-radius: 50%;
  object-fit: cover;
}
.quote-name { display: block; font: 600 1rem/1.2 var(--font-display); }
.quote-role { display: block; margin-top: 0.3rem; font: 400 0.9rem/1.3 var(--font-display); color: var(--white-60); }
.quote-controls {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-top: clamp(2.5rem, 5vw, 4rem);
  padding-top: 1.25rem;
  border-top: var(--line);
}
.quote-button {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border: 1px solid var(--white-25);
  border-radius: 50%;
  background: none;
  cursor: pointer;
}
.quote-button:hover { border-color: var(--paper); }
.quote-button:focus-visible { outline: 1px solid var(--paper); outline-offset: 3px; }
.quote-count {
  font: 500 0.72rem/1 var(--font-mono);
  letter-spacing: 0.16em;
  font-variant-numeric: tabular-nums;
  color: var(--white-60);
}

@media (max-width: 900px) {
  .testimonials-grid { grid-template-columns: 1fr; }
}

