/* Shared motion for the audience pages: reveals, the example check, and the by-hand / built flow panel.
   Driven by /js/motion.js; nothing is hidden until that script marks the page with .motion. */

/* Reveals */
.motion .reveal { transition: opacity 700ms var(--ease), transform 700ms var(--ease); transition-delay: calc(var(--d, 0) * 80ms); }
.motion .reveal:not(.in) { opacity: 0; transform: translateY(18px); }

/* Example check: a ruled report. The rule under the header fills as each row is scanned, then the first fix arrives. */
.sample .sample-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.sample figcaption { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.sample .sample-head figcaption { margin-bottom: 0; }
.sample-site { font-size: .8rem; color: var(--cream-2); }
.sample-replay { font: 500 13px 'DM Sans', sans-serif; color: var(--cream-2); background: none; border: 0; padding: 0 2px; min-height: 44px; margin: -12px 0; cursor: pointer; opacity: 0; pointer-events: none; transition: opacity 300ms var(--ease), color 200ms; }
.sample.played .sample-replay { opacity: 1; pointer-events: auto; }
@media (hover:hover) and (pointer:fine) { .sample-replay:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; } }
.sample-bar { height: 2px; background: var(--line); overflow: hidden; }
.sample-bar span { display: block; height: 100%; background: var(--text); transform-origin: left; transform: scaleX(var(--p, 1)); transition: transform 500ms var(--ease); }
.sample-bar + .sample-row { border-top: 0; }
.sample-row { position: relative; }
/* Statuses are plain text with a glyph column, no badges. */
.sample .pill { flex: none; min-width: 6.5rem; padding: 0; border-radius: 0; background: none; text-transform: none; letter-spacing: 0; font-size: .9rem; font-weight: 500; transition: opacity 260ms var(--ease); }
.sample .pill::before { display: inline-block; width: 1.15em; font-weight: 600; }
.sample .pill-pass::before { content: "\2713"; }
.sample .pill-warn::before { content: "!"; }
.sample .pill-fail::before { content: "\2715"; }
@media (max-width: 480px) { .sample .pill { min-width: 0; } }
.sample.scanning .sample-row:not(.checked) .pill { opacity: 0; }
.sample.scanning .sample-row:not(.checked)::after { content: 'Checking\2026'; position: absolute; right: 0; top: 50%; translate: 0 -50%; font-size: .85rem; color: var(--cream-2); opacity: .35; }
.sample.scanning .sample-row.active::after { opacity: 1; animation: sample-pulse 900ms var(--ease) infinite alternate; }
@keyframes sample-pulse { to { opacity: .45; } }
.sample-fix { transition: opacity 500ms var(--ease), transform 500ms var(--ease); }
.sample.scanning .sample-fix { opacity: 0; transform: translateY(10px); }

