/* =====================================================================
   Homepage hero: the four services as a radial selection wheel.
   Four ring segments around a centre hub, inside a glowing rim.
   - Hover, keyboard focus or a tap: the segment slides out and grows,
     the others dim, and the hub shows its number.
   - Touch: first tap selects, second tap opens (js/svc-wheel.js).
   - Opening screen only: it spins shut as soon as you scroll down
     (.is-away, set by js/svc-wheel.js) and opens again at the top.
   Replaces the docked 4-card grid (.svc-picker--dock in css/proof.css).
   ===================================================================== */
/* Phones: 100vh is the screen with the browser bars hidden, so anything pinned to the bottom of
   the opening screen sits behind the bottom toolbar until you scroll. --pp-vb is the height those
   bars take (0 on desktop); bottom-pinned items add it. Also used by css/pp-gate.css and index.html. */
:root { --pp-vb: 0px; }
@supports (height: 100svh) { :root { --pp-vb: calc(100vh - 100svh); } }

.svc-wheel {
  --W: clamp(270px, 44vh, 340px);   /* wheel diameter */
  --gap: 4px;                       /* gap between segments */
  --rin: calc(var(--W) * 0.15);     /* hole radius (the hub sits in it) */
  --m: calc(var(--W) * 0.218);      /* label centre, along the diagonal: mid-band */
  --pop: 7px;                       /* how far an active segment slides out */
  position: absolute;
  left: 50%;
  bottom: calc(clamp(2.5rem, 7vh, 4.5rem) + var(--pp-vb));
  transform: translateX(-50%);   /* centred on every screen size */
  z-index: 6;
  width: var(--W);
  height: var(--W);
  margin: 0;
  /* The box itself never takes taps: once the wheel hides on scroll it would sit invisibly
     over the hero buttons and the workspace station labels (worst on phones). Only the ring does. */
  pointer-events: none;
}

.svc-wheel-ring {
  position: relative;
  pointer-events: auto;
  width: 100%;
  height: 100%;
  /* box-shadow, not filter: drop-shadow. A filter here re-renders the whole wheel (and the
     spinning rim inside it) every frame over the live 3D scene; in Chrome that showed up as
     square blocks dropping out and the rim flickering on and off. */
  border-radius: 50%;
  box-shadow: 0 18px 30px rgba(0, 0, 0, .5);
  transition: transform .5s cubic-bezier(.2, .9, .25, 1.15), opacity .35s ease, visibility 0s;
  /* backwards (not both), so the opened state doesn't override .is-away afterwards */
  animation: svcWheelIn .7s cubic-bezier(.2, .9, .25, 1.15) .35s backwards;
}
@keyframes svcWheelIn {
  from { opacity: 0; transform: scale(.55) rotate(-40deg); }
  to   { opacity: 1; transform: none; }
}

