/* Power TechSL edge navigation.
   A half-circle tab pinned to the left edge appears once the header scrolls
   away, and opens a full-screen overlay menu. Progressive enhancement: the
   trigger and overlay are built by JS, so a no-JS visitor keeps the normal header. */

/* ---------------------------------------------------------------
   1. The half-circle edge trigger
   --------------------------------------------------------------- */
.nav-orb {
 position: fixed;
 left: 0;
 top: 50%;
 z-index: 70;
 /* A half-capsule: flat against the viewport edge, round on the inside.
    Each right corner radius is half the height, so together they exactly
    fill the height without the browser clamping them outward. */
 width: 36px;
 height: 84px;
 padding: 0;
 display: grid;
 place-items: center;
 border: 0;
 border-radius: 0 42px 42px 0;
 background: var(--cin-navy, #0d094c);
 color: #fff;
 box-shadow: 2px 0 26px #0d094c4d;
 transform: translate(-100%, -50%);
 opacity: 0;
 pointer-events: none;
 transition: transform .5s var(--cin-ease, cubic-bezier(.16,1,.3,1)), opacity .3s ease, width .35s var(--cin-ease, cubic-bezier(.16,1,.3,1)), background .3s ease;
}
.nav-orb.is-visible { transform: translate(0, -50%); opacity: 1; pointer-events: auto; }

/* Two offset bars that cross into an X when the overlay is open. They sit
   slightly left of centre so they read as part of the edge, not the curve. */
.nav-orb-bars { display: grid; gap: 7px; width: 18px; justify-items: start; transform: translateX(-2px); }
.nav-orb-bars i {
 display: block; height: 2px; width: 100%; background: #fff; border-radius: 2px;
 transition: transform .45s var(--cin-ease, cubic-bezier(.16,1,.3,1)), width .35s var(--cin-ease, cubic-bezier(.16,1,.3,1));
 transform-origin: center;
}
.nav-orb-bars i:nth-child(2) { width: 58%; }
.nav-orb:hover .nav-orb-bars i:nth-child(2) { width: 100%; }
.nav-orb[aria-expanded="true"] .nav-orb-bars i:nth-child(1) { transform: translateY(4.5px) rotate(45deg); }
.nav-orb[aria-expanded="true"] .nav-orb-bars i:nth-child(2) { width: 100%; transform: translateY(-4.5px) rotate(-45deg); }

/* The MENU label is not shown on the tab itself; the shape and bars carry it. */
.nav-orb-word { display: none; }

@media (hover: hover) and (pointer: fine) {
 .nav-orb:hover { width: 42px; background: #17116e; }
}

/* One quiet ring, drawn inside the shape so it cannot halo past the edge. */
.nav-orb::after {
 content: ''; position: absolute; inset: 0; border-radius: inherit;
 box-shadow: inset 0 0 0 1px #ffffff00;
 transition: box-shadow .3s ease;
 pointer-events: none;
}
.nav-orb:hover::after, .nav-orb:focus-visible::after { box-shadow: inset 0 0 0 1px #ffffff3d; }

/* ---------------------------------------------------------------
   2. Full-screen overlay
   --------------------------------------------------------------- */
.nav-overlay {
 position: fixed; inset: 0; z-index: 65;
 background: var(--cin-navy, #0d094c);
 color: #fff;
 display: grid;
 grid-template-rows: auto 1fr auto;
 padding: 26px clamp(22px, 5vw, 80px) 26px;
 overflow-y: auto; overscroll-behavior: contain;
 /* Circular wipe that opens from the trigger on the left edge. */
 clip-path: circle(0 at 0 50%);
 visibility: hidden;
}
.nav-overlay[hidden] { display: none; }
.motion-enabled .nav-overlay { transition: clip-path .85s var(--cin-ease, cubic-bezier(.16,1,.3,1)), visibility .85s; }
.nav-overlay.is-open { clip-path: circle(150% at 0 50%); visibility: visible; }

/* A faint grid of vertical rules, so the panel is not a flat block of colour. */
.nav-overlay::before {
 content: ''; position: absolute; inset: 0; pointer-events: none;
 background-image: repeating-linear-gradient(90deg, #ffffff0a 0 1px, transparent 1px 25%);
}

.nav-overlay-top { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.nav-overlay-top .eyebrow { color: #9f9fd0; }
.nav-overlay-top img { height: 28px; width: auto; filter: brightness(0) invert(1); }

/* Two columns: the links, and a panel that previews whatever is hovered. */
.nav-overlay-body {
 position: relative;
 display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .62fr);
 gap: clamp(30px, 5vw, 80px); align-items: center;
 margin: clamp(14px, 2.4vh, 32px) 0;
}

/* The links */
.nav-overlay-list { display: grid; align-content: center; gap: 0; }
.nav-link {
 position: relative;
 display: flex; align-items: center; gap: clamp(14px, 2vw, 26px);
 padding: clamp(5px, 1vh, 16px) 0;
 /* Scale with the viewport HEIGHT as well as its width, so the whole menu
    fits on one screen instead of forcing the reader to scroll a navigation. */
 font-size: clamp(28px, min(5.6vw, 7.4vh), 78px);
 line-height: 1.02; letter-spacing: -.05em;
 border-bottom: 1px solid #ffffff1c;
}
.nav-link-index { font-size: clamp(9px, .8vw, 12px); letter-spacing: .12em; color: #7d7db8; flex-shrink: 0; width: 2.2em; transition: color .3s ease; }
/* Hover: the word slides up and a coloured copy rises into its place. */
.nav-link-text { position: relative; display: inline-block; overflow: clip; vertical-align: bottom; }
.nav-link-text span { display: block; transition: transform .55s var(--cin-ease, cubic-bezier(.16,1,.3,1)); }
.nav-link-text span:last-child { position: absolute; inset: 0; color: #b8b2ff; transform: translateY(105%); }

/* A line that draws across the row, and the row itself eases to the right. */
.nav-link::before {
 content: ''; position: absolute; left: 0; bottom: -1px; height: 1px; width: 100%;
 background: #fff; transform: scaleX(0); transform-origin: left;
 transition: transform .6s var(--cin-ease, cubic-bezier(.16,1,.3,1));
}
.nav-link-arrow { margin-left: auto; width: clamp(18px, 1.6vw, 24px); height: auto; opacity: 0; transform: translate(-12px, 10px) rotate(-12deg); transition: opacity .35s ease, transform .55s var(--cin-ease, cubic-bezier(.16,1,.3,1)); flex-shrink: 0; }

@media (hover: hover) and (pointer: fine) {
 .motion-enabled .nav-link:hover .nav-link-text span:first-child { transform: translateY(-105%); }
 .motion-enabled .nav-link:hover .nav-link-text span:last-child { transform: translateY(0); }
 .nav-link:hover::before { transform: scaleX(1); }
 .nav-link:hover .nav-link-index { color: #b8b2ff; }
 .motion-enabled .nav-link:hover .nav-link-arrow { opacity: .85; transform: none; }
 /* Everything the pointer is not on steps back, so the focus is unmistakable. */
 .motion-enabled .nav-overlay-list:hover .nav-link { opacity: .28; transition: opacity .35s ease; }
 .motion-enabled .nav-overlay-list:hover .nav-link:hover { opacity: 1; }
 /* The row itself eases right as it takes focus. */
 .motion-enabled .nav-link { transition: opacity .35s ease, transform .55s var(--cin-ease, cubic-bezier(.16,1,.3,1)); }
 .motion-enabled .nav-overlay.is-open .nav-link:hover { transform: translateX(clamp(8px, 1vw, 18px)); }
}
.nav-link[aria-current] .nav-link-index { color: #fff; }
.nav-link[aria-current]::before { transform: scaleX(1); background: #ffffff5c; }

/* ---- The preview panel ---- */
.nav-preview { position: relative; align-self: center; }
.nav-preview-frame {
 position: relative; border-radius: 20px; overflow: clip;
 border: 1px solid #ffffff1f;
 background: linear-gradient(150deg, #ffffff12, #ffffff04);
 aspect-ratio: 4 / 3;
 display: grid;
}
.nav-preview-item {
 grid-area: 1 / 1; display: grid; align-content: center; gap: 12px;
 padding: clamp(20px, 2.4vw, 34px);
 opacity: 0; transform: scale(1.04);
}
.motion-enabled .nav-preview-item { transition: opacity .5s ease, transform .8s var(--cin-ease, cubic-bezier(.16,1,.3,1)); }
.nav-preview-item[data-show="true"] { opacity: 1; transform: none; }
.nav-preview-kicker { font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: #9f9fd0; }
.nav-preview-item h3 { font-size: clamp(19px, 1.7vw, 27px); letter-spacing: -.035em; line-height: 1.15; }
.nav-preview-item p { color: #c2c4e4; font-size: clamp(12px, 1vw, 14px); line-height: 1.55; }
/* A large ghost numeral behind the preview copy. */
.nav-preview-item b {
 position: absolute; right: .12em; bottom: -.16em; margin: 0;
 font-size: clamp(80px, 9.5vw, 165px); font-weight: 500; line-height: .9;
 color: #ffffff0d; letter-spacing: -.06em; pointer-events: none;
}

/* Footer of the overlay */
.nav-overlay-foot { position: relative; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-top: 18px; border-top: 1px solid #ffffff1c; font-size: 12px; color: #b3b4d8; }
.nav-overlay-foot a { border-bottom: 1px solid #ffffff40; padding-bottom: 2px; }
.nav-overlay-foot a:hover { border-color: #fff; color: #fff; }

/* Staggered entrance. */
.motion-enabled .nav-overlay .nav-link { opacity: 0; transform: translate3d(0, 30px, 0); }
.motion-enabled .nav-overlay.is-open .nav-link {
 opacity: 1; transform: none;
 transition: opacity .5s ease, transform .75s var(--cin-ease, cubic-bezier(.16,1,.3,1));
 transition-delay: calc(200ms + var(--i, 0) * 60ms);
}
.motion-enabled .nav-overlay .nav-preview { opacity: 0; transform: translate3d(26px, 0, 0); }
.motion-enabled .nav-overlay.is-open .nav-preview { opacity: 1; transform: none; transition: opacity .6s ease .34s, transform .9s var(--cin-ease, cubic-bezier(.16,1,.3,1)) .34s; }
.motion-enabled .nav-overlay .nav-overlay-top, .motion-enabled .nav-overlay .nav-overlay-foot { opacity: 0; transition: opacity .5s ease .45s; }
.motion-enabled .nav-overlay.is-open .nav-overlay-top, .motion-enabled .nav-overlay.is-open .nav-overlay-foot { opacity: 1; }

/* ---------------------------------------------------------------
   3. Small screens
   --------------------------------------------------------------- */
@media (max-width: 1000px) {
 /* The preview panel needs real width to earn its place; below this the
    links use the full width instead. */
 .nav-overlay-body { grid-template-columns: 1fr; gap: 0; }
 .nav-preview { display: none; }
 .nav-link { font-size: clamp(26px, min(9vw, 6.6vh), 52px); }
 /* Keep the rows clear of the close tab on the left edge. */
 .nav-overlay-list { padding-left: 30px; }
}
@media (max-width: 560px) {
 /* Keep width:height at 1:2 and the radius equal to the width, or the
    half circle closes up into a full one. */
 .nav-orb { width: 32px; height: 74px; border-radius: 0 37px 37px 0; }
 .nav-orb-bars { width: 16px; gap: 6px; }
 .nav-orb[aria-expanded="true"] .nav-orb-bars i:nth-child(1) { transform: translateY(4px) rotate(45deg); }
 .nav-orb[aria-expanded="true"] .nav-orb-bars i:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }
 .nav-overlay { padding: 22px 20px 26px; }
 .nav-overlay-foot { font-size: 11px; gap: 12px; }
 .nav-overlay-list { padding-left: 26px; }
}
/* On short screens move up, clear of the motion toggle in the bottom-left. */
@media (max-height: 520px) { .nav-orb { top: 34%; } }

/* ---------------------------------------------------------------
   4. Paused motion and reduced motion: no wipe, no stagger, still usable.
   --------------------------------------------------------------- */
.motion-paused .nav-overlay, .motion-paused .nav-orb { transition: none; }
.motion-paused .nav-overlay { clip-path: none; }
.motion-paused .nav-overlay .nav-link { opacity: 1 !important; transform: none !important; }
.motion-paused .nav-overlay .nav-overlay-top, .motion-paused .nav-overlay .nav-overlay-foot { opacity: 1 !important; }
@media (prefers-reduced-motion: reduce) {
 .nav-orb { transition: none; }
 .nav-overlay { clip-path: none; transition: none; }
 .nav-overlay .nav-link { opacity: 1 !important; transform: none !important; }
 .nav-overlay .nav-overlay-top, .nav-overlay .nav-overlay-foot { opacity: 1 !important; }
}
