/* ============================================================
   PRIMENESS: Field Survey page, "Works everywhere" (#everywhere)
   10/7/2026 (Dorian: redo it). One job on three screens: the phone
   on site, the tablet in the truck, the computer at the desk, with a
   lime pulse through the cloud each time the job moves on.
   Script: assets/js/fs-everywhere.js. The screenshots are the app's
   (TODO(reshoot): see RESHOOT-TODO.md "Works everywhere").
   ============================================================ */
.fs-ev { position: relative; max-width: 1160px; margin: 0 auto; }
.fs-ev__stage { position: relative; aspect-ratio: 16 / 8.6; container-type: inline-size; border-radius: 22px; overflow: hidden;
  background: radial-gradient(60% 70% at 50% 10%, rgba(191,255,0,.09), transparent 65%), linear-gradient(#0d0e10, #09090a);
  border: 1px solid rgba(255,255,255,.08); box-shadow: inset 0 1px 0 rgba(255,255,255,.04); }
.fs-ev__stage::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 40px 40px; -webkit-mask-image: radial-gradient(80% 80% at 50% 45%, #000 40%, transparent 100%); mask-image: radial-gradient(80% 80% at 50% 45%, #000 40%, transparent 100%); }

/* the sync lines and the cloud node */
.fs-ev__net { position: absolute; z-index: 1; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.fs-ev__net path { fill: none; stroke: rgba(191,255,0,.22); stroke-width: 1.5; stroke-dasharray: 3 7; animation: fsEvFlow 1.2s linear infinite; }
.fs-ev__net path.is-hot { stroke: var(--volt); stroke-width: 2; stroke-dasharray: none; filter: drop-shadow(0 0 5px rgba(191,255,0,.8)); animation: none; }
.fs-ev__net circle { fill: #fff; stroke: var(--volt); stroke-width: 2; filter: drop-shadow(0 0 8px rgba(191,255,0,.95)); opacity: 0; }
@keyframes fsEvFlow { to { stroke-dashoffset: -10; } }
.fs-ev__cloud { position: absolute; z-index: 3; left: 50%; top: 4.5%; transform: translateX(-50%); display: inline-flex; align-items: center; gap: .6em;
  padding: .55em .95em .55em .7em; border-radius: 100px; background: rgba(10,10,11,.9); border: 1px solid rgba(191,255,0,.35);
  font: 700 clamp(9px, 1.05cqw, 12.5px)/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink); white-space: nowrap;
  box-shadow: 0 10px 30px -10px rgba(0,0,0,.8), 0 0 30px -10px rgba(191,255,0,.5); }
.fs-ev__cloud i { width: .75em; height: .75em; border-radius: 50%; background: var(--volt); box-shadow: 0 0 0 0 rgba(191,255,0,.6); }
.fs-ev__cloud.is-ping i { animation: fsEvPing .9s ease-out; }
.fs-ev__cloud b { color: var(--volt); font-weight: 700; }
@keyframes fsEvPing { 0% { box-shadow: 0 0 0 0 rgba(191,255,0,.7); } 100% { box-shadow: 0 0 0 1.1em rgba(191,255,0,0); } }

/* the three devices (positions per layout below) */
.fs-ev__dev { position: absolute; z-index: 2; display: block; padding: 0; border: 0; background: none; cursor: pointer; text-align: left;
  transition: transform .7s var(--ease-out), opacity .5s, filter .5s; -webkit-tap-highlight-color: transparent; }
.fs-ev.is-live .fs-ev__dev { opacity: .5; filter: saturate(.6) brightness(.8); }
.fs-ev.is-live .fs-ev__dev.is-on { z-index: 3; opacity: 1; filter: none; }   /* the screen in focus comes to the front */
.fs-ev__dev:focus-visible { outline: 2px solid var(--volt); outline-offset: 6px; border-radius: 12px; }
.fs-ev__screen { position: relative; display: block; overflow: hidden; background: #0b0b0d; }
.fs-ev__screen img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top left; opacity: 0; transition: opacity .6s; }
.fs-ev__screen img.is-on { opacity: 1; }
.fs-ev__screen img:first-child { position: relative; }
.fs-ev__glare { position: absolute; z-index: 2; inset: 0; pointer-events: none; background: linear-gradient(115deg, rgba(255,255,255,.07), transparent 38%); }
.fs-ev__wipe { position: absolute; z-index: 3; top: 0; bottom: 0; left: 0; width: 2px; background: var(--volt); box-shadow: 0 0 16px 3px rgba(191,255,0,.7); opacity: 0; pointer-events: none; }

/* laptop: the computer at the desk */
.fs-ev__dev--desk { left: 23%; top: 15%; width: 54%; }
.fs-ev__dev--desk .fs-ev__bezel { display: block; padding: 1.6%; border-radius: 14px 14px 4px 4px; background: #050506; border: 1px solid #33333a; box-shadow: 0 30px 70px -30px rgba(0,0,0,.95); }
.fs-ev__dev--desk .fs-ev__screen { aspect-ratio: 16 / 10; border-radius: 4px; }
.fs-ev__base { display: block; position: relative; height: clamp(8px, 1.6cqw, 18px); margin: 0 -7%; border-radius: 0 0 14px 14px;
  background: linear-gradient(#3a3a41, #1b1b1f 60%, #101012); box-shadow: 0 18px 30px -12px rgba(0,0,0,.9); }
.fs-ev__base::before { content: ""; position: absolute; left: 50%; top: 0; width: 16%; height: 40%; transform: translateX(-50%); border-radius: 0 0 8px 8px; background: #0e0e10; }
/* tablet: in the truck */
.fs-ev__dev--truck { right: 3.5%; bottom: 9%; width: 33%; transform: perspective(1400px) rotateY(-14deg) rotateX(4deg); }
.fs-ev__dev--truck .fs-ev__bezel { display: block; padding: 2.4%; border-radius: 22px; background: #050506; border: 1px solid #36363d; box-shadow: 0 34px 60px -24px rgba(0,0,0,.95); }
.fs-ev__dev--truck .fs-ev__screen { aspect-ratio: 16 / 10; border-radius: 10px; }
/* phone: on site */
.fs-ev__dev--site { left: 6%; bottom: 5%; width: 15.5%; transform: perspective(1400px) rotateY(14deg) rotateX(3deg); }
.fs-ev__dev--site .fs-ev__bezel { display: block; padding: 4%; border-radius: 18% / 8.5%; background: #050506; border: 1px solid #36363d; box-shadow: 0 34px 60px -24px rgba(0,0,0,.95); }
.fs-ev__dev--site .fs-ev__screen { aspect-ratio: 390 / 844; border-radius: 14% / 6.5%; }
.fs-ev.is-live .fs-ev__dev--desk.is-on { transform: translateY(-1.2%); }
.fs-ev.is-live .fs-ev__dev--truck.is-on { transform: perspective(1400px) rotateY(-8deg) rotateX(2deg) translateY(-3%); }
.fs-ev.is-live .fs-ev__dev--site.is-on { transform: perspective(1400px) rotateY(8deg) rotateX(2deg) translateY(-3%); }
.fs-ev__dev.is-on .fs-ev__bezel { border-color: rgba(191,255,0,.55); box-shadow: 0 34px 70px -26px rgba(0,0,0,.95), 0 0 50px -16px rgba(191,255,0,.55); }

/* what just happened, beside each device */
.fs-ev__chip { position: absolute; z-index: 4; max-width: 30%; padding: .8em 1em; border-radius: 12px; background: rgba(10,10,11,.92); border: 1px solid rgba(191,255,0,.4);
  box-shadow: 0 18px 40px -16px rgba(0,0,0,.9); font: 500 clamp(11px, 1.15cqw, 14px)/1.35 var(--font-body); color: var(--muted); pointer-events: none;
  opacity: 0; transform: translateY(8px); transition: opacity .4s, transform .5s var(--ease-out); }
.fs-ev__chip b { display: flex; align-items: center; gap: .5em; margin-bottom: .25em; font: 700 clamp(9px, .95cqw, 11.5px)/1 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--volt); }
.fs-ev__chip b::before { content: ""; width: .7em; height: .7em; border-radius: 50%; background: var(--volt); box-shadow: 0 0 10px rgba(191,255,0,.8); }
.fs-ev__chip strong { display: block; font: 600 clamp(12px, 1.35cqw, 16px)/1.25 var(--font-display); color: var(--white); }
.fs-ev__chip.is-on { opacity: 1; transform: none; }
/* the notes are the source text; the caption under the stage shows the one in focus, so nothing covers a screen */
.fs-ev__chip { display: none; }
.fs-ev__chip[data-for="site"] { left: 22.5%; bottom: 30%; }
.fs-ev__chip[data-for="truck"] { right: 4%; top: 17%; }
.fs-ev__chip[data-for="desk"] { left: 3.5%; top: 17%; }
.fs-ev__caption { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; column-gap: .7em; row-gap: .2em; min-height: 3.2em; max-width: 820px;
  margin: 16px auto 0; padding: 0 8px; text-align: center; font-size: 15.5px; line-height: 1.5; color: var(--muted); transition: opacity .3s; }
.fs-ev__caption.is-swap { opacity: 0; }
.fs-ev__caption b { display: inline-flex; align-items: center; gap: .5em; font: 700 11.5px/1 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--volt); }
.fs-ev__caption b::before { content: ""; width: .7em; height: .7em; border-radius: 50%; background: var(--volt); box-shadow: 0 0 10px rgba(191,255,0,.8); }
.fs-ev__caption strong { font: 600 17px/1.35 var(--font-display); color: var(--white); }

/* the three moments (tabs) */
.fs-ev__rail { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin-top: 18px; border-top: 1px solid rgba(255,255,255,.1); }
.fs-ev__tab { position: relative; display: grid; gap: 4px; padding: 14px 6px 4px 0; border: 0; background: none; text-align: left; cursor: pointer; color: var(--muted); font: inherit; }
.fs-ev__tab i { position: absolute; left: 0; right: 10px; top: -1px; height: 2px; background: var(--volt); box-shadow: 0 0 10px rgba(191,255,0,.7); transform-origin: left; transform: scaleX(0); }
.fs-ev__tab b { font: 700 12px/1 var(--font-mono); letter-spacing: .08em; color: var(--muted); }
.fs-ev__tab span { font: 600 17px/1.25 var(--font-display); color: var(--muted); transition: color .25s; }
.fs-ev__tab em { font-style: normal; font-size: 13.5px; color: var(--faint, #6b6b73); }
.fs-ev__tab[aria-selected="true"] b { color: var(--volt); }
.fs-ev__tab[aria-selected="true"] span { color: var(--white); }
.fs-ev__tab:hover span { color: var(--ink); }
.fs-ev__tab:focus-visible { outline: 2px solid var(--volt); outline-offset: 4px; border-radius: 4px; }
.fs-ev:not(.is-auto) .fs-ev__tab[aria-selected="true"] i { transform: scaleX(1); }
.fs-ev.is-auto .fs-ev__tab[aria-selected="true"] i { animation: fsEvFill var(--beat, 5s) linear both; }
.fs-ev.is-auto.is-hold .fs-ev__tab[aria-selected="true"] i { animation-play-state: paused; }
@keyframes fsEvFill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.fs-ev__pause { position: absolute; right: 0; bottom: 0; opacity: 0; pointer-events: none; padding: 8px 14px; border-radius: 100px; border: 1px solid var(--volt); background: var(--bg-2); color: var(--ink); font: 600 12px/1 var(--font-mono); }
.fs-ev__pause:focus-visible { opacity: 1; pointer-events: auto; outline: 2px solid var(--volt); outline-offset: 2px; }
.fs-ev__sr { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

/* how you run it */
.fs-ev__ways { list-style: none; margin: clamp(26px, 3.4vw, 40px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(12px, 1.6vw, 18px); }
.fs-ev__way { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 14px; row-gap: 4px; align-items: start; padding: 18px 18px 18px 16px; border-radius: 16px;
  background: var(--bg-2); border: 1px solid var(--line); }
.fs-ev__way svg { grid-row: 1 / 3; width: 38px; height: 38px; padding: 9px; border-radius: 11px; background: rgba(191,255,0,.08); border: 1px solid rgba(191,255,0,.28); color: var(--volt); }
.fs-ev__way h3 { font: 600 17px/1.25 var(--font-display); color: var(--white); }
.fs-ev__way p { font-size: 14.5px; line-height: 1.55; color: var(--muted); }

@media (max-width: 860px) {
  .fs-ev__stage { aspect-ratio: 4 / 4.6; border-radius: 18px; }
  .fs-ev__cloud { top: 3.5%; }
  .fs-ev__dev--desk { left: 6%; top: 12%; width: 88%; }
  .fs-ev__dev--truck { right: 3%; bottom: 6%; width: 52%; }
  .fs-ev__dev--site { left: 5%; bottom: 3%; width: 27%; }
  .fs-ev__caption { display: block; min-height: 6.2em; margin-top: 12px; text-align: left; font-size: 14px; line-height: 1.45; }
  .fs-ev__caption b { display: flex; margin-bottom: .35em; font-size: 11px; }
  .fs-ev__caption strong { display: block; font-size: 16px; }
  .fs-ev__tab span { font-size: 15px; }
  .fs-ev__tab em { display: none; }
  .fs-ev__ways { grid-template-columns: minmax(0, 1fr); max-width: 560px; margin-inline: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .fs-ev__net path { animation: none; }
  .fs-ev__dev, .fs-ev__chip, .fs-ev__screen img { transition: none !important; }
}
