/* Site header and the "live wire" menu. Printed by the plugin on every page. */

/* ---------- top bar ---------- */
.pps-topbar { position: fixed; top: 0; left: 0; right: 0; z-index: 90; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; height: 78px; padding: 0 var(--pps-gutter); background: linear-gradient(180deg, rgba(5, 5, 7, 0.82), rgba(5, 5, 7, 0.55)); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-bottom: 1px solid rgba(226, 234, 242, 0.12); transition: background-color 0.4s, height 0.4s var(--pps-ease); }
.pps-topbar.is-scrolled { height: 66px; background: rgba(5, 5, 7, 0.94); }
.admin-bar .pps-topbar { top: 32px; }
.pps-topbar__logo { display: block; flex: none; }
.pps-topbar__logo img { display: block; height: 52px; width: auto; transition: height 0.4s var(--pps-ease); }
.pps-topbar.is-scrolled .pps-topbar__logo img { height: 44px; }
.pps-topbar__right { display: flex; align-items: center; gap: clamp(0.75rem, 2vw, 1.75rem); }
.pps-topbar__cta { display: inline-flex; align-items: center; min-height: 44px; padding: 0 1.2rem; font-family: var(--pps-font-display); font-weight: 700; font-size: 0.95rem; letter-spacing: 0.14em; text-transform: uppercase; text-decoration: none; color: var(--pps-white); background: linear-gradient(180deg, #2f9bff, var(--pps-blue-deep)); box-shadow: 0 8px 26px -10px rgba(22, 139, 255, 0.9); transition: filter 0.2s, transform 0.4s var(--pps-ease); }
.pps-topbar__cta:hover { filter: brightness(1.15); transform: translateY(-1px); }

/* menu button: three nodes joined by a wire */
.pps-menu-btn { position: relative; display: inline-flex; align-items: center; gap: 0.9rem; min-height: 48px; padding: 0 0.2rem 0 0; background: none; border: 0; cursor: pointer; color: var(--pps-white); font-family: var(--pps-font-mono); font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; }
.pps-menu-btn svg { width: 44px; height: 28px; overflow: visible; fill: none; }
.pps-menu-btn__wire { stroke: var(--pps-fiber-cyan); stroke-width: 1.6; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 0; transition: stroke-dashoffset 0.6s var(--pps-ease), opacity 0.3s; }
.pps-menu-btn__node { fill: var(--pps-white); transition: transform 0.6s var(--pps-ease), fill 0.3s; transform-box: fill-box; transform-origin: center; }
.pps-menu-btn:hover .pps-menu-btn__node { fill: var(--pps-fiber-cyan); }
.pps-menu-btn:hover .pps-menu-btn__node:nth-of-type(2) { transform: translateY(-3px); }
.pps-menu-btn__x { stroke: var(--pps-white); stroke-width: 2; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 0.5s var(--pps-ease); }
.pps-menu-btn[aria-expanded='true'] .pps-menu-btn__wire { stroke-dashoffset: 1; opacity: 0; }
.pps-menu-btn[aria-expanded='true'] .pps-menu-btn__node { transform: scale(0); }
.pps-menu-btn[aria-expanded='true'] .pps-menu-btn__x { stroke-dashoffset: 0; transition-delay: 0.2s; }
.pps-menu-btn__label { min-width: 3.4em; text-align: left; }

/* ---------- overlay ---------- */
.pps-menu { position: fixed; inset: 0; z-index: 85; overflow: hidden auto; background: radial-gradient(70% 90% at 22% 50%, #10151f, var(--pps-black) 70%); color: var(--pps-mist); opacity: 0; visibility: hidden; transition: opacity 0.45s var(--pps-ease), visibility 0s 0.45s; }
.pps-menu::before { content: ''; position: absolute; inset: 0; background-image: linear-gradient(rgba(226, 234, 242, 0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(226, 234, 242, 0.035) 1px, transparent 1px); background-size: 64px 64px; -webkit-mask-image: radial-gradient(80% 80% at 40% 50%, #000, transparent); mask-image: radial-gradient(80% 80% at 40% 50%, #000, transparent); pointer-events: none; }
.pps-menu.is-open { opacity: 1; visibility: visible; transition: opacity 0.45s var(--pps-ease), visibility 0s; }
.pps-menu__inner { position: relative; display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); align-items: center; gap: clamp(3rem, 12vw, 14rem); min-height: 100%; padding: calc(78px + 3rem) var(--pps-gutter) 7rem; }
.pps-menu__wires { position: absolute; left: 0; top: 0; width: 100%; height: 100%; overflow: visible; fill: none; pointer-events: none; }

/* the source the wires leave from */
.pps-menu__hub { position: relative; justify-self: center; display: grid; justify-items: center; gap: 1.2rem; text-align: center; opacity: 0; transform: scale(0.92); transition: opacity 0.6s var(--pps-ease), transform 0.9s var(--pps-ease); }
.pps-menu.is-open .pps-menu__hub { opacity: 1; transform: none; }
.pps-menu__core { position: relative; display: grid; place-items: center; width: clamp(150px, 15vw, 230px); aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(22, 139, 255, 0.22), rgba(22, 139, 255, 0) 68%); box-shadow: inset 0 0 0 1px rgba(85, 200, 255, 0.5); }
.pps-menu__core::before, .pps-menu__core::after { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 1px solid rgba(85, 200, 255, 0.55); animation: pps-hub-ring 3.2s var(--pps-ease) infinite; }
.pps-menu__core::after { animation-delay: 1.6s; }
.pps-menu__core img { position: relative; width: 78%; height: auto; }
.pps-menu__port { position: absolute; right: -5px; top: 50%; width: 10px; height: 10px; margin-top: -5px; border-radius: 50%; background: var(--pps-fiber-cyan); box-shadow: 0 0 14px 3px rgba(22, 139, 255, 0.9); }
.pps-menu__hub .pps-mono { color: var(--pps-steel); font-size: 0.66rem; }
.pps-menu__hub .pps-mono b { color: var(--pps-fiber-cyan); font-weight: 500; }
@keyframes pps-hub-ring { 0% { transform: scale(1); opacity: 0.7; } 100% { transform: scale(1.55); opacity: 0; } }

/* items: each one is a terminal on the end of a wire */
.pps-menu__list { position: relative; display: grid; gap: clamp(0.4rem, 1.6vh, 1.3rem); justify-self: start; }
.pps-menu__item > a, .pps-menu__sub a { position: relative; display: inline-flex; align-items: center; gap: 1.1rem; color: var(--pps-white); text-decoration: none; opacity: 0; transform: translateX(-18px); transition: opacity 0.5s var(--pps-ease), transform 0.7s var(--pps-ease), color 0.25s; transition-delay: 0s; }
.pps-menu.is-open .pps-menu__item > a, .pps-menu.is-open .pps-menu__sub a { opacity: 1; transform: none; transition-delay: calc(var(--i, 0) * 80ms + 0.55s); }
.pps-menu__dot { position: relative; flex: none; width: 14px; height: 14px; border-radius: 50%; background: var(--pps-black); box-shadow: inset 0 0 0 2px var(--pps-steel); transition: box-shadow 0.3s, background-color 0.3s, transform 0.5s var(--pps-ease); }
.pps-menu.is-open .pps-menu__dot { animation: pps-dot-on 0.5s var(--pps-ease) both; animation-delay: calc(var(--i, 0) * 80ms + 0.85s); }
@keyframes pps-dot-on { 0% { box-shadow: inset 0 0 0 2px var(--pps-steel); } 40% { transform: scale(1.7); background: var(--pps-white); box-shadow: 0 0 22px 6px rgba(85, 200, 255, 0.9); } 100% { background: var(--pps-fiber-cyan); box-shadow: 0 0 12px 2px rgba(22, 139, 255, 0.8); } }
.pps-menu__num { font-family: var(--pps-font-mono); font-size: 0.7rem; letter-spacing: 0.16em; color: var(--pps-steel); transition: color 0.25s; }
.pps-menu__label { font-family: var(--pps-font-display); font-weight: 800; font-size: clamp(2.2rem, 5.4vh + 0.6vw, 4.6rem); line-height: 1; letter-spacing: 0.01em; text-transform: uppercase; transition: transform 0.6s var(--pps-ease); }
.pps-menu__item > a:hover .pps-menu__label, .pps-menu__item > a:focus-visible .pps-menu__label { transform: translateX(10px); }
.pps-menu__item > a:hover, .pps-menu__item > a:focus-visible, .pps-menu__sub a:hover, .pps-menu__sub a:focus-visible, .pps-menu a[aria-current='page'] { color: var(--pps-fiber-cyan); }
.pps-menu a:hover .pps-menu__num, .pps-menu a:focus-visible .pps-menu__num { color: var(--pps-fiber-cyan); }
.pps-menu a:hover .pps-menu__dot, .pps-menu a:focus-visible .pps-menu__dot { transform: scale(1.35); background: var(--pps-white); box-shadow: 0 0 22px 6px rgba(85, 200, 255, 0.95); }
.pps-menu__sub { display: grid; gap: 0.7rem; margin: 0.9rem 0 0.6rem clamp(3rem, 5vw, 5.5rem); }
.pps-menu__sub .pps-menu__dot { width: 10px; height: 10px; }
.pps-menu__sub .pps-menu__label { font-size: clamp(1.1rem, 1.5vw, 1.5rem); font-weight: 700; letter-spacing: 0.04em; }

/* the wires */
.pps-wire path { vector-effect: non-scaling-stroke; }
.pps-wire__base { stroke: rgba(143, 159, 180, 0.28); stroke-width: 1.4; }
.pps-wire__live { stroke: var(--pps-electric-blue); stroke-width: 2; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 0s, stroke 0.3s, stroke-width 0.3s, opacity 0.3s; }
.pps-menu.is-open .pps-wire__live { stroke-dashoffset: 0; transition: stroke-dashoffset 0.9s cubic-bezier(0.65, 0, 0.35, 1) calc(var(--i, 0) * 80ms + 0.1s), stroke 0.3s, stroke-width 0.3s, opacity 0.3s; }
.pps-wire__pulse { stroke: #dff4ff; stroke-width: 3.5; stroke-linecap: round; stroke-dasharray: 0.035 0.965; stroke-dashoffset: 1; opacity: 0; }
.pps-menu.is-open .pps-wire__pulse { opacity: 1; animation: pps-wire-pulse var(--pps-wire-t, 3.4s) linear infinite; animation-delay: calc(var(--i, 0) * 0.43s + 1.3s); transition: opacity 0.4s 1.3s; }
@keyframes pps-wire-pulse { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
.pps-menu.has-hot .pps-wire:not(.is-hot) .pps-wire__live { opacity: 0.28; }
.pps-menu.has-hot .pps-wire:not(.is-hot) .pps-wire__pulse { opacity: 0; }
.pps-wire.is-hot .pps-wire__live { stroke: var(--pps-fiber-cyan); stroke-width: 3.2; filter: drop-shadow(0 0 6px rgba(22, 139, 255, 0.95)); }
.pps-wire.is-hot { --pps-wire-t: 1.1s; }
.pps-wire.is-hot .pps-wire__pulse { stroke-width: 5; stroke-dasharray: 0.06 0.27; }

/* bottom strip */
.pps-menu__foot { position: absolute; left: var(--pps-gutter); right: var(--pps-gutter); bottom: 2rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem 2rem; padding-top: 1.2rem; border-top: 1px solid var(--pps-rule-dark); font-family: var(--pps-font-mono); font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--pps-steel); opacity: 0; transition: opacity 0.6s 0.9s; }
.pps-menu.is-open .pps-menu__foot { opacity: 1; }
.pps-menu__foot b { color: var(--pps-fiber-cyan); font-weight: 500; }
.pps-menu__foot i { display: inline-block; width: 8px; height: 8px; margin-right: 0.6rem; border-radius: 50%; background: #3ddc84; box-shadow: 0 0 10px #3ddc84; animation: pps-breathe 1.6s ease-in-out infinite alternate; }

html.pps-menu-open { overflow: hidden; }

@media (max-width: 900px) {
  .pps-topbar { height: 66px; }
  .pps-topbar__logo img, .pps-topbar.is-scrolled .pps-topbar__logo img { height: 42px; }
  .pps-topbar__cta { display: none; }
  .admin-bar .pps-topbar { top: 46px; }
  .pps-menu__inner { grid-template-columns: minmax(0, 1fr); align-items: start; gap: 2.2rem; padding: calc(66px + 1.8rem) var(--pps-gutter) 6.5rem; }
  .pps-menu__hub { justify-self: start; grid-auto-flow: column; align-items: center; gap: 1rem; }
  .pps-menu__core { width: 74px; }
  .pps-menu__port { right: auto; left: 50%; top: auto; bottom: -5px; margin: 0 0 0 -5px; }
  .pps-menu__list { padding-left: 54px; gap: 0.9rem; }
  .pps-menu__label { font-size: clamp(1.9rem, 8.4vw, 2.8rem); }
  .pps-menu__sub { margin-left: 1.6rem; }
  .pps-menu__sub .pps-menu__label { font-size: 1.05rem; }
  .pps-menu__num { display: none; }
  .pps-menu__foot span:last-child { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .pps-wire__pulse, .pps-menu__core::before, .pps-menu__core::after { animation: none !important; opacity: 0 !important; }
  .pps-menu.is-open .pps-wire__live, .pps-menu.is-open .pps-menu__item > a, .pps-menu.is-open .pps-menu__sub a { transition-duration: 0.01s; transition-delay: 0s; }
  .pps-menu.is-open .pps-menu__dot { animation-duration: 0.01s; animation-delay: 0s; }
}
