/* Shared by vega-a/b/c: the eight-step rail, demos, film, service models, clients, close */

.sec-head h2 {
  max-width: 18ch;
}

.sec-head p {
  max-width: 46ch;
  margin-top: 16px;
  font-size: 1.125rem;
  line-height: 1.45;
  color: var(--ink-2);
}

/* Eight steps: numbered rail beside the app, the active step's copy under the screenshot */
.how {
  display: grid;
  grid-template-columns: minmax(0, 21rem) minmax(0, 1fr);
  grid-template-areas:
    "head head"
    "list shots";
  column-gap: clamp(32px, 5vw, 80px);
}

.how .sec-head {
  grid-area: head;
  margin-bottom: clamp(28px, 4vw, 48px);
}

.rail {
  grid-area: list;
  position: relative;
  align-self: start;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rail::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 22px;
  bottom: 22px;
  width: 1px;
  background: var(--rule-ink);
}

.rail button {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 14px;
  width: 100%;
  min-height: 44px;
  padding: 10px 0 10px 30px;
  border: 0;
  background: none;
  color: var(--ink-2);
  font: inherit;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
}

.rail button::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 11px;
  height: 11px;
  margin-top: -5.5px;
  border-radius: 50%;
  background: var(--dot);
  box-shadow: 0 0 0 4px var(--paper);
  transition:
    background-color 0.2s ease-out,
    transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.rail button:hover {
  color: var(--ink);
}

.rail button[aria-pressed="true"] {
  color: var(--ink);
  font-weight: 700;
}

.rail button[aria-pressed="true"]::before {
  background: var(--accent);
  transform: scale(1.35);
}

.rail .n,
.n {
  font-size: 0.8125rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--ink-3);
}

.how__view {
  grid-area: shots;
  min-width: 0;
}

.shot {
  position: relative;
  aspect-ratio: 1728 / 945;
  border: 1px solid var(--rule-ink);
  background: var(--shot-bg);
  overflow: hidden;
}

.shot img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top left;
  filter: var(--shot-filter);
}

.how__copy {
  display: grid;
  grid-template-columns: minmax(0, 15rem) minmax(0, 1fr);
  gap: 8px 32px;
  margin-top: 24px;
}

.how__copy h3 {
  font-size: 1.375rem;
}

.how__copy p {
  max-width: 52ch;
  color: var(--ink-2);
}

@media (max-width: 991px) {
  .how {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "head"
      "shots"
      "list";
  }

  .how__copy {
    grid-template-columns: minmax(0, 1fr);
    margin-top: 16px;
  }

  .rail {
    margin-top: 24px;
  }
}

/* Interview and Explore: two columns split by a hairline */
.pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--rule-ink);
}

.demo {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  padding: 32px clamp(24px, 4vw, 56px) 8px 0;
}

.demo + .demo {
  padding-left: clamp(24px, 4vw, 56px);
  border-left: 1px solid var(--rule);
}

.demo h3 {
  font-size: clamp(1.5rem, 2.4vw, 2.125rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.demo h3 a {
  gap: 10px;
  font-weight: inherit;
}

.demo h3 svg {
  width: 20px;
  height: 20px;
}

.demo p {
  max-width: 44ch;
  color: var(--ink-2);
}

.demo .scenario {
  color: var(--ink);
}

@media (max-width: 767px) {
  .pair {
    grid-template-columns: minmax(0, 1fr);
  }

  .demo,
  .demo + .demo {
    padding: 28px 0;
    border-left: 0;
  }

  .demo + .demo {
    border-top: 1px solid var(--rule);
  }
}

/* CEO film */
.film {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  align-items: end;
  gap: clamp(24px, 4vw, 64px);
}

.film h2 {
  max-width: 14ch;
}

.byline {
  margin-top: 16px;
  font-size: 0.9375rem;
  color: var(--ink-2);
}

.film__frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--film-bg);
  overflow: hidden;
}

.film__frame img,
.film__frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
}