/* Rim: a soft lilac glow ring with tick marks, slowly turning */
.svc-wheel-ring::before,
.svc-wheel-ring::after {
  content: '';
  position: absolute;
  inset: calc(var(--W) * -0.055);
  border-radius: 50%;
  pointer-events: none;
}
.svc-wheel-ring::before {
  background:
    conic-gradient(from 0deg, transparent 0 285deg, rgba(124, 77, 255, .35) 330deg, rgba(220, 208, 255, .85) 356deg, #FFFFFF 359.5deg, transparent 360deg),
    radial-gradient(circle closest-side, transparent 84%, rgba(124, 77, 255, .28) 92%, rgba(124, 77, 255, 0) 100%);
  border: 1px solid rgba(184, 162, 255, .28);
  -webkit-mask: radial-gradient(circle closest-side, transparent 79%, #000 80%);
          mask: radial-gradient(circle closest-side, transparent 79%, #000 80%);
  animation: svcRimSweep 4.5s linear infinite;
  will-change: transform;   /* spin on the GPU instead of repainting the masked gradient */
}
@keyframes svcRimSweep { to { transform: rotate(360deg); } }
.svc-wheel-ring::after {
  inset: calc(var(--W) * -0.035);
  background: repeating-conic-gradient(from 0deg, rgba(184, 162, 255, .55) 0 .6deg, transparent .6deg 7.5deg);
  -webkit-mask: radial-gradient(circle closest-side, transparent calc(100% - 6px), #000 calc(100% - 5px), #000 calc(100% - 1px), transparent 100%);
          mask: radial-gradient(circle closest-side, transparent calc(100% - 6px), #000 calc(100% - 5px), #000 calc(100% - 1px), transparent 100%);
  animation: svcWheelSpin 60s linear infinite;
  will-change: transform;
}
@keyframes svcWheelSpin { to { transform: rotate(360deg); } }

/* ---------- Segments ---------- */
.svc-seg {
  position: absolute;
  width: calc(50% - var(--gap));
  height: calc(50% - var(--gap));
  display: block;
  color: #F5F3FF;
  text-decoration: none;
  background:
    linear-gradient(var(--sheen), rgba(255, 255, 255, .09), rgba(255, 255, 255, 0) 38%),
    radial-gradient(circle at var(--cx) var(--cy), rgba(124, 77, 255, .5) 0%, rgba(52, 30, 132, .78) 45%, rgba(13, 15, 23, .94) 78%);
  box-shadow: inset 0 0 0 1px rgba(184, 162, 255, .4), inset 0 0 24px rgba(124, 77, 255, .3);
  /* No backdrop-filter: blurring the live 3D scene behind four masked segments every frame
     caused the start-screen glitches (missing square blocks, flickering rim). The fill above
     is a touch more solid instead. */
  -webkit-mask: radial-gradient(circle at var(--cx) var(--cy), transparent var(--rin), #000 calc(var(--rin) + 1px));
          mask: radial-gradient(circle at var(--cx) var(--cy), transparent var(--rin), #000 calc(var(--rin) + 1px));
  transform-origin: var(--cx) var(--cy);
  transition: transform .3s cubic-bezier(.2, .9, .25, 1.3), background .25s ease, box-shadow .25s ease, opacity .25s ease;
  -webkit-tap-highlight-color: transparent;
  outline: none;
}
/* 01 top-left, 02 top-right, 03 bottom-right, 04 bottom-left (clockwise) */
.svc-seg--1 { --ix: 100%; --iy: 100%; }
.svc-seg--2 { --ix: 0%;   --iy: 100%; }
.svc-seg--3 { --ix: 0%;   --iy: 0%; }
.svc-seg--4 { --ix: 100%; --iy: 0%; }
.svc-seg--1 { top: 0;    left: 0;  border-top-left-radius: 100%;     --cx: calc(100% + var(--gap)); --cy: calc(100% + var(--gap)); --dx: -1; --dy: -1; --sheen: 135deg; }
.svc-seg--2 { top: 0;    right: 0; border-top-right-radius: 100%;    --cx: calc(0% - var(--gap));   --cy: calc(100% + var(--gap)); --dx: 1;  --dy: -1; --sheen: 225deg; }
.svc-seg--3 { bottom: 0; right: 0; border-bottom-right-radius: 100%; --cx: calc(0% - var(--gap));   --cy: calc(0% - var(--gap));   --dx: 1;  --dy: 1;  --sheen: 315deg; }
.svc-seg--4 { bottom: 0; left: 0;  border-bottom-left-radius: 100%;  --cx: calc(100% + var(--gap)); --cy: calc(0% - var(--gap));   --dx: -1; --dy: 1;  --sheen: 45deg; }

/* HUD layer on each segment: neon outer and inner arcs, radar rings and spokes */
.svc-seg::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  --R: calc(var(--W) / 2 - var(--gap));
  background:
    radial-gradient(circle at var(--ix) var(--iy), transparent calc(var(--R) - 7px), rgba(220, 208, 255, .95) calc(var(--R) - 4px), rgba(124, 77, 255, .5) calc(var(--R) - 2px), transparent var(--R)),
    radial-gradient(circle at var(--cx) var(--cy), transparent calc(var(--rin) + 2px), rgba(184, 162, 255, .75) calc(var(--rin) + 3.5px), transparent calc(var(--rin) + 6px)),
    repeating-radial-gradient(circle at var(--cx) var(--cy), rgba(184, 162, 255, .08) 0 1px, transparent 1px 9px),
    repeating-conic-gradient(from 0deg at var(--cx) var(--cy), rgba(184, 162, 255, .12) 0 .35deg, transparent .35deg 5deg);
  opacity: .85;
  transition: opacity .25s ease;
}
.svc-seg:hover::before,
.svc-seg:focus-visible::before,
.svc-seg.is-on::before { opacity: 1; }

/* Number, icon and name, centred in the ring band */
/* Same block in every quarter: number + icon on one row, then the name on exactly two lines.
   Sized from the wheel (--W) so it always fits inside its quarter (max ~0.4W wide there). */
.svc-seg-in {
  position: absolute;
  width: calc(var(--W) * 0.36);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  column-gap: calc(var(--W) * 0.022);
  row-gap: calc(var(--W) * 0.018);
  text-align: center;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.svc-seg--1 .svc-seg-in { left: calc(100% - var(--m)); top: calc(100% - var(--m)); }
.svc-seg--2 .svc-seg-in { left: var(--m);              top: calc(100% - var(--m)); }
.svc-seg--3 .svc-seg-in { left: var(--m);              top: var(--m); }
.svc-seg--4 .svc-seg-in { left: calc(100% - var(--m)); top: var(--m); }
.svc-seg-in::before {
  font: 600 calc(var(--W) * 0.03)/1 'Orbitron', 'Satoshi', system-ui, sans-serif;
  letter-spacing: .14em;
  color: #C9B8FF;
  text-shadow: 0 0 8px rgba(124, 77, 255, .95);
  transition: color .25s ease;
}
.svc-seg--1 .svc-seg-in::before { content: '01'; }
.svc-seg--2 .svc-seg-in::before { content: '02'; }
.svc-seg--3 .svc-seg-in::before { content: '03'; }
.svc-seg--4 .svc-seg-in::before { content: '04'; }

.svc-seg .pp-icon { width: calc(var(--W) * 0.062); height: calc(var(--W) * 0.062); color: #CDBDFF; filter: drop-shadow(0 0 5px rgba(124, 77, 255, .95)); transition: color .25s ease, transform .3s cubic-bezier(.2, .9, .25, 1.3); }
/* Short HUD tag in each button (Orbitron, the site's HUD font); the full name is in .svc-sr
   for search engines and screen readers, and shows in the readout above the wheel. */
.svc-seg-name { flex-basis: 100%; }
.svc-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.svc-tag {
  display: block;
  white-space: nowrap;
  font: 700 calc(var(--W) * 0.04)/1 'Orbitron', 'Clash Display', system-ui, sans-serif;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #EDE7FF;
  text-shadow: 0 0 10px rgba(124, 77, 255, .8), 0 1px 4px rgba(0, 0, 0, .7);
}
/* Resting a little dim, so the radar blip has somewhere to go */
.svc-seg-in { opacity: .82; transition: opacity .3s ease; }
.svc-seg:hover .svc-seg-in,
.svc-seg:focus-visible .svc-seg-in,
.svc-seg.is-on .svc-seg-in { opacity: 1; }

/* Radar blip: when the rim sweep passes a button (js/svc-wheel.js adds .is-blip) */
.svc-seg.is-blip .svc-seg-in { animation: svcBlip .9s ease-out; }
.svc-seg.is-blip::before { animation: svcBlipRings .9s ease-out; }
@keyframes svcBlip {
  0%   { opacity: .82; filter: none; }
  6%   { opacity: 1; filter: brightness(1.7) drop-shadow(0 0 6px rgba(220, 208, 255, .9)); }
  12%  { opacity: .6; }
  20%  { opacity: 1; filter: brightness(1.45) drop-shadow(0 0 5px rgba(220, 208, 255, .7)); }
  100% { opacity: .82; filter: none; }
}
@keyframes svcBlipRings {
  0%   { opacity: .85; }
  10%  { opacity: 1; filter: brightness(1.6); }
  100% { opacity: .85; filter: none; }
}

/* Readout above the wheel: the full name of the button the sweep just touched,
   or of the one you hover, focus or tap (js/svc-wheel.js) */
.svc-readout {
  position: absolute;
  left: 50%;
  bottom: calc(100% + var(--W) * .055 + .5rem);
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  gap: .55em;
  padding: .55em .9em;
  white-space: nowrap;
  font: 600 calc(var(--W) * 0.034)/1 'Orbitron', 'Clash Display', system-ui, sans-serif;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #EDE7FF;
  background:
    linear-gradient(#B8A2FF, #B8A2FF) top left / 8px 1.5px no-repeat,
    linear-gradient(#B8A2FF, #B8A2FF) top left / 1.5px 8px no-repeat,
    linear-gradient(#B8A2FF, #B8A2FF) bottom right / 8px 1.5px no-repeat,
    linear-gradient(#B8A2FF, #B8A2FF) bottom right / 1.5px 8px no-repeat,
    rgba(13, 15, 23, .74);
  border: 1px solid rgba(184, 162, 255, .28);
  box-shadow: 0 0 18px rgba(124, 77, 255, .35);
  transform: translateX(-50%);
  pointer-events: none;
  transition: opacity .3s ease, visibility 0s;
}
.svc-readout-n { color: #B8A2FF; text-shadow: 0 0 8px rgba(124, 77, 255, .9); }
.svc-readout-n::before {
  content: '';
  display: inline-block;
  width: .55em;
  height: .55em;
  margin-right: .55em;
  border-radius: 50%;
  background: #6CF5C2;
  box-shadow: 0 0 8px #6CF5C2;
  vertical-align: .05em;
}
.svc-readout.is-swap .svc-readout-t { animation: svcReadIn .5s steps(1, end); }
@keyframes svcReadIn {
  0%   { opacity: .2; }
  15%  { opacity: 1; }
  30%  { opacity: .4; }
  45%, 100% { opacity: 1; }
}
.svc-wheel.is-away .svc-readout,
.svc-wheel.hud-in .svc-readout,
html.pp-loading .svc-readout { opacity: 0; visibility: hidden; transition: opacity .2s ease, visibility 0s .2s; }

/* Active: hover, keyboard focus, or selected by a tap */
.svc-seg:hover,
.svc-seg:focus-visible,
.svc-seg.is-on {
  transform: translate(calc(var(--dx) * var(--pop)), calc(var(--dy) * var(--pop))) scale(1.1);
  background:
    linear-gradient(var(--sheen), rgba(255, 255, 255, .24), rgba(255, 255, 255, 0) 48%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .09) 0 1px, transparent 1px 3px),
    radial-gradient(circle at var(--cx) var(--cy), #A07CFF 15%, #6A3CF0 55%, #3A1BA8 100%);
  box-shadow: inset 0 0 0 2px rgba(220, 208, 255, .9), inset 0 0 30px rgba(220, 208, 255, .35), 0 0 26px rgba(124, 77, 255, .7);
  z-index: 2;
}
.svc-seg:focus-visible { box-shadow: inset 0 0 0 3px #F5F3FF, inset 0 0 26px rgba(255, 255, 255, .22); }
.svc-seg:hover .pp-icon,
.svc-seg:focus-visible .pp-icon,
.svc-seg.is-on .pp-icon { color: #fff; transform: scale(1.2); }
.svc-seg:hover .svc-seg-in::before,
.svc-seg:focus-visible .svc-seg-in::before,
.svc-seg.is-on .svc-seg-in::before { color: #fff; }
.svc-seg:active { transform: translate(calc(var(--dx) * var(--pop)), calc(var(--dy) * var(--pop))) scale(1.14); }

/* the others dim while one is active */
.svc-wheel:has(.svc-seg:hover, .svc-seg:focus-visible, .svc-seg.is-on) .svc-seg:not(:hover):not(:focus-visible):not(.is-on) { opacity: .55; }

/* ---------- Hub ---------- */
.svc-wheel-hub {
  position: absolute;
  left: 50%;
  top: 50%;
  width: calc(var(--rin) * 2 - 10px);
  height: calc(var(--rin) * 2 - 10px);
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, rgba(124, 77, 255, .35), rgba(18, 20, 27, .95) 70%);
  box-shadow:
    inset 0 0 0 1px rgba(184, 162, 255, .5),
    0 0 0 4px rgba(124, 77, 255, .16),
    0 0 24px rgba(124, 77, 255, .35);
  display: grid;
  place-items: center;
  pointer-events: none;
  z-index: 3;
  transition: box-shadow .25s ease;
}
.svc-wheel:has(.svc-seg:hover, .svc-seg:focus-visible, .svc-seg.is-on) .svc-wheel-hub {
  box-shadow: inset 0 0 0 1px rgba(220, 208, 255, .8), 0 0 0 4px rgba(124, 77, 255, .3), 0 0 32px rgba(124, 77, 255, .6);
}
.svc-wheel-hub > span {
  grid-area: 1 / 1;
  text-align: center;
  font: 700 .62rem/1.15 'Satoshi', system-ui, sans-serif;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #C3B2FF;
  transition: opacity .2s ease, transform .25s ease;
}
.svc-wheel-hub .hub-default { font-family: 'Orbitron', 'Satoshi', system-ui, sans-serif; font-size: calc(var(--W) * 0.03); letter-spacing: .14em; }
.svc-wheel-hub .hub-n { opacity: 0; transform: scale(.8); color: #fff; font: 600 1.35rem/1 'Clash Display', 'Satoshi', system-ui, sans-serif; letter-spacing: 0; text-transform: none; }
.svc-wheel-hub .hub-n small { display: block; margin-top: .2rem; font: 700 .5rem/1 'Satoshi', system-ui, sans-serif; letter-spacing: .14em; text-transform: uppercase; color: #C3B2FF; }
.svc-wheel:has(.svc-seg:hover, .svc-seg:focus-visible, .svc-seg.is-on) .hub-default { opacity: 0; }
.svc-wheel:has(.svc-seg--1:is(:hover, :focus-visible, .is-on)) .hub-n1,
.svc-wheel:has(.svc-seg--2:is(:hover, :focus-visible, .is-on)) .hub-n2,
.svc-wheel:has(.svc-seg--3:is(:hover, :focus-visible, .is-on)) .hub-n3,
.svc-wheel:has(.svc-seg--4:is(:hover, :focus-visible, .is-on)) .hub-n4 { opacity: 1; transform: none; }

/* ---------- Coming out of the loader ---------- */
/* The homepage loader (#animeIntro in index.html) counts to 100% and then glides onto this wheel.
   Until then the wheel stays hidden (html.pp-loading); then it takes over with a quick fade. */
html.pp-loading .svc-wheel-ring { opacity: 0; visibility: hidden; animation: none; }
html.pp-morphed .svc-wheel-ring { animation: svcWheelReveal .35s ease-out backwards; }
@keyframes svcWheelReveal {
  from { opacity: 0; transform: scale(.97); }
  to   { opacity: 1; transform: none; }
}
/* Skipped from the "Press to start" gate (and reduced motion, below): a calm fade */
html.pp-skip .svc-wheel-ring { animation: svcWheelCalm .7s ease .15s backwards; }
@keyframes svcWheelCalm { from { opacity: 0; } }

/* ---------- HUD reveal (js/svc-wheel.js adds .hud-in when the loader lands) ----------
   0.08s  scan beam sweeps down the wheel, rim ticks spin into place
   0.15s+ segments fly in 01, 02, 03, 04 (every ~0.15s) as holograms and lock with a flash
   0.88s  hub powers up; 0.95s shockwave and a light sweep across the wheel */
.svc-wheel.hud-in .svc-seg--1 { --hd: .15s; }
.svc-wheel.hud-in .svc-seg--2 { --hd: .27s; }
.svc-wheel.hud-in .svc-seg--3 { --hd: .45s; }
.svc-wheel.hud-in .svc-seg--4 { --hd: .57s; }
.svc-wheel.hud-in .svc-wheel-ring::before { animation: hudGlow .8s ease-out backwards; }
.svc-wheel.hud-in .svc-wheel-ring::after { animation: hudTicks 1s cubic-bezier(.2, .9, .25, 1) backwards, svcWheelSpin 60s linear 1s infinite; }
@keyframes hudGlow { from { opacity: 0; transform: scale(.82); } }
@keyframes hudTicks { from { opacity: 0; transform: rotate(-150deg) scale(.9); } }

.svc-wheel.hud-in .svc-seg { animation: hudSegIn .6s var(--hd) backwards; }
@keyframes hudSegIn {
  0%   { opacity: 0; transform: translate(calc(var(--dx) * 34px), calc(var(--dy) * 34px)) scale(.86); animation-timing-function: cubic-bezier(.5, 0, .9, .5); }
  45%  { opacity: 1; transform: translate(calc(var(--dx) * -2px), calc(var(--dy) * -2px)) scale(1.02); animation-timing-function: cubic-bezier(.2, .8, .3, 1); }
  100% { opacity: 1; transform: none; }
}
/* Hologram layer on each segment: scanlines and a rim glow, flashing white as it locks */
.svc-seg::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background:
    repeating-linear-gradient(0deg, rgba(220, 208, 255, .3) 0 1px, transparent 1px 4px),
    radial-gradient(circle at var(--cx) var(--cy), transparent 38%, rgba(124, 77, 255, .35) 70%, rgba(220, 208, 255, .8) 100%);
  box-shadow: inset 0 0 0 1.5px rgba(220, 208, 255, .9);
}
.svc-wheel.hud-in .svc-seg::after { animation: hudFlash .8s ease-out var(--hd) backwards; }
@keyframes hudFlash {
  0%   { opacity: .8; }
  38%  { opacity: .8; }
  45%  { opacity: 1; background-color: rgba(255, 255, 255, .45); }
  60%  { opacity: .6; background-color: rgba(255, 255, 255, 0); }
  100% { opacity: 0; }
}
.svc-wheel.hud-in .svc-seg-in { animation: hudWipe .42s cubic-bezier(.65, 0, .35, 1) calc(var(--hd) + .2s) backwards; }
@keyframes hudWipe { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 -10% 0 -10%); } }

.svc-wheel.hud-in .svc-wheel-hub { animation: hudHub .55s cubic-bezier(.2, 1.5, .4, 1) .82s backwards; }
@keyframes hudHub { from { opacity: 0; transform: translate(-50%, -50%) scale(.2); } }
.svc-wheel-hub::before {
  content: '';
  position: absolute;
  inset: -7px;
  border-radius: 50%;
  border: 1px dashed rgba(184, 162, 255, .6);
  pointer-events: none;
  animation: svcWheelSpin 16s linear infinite reverse;
}
.svc-wheel-hub::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid rgba(184, 162, 255, .9);
  opacity: 0;
  pointer-events: none;
}
.svc-wheel.hud-in .svc-wheel-hub::after { animation: hudPing .8s ease-out .9s; }
@keyframes hudPing { from { opacity: .9; transform: scale(1); } to { opacity: 0; transform: scale(3.4); } }

/* Decoding labels: the real text stays (transparent) for screen readers under the glyphs */
.is-scr { position: relative; color: transparent !important; text-shadow: none !important; }
.svc-scr {
  position: absolute;
  inset: 0;
  color: #F5F3FF;
  white-space: pre-line;
  text-shadow: 0 0 8px rgba(124, 77, 255, .9);
}
.hub-default .svc-scr { color: #C3B2FF; }

/* Effects layer over the wheel (built by js/svc-wheel.js, removed when done) */
.svc-hud { position: absolute; inset: 0; z-index: 7; pointer-events: none; }
.svc-hud-clip { position: absolute; inset: 0; border-radius: 50%; overflow: hidden; }
.svc-hud-glare {
  position: absolute;
  top: -10%;
  bottom: -10%;
  left: 0;
  width: 38%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .3), transparent);
  mix-blend-mode: screen;
  transform: translateX(-160%) skewX(-18deg);
  animation: hudGlare .75s cubic-bezier(.4, 0, .2, 1) .95s forwards;
}
@keyframes hudGlare { to { transform: translateX(330%) skewX(-18deg); } }
.svc-hud-beam {
  position: absolute;
  left: -12%;
  right: -12%;
  top: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #B8A2FF 18%, #FFFFFF 50%, #B8A2FF 82%, transparent);
  box-shadow: 0 0 14px 3px rgba(124, 77, 255, .75);
  opacity: 0;
  animation: hudBeam .72s cubic-bezier(.45, 0, .25, 1) .08s forwards;
}
@keyframes hudBeam {
  0%   { opacity: 0; transform: translateY(-6px); }
  12%  { opacity: 1; }
  88%  { opacity: 1; }
  100% { opacity: 0; transform: translateY(calc(var(--W) + 6px)); }
}
.svc-hud-wave {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(184, 162, 255, .85);
  opacity: 0;
  animation: hudWave .9s cubic-bezier(.2, .8, .3, 1) .95s;
}
@keyframes hudWave { from { opacity: .85; transform: scale(1); } to { opacity: 0; transform: scale(1.6); } }
.svc-hud-status {
  position: absolute;
  left: 50%;
  bottom: calc(100% + var(--W) * .055 + .6rem);
  white-space: nowrap;
  padding: .42rem .75rem;
  border: 1px solid rgba(184, 162, 255, .32);
  border-radius: 999px;
  background: rgba(18, 20, 27, .66);
  font: 700 .58rem/1 'Satoshi', system-ui, sans-serif;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: rgba(195, 178, 255, .9);
  animation: hudStatus 2.3s ease forwards;
  transition: color .25s ease, border-color .25s ease;
}
.svc-hud-status b { color: #FFFFFF; font-weight: 700; font-variant-numeric: tabular-nums; }
.svc-hud-status.is-done { color: #B9FBE3; border-color: rgba(108, 245, 194, .55); }
@keyframes hudStatus {
  0%       { opacity: 0; transform: translate(-50%, 4px); }
  8%, 82%  { opacity: 1; transform: translate(-50%, 0); }
  100%     { opacity: 0; transform: translate(-50%, -4px); }
}
.svc-hud-px { position: absolute; left: -45%; top: -45%; width: 190%; height: 190%; z-index: 8; pointer-events: none; }

/* Page-wide boot scan as the loader hands over */
.pp-hud-sweep {
  position: fixed;
  inset: 0;
  z-index: 55;
  pointer-events: none;
  overflow: hidden;
  background: repeating-linear-gradient(0deg, rgba(184, 162, 255, .05) 0 1px, transparent 1px 3px);
  animation: hudSweepFade 1.2s ease forwards;
}
.pp-hud-sweep::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(184, 162, 255, .9) 25%, #FFFFFF 50%, rgba(184, 162, 255, .9) 75%, transparent);
  box-shadow: 0 0 20px 5px rgba(124, 77, 255, .55);
  animation: hudSweep .95s cubic-bezier(.45, 0, .2, 1) forwards;
}
@keyframes hudSweep { from { transform: translateY(-4px); } to { transform: translateY(100vh); } }
@keyframes hudSweepFade { 0% { opacity: 0; } 10%, 70% { opacity: 1; } 100% { opacity: 0; } }

/* ---------- Opening screen only ---------- */
/* Spins shut once you scroll (js/svc-wheel.js adds .is-away). The :has() rules are a
   fallback in case the script hasn't run: hide on the headline and stats steps. */
.svc-wheel.is-away .svc-wheel-ring,
.hero-stage-sticky:has(#step-headline.active) .svc-wheel-ring,
.hero-stage-sticky:has(#step-stats.active) .svc-wheel-ring {
  opacity: 0;
  visibility: hidden;
  transform: scale(.55) rotate(40deg);
  pointer-events: none;
  animation: none;
  transition: transform .4s cubic-bezier(.5, 0, .75, 0), opacity .3s ease, visibility 0s .4s;
}

/* Phones: a bit smaller, and lifted clear of the centred Scroll hint */
@media (max-width: 768px) {
  .svc-wheel {
    --W: min(296px, 80vw, max(264px, 38vh)); /* never below 264px, or the longer names touch the rim */
    --pop: 5px;
    bottom: calc(clamp(4.5rem, 10vh, 5.5rem) + var(--pp-vb)); /* clear of the Scroll hint, even with a segment popped out */
  }
}

@media (prefers-reduced-motion: reduce) {
  .svc-wheel-ring { animation: svcWheelCalm .7s ease backwards; }
  .svc-wheel-ring::after,
  .svc-wheel-ring::before,
  .svc-wheel-hub::before,
  .svc-seg.is-blip .svc-seg-in,
  .svc-seg.is-blip::before,
  .svc-readout.is-swap .svc-readout-t { animation: none; }
  .svc-seg, .svc-seg .pp-icon, .svc-wheel-ring,
  .svc-wheel.is-away .svc-wheel-ring { transition: opacity .2s ease, visibility 0s; }
  .svc-wheel.is-away .svc-wheel-ring { transform: none; }
}
