/* CyberPath navigation language — the page is one route.
   Rail: one stop per section, copper node at the current stop, line filled to the current position.
   Handoffs: each section ends by previewing the next idea with its own route figure, drawn once.
   Arrival: a same-page jump or history step briefly marks the section it lands on.
   Page headings arrive from the reading edge. All native links; nothing hidden without script. Loaded after journey.css. */

/* Page route rail (wide screens). The black backing keeps it legible over paper and dark sections. */
.page-route{position:fixed;z-index:30;top:50%;inset-inline-start:clamp(6px,calc((100vw - 1440px) / 2 + 8px),40px);translate:0 -50%;pointer-events:none}
.page-route ol{position:relative;display:grid;gap:18px;list-style:none;margin:0;padding:10px 6px;background:var(--black);border:1px solid var(--line)}
.page-route ol::before,.page-route ol::after{content:"";position:absolute;top:22px;bottom:22px;inset-inline-start:17px;width:2px;background:rgba(239,233,222,.18)}
.page-route ol::after{background:var(--copper);transform:scaleY(var(--route-fill,0));transform-origin:top;transition:transform var(--cp-dur-route) var(--cp-ease-path)}
.page-route a{position:relative;display:flex;align-items:center;justify-content:center;width:24px;height:24px;pointer-events:auto;text-decoration:none}
.page-route__node{position:relative;z-index:1;display:block;width:12px;height:12px;background:var(--ink);border:2px solid rgba(239,233,222,.55);transition:background-color var(--cp-dur-base),border-color var(--cp-dur-base),scale var(--cp-dur-base) var(--cp-ease-node)}
.page-route__stop.is-reached .page-route__node{border-color:var(--sand)}
.page-route__stop.is-current .page-route__node{background:var(--copper);border-color:var(--copper);scale:1.3}
/* Track colours appear on the route only once the visitor has reached the tracks. */
.page-route__node>i{display:none}
.page-route__stop--tracks.is-reached .page-route__node{display:grid;grid-template-rows:repeat(3,minmax(0,1fr));border-color:transparent;background:transparent}
.page-route__stop--tracks.is-reached .page-route__node>i{display:block;background:var(--grc)}
.page-route__stop--tracks.is-reached .page-route__node>i:nth-child(2){background:var(--pt)}
.page-route__stop--tracks.is-reached .page-route__node>i:nth-child(3){background:var(--soc)}
.page-route__stop--tracks.is-current .page-route__node{outline:2px solid var(--copper);outline-offset:2px}
.page-route__label{position:absolute;inset-inline-start:34px;top:50%;translate:-6px -50%;padding:6px 12px;white-space:nowrap;background:var(--black);border:1px solid var(--line);color:var(--sand);font-size:.8125rem;line-height:1.4;opacity:0;pointer-events:none;transition:opacity var(--cp-dur-quick),translate var(--cp-dur-base) var(--cp-ease-route)}
html[dir=rtl] .page-route__label{translate:6px -50%}
.page-route a:is(:hover,:focus) .page-route__label{opacity:1;translate:0 -50%}
.page-route a:focus-visible{outline:2px solid var(--copper);outline-offset:2px}
.page-route__label bdi{font:500 .75rem/1.3 var(--font-ui);letter-spacing:.14em;color:var(--copper);margin-inline-end:6px}
@media(max-width:1199px){.page-route{display:none}}