.play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  width: 100%;
  padding: clamp(16px, 3vw, 32px);
  border: 0;
  background: none;
  cursor: pointer;
}

/* The play disc is the one fixed-colour element (DESIGN.md) */
.play svg {
  width: 72px;
  height: 72px;
  padding: 16px;
  border-radius: 50%;
  background: #ffffff;
  fill: var(--vega-navy);
  transition:
    background-color 0.2s ease-out,
    transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.play:hover svg {
  background: var(--vega-blue);
  fill: #fff;
  transform: scale(1.06);
}

.play:focus-visible {
  outline-offset: -6px;
  outline-color: #ffffff;
}

@media (max-width: 991px) {
  .film {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Clients as the homepage ledger */
.ledger {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
  border-bottom: 1px solid var(--rule-ink);
}

.ledger li {
  display: grid;
  align-content: start;
  gap: 20px;
  padding: 32px 32px 36px 0;
  border-top: 1px solid var(--rule-ink);
}

.ledger .mark {
  display: flex;
  align-items: center;
  height: 48px;
}

.ledger img {
  width: auto;
  height: clamp(18px, calc(var(--s) * 64px), 44px);
  max-width: 100%;
  filter: var(--mark-filter);
}

.ledger p {
  max-width: 28ch;
  line-height: 1.4;
  color: var(--ink-2);
}

@media (max-width: 991px) {
  .ledger {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 599px) {
  .ledger li {
    gap: 14px;
    padding: 24px 16px 28px 0;
  }

  .ledger img {
    height: clamp(14px, calc(var(--s) * 48px), 32px);
  }

  .ledger p {
    font-size: 0.9375rem;
  }
}

/* Drifting logo row (homepage hero row) */
.drift__head {
  display: flex;
  align-items: center;
  gap: 4px;
}

.drift__toggle {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink-3);
  cursor: pointer;
}

.drift__toggle:hover {
  color: var(--ink);
}

.drift__toggle svg {
  width: 10px;
  height: 10px;
  fill: currentColor;
}

.drift__view {
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
}

.drift__track {
  display: flex;
  width: max-content;
  animation: drift 60s linear infinite;
}

.drift__track ul {
  display: flex;
  align-items: center;
  gap: 56px;
  margin: 0;
  padding: 0 56px 0 0;
  list-style: none;
}

.drift__track img {
  width: auto;
  height: clamp(16px, calc(var(--s) * 56px), 38px);
  filter: var(--mark-filter);
  opacity: 0.8;
}

.drift__view:hover .drift__track,
.drift.paused .drift__track {
  animation-play-state: paused;
}

@keyframes drift {
  to {
    transform: translateX(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .drift__track {
    flex-wrap: wrap;
    width: auto;
    animation: none;
  }

  .drift__toggle,
  .drift__track ul + ul {
    display: none;
  }

  .drift__track ul {
    flex-wrap: wrap;
    gap: 28px 48px;
  }
}

@media (max-width: 991px) {
  .drift__track ul {
    gap: 36px;
    padding-right: 36px;
  }

  .drift__track img {
    height: clamp(13px, calc(var(--s) * 40px), 26px);
  }
}

/* Closing call */
.close h2 {
  max-width: 14ch;
  font-size: clamp(2.75rem, 6.4vw, 5.5rem);
  line-height: 0.96;
  letter-spacing: -0.04em;
}

.close p {
  margin-top: 20px;
  font-size: 1.25rem;
  color: var(--ink-2);
}

.close .actions {
  margin-top: 36px;
}

/* Canvases fill their (positioned) box; absolute so their own size never feeds back into it */
canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

/* On-graphic labels: paper knockout, placed by script */
.anno {
  position: absolute;
  left: 0;
  top: 0;
  padding: 2px 6px;
  background: var(--paper);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease-out;
}

.anno.on {
  opacity: 1;
}

.anno small {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--ink-3);
}

.anno .pct {
  margin-left: 6px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
}
