.gtm-section { background: var(--tertiary); }
.gtm-section .shell { max-width: 1000px; }
.gtm-section .gtm-heading { padding-bottom: clamp(20px, 3.2vw, 36px); }
.gtm-section .gtm-title {
  font-size: clamp(38px, 7.3vw, 78px);
  font-weight: 400;
  letter-spacing: -.065em;
  line-height: .98;
}
.gtm-section .gtm-title span { color: #6b6b6b; }
.gtm-section .intro { margin-top: 12px; font-size: clamp(14px, 1.9vw, 18px); color: #535353; line-height: 1.4; }
.gtm-section .funnel {
  --step: clamp(63px, 7.8vw, 78px);
  --diagram: 44%;
  --loop: 10.5s;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: #fff;
  border-radius: 22px;
  padding: 22px clamp(16px, 3.2vw, 36px) 20px;
  background:
    radial-gradient(ellipse at 50% 52%, #fff1, transparent 65%),
    linear-gradient(#ffffff0b 1px, transparent 1px),
    linear-gradient(90deg, #ffffff0b 1px, transparent 1px),
    #222;
  background-size: auto, 28px 28px, 28px 28px, auto;
}
.gtm-section figcaption { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.gtm-section .funnel-bar { margin-bottom: 12px; }
.gtm-section .system, .gtm-section .phase, .gtm-section .artifact, .gtm-section figcaption {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
  letter-spacing: .085em;
}
.gtm-section .system { text-transform: uppercase; color: #ddd; }
.gtm-section .system::before {
  content: ""; display: inline-block; vertical-align: 1px;
  width: 6px; height: 6px; margin-right: 8px; border-radius: 50%;
  background: #fff; box-shadow: 0 0 10px #fff8;
}
.gtm-section .track { position: relative; }
.gtm-section .stages { list-style: none; margin: 0; padding: 0; }
.gtm-section .stage {
  --tone: #d4d4d4;
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--diagram) minmax(0, 1fr);
  align-items: center;
  min-height: var(--step);
  position: relative;
}
.gtm-section .stage:nth-child(n+3) { --tone: #e7e7e7; }
.gtm-section .stage:nth-child(n+5) { --tone: #fff; }
.gtm-section .stage:last-child { color: #fff; }
.gtm-section .stage-name { padding-right: 12px; text-align: right; }
.gtm-section .stage-name h3 { font-size: clamp(15px, 2.2vw, 25px); font-weight: 500; letter-spacing: -.04em; }
.gtm-section .metric { color: #c7c7c7; font-size: clamp(11px, 1.35vw, 14px); margin-top: 3px; }
.gtm-section .question { padding-left: 12px; color: #ddd; font-size: clamp(13px, 1.65vw, 17px); line-height: 1.2; }
.gtm-section .cell {
  position: relative; height: var(--step); display: grid;
  align-items: center; justify-items: center;
}
.gtm-section .segment, .gtm-section .rim, .gtm-section .connector, .gtm-section .pulse { position: absolute; pointer-events: none; }
.gtm-section .segment {
  inset: 0;
  clip-path: polygon(var(--start) 0, calc(100% - var(--start)) 0,
    calc(100% - var(--end)) 100%, var(--end) 100%);
  background: linear-gradient(105deg, #ffffff16, #ffffff08 45%, #ffffff24);
}
.gtm-section .cell::before, .gtm-section .cell::after {
  content: ""; position: absolute; inset: 0;
  clip-path: polygon(var(--start) 0, calc(var(--start) + 1.4px) 0,
    calc(var(--end) + 1.4px) 100%, var(--end) 100%);
  background: linear-gradient(#fff9, #fff5);
}
.gtm-section .cell::after { transform: scaleX(-1); }
.gtm-section .rim {
  z-index: 1; top: 0; inset-inline: var(--start); height: clamp(11px, 2.5vw, 26px);
  border: 1px solid #fff8; border-top-style: dashed; border-radius: 50%;
  transform: translateY(-50%);
  background: linear-gradient(180deg, transparent 50%, #ffffff14 100%);
}
.gtm-section .stage:first-child .rim { border-color: #fffd; box-shadow: 0 2px 16px #fff2; }
.gtm-section .connector {
  top: 50%; inset-inline: 0; border-top: 1px dotted #ffffff42; z-index: -1;
}
.gtm-section .artifact {
  z-index: 2; text-align: center; position: relative; white-space: nowrap;
  letter-spacing: .015em; padding: 7px 10px; border: 1px solid #ffffff55;
  background: #282828; border-radius: 8px; color: var(--tone);
  box-shadow: 0 4px 10px #0003;
  animation: gtm-stage-light var(--loop) linear infinite both;
  animation-delay: var(--delay);
}
.gtm-section .artifact::before { content: attr(data-symbol); margin-right: 6px; }
.gtm-section .stage:last-child .artifact { background: #f8f8f8; color: #222; font-weight: bold; }
.gtm-section .phase { display: block; color: #c5c5c5; font-size: 9px; margin-bottom: 4px; text-transform: uppercase; }
.gtm-section .pulse {
  z-index: 1; top: 0; left: calc(50% - 4px); width: 8px; height: 8px;
  border-radius: 50%; background: #fff; box-shadow: 0 0 9px 3px #fffb;
  animation: gtm-traverse var(--loop) linear infinite;
}
.gtm-section .outcome { display: grid; justify-items: center; }
.gtm-section .outcome::before { content: ""; width: 1px; height: 10px; background: #fff7; }
.gtm-section .outcome span {
  width: 31px; aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%;
  background: #f8f8f8; color: #222; font-size: 15px;
  animation: gtm-stage-light var(--loop) linear infinite both;
  animation-delay: 8.55s;
}
.gtm-section figcaption { color: #c9c9c9; margin-top: 13px; padding-top: 12px; border-top: 1px solid #fff3; }
@keyframes gtm-traverse {
  0% { transform: translate(-42px, -4px); opacity: 0; }
  4% { opacity: 1; }
  15% { transform: translate(24px, calc(var(--step) * 1.15)); }
  30% { transform: translate(-19px, calc(var(--step) * 2.35)); }
  45% { transform: translate(15px, calc(var(--step) * 3.55)); }
  60% { transform: translate(-9px, calc(var(--step) * 4.75)); }
  75% { transform: translate(4px, calc(var(--step) * 5.95)); }
  84% { transform: translate(0, calc(var(--step) * 6 + 22px)); opacity: 1; }
  89%, 100% { transform: translate(0, calc(var(--step) * 6 + 22px)); opacity: 0; }
}
@keyframes gtm-stage-light {
  0%, 16%, 100% { transform: translateY(0); }
  6% { transform: translateY(-3px); box-shadow: 0 0 18px #fff6; }
}
@media (max-width: 620px) {
  .section.gtm-section { padding-block: 48px; }
  .gtm-section .funnel { --diagram: 43%; --step: 66px; border-radius: 17px; padding: 14px 13px; }
  .gtm-section .stage { grid-template-columns: var(--diagram) minmax(0, 1fr); grid-template-rows: 49% 51%; height: var(--step); column-gap: 11px; }
  .gtm-section .cell { grid-area: 1 / 1 / 3 / 2; }
  .gtm-section .stage-name { grid-area: 1 / 2; align-self: end; text-align: left; padding: 0; }
  .gtm-section .stage-name h3 { font-size: 16px; line-height: 1.15; }
  .gtm-section .metric { margin-top: 0; line-height: 1.2; }
  .gtm-section .question { grid-area: 2 / 2; align-self: start; padding: 2px 0 0; font-size: 11px; }
  .gtm-section .phase { display: none; }
  .gtm-section .artifact { padding: 5px 6px; font-size: 9px; }
  .gtm-section .artifact::before { margin-right: 4px; }
  .gtm-section .pulse { left: calc(var(--diagram) / 2 - 4px); }
  .gtm-section .outcome { width: var(--diagram); }
  .gtm-section figcaption { font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  .gtm-section .artifact, .gtm-section .outcome span { animation: none; }
  .gtm-section .pulse { display: none; }
}