/* Handoffs. */
.handoff{display:inline-flex;align-items:center;gap:20px;max-width:100%;margin-top:clamp(48px,6vw,80px);padding:14px 20px 14px 16px;border:1px solid var(--line);color:var(--sand);text-decoration:none;transition:border-color var(--cp-dur-base),background-color var(--cp-dur-base)}
.handoff:hover{border-color:var(--copper);background:rgba(239,233,222,.04);text-decoration:none}
.handoff:focus-visible{outline:2px solid var(--copper);outline-offset:4px}
.handoff--paper{border-color:rgba(11,11,11,.2);color:var(--ink)}
.handoff--paper:hover{background:rgba(11,11,11,.04)}
.handoff--paper:focus-visible{outline-color:var(--ink)}
.handoff__route{width:96px;height:38px;flex-shrink:0;overflow:visible;direction:ltr}
.handoff__line{fill:none;stroke:currentColor;stroke-width:2.5;stroke-dasharray:1;stroke-dashoffset:0;transition:stroke-dashoffset 900ms var(--cp-ease-path)}
.handoff__line--grc{stroke:var(--grc)}.handoff__line--pt{stroke:var(--pt)}.handoff__line--soc{stroke:var(--soc)}.handoff__line--copper{stroke:var(--copper)}
.handoff--paper .handoff__line--grc{stroke:#0c6694}.handoff--paper .handoff__line--pt{stroke:#a32a2a}.handoff--paper .handoff__line--soc{stroke:#1a6e3f}
.handoff__node{fill:var(--copper);transform-box:fill-box;transform-origin:center;transition:transform 240ms var(--cp-ease-node)}
.handoff:is(:hover,:focus-visible) .handoff__node{transform:scale(1.5)}
.handoff__copy{display:grid;gap:2px;line-height:1.5}
.handoff__copy small{font-size:.75rem;color:rgba(239,233,222,.72)}
.handoff--paper .handoff__copy small{color:var(--stone)}
.handoff__copy strong{font-size:1.125rem;font-weight:700}
.handoff .arrow-icon{width:20px;height:20px;transition:translate var(--cp-dur-base) var(--cp-ease-route)}
.handoff:is(:hover,:focus-visible) .arrow-icon{translate:0 3px}
/* Drawn once on arrival; the figures differ so boundaries do not repeat the same motion. */
.reveal-armed .handoff:not([data-revealed]) .handoff__line{stroke-dashoffset:1}
.reveal-armed .handoff[data-revealed] .handoff__line{transition-delay:240ms}
.reveal-armed .handoff--split[data-revealed] .handoff__line:not(:first-child),.reveal-armed .handoff--merge[data-revealed] .handoff__line--copper{transition-delay:620ms}
.home-tracks__handoff{padding-bottom:clamp(56px,7vw,96px)}
.home-journey>.handoff,.home-audience>.handoff{grid-column:1/-1;justify-self:start}
/* A percentage row gap cannot resolve against an auto height and lets later rows spill out of the section. */
@media(min-width:761px){.home-journey,.home-audience{row-gap:0}}
.home-journey>.handoff{margin-top:clamp(40px,5vw,64px)}
.home-reasons>.handoff{margin-top:clamp(40px,5vw,64px)}

/* Arrival mark: a copper rule along the top of the section, then it fades. No layout change. */
section.is-arrived{animation:arrival-mark 1.5s var(--cp-ease-route) both}
@keyframes arrival-mark{0%{box-shadow:inset 0 0 0 transparent}12%,55%{box-shadow:inset 0 3px 0 var(--copper)}100%{box-shadow:inset 0 3px 0 transparent}}

/* Page headings arrive from the reading edge, so a page change reads as travel rather than a fade. */
.route-stage :is(.registration-heading,.confirmation-page,.admin-page-heading) h1{animation:heading-route 620ms var(--cp-ease-route) backwards}
html[dir=rtl] .route-stage :is(.registration-heading,.confirmation-page,.admin-page-heading) h1{animation-name:heading-route-rtl}
@keyframes heading-route{from{clip-path:inset(0 100% 0 0)}to{clip-path:inset(0 0 0 0)}}
@keyframes heading-route-rtl{from{clip-path:inset(0 0 0 100%)}to{clip-path:inset(0 0 0 0)}}
.error-summary{animation:route-enter var(--cp-dur-route) var(--cp-ease-route) backwards}

/* CMS: restricted areas are named, not linked, for registration managers; next-step guidance after a change. */
.admin-rail__restricted{display:flex;gap:10px;align-items:flex-start;margin:20px 12px 0;padding-top:16px;border-top:1px solid var(--line);font-size:.75rem;line-height:1.7;color:rgba(239,233,222,.72)}
.admin-rail__restricted>span{flex-shrink:0;width:8px;height:8px;margin-top:6px;border:1px solid var(--sand)}
.admin-next{display:block;margin-top:6px;font-size:.875rem;color:var(--sand)}
.admin-next>b{font:500 .75rem/1.3 var(--font-ui);letter-spacing:.2em;color:rgba(239,233,222,.72);margin-inline-end:10px}

/* Pause and reduced motion: complete static states. */
.cp-motion-paused :is(.error-summary,section.is-arrived){animation:none}
.cp-motion-paused .route-stage :is(.registration-heading,.confirmation-page,.admin-page-heading) h1{animation:none}
.cp-motion-paused .handoff__line,.cp-motion-paused .page-route ol::after{transition:none}
@media(prefers-reduced-motion:reduce){
 .error-summary,section.is-arrived,.route-stage :is(.registration-heading,.confirmation-page,.admin-page-heading) h1{animation:none!important}
 .handoff__line,.page-route ol::after,.page-route__node,.page-route__label,.handoff,.handoff .arrow-icon,.handoff__node{transition:none}
 .reveal-armed .handoff:not([data-revealed]) .handoff__line{stroke-dashoffset:0}
}
