/* ============================================================
   Who It's For — page-only surfaces and motion.
   Every hidden starting state sits under html.wf-motion, which
   js/who.js adds only when it can also reveal things, so the page
   reads fine with the script missing or reduced motion on.
   ============================================================ */

:root {
  --wf-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --wf-orange: #FE5D01;
}

/* ---------- Office cards: rise out of the hero ---------- */

.wf-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  border: 1px solid #e2e8f0;
  border-radius: 1.25rem;
  background-color: #fff;
  padding: 1.75rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06),
    0 34px 60px -34px rgba(15, 23, 42, 0.5);
  transition: transform 0.5s var(--wf-ease), box-shadow 0.5s var(--wf-ease),
    border-color 0.3s ease;
}

/* Orange bar that sweeps across the top edge on hover */
.wf-card::after {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background-color: var(--wf-orange);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.6s var(--wf-ease);
}

/* Soft orange light that follows the pointer (--mx/--my from who.js) */
.wf-spot {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(
    380px circle at var(--mx, 50%) var(--my, 0%),
    rgba(254, 93, 1, 0.1),
    transparent 62%
  );
  transition: opacity 0.4s ease;
}

.wf-rule {
  display: block;
  height: 1px;
  margin-top: 1.5rem;
  background: linear-gradient(90deg, var(--wf-orange), #FFD5A9 35%, #e2e8f0 70%);
  transform-origin: 0 50%;
}

@media (hover: hover) and (pointer: fine) {
  .wf-card:hover {
    transform: translateY(-6px);
    border-color: #FFD5A9;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06),
      0 44px 70px -34px rgba(15, 23, 42, 0.55);
  }

  .wf-card:hover::after {
    transform: none;
  }

  .wf-card:hover .wf-spot {
    opacity: 1;
  }
}

/* ---------- Field & bid table: dusk section ---------- */

.wf-dusk {
  background-color: #0b1120;
  background-image:
    radial-gradient(ellipse 70% 60% at 12% 112%, rgba(254, 93, 1, 0.2), transparent 68%),
    radial-gradient(ellipse 55% 50% at 92% -12%, rgba(148, 163, 184, 0.12), transparent 70%);
}

.wf-dusk .eyebrow {
  border-color: rgba(254, 93, 1, 0.35);
  background-color: rgba(254, 93, 1, 0.08);
  color: var(--wf-orange);
}

.wf-dusk ::selection {
  background-color: var(--wf-orange);
  color: #0f172a;
}

.wf-panel {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 1.5rem;
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.72), rgba(15, 23, 42, 0.9));
  padding: 1.75rem;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.6);
  transform: perspective(1100px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.7s var(--wf-ease), border-color 0.3s ease;
}

@media (min-width: 640px) {
  .wf-panel {
    padding: 2.25rem;
  }
}

.wf-panel.is-tilting {
  transition: transform 0.15s linear, border-color 0.3s ease;
}

.wf-glare {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(
    520px circle at var(--mx, 50%) var(--my, 0%),
    rgba(255, 255, 255, 0.07),
    transparent 55%
  );
  transition: opacity 0.4s ease;
}

/* Line drawing in the corner; pathLength="1" lets every stroke draw in
   with one dash value regardless of its real length. */
.wf-art {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  z-index: -1;
  width: 7.5rem;
  height: 7.5rem;
  color: rgba(254, 93, 1, 0.55);
}

.wf-art > * {
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}

