/* Gateway story (homepage, under "Programmes end, services don't."): a stepped simulation in the
   same HUD box as the Muon scan and value gates. The frame is drawn by hud-frame.js via
   gateway-hud.js; the stepping, diagram and captions are gateway-steps.js.
   A start screen ("Where does the value go?" and Start), then five stages stepped with the side
   arrows, the stage bar on the title band, a swipe or the arrow keys. Each stage's caption sits on
   the frame's footer band. Shown only when the script runs; otherwise .gw-static stays. */
.gwb{display:none}
.gwb-on .gwb{display:block}
.gwb-on .gw-static{display:none}

/* The section's heading with its description underneath */
.gw-c .gwb-intro{display:block}
.gw-c .gwb-intro h2 i{font-style:normal;color:var(--gw-primary)}
.gw-c .gwb-intro .intro-side{max-width:760px;margin:22px 0 0}
.gw-c .gwb-intro .intro-side strong{color:var(--text)}

/* The panel (colours read by gateway-hud.js for the frame) */
.gwb{--p:#1b4585;--band:#1b4585;--panel:#ffffff;position:relative;margin:44px 0;color:var(--text);isolation:isolate}
html[data-theme=dark] .gwb{--p:#5b8fdc;--band:#2b5fae;--panel:#102036}
.gwb:focus-visible{outline:2px solid #faa61a;outline-offset:4px}
.gwb-hudframe{position:absolute;left:-44px;top:-44px;z-index:-1;pointer-events:none}
.gwb-screen{position:relative;isolation:isolate}

/* Title band: "Simulation", then the stage and the stage bar once running */
.gwb-top{display:flex;align-items:center;justify-content:space-between;gap:16px;box-sizing:border-box;height:70px;padding:6px 30px 0}
.gwb-kicker{font:400 clamp(14px,1.3vw,18px)/64px 'Audiowide','Manrope',sans-serif;letter-spacing:.06em;text-transform:uppercase;color:#fff}
.gwb-where{display:flex;align-items:center;gap:14px;margin-top:14px}
.gwb:not(.is-started) .gwb-where{visibility:hidden}
.gwb-count{font:400 11.5px/1 'Audiowide','Manrope',sans-serif;letter-spacing:.1em;text-transform:uppercase;color:#fff;font-variant-numeric:tabular-nums;white-space:nowrap}
.gwb-count:not(:empty)::before{content:'Stage ';color:rgba(255,255,255,.7)}
.gwb-dots{display:flex;gap:5px}
.gwb-dots button{position:relative;width:30px;height:20px;padding:0;border:0;background:none;cursor:pointer}
.gwb-dots button::before{content:'';position:absolute;left:0;right:0;top:50%;height:6px;margin-top:-3px;border-radius:3px;
  background:rgba(255,255,255,.28);transition:background .3s,box-shadow .3s}
.gwb-dots button.is-past::before{background:rgba(255,255,255,.62)}
.gwb-dots button.is-on::before{background:#fff;box-shadow:0 0 10px rgba(255,255,255,.7)}
.gwb-dots button:hover::before{background:#fff}
.gwb-dots button:focus-visible{outline:2px solid #faa61a;outline-offset:2px;border-radius:4px}

/* The diagram, with an arrow either side; the arrows appear once the story is running */
.gwb-stage{touch-action:pan-y;-webkit-user-select:none;user-select:none}
.gwb-view{display:grid;grid-template-columns:100px minmax(0,1fr) 100px;align-items:center}
.gwb-canvas{display:block;width:100%;height:clamp(300px,29vw,400px);transition:opacity .4s ease}
.gwb:not(.is-started) .gwb-canvas{opacity:0}
.gwb-arrow{position:relative;z-index:3;display:grid;place-items:center;justify-self:center;width:60px;height:60px;padding:0;border:0;
  background:none;color:var(--p);cursor:pointer;-webkit-tap-highlight-color:transparent;
  transition:color .2s,opacity .4s ease .8s,transform .22s cubic-bezier(.2,.8,.2,1)}
html[data-theme=dark] .gwb-arrow{color:#9fc0f5}
.gwb-arrow svg{width:34px;height:34px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.gwb-arrow:hover{color:var(--blue2);transform:scale(1.1)}
.gwb-arrow:active{transform:scale(.92)}
.gwb-arrow:focus-visible{outline:2px solid #faa61a;outline-offset:3px}
.gwb-arrow:disabled{opacity:.22;cursor:default;color:var(--p);transform:none}
.gwb:not(.is-started) .gwb-arrow{opacity:0;visibility:hidden;transition:opacity .2s,visibility 0s .2s}
/* On the last stage the next arrow becomes replay */
.gwb-i-again{display:none}
.gwb-next.is-again .gwb-i-next{display:none}
.gwb-next.is-again .gwb-i-again{display:block}

/* Captions on the footer band: a title (codes in) beside its description (fades). The stage
   frames stay in the layout, unseen, so the band keeps the height of the longest caption */
.gwb-text{display:grid;margin:0 30px;padding:22px 0 30px}
.gwb-frame,.gwb-cap{grid-area:1/1;display:grid;grid-template-columns:minmax(0,.8fr) minmax(0,1.6fr);column-gap:44px;align-items:start}
.gwb-text.has-cap .gwb-frame{visibility:hidden}
.gwb-frame h3,.gwb-cap-title{margin:0;font:400 clamp(17px,.44vw + 15.4px,21px)/1.3 'Audiowide','Manrope',sans-serif;letter-spacing:.01em;color:var(--text)}
.gwb-frame p,.gwb-cap-desc{margin:0;font-size:15.5px;line-height:1.6;color:var(--muted)}
.gwb-frame small,.gwb-cap-desc small{display:block;margin-top:6px;font-size:12px;color:var(--muted);opacity:.85}
.gwb-cap{opacity:0;transition:opacity .35s ease}
.gwb-cap.is-on{opacity:1}
.gwb-cap-desc{transition:opacity .38s ease}
.gwb-cap-desc.is-out{opacity:0;transition:opacity .22s ease}

/* Start screen: centred; on Start it flies away into its centre point and fades */
.gwb-cover{position:absolute;inset:70px 0 0;z-index:2;display:flex;flex-direction:column;justify-content:center;align-items:center;
  padding:24px 116px;text-align:center;transform-origin:50% 50%;
  transition:transform .6s cubic-bezier(.2,.8,.2,1),opacity .5s ease,visibility 0s}
.gwb.is-started .gwb-cover{opacity:0;visibility:hidden;transform:scale(.3);
  transition:transform .7s cubic-bezier(.55,0,.75,.2),opacity .55s ease .1s,visibility 0s .7s}
.gwb-cover-title{margin:0;font:400 clamp(28px,1.9vw + 21px,46px)/1.15 'Audiowide','Manrope',sans-serif;letter-spacing:.01em;color:var(--text)}
.gwb-cover-text{max-width:560px;margin:16px auto 0;font-size:var(--t-lead,17px);line-height:1.65;color:var(--muted)}
/* Start: a tab like the scan's Today / Claimed control */
.gwb-go{display:inline-flex;margin-top:30px;padding:3px;border:1px solid rgba(27,69,133,.45)}
.gwb-start{box-sizing:border-box;display:inline-flex;align-items:center;height:42px;padding:0 40px;border:0;border-radius:0;cursor:pointer;
  background:#1b4585;color:#fff;font:600 15.5px/1 'DM Sans',sans-serif;transition:background .2s}
.gwb-start:hover{background:#2b5fae}
.gwb-start:active{transform:translateY(1px)}
.gwb-start:focus-visible{outline:2px solid #faa61a;outline-offset:3px}
html[data-theme=dark] .gwb-go{border-color:rgba(255,255,255,.4)}
html[data-theme=dark] .gwb-start{background:#fff;color:#1b4585}
html[data-theme=dark] .gwb-start:hover{background:#dce8fb}

@media(max-width:700px){
  .gwb-top{padding:6px 18px 0}
  .gwb-kicker{font-size:12px}
  .gwb-count{display:none}
  .gwb-dots button{width:22px}
  /* The diagram keeps the full width; the arrows float over its edges */
  .gwb-view{position:relative;display:block}
  .gwb-canvas{height:280px}
  .gwb-arrow{position:absolute;top:50%;width:44px;height:44px;margin-top:-22px}
  .gwb-prev{left:8px}
  .gwb-next{right:8px}
  .gwb-arrow svg{width:28px;height:28px}
  .gwb-text{margin:0 18px;padding:18px 0 24px}
  .gwb-frame,.gwb-cap{grid-template-columns:1fr;row-gap:8px}
  .gwb-cover{padding:20px 58px}
  .gwb-start{padding:0 32px}
}
@media(prefers-reduced-motion:reduce){
  .gwb-cover,.gwb.is-started .gwb-cover{transform:none;transition:opacity .2s,visibility 0s .2s}
  .gwb-arrow{transition:none}
}