/* Flow panel: one item handled by hand, then with a build. Without JS the built state shows. */
.fp { container-type: inline-size; --fp-ink: #172f29; --fp-miss: #8f3b28; background: #dce6d7; border-radius: 8px; padding: 26px; display: flex; flex-direction: column; gap: 18px; min-height: 440px; color: var(--fp-ink); }
.fp-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
/* Two text tabs; the active one is underlined. Each keeps a 44px hit area. */
.fp .fp-toggle { display: flex; gap: 18px; margin: -10px 0; }
.fp .fp-toggle button { position: relative; font: 500 12px 'DM Sans', sans-serif; letter-spacing: .2px; border: 0; border-radius: 0; background: none; color: #51655a; padding: 0 1px; min-height: 44px; cursor: pointer; transition: color 200ms var(--ease); }
.fp .fp-toggle button::after { content: ''; position: absolute; left: 0; right: 0; bottom: 10px; height: 2px; background: var(--fp-ink); transform: scaleX(0); transform-origin: left; transition: transform 240ms var(--ease); }
.fp .fp-toggle button[aria-pressed=true] { color: var(--fp-ink); }
.fp .fp-toggle button[aria-pressed=true]::after { transform: none; }
@media (hover:hover) and (pointer:fine) { .fp .fp-toggle button:hover { color: var(--fp-ink); } }
.fp-stage { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 46px minmax(0, 1.3fr); align-items: center; flex: 1; min-height: 250px; }
.fp-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.fp-lines path { fill: none; stroke: var(--green); stroke-width: 1.5; transition: opacity 300ms, stroke 300ms; }
.fp[data-state=today] .fp-lines path { stroke: #9fb29b; stroke-dasharray: 3 5; opacity: .7; }
.fp-node { position: relative; z-index: 1; background: var(--paper); border-radius: 6px; padding: 9px 11px; display: flex; flex-direction: column; gap: 1px; box-shadow: 0 6px 18px #173f2012; transition: transform 260ms var(--ease), box-shadow 260ms, opacity 300ms; }
.fp-k { font-size: 9px; letter-spacing: 1.3px; text-transform: uppercase; color: #51655a; }
.fp-node strong { font: 600 13px/1.25 Manrope, sans-serif; letter-spacing: -.2px; }
.fp-sub { font-size: 11px; color: #51655a; }
.fp-src { padding: 13px 14px; border-left: 3px solid var(--lime); }
.fp-src strong { font-size: 15px; }
.fp-hub { position: relative; z-index: 1; justify-self: center; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--fp-ink); color: var(--lime); font-size: 18px; transition: opacity 300ms, transform 400ms var(--ease); }
.fp[data-state=today] .fp-hub { opacity: 0; transform: scale(.6); }
.fp-targets { list-style: none; display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; }
/* Tags sit in flow beside the title and wrap beneath it when the tile is too narrow, so they never overlap. */
.fp-targets .fp-node { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 8px; }
.fp-txt { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.fp-tag { flex: none; white-space: nowrap; font-style: normal; font-size: 10px; line-height: 1; padding: 4px 6px; border-radius: 3px; opacity: 0; scale: .85; transition: opacity 220ms var(--ease), scale 220ms var(--ease); }
.fp-tag span { display: none; }
.fp[data-state=today] .t-today, .fp[data-state=built] .t-built { display: inline; }
.fp[data-state=built] .fp-tag { background: var(--lime); color: var(--fp-ink); }
.fp[data-state=built] .fp-tag::before { content: "✓ "; }
.fp[data-state=today] .fp-tag { background: #f3e4cf; color: #7a4c17; }
.fp[data-state=today] .fp-miss .fp-tag { background: #f2d9d1; color: var(--fp-miss); }
.fp[data-state=today] .fp-miss .fp-tag::before { content: "! "; font-weight: 600; }
.fp[data-state=today] .fp-miss.done { opacity: .72; }
.fp-node.done .fp-tag { opacity: 1; scale: 1; }
.fp-node.pulse { transform: translateY(-2px); box-shadow: 0 10px 22px #173f2020; }
/* By hand, each title is retyped in place behind a caret, so nothing moves over the tiles. */
.fp-node strong.typing::after { content: ''; display: inline-block; width: 1.5px; height: 1em; margin-left: 1px; vertical-align: -.14em; background: currentColor; animation: fp-caret 900ms steps(1) infinite; }
@keyframes fp-caret { 50% { opacity: 0; } }
.fp-packet { position: absolute; left: 0; top: 0; z-index: 2; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 2px var(--fp-ink); pointer-events: none; will-change: transform; }
.fp-foot { display: flex; flex-direction: column; gap: 8px; }
.fp-caption { font: 500 clamp(20px, 2vw, 26px)/1.1 Manrope, sans-serif; letter-spacing: -1px; min-height: 2.2em; }
.fp-note { font-size: 12px; line-height: 1.5; color: #51655a; }
@media (min-width: 1100px) {
  .fp-stage { grid-template-columns: minmax(0, 1fr) 56px minmax(0, 1.35fr); }
  .fp-targets { gap: 10px; }
  .fp-node strong { font-size: 14px; }
  .fp-src strong { font-size: 16px; }
  .fp-tag { font-size: 11px; }
  .fp-hub { width: 38px; height: 38px; font-size: 20px; }
}
@media (max-width: 620px) {
  .fp { padding: 18px; min-height: 0; gap: 12px; }
  .fp-stage { grid-template-columns: minmax(0, 1fr) 30px minmax(0, 1.35fr); min-height: 230px; }
  .fp-hub { width: 26px; height: 26px; font-size: 14px; }
  .fp-node { padding: 7px 8px; }
  .fp-src { padding: 10px; }
  .fp-src strong, .fp-node strong { font-size: 12px; }
  .fp-tag { font-size: 9px; padding: 3px 5px; }
}
@media (max-width: 380px) { .fp-sub { display: none; } }
/* A narrow panel beside the copy (tablet widths) gets the compact layout whatever the viewport is. */
@container (max-width: 300px) {
  .fp-stage { grid-template-columns: minmax(0, 1fr) 24px minmax(0, 1.4fr); }
  .fp-hub { width: 22px; height: 22px; font-size: 12px; }
  .fp-node { padding: 7px 8px; }
  .fp-src { padding: 9px; }
  .fp-src strong, .fp-node strong { font-size: 12px; }
  .fp-sub { display: none; }
  .fp-tag { font-size: 9px; padding: 3px 5px; }
  .fp-caption { font-size: 19px; }
}

@media (prefers-reduced-motion: reduce) {
  .motion .reveal:not(.in) { opacity: 1; transform: none; }
  .motion .reveal, .sample *, .fp * { transition: none !important; animation: none !important; }
}

.visually-hidden { position:absolute!important; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
/* The associations hero stacks at the same width as trades and tourism, so the panel never gets squeezed. */
@media (max-width: 960px) { .editorial-hero:has(.fp) { grid-template-columns: 1fr; gap: 36px; } .editorial-hero .fp { max-width: 560px; } }

/* Phone wireframe on trades and tourism: the customer's path played on a homepage, with numbered markers
   that match the path cards below. Without JS it shows the finished page with every marker. */
.wf { --wf-ink: #172f29; --wf-bar: #d9dfd3; --wf-bar-2: #b5c2b1; display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 56px; align-items: center; margin-top: 36px; }
.wf-phone { width: 270px; height: 540px; padding: 10px; border-radius: 38px; background: var(--wf-ink); box-shadow: 0 30px 60px -30px rgba(23,47,41,.45); }
.wf-screen { position: relative; width: 100%; height: 100%; border-radius: 29px; overflow: hidden; background: #fafbf5; font-family: 'DM Sans', sans-serif; color: var(--wf-ink); }
.wf-bar { display: block; height: 7px; border-radius: 4px; background: var(--wf-bar); margin: 7px 0; }
.wf-bar.dark { background: var(--wf-bar-2); }
.wf-bar.thick { height: 13px; background: var(--wf-bar-2); margin: 9px 0; }
.wf-bar.w40 { width: 40%; } .wf-bar.w50 { width: 50%; } .wf-bar.w60 { width: 60%; } .wf-bar.w70 { width: 70%; } .wf-bar.w80 { width: 80%; } .wf-bar.w85 { width: 85%; } .wf-bar.w90 { width: 90%; }
.wf-stars { font-size: 10px; letter-spacing: 1px; color: #a86a1f; }
.wf-stars.dim { color: var(--wf-bar-2); }

/* Markers */
.wf-m { position: absolute; z-index: 4; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font: 600 10px 'DM Sans', sans-serif; background: var(--lime); color: var(--wf-ink); box-shadow: 0 0 0 2px var(--wf-ink); opacity: 0; scale: .5; transition: opacity 260ms var(--ease), scale 360ms var(--ease); pointer-events: none; }
.wf-m::after { content: ''; position: absolute; inset: -2px; border-radius: 50%; border: 2px solid var(--wf-ink); opacity: 0; }
/* Markers sit on the phone's left bezel, level with what they mark, with a hairline in to it. Nothing covers the page. */
.wf-phone { position: relative; }
.wf-m { left: -10px; top: calc(var(--y) - 10px); }
.wf-m::before { content: ''; position: absolute; left: 100%; top: 50%; width: calc(var(--reach) + 2px); height: 1px; background: var(--wf-ink); }
.wf-m[data-at=result] { --y: 234px; --reach: 14px; }
.wf-m[data-at=rating] { --y: 305px; --reach: 14px; }
.wf-m[data-at=url] { --y: 36px; --reach: 67px; }
.wf-m[data-at=cta] { --y: 304px; --reach: 14px; }
.wf-m[data-at=call] { --y: 496px; --reach: 12px; }
.wf.p-hl[data-step="1"] [data-at=result], .wf.m2:not(.p-scroll) [data-at=rating], .wf.m2 [data-at=url], .wf.m3.p-scroll [data-at=cta], .wf.m4.p-dock [data-at=call] { opacity: 1; scale: 1; }
/* Wait for the scroll and the dock to settle before pointing at them. */
.wf.m3.p-scroll [data-at=cta] { transition-delay: 1100ms; }
.wf.m4.p-dock [data-at=call] { transition-delay: 300ms; }
.wf[data-step="1"] [data-m="1"]::after, .wf[data-step="2"] [data-m="2"]::after, .wf[data-step="3"] [data-m="3"]::after, .wf[data-step="4"] [data-m="4"]::after { animation: wf-ring 1400ms var(--ease) infinite; }
@keyframes wf-ring { from { opacity: .7; scale: 1; } to { opacity: 0; scale: 1.9; } }

/* Taps */
.wf-tap { position: absolute; z-index: 5; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; border: 2px solid var(--wf-ink); background: rgba(23,47,41,.12); opacity: 0; pointer-events: none; }
@keyframes wf-tap { 0% { opacity: .9; scale: .4; } 100% { opacity: 0; scale: 1.5; } }
.wf.p-tap .wf-search .wf-tap, .wf.p-call .wf-dock .wf-tap, .wf.p-send .wf-sheet .wf-tap { animation: wf-tap 650ms var(--ease) both; }

/* Search results */
.wf-search { position: absolute; inset: 0; padding: 18px 14px; transition: transform 520ms var(--ease); }
.wf-q { display: flex; align-items: center; gap: 8px; font-size: 11px; padding: 9px 12px; border-radius: 6px; border: 1px solid var(--wf-bar); margin-bottom: 16px; color: #51655a; }
.wf-g { font: 700 12px Manrope, sans-serif; color: var(--green); }
.wf-result { position: relative; padding: 11px 12px; border: 1px solid var(--wf-bar); border-radius: 10px; margin-bottom: 10px; background: #fff; transition: border-color 300ms, box-shadow 300ms; }
.wf-result .wf-stars { display: block; margin: 2px 0 4px; }
.wf.p-hl .wf-result.you { border-color: var(--green); box-shadow: 0 0 0 3px rgba(48,92,75,.15); }
.wf-search .wf-tap { left: 50%; top: 172px; }
.wf:not([data-step="1"]) .wf-search { transform: translateX(-100%); }

/* The homepage */
.wf-site { position: absolute; inset: 0; transform: translateX(100%); transition: transform 520ms var(--ease); }
.wf:not([data-step="1"]) .wf-site { transform: none; }
.wf-url { position: absolute; z-index: 3; inset: 0 0 auto; height: 38px; padding: 14px 14px 0; display: flex; align-items: center; justify-content: center; gap: 5px; font-size: 10px; color: #51655a; background: #eef1e8; }
.wf-url svg { width: 10px; height: 10px; color: var(--green); opacity: 0; transition: opacity 300ms; }
.wf.p-loaded .wf-url svg { opacity: 1; }
.wf-load { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--green); transform-origin: left; transform: scaleX(0); }
.wf.p-load .wf-load { transform: scaleX(1); transition: transform 1100ms cubic-bezier(.3,.7,.4,1); }
.wf.p-loaded .wf-load { opacity: 0; transition: opacity 300ms; }
.wf-scroll { position: absolute; inset: 38px 0 auto; padding: 0 14px 20px; opacity: .3; transition: transform 1400ms cubic-bezier(.45,0,.2,1), opacity 400ms; }
.wf.p-loaded .wf-scroll { opacity: 1; }
.wf.p-scroll .wf-scroll { transform: translateY(-250px); }
.wf-head { display: flex; justify-content: space-between; align-items: center; height: 40px; }
.wf-logo { width: 26px; height: 26px; border-radius: 6px; background: var(--wf-bar-2); }
.wf-burger { width: 18px; height: 10px; border-top: 2px solid var(--wf-bar-2); border-bottom: 2px solid var(--wf-bar-2); }
.wf-hero { height: 190px; border-radius: 12px; background: #dce6d7; padding: 70px 14px 0; margin-bottom: 12px; }
.wf-hero .wf-bar.thick { background: #a9bca6; }
.wf-rating { position: relative; display: inline-flex; align-items: center; gap: 6px; font-size: 10px; padding: 6px 10px; border-radius: 4px; background: #fff; border: 1px solid var(--wf-bar); margin-bottom: 6px; }
.wf-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0; }
.wf-cards span { height: 96px; border-radius: 10px; background: #eef1e8; border: 1px solid var(--wf-bar); }
.wf-cta { position: relative; margin: 14px 0; padding: 11px; border-radius: 8px; text-align: center; font-size: 11px; font-weight: 600; background: var(--wf-ink); color: var(--paper); }
.wf-ruler { position: absolute; z-index: 2; right: 3px; top: 46px; bottom: 60px; width: 3px; border-radius: 3px; opacity: 0; transition: opacity 300ms; }
.wf-ruler i { display: block; width: 100%; height: 34%; border-radius: 3px; background: var(--wf-bar-2); transition: transform 1400ms cubic-bezier(.45,0,.2,1); }
.wf[data-step="3"] .wf-ruler { opacity: 1; }
.wf.p-scroll .wf-ruler i { transform: translateY(130%); }
.wf-dock { position: absolute; z-index: 3; inset: auto 0 0; display: flex; gap: 8px; padding: 10px 12px 16px; background: #fafbf5; border-top: 1px solid var(--wf-bar); transform: translateY(100%); transition: transform 420ms var(--ease); }
.wf.p-dock .wf-dock { transform: none; }
.wf-dock > span:not(.wf-m):not(.wf-tap) { flex: 1; display: flex; align-items: center; justify-content: center; gap: 5px; padding: 10px 6px; border-radius: 8px; font-size: 11px; font-weight: 600; }
.wf-call { border: 1.5px solid var(--wf-ink); }
.wf-call svg { width: 12px; height: 12px; }
.wf-quote { background: var(--lime); }
.wf-dock .wf-tap { left: 25%; top: 29px; }
.wf-sheet { position: absolute; z-index: 4; inset: auto 0 0; padding: 16px 14px 20px; border-radius: 18px 18px 0 0; background: #fff; box-shadow: 0 -12px 30px rgba(23,47,41,.14); display: flex; flex-direction: column; gap: 8px; transform: translateY(105%); transition: transform 460ms var(--ease); }
.wf.p-sheet .wf-sheet { transform: none; }
.wf-sheet strong { font: 600 13px Manrope, sans-serif; margin-bottom: 4px; }
.wf-field { height: 30px; border-radius: 8px; border: 1px solid var(--wf-bar); background: #fafbf5; }
.wf-field.tall { height: 54px; }
.wf-send { margin-top: 4px; padding: 10px; border-radius: 8px; text-align: center; font-size: 11px; font-weight: 600; background: var(--wf-ink); color: var(--paper); }
.wf-sheet .wf-tap { left: 50%; bottom: 22px; top: auto; margin-bottom: -17px; }
.wf-toast { position: absolute; z-index: 5; left: 50%; top: 50px; translate: -50% -8px; padding: 8px 14px; border-radius: 20px; background: var(--lime); font-size: 11px; font-weight: 600; white-space: nowrap; box-shadow: 0 8px 20px rgba(23,47,41,.16); opacity: 0; transition: opacity 300ms var(--ease), translate 400ms var(--ease); }
.wf.p-sent .wf-toast { opacity: 1; translate: -50% 0; }

/* Step list beside the phone */
.wf-legend { list-style: none; display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; max-width: 460px; }
.wf-legend button { width: 100%; display: flex; align-items: center; gap: 16px; text-align: left; font: inherit; color: var(--text); background: transparent; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; min-height: 64px; cursor: pointer; transition: background 240ms var(--ease), border-color 240ms; }
.wf-legend button > span:last-child { display: flex; flex-direction: column; gap: 3px; }
.wf-legend .mono-label { font-size: 10px; }
.wf-legend strong { font: 400 1.15rem/1.2 Manrope, sans-serif; }
.wf-n { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: .8rem; font-weight: 500; border: 1px solid var(--green); color: var(--green); transition: background 240ms, color 240ms; }
.wf-legend button[aria-pressed=true] { background: var(--surface); border-color: var(--green); }
.wf-legend button[aria-pressed=true] .wf-n { background: var(--lime); color: var(--text); border-color: var(--text); }
@media (hover:hover) and (pointer:fine) { .wf-legend button:hover { border-color: var(--green); } }

/* The path card for the step on the phone */
.flow-step { transition: border-color 300ms var(--ease), box-shadow 300ms var(--ease); }
.flow-step.is-active { border-color: var(--green); box-shadow: 0 0 0 1px var(--green); }
.flow-step.is-active .flow-node { background: var(--lime); color: var(--text); border-color: var(--text); }

@media (max-width: 900px) {
  .wf { grid-template-columns: 1fr; justify-items: center; gap: 28px; }
  .wf-legend { display: grid; grid-template-columns: 1fr 1fr; max-width: 560px; width: 100%; }
  .wf-legend button { flex-direction: column; align-items: flex-start; gap: 10px; height: 100%; }
}
/* On phones the path cards below are the step controls, so the list beside the phone goes. */
@media (max-width: 700px) { .wf-legend { display: none; } }
.motion .flow-step[data-wf] { cursor: pointer; }
@media (prefers-reduced-motion: reduce) { .wf * { transition: none !important; animation: none !important; } }
/* The confirmation takes the dock's place, so it never sits over page content. It clears quickly when the loop restarts. */
.wf-toast { top: auto; bottom: 16px; left: 12px; right: 12px; translate: 0 8px; padding: 11px 14px; border-radius: 4px; text-align: center; box-shadow: none; transition: opacity 150ms var(--ease), translate 150ms var(--ease); }
.wf.p-sent .wf-toast { translate: 0 0; transition-duration: 300ms, 400ms; }
.wf-dock > span { transition: opacity 250ms var(--ease); }
.wf.p-sent .wf-dock > span { opacity: 0; }