.wf-chip {
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 9999px;
  padding: 0.25rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1rem;
  color: #cbd5e1;
  transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

.wf-chip:hover {
  border-color: var(--wf-orange);
  background-color: rgba(254, 93, 1, 0.1);
  color: #fff;
}

.wf-chip:focus-visible {
  outline: 2px solid var(--wf-orange);
  outline-offset: 2px;
}

@media (hover: hover) and (pointer: fine) {
  .wf-panel:hover {
    border-color: rgba(254, 93, 1, 0.45);
  }

  .wf-panel:hover .wf-glare {
    opacity: 1;
  }
}

/* ---------- From field log to final invoice: conveyor ---------- */

.wf-flow {
  overflow: hidden;
  padding: 0.75rem 0 2rem;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.wf-flow-track {
  display: flex;
  width: max-content;
  animation: wf-flow 64s linear infinite;
}

.wf-flow-group {
  display: flex;
  flex-shrink: 0;
  align-items: stretch;
  margin: 0;
  padding: 0;
  list-style: none;
}

.wf-step {
  position: relative;
  flex-shrink: 0;
  width: min(80vw, 22rem);
  margin-right: 4.5rem;
  border: 1px solid #e2e8f0;
  border-radius: 1.25rem;
  background-color: #f8fafc;
  padding: 1.75rem;
  transition: transform 0.35s var(--wf-ease), border-color 0.3s ease,
    background-color 0.3s ease, box-shadow 0.35s var(--wf-ease);
}

/* Dashed pipe to the next step, with dashes that run toward it */
.wf-step::after {
  content: "";
  position: absolute;
  top: 50%;
  left: calc(100% + 0.75rem);
  width: 3rem;
  height: 2px;
  background: repeating-linear-gradient(90deg, var(--wf-orange) 0 6px, transparent 6px 12px);
  background-size: 12px 2px;
  animation: wf-pipe 0.9s linear infinite;
}

.wf-step::before {
  content: "";
  position: absolute;
  top: calc(50% - 4px);
  left: calc(100% + 3.5rem);
  width: 9px;
  height: 9px;
  border-top: 2px solid var(--wf-orange);
  border-right: 2px solid var(--wf-orange);
  transform: rotate(45deg);
}

.wf-step-icon {
  display: inline-flex;
  width: 2.75rem;
  height: 2.75rem;
  align-items: center;
  justify-content: center;
  border: 1px solid #FFD5A9;
  border-radius: 0.75rem;
  background-color: rgba(254, 93, 1, 0.06);
  color: #C24600;
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.wf-step-icon svg {
  width: 1.375rem;
  height: 1.375rem;
}

.wf-flow:hover .wf-flow-track,
.wf-flow:focus-within .wf-flow-track,
.wf-flow:hover .wf-step::after,
.wf-flow:focus-within .wf-step::after {
  animation-play-state: paused;
}

@media (hover: hover) and (pointer: fine) {
  .wf-step:hover {
    transform: translateY(-4px);
    border-color: #FFD5A9;
    background-color: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 24px 44px -26px rgba(15, 23, 42, 0.4);
  }

  .wf-step:hover .wf-step-icon {
    border-color: var(--wf-orange);
    background-color: var(--wf-orange);
    color: #0f172a;
  }
}

@keyframes wf-flow {
  to {
    transform: translateX(-25%);
  }
}

@keyframes wf-pipe {
  to {
    background-position: 12px 0;
  }
}

/* ---------- Entrances (only with html.wf-motion) ---------- */

/* Office cards pop up in turn */
.wf-motion .wf-pop {
  opacity: 0;
  transform: translateY(64px) scale(0.94);
  transition: opacity 0.8s ease, transform 1.1s var(--wf-ease);
  transition-delay: calc(var(--i, 0) * 140ms);
}

.wf-motion .wf-pop.in-view {
  opacity: 1;
  transform: none;
}

/* Field and bid panels slide in from opposite sides */
.wf-motion .wf-slide {
  opacity: 0;
  transform: translateX(-90px) rotate(-1.5deg);
  transition: opacity 0.9s ease, transform 1.2s var(--wf-ease);
}

.wf-motion .wf-slide[data-from="right"] {
  transform: translateX(90px) rotate(1.5deg);
  transition-delay: 120ms;
}

.wf-motion .wf-slide.in-view {
  opacity: 1;
  transform: none;
}

/* Contents fade in one line at a time once the card is in place */
.wf-motion .wf-stagger > :not(.wf-spot):not(.wf-glare):not(.wf-art) {
  opacity: 0;
  filter: blur(6px);
  transform: translateY(12px);
  transition: opacity 0.7s ease, filter 0.7s ease, transform 0.8s var(--wf-ease);
  transition-delay: calc(350ms + var(--d, 0) * 90ms);
}

.wf-motion .wf-stagger li {
  opacity: 0;
  transform: translateX(-10px);
  transition: opacity 0.6s ease, transform 0.7s var(--wf-ease);
  transition-delay: calc(650ms + var(--li, 0) * 110ms);
}

.wf-motion .in-view .wf-stagger > :not(.wf-spot):not(.wf-glare):not(.wf-art),
.wf-motion .in-view .wf-stagger li {
  opacity: 1;
  filter: none;
  transform: none;
}

.wf-motion .wf-rule {
  transform: scaleX(0);
}

.wf-motion .in-view .wf-rule {
  transform: none;
  transition: opacity 0.7s ease, transform 1s var(--wf-ease) 0.55s;
}

.wf-motion .wf-art > * {
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 2s var(--wf-ease);
}

.wf-motion .in-view .wf-art > * {
  stroke-dashoffset: 0;
}

.wf-motion .in-view .wf-art > :nth-child(2) { transition-delay: 0.35s; }
.wf-motion .in-view .wf-art > :nth-child(3) { transition-delay: 0.7s; }
.wf-motion .in-view .wf-art > :nth-child(4) { transition-delay: 1.05s; }

/* Headings come in word by word, out of a blur */
.wf-w {
  display: inline-block;
}

.wf-motion .wf-words .wf-w {
  opacity: 0;
  filter: blur(10px);
  transform: translateY(0.35em);
  transition: opacity 0.8s ease, filter 0.8s ease, transform 1s var(--wf-ease);
  transition-delay: calc(var(--w, 0) * 80ms);
}

.wf-motion .wf-words.in-view .wf-w {
  opacity: 1;
  filter: none;
  transform: none;
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .wf-card,
  .wf-card::after,
  .wf-panel,
  .wf-step {
    transition: border-color 0.2s ease, background-color 0.2s ease, opacity 0.2s ease;
  }

  .wf-card:hover,
  .wf-step:hover {
    transform: none;
  }

  .wf-card:hover::after {
    transform: scaleX(0);
  }

  .wf-panel {
    transform: none;
  }

  .wf-flow {
    -webkit-mask-image: none;
    mask-image: none;
  }

  .wf-flow-track {
    width: auto;
    animation: none;
    justify-content: center;
    padding: 0 1rem;
  }

  .wf-flow-group {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
  }

  .wf-flow-group[aria-hidden="true"],
  .wf-step::after,
  .wf-step::before {
    display: none;
  }

  .wf-step {
    margin-right: 0;
  }
}

/* ============================================================
   Nov 17 2026 wow pass. Three new construction pieces:
   1. Hero: rotary laser level + four grade rods (wf-level)
   2. Field & bid: light towers strike on (wf-tower)
   3. Field log to invoice: conveyor belt under the steps (wf-belt)
   Start states sit under html.wf-motion like the rest of the page.
   ============================================================ */

/* ---------- 1. Rotary laser level ---------- */

.wf-level {
  position: relative;
  padding-bottom: 3.25rem;
}

.wf-level-svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.wf-level-svg * {
  transform-box: fill-box;
}

.wf-rcv-bar {
  fill: #475569;
  transition: fill 0.35s ease;
}

.wf-rcv-ring {
  opacity: 0;
  transform-origin: 50% 50%;
}

.wf-sweep {
  opacity: 0;
}

/* Role tags under each rod; the link also covers the rod above it */
.wf-tags {
  position: absolute;
  inset: 0;
}

.wf-tag {
  position: absolute;
  top: 6%;
  bottom: 0;
  left: var(--x);
  display: flex;
  width: 6.5rem;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 0.2rem;
  border-radius: 0.75rem;
  transform: translateX(-50%);
  text-align: center;
  -webkit-tap-highlight-color: transparent;
}

.wf-tag-role {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.14em;
  line-height: 1.2;
  text-transform: uppercase;
  white-space: nowrap;
  color: #cbd5e1;
  transition: color 0.25s ease;
}

.wf-tag-read {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  white-space: nowrap;
  color: #FE5D01;
}

.wf-tag:hover .wf-tag-role,
.wf-tag:focus-visible .wf-tag-role {
  color: #fff;
}

.wf-tag:focus-visible {
  outline: 2px solid var(--wf-orange);
  outline-offset: 2px;
}

@media (min-width: 640px) {
  .wf-tag {
    width: 9rem;
  }

  .wf-tag-role {
    font-size: 11px;
  }

  .wf-tag-read {
    font-size: 11px;
  }
}

/* Locked state: orange bar on every receiver */
.wf-rcv-arrow {
  transition: opacity 0.3s ease;
}

.wf-level .wf-rcv-bar {
  fill: #FE5D01;
}

.wf-level .wf-rcv-arrow {
  opacity: 0;
}

/* Hovered or focused rod: receiver rings beep, pole brightens */
.wf-level[data-hot="0"] .wf-rod-0 .wf-rcv-ring,
.wf-level[data-hot="1"] .wf-rod-1 .wf-rcv-ring,
.wf-level[data-hot="2"] .wf-rod-2 .wf-rcv-ring,
.wf-level[data-hot="3"] .wf-rod-3 .wf-rcv-ring {
  animation: wf-beep 1.1s ease-out infinite;
}

@keyframes wf-beep {
  0% { opacity: 0.9; transform: scale(1); }
  100% { opacity: 0; transform: scale(2.3); }
}

/* Motion: rods rise, laser strikes, beam runs out, receivers find grade.
   Keyframes (not transitions) because the hero is on screen at load,
   where a transition can be skipped before the first paint. */
.wf-motion .wf-level .wf-tripod,
.wf-motion .wf-level .wf-rod-pole,
.wf-motion .wf-level .wf-rcv,
.wf-motion .wf-level .wf-beam-l,
.wf-motion .wf-level .wf-beam-r,
.wf-motion .wf-level .wf-laser-dot,
.wf-motion .wf-level .wf-tag,
.wf-motion .wf-level .wf-tag-read {
  opacity: 0;
}

.wf-motion .wf-level .wf-beam-l,
.wf-motion .wf-level .wf-beam-r {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  opacity: 1;
}

.wf-motion .wf-level .wf-rod-pole {
  transform-origin: 50% 100%;
}

.wf-motion .wf-level.in-view .wf-tripod {
  animation: wf-rise 0.8s var(--wf-ease) both;
}

.wf-motion .wf-level.in-view .wf-rod-pole {
  animation: wf-pole 0.8s var(--wf-ease) calc(0.25s + var(--i) * 0.1s) both;
}

.wf-motion .wf-level.in-view .wf-rcv {
  animation:
    wf-fade 0.4s ease calc(0.55s + var(--i) * 0.1s) both,
    wf-grade 0.8s cubic-bezier(0.34, 1.3, 0.5, 1) var(--t) both;
}

.wf-motion .wf-level.in-view .wf-rcv-arrow {
  animation: wf-fade 0.2s ease calc(var(--t) + 0.55s) reverse both;
}

.wf-motion .wf-level.in-view .wf-rcv-bar {
  animation: wf-lock 0.2s ease calc(var(--t) + 0.6s) both;
}

.wf-motion .wf-level.in-view .wf-beam-l,
.wf-motion .wf-level.in-view .wf-beam-r {
  animation: wf-draw 0.9s cubic-bezier(0.4, 0, 0.6, 1) 1.15s both;
}

.wf-motion .wf-level.in-view .wf-laser-dot {
  animation: wf-fade 0.3s ease 1s both;
}

.wf-motion .wf-level.in-view .wf-tag {
  animation: wf-tag-in 0.7s var(--wf-ease) calc(0.5s + var(--i, 0) * 0.1s) both;
}

.wf-motion .wf-level.in-view .wf-tag-read {
  animation: wf-fade 0.4s ease 2.15s both;
}

.wf-motion .wf-level.in-view .wf-tag[data-rod="0"] .wf-tag-read,
.wf-motion .wf-level.in-view .wf-tag[data-rod="3"] .wf-tag-read {
  animation-delay: 2.45s;
}

@keyframes wf-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes wf-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes wf-pole { from { opacity: 1; transform: scaleY(0); } to { opacity: 1; transform: none; } }
@keyframes wf-grade { from { transform: translateY(var(--off)); } to { transform: none; } }
@keyframes wf-lock { from { fill: #475569; } to { fill: #FE5D01; } }
@keyframes wf-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes wf-tag-in {
  from { opacity: 0; transform: translateX(-50%) translateY(8px); }
  to { opacity: 1; transform: translateX(-50%); }
}

/* Lock flash: one ring per receiver the moment it reaches grade */
.wf-motion .wf-level.in-view .wf-rcv-ring {
  animation: wf-beep 0.9s ease-out calc(var(--t) + 0.6s) 1 forwards;
}

/* Hover beats the one-off lock flash */
.wf-motion .wf-level.in-view[data-hot="0"] .wf-rod-0 .wf-rcv-ring,
.wf-motion .wf-level.in-view[data-hot="1"] .wf-rod-1 .wf-rcv-ring,
.wf-motion .wf-level.in-view[data-hot="2"] .wf-rod-2 .wf-rcv-ring,
.wf-motion .wf-level.in-view[data-hot="3"] .wf-rod-3 .wf-rcv-ring {
  animation: wf-beep 1.1s ease-out infinite;
}

/* Settled: the head keeps spinning and a bright pass runs down the beam */
.wf-motion .wf-level.is-settled .wf-laser-spin {
  animation: wf-spin 0.9s linear infinite;
}

.wf-motion .wf-level.is-settled .wf-sweep-r {
  animation: wf-sweep-r 4s cubic-bezier(0.3, 0, 0.7, 1) infinite;
}

.wf-motion .wf-level.is-settled .wf-sweep-l {
  animation: wf-sweep-l 4s cubic-bezier(0.3, 0, 0.7, 1) infinite;
}

/* Receivers wink as the pass goes by (inner rods first, then outer) */
.wf-motion .wf-level.is-settled .wf-rod-1 .wf-rcv-bar,
.wf-motion .wf-level.is-settled .wf-rod-2 .wf-rcv-bar {
  animation: wf-wink 4s linear 0.62s infinite;
}

.wf-motion .wf-level.is-settled .wf-rod-0 .wf-rcv-bar,
.wf-motion .wf-level.is-settled .wf-rod-3 .wf-rcv-bar {
  animation: wf-wink 4s linear 1.2s infinite;
}

@keyframes wf-spin {
  0% { transform: translateX(0); opacity: 1; }
  45% { opacity: 1; }
  50% { transform: translateX(15px); opacity: 0; }
  100% { transform: translateX(0); opacity: 0; }
}

@keyframes wf-sweep-r {
  0% { transform: translateX(0); opacity: 0; }
  5% { opacity: 1; }
  40% { transform: translateX(420px); opacity: 0; }
  100% { transform: translateX(420px); opacity: 0; }
}

@keyframes wf-sweep-l {
  0% { transform: rotate(180deg) translateX(0); opacity: 0; }
  5% { opacity: 1; }
  40% { transform: rotate(180deg) translateX(420px); opacity: 0; }
  100% { transform: rotate(180deg) translateX(420px); opacity: 0; }
}

@keyframes wf-wink {
  0% { fill: #fff; }
  6% { fill: #FE5D01; }
  100% { fill: #FE5D01; }
}

/* Role cards: a short orange ring when a rod sends you there */
#role-owners,
#role-pm,
#role-finance,
#role-field {
  scroll-margin-top: 7rem;
}

.wf-card.is-called,
.wf-panel.is-called {
  animation: wf-called 1.6s ease-out 1;
}

@keyframes wf-called {
  0% { box-shadow: 0 0 0 0 rgba(254, 93, 1, 0.55); border-color: var(--wf-orange); }
  70% { box-shadow: 0 0 0 14px rgba(254, 93, 1, 0); border-color: var(--wf-orange); }
  100% { box-shadow: 0 0 0 0 rgba(254, 93, 1, 0); }
}

/* ---------- 2. Light towers ---------- */

.wf-towers {
  position: absolute;
  inset: auto 0 0;
  height: 100%;
  pointer-events: none;
}

/* Warm pools on the ground under each tower once lit */
.wf-towers::before,
.wf-towers::after {
  content: "";
  position: absolute;
  bottom: 0;
  width: 22rem;
  height: 5rem;
  background: radial-gradient(ellipse 50% 50% at 50% 75%, rgba(254, 93, 1, 0.16), transparent 70%);
  transition: opacity 2s ease 1.8s;
}

.wf-towers::before { left: max(-6rem, calc(50% - 47rem)); }
.wf-towers::after { right: max(-6rem, calc(50% - 47rem)); }

.wf-motion .wf-dusk:not(.is-lit) .wf-towers::before,
.wf-motion .wf-dusk:not(.is-lit) .wf-towers::after {
  opacity: 0;
}

.wf-ground-line {
  position: absolute;
  inset: auto 0 1.25rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(148, 163, 184, 0.35) 12%, rgba(148, 163, 184, 0.35) 88%, transparent);
}

.wf-tower {
  position: absolute;
  bottom: calc(1.25rem - 9px);
  width: 6.5rem;
  height: auto;
  overflow: visible;
}

.wf-tower-l {
  left: max(0.25rem, calc(50% - 41rem));
}

.wf-tower-r {
  right: max(0.25rem, calc(50% - 41rem));
  transform: scaleX(-1);
}

@media (min-width: 768px) {
  .wf-tower {
    width: 9.5rem;
  }
}

.wf-tower * {
  transform-box: view-box;
}

/* Aim: js/who.js nudges --aim (deg) toward the pointer */
.wf-tw-head {
  transform-origin: 80px 18px;
  transform: rotate(var(--aim, 0deg));
  transition: transform 1.2s var(--wf-ease);
}

.wf-tw-cone {
  filter: blur(3px);
}

.wf-dusk-floor {
  height: 13rem;
}

@media (min-width: 768px) {
  .wf-dusk-floor {
    height: 16.5rem;
  }
}

/* Warm light on the panel corner that faces each tower */
.wf-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(ellipse 80% 60% at 0% 105%, rgba(254, 93, 1, 0.16), transparent 70%);
  opacity: 1;
  transition: opacity 1.6s ease;
}

.wf-slide[data-from="right"] .wf-panel::before {
  background: radial-gradient(ellipse 80% 60% at 100% 105%, rgba(254, 93, 1, 0.16), transparent 70%);
}

/* Motion: collapsed masts, dark lamps until the section is in view */
.wf-motion .wf-tw-mast2 {
  transform: translateY(46px);
  transition: transform 0.9s var(--wf-ease);
}

.wf-motion .wf-tw-head {
  transform: translateY(96px) rotate(0deg);
  transition: transform 1.1s var(--wf-ease) 0.25s;
}

.wf-motion .wf-tower-r .wf-tw-mast2 { transition-delay: 0.3s; }
.wf-motion .wf-tower-r .wf-tw-head { transition-delay: 0.55s; }

.wf-motion .wf-tw-lit,
.wf-motion .wf-tw-cone {
  opacity: 0;
}

.wf-motion .wf-panel::before {
  opacity: 0;
}

.wf-motion .wf-dusk.is-lit .wf-tw-mast2 {
  transform: none;
}

.wf-motion .wf-dusk.is-lit .wf-tw-head {
  transform: rotate(var(--aim, 0deg));
}

.wf-motion .wf-dusk.is-raised .wf-tw-head {
  transition: transform 1.2s var(--wf-ease);
}

.wf-motion .wf-dusk.is-lit .wf-tw-lit {
  animation: wf-strike 0.9s steps(1, end) 1.35s both;
}

.wf-motion .wf-dusk.is-lit .wf-tower-r .wf-tw-lit {
  animation-delay: 1.7s;
}

.wf-motion .wf-dusk.is-lit .wf-tw-cone {
  animation: wf-warm 2.2s ease-out 1.6s both;
}

.wf-motion .wf-dusk.is-lit .wf-tower-r .wf-tw-cone {
  animation-delay: 1.95s;
}

.wf-motion .wf-dusk.is-lit .wf-panel::before {
  opacity: 1;
  transition-delay: 2s;
}

/* Metal-halide strike: a couple of flickers, then on */
@keyframes wf-strike {
  0% { opacity: 0; }
  12% { opacity: 0.85; }
  22% { opacity: 0.1; }
  38% { opacity: 1; }
  48% { opacity: 0.35; }
  60%, 100% { opacity: 1; }
}

@keyframes wf-warm {
  0% { opacity: 0; }
  20% { opacity: 0.45; }
  100% { opacity: 1; }
}

/* ---------- 3. Conveyor belt ---------- */

.wf-flow {
  padding-bottom: 0.5rem;
}

.wf-belt {
  position: relative;
  height: 4.75rem;
  margin-top: 0.25rem;
}

/* Top run of the belt; cleats scroll at the same speed as the steps */
.wf-belt-surface {
  position: absolute;
  inset: 0 0 auto;
  z-index: 2;
  height: 0.75rem;
  border-radius: 3px;
  background-color: #1e293b;
  background-image: repeating-linear-gradient(90deg, #475569 0 3px, transparent 3px var(--wf-cleat, 24px));
  background-size: var(--wf-cleat, 24px) 100%;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.08);
  animation: wf-belt-run var(--wf-belt-dur, 64s) linear infinite;
}

/* Return run under the rollers, plus the side rail they hang from */
.wf-belt::before {
  content: "";
  position: absolute;
  top: 1.85rem;
  left: 0;
  right: 0;
  height: 4px;
  border-radius: 2px;
  background-color: #334155;
}

.wf-belt::after {
  content: "";
  position: absolute;
  top: 0.95rem;
  left: 0;
  right: 0;
  height: 2px;
  background-color: #cbd5e1;
}

.wf-belt-rollers {
  position: absolute;
  top: 0.3rem;
  left: 0;
  right: 0;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  padding: 0 0.75rem;
}

.wf-roller {
  position: relative;
  width: 1.5rem;
  height: 1.5rem;
  flex-shrink: 0;
  border: 2px solid #475569;
  border-radius: 50%;
  background-color: #f1f5f9;
  animation: wf-roll var(--wf-roll-dur, 4s) linear infinite;
}

/* Axle in the middle, one orange bolt near the rim so the turn reads */
.wf-roller::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6px;
  height: 6px;
  margin: -3px 0 0 -3px;
  border-radius: 50%;
  background-color: #334155;
}

.wf-roller::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 50%;
  width: 4px;
  height: 4px;
  margin-left: -2px;
  border-radius: 50%;
  background-color: #FE5D01;
}

/* A-frame legs (built by js/who.js) */
.wf-belt-legs {
  position: absolute;
  inset: 1.85rem 0 0;
}

.wf-leg {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 3.5rem;
  margin-left: -1.75rem;
}

.wf-leg::before,
.wf-leg::after {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 3px;
  height: 108%;
  margin-left: -1.5px;
  border-radius: 2px;
  background-color: #94a3b8;
  transform-origin: 50% 0;
  transform: rotate(22deg);
}

.wf-leg::after {
  transform: rotate(-22deg);
}

.wf-flow:hover .wf-belt *,
.wf-flow:focus-within .wf-belt * {
  animation-play-state: paused;
}

@keyframes wf-belt-run {
  to {
    background-position: calc(-1 * var(--wf-belt-dist, 0px)) 0;
  }
}

@keyframes wf-roll {
  to {
    transform: rotate(-360deg);
  }
}

/* ---------- Reduced motion for the new pieces ---------- */

@media (prefers-reduced-motion: reduce) {
  .wf-belt {
    display: none;
  }

  .wf-tw-cone {
    filter: none;
  }
}

/* ---------- Phone fixes (Nov 23 2026) ---------- */
@media (max-width: 639px) {
  /* The corner line drawing sat under the card's eyebrow and title on a
     phone. Smaller and fainter, it reads as a watermark instead. */
  .wf-art {
    top: 0.75rem;
    right: 0.75rem;
    width: 4.25rem;
    height: 4.25rem;
    opacity: 0.4;
  }
}
@media (max-width: 359px) {
  /* The outer rod labels reached past the screen edge on the smallest phones. */
  .wf-tag { width: 4.75rem; }
  .wf-tag-role, .wf-tag-read { font-size: 9px; letter-spacing: 0.06em; }
}
@media (max-width: 639px) {
  /* Keep the conveyor's Pause button off the screen edge */
  .motion-toggle[data-motion-target=".wf-flow"] { margin-right: 1rem; }
}
