/* SLANT Conik M1 section navigator: Tarun's towbar, Direction A "Shunt" (part 2, chosen 6 Nov 2026). Needs the site tokens. */
/* ============================================================
   TOWBAR DOCK · Direction A · Shunt  (CSS block, liftable)
   Six trailers sit coupled, 10 px apart. One opening of --dw
   is reserved; the trailers ahead of the current section shunt
   forward by --dw so the drive unit always has exactly one bay.
   Row width = 6·tw + 5·g + dw.
   ============================================================ */
.dock {
  --tw: 120px;  /* trailer tile width */
  --g: 10px;    /* coupling gap between tiles */
  --dw: 52px;   /* drive-unit bay width */
  --h: 56px;    /* trailer height (box + wheel) */
  --bh: 40px;   /* box height */
  --ww: 18px;   /* wheel diameter */
  --du-ease: cubic-bezier(.3, .9, .25, 1);
  position: fixed; z-index: 60; left: 50%; bottom: max(14px, env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  padding: 12px 18px;
  color: var(--bone);
  background: color-mix(in srgb, var(--black) 88%, transparent);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border: 1px solid rgba(239, 234, 224, .14); border-radius: 3px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .5), 0 1px 0 rgba(239, 234, 224, .06) inset;
  transition: transform .5s var(--ease-expo), opacity .35s linear;
}
@supports not (background: color-mix(in srgb, #000 88%, transparent)) { .dock { background: rgba(11, 11, 13, .9); } }
/* steps aside for the closing band; a keyboard user tabbing into it brings it back */
.dock.is-away { transform: translate(-50%, 140%); opacity: 0; pointer-events: none; }
.dock.is-away:focus-within { transform: translateX(-50%); opacity: 1; pointer-events: auto; }

.dock ol { list-style: none; margin: 0; padding: 0 var(--dw) 0 0; display: flex; gap: var(--g); height: var(--h); position: relative; }
.dock li { flex: none; width: var(--tw); }
.dock.is-ready li { transition: transform .6s var(--du-ease); }
.dock li.is-ahead { transform: translateX(var(--dw)); }

.dock a { position: relative; display: block; height: var(--h); color: var(--smoke); text-decoration: none; -webkit-tap-highlight-color: transparent; }
.dock a:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }
.dock .box { position: absolute; left: 0; right: 0; top: 0; height: var(--bh); display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: 0 9px; background: var(--graphite-2); border: 1.5px solid rgba(239, 234, 224, .16); transition: background .25s, border-color .25s, color .25s; }
.dock .n { font-family: var(--mono); font-weight: 500; font-size: 12px; letter-spacing: .06em; line-height: 1; }
.dock .l { font-family: var(--font-display, var(--font)); font-weight: 700; font-size: 13px; line-height: 1.1; white-space: nowrap; letter-spacing: -.01em; }
.dock .ls { display: none; }
/* trailer wheel: a ring with a cross of spokes; rotates with --rot (set by JS on the hitched link only) */
.dock .wh { position: absolute; left: 50%; bottom: 0; width: var(--ww); height: var(--ww); margin-left: calc(var(--ww) / -2); border-radius: 50%; border: 2px solid currentColor; background: var(--black); transform: rotate(var(--rot, 0deg)); }
.dock .wh::before, .dock .wh::after { content: ""; position: absolute; inset: 0; margin: auto; background: currentColor; }
.dock .wh::before { width: 1.5px; height: 100%; }
.dock .wh::after { height: 1.5px; width: 100%; }

.dock a:hover .box { border-color: var(--bone); color: var(--bone); }
.dock a.is-done { color: var(--bone); }
.dock a.is-done .box { border-color: color-mix(in srgb, var(--goldenrod) 75%, transparent); }
.dock a[aria-current="true"] { color: var(--bone); }
.dock a[aria-current="true"] .box { background: var(--amber); border-color: var(--amber); color: var(--black); box-shadow: 0 0 0 1px var(--amber), 0 8px 22px -6px rgba(255, 192, 0, .5); }
/* the coupling tug: the freshly hitched trailer is pulled 3 px toward the unit, then settles */
.dock a.is-hitch { animation: dock-tug .5s .42s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes dock-tug { 0% { transform: none; } 35% { transform: translateX(3px); } 100% { transform: none; } }

/* drive unit: the cartoon render (two layers), its clamp side against the tile's right edge, wheel on the road */
.dock .du { position: absolute; left: 0; bottom: 0; width: var(--dw); height: var(--h); pointer-events: none; }
.dock.is-ready .du { transition: transform .6s var(--du-ease); }
.dock .du-art { position: absolute; left: 0; bottom: 0; height: calc(var(--h) + 4px); aspect-ratio: 512 / 469; transform-origin: 30% 92%; }
.dock .du-art img { position: absolute; display: block; max-width: none; }
.dock .du-body { inset: 0; width: 100%; height: 100%; z-index: 1; }
/* compact pose (drawbar collapsed, 20 deg): the wheel square sits at left 11.62 %, top 59.23 %, 37.11 % of the image width (SLANT-3D's placement), under the body */
.dock .du-wheel { left: 11.62%; top: 59.23%; width: 37.11%; height: auto; aspect-ratio: 1; z-index: 0; transform: rotate(var(--rot, 0deg)); }
/* the lean: leans back as it pulls away, dips forward as it brakes; --dir flips for backward moves */
.dock .du.is-moving .du-art { animation: dock-lean .6s var(--du-ease); }
@keyframes dock-lean { 0% { transform: none; } 30% { transform: rotate(calc(var(--dir, 1) * -5deg)); } 75% { transform: rotate(calc(var(--dir, 1) * 2.5deg)); } 100% { transform: none; } }

/* the road: dashes slide with the page scroll, by transform only, wrapped every 24 px */
.dock .road { position: relative; display: block; height: 2px; padding: 0; border: 0; overflow: hidden; }
.dock .road i { position: absolute; top: 0; left: -48px; right: -48px; height: 2px; background: repeating-linear-gradient(90deg, rgba(239, 234, 224, .45) 0 14px, transparent 14px 24px); transform: translateX(var(--road, 0px)); }

@media (max-width: 1023px) { .dock { --tw: 108px; --g: 8px; --dw: 44px; padding: 12px 10px; } .dock .box { padding: 0 8px; } .dock .l { font-size: 12px; } }
@media (max-width: 767px) {
  .dock { --tw: 46px; --g: 7px; --dw: 37px; --h: 44px; --bh: 30px; --ww: 14px; left: 16px; right: 16px; transform: none; padding: 6px 4px; bottom: max(10px, env(safe-area-inset-bottom, 0px)); }
  .dock.is-away { transform: translateY(140%); }
  .dock.is-away:focus-within { transform: none; }
  .dock ol { justify-content: flex-start; }
  .dock .box { padding: 0 2px; align-items: center; text-align: center; border-width: 1px; }
  .dock .n, .dock .l { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .dock .ls { display: block; font-family: var(--font-display, var(--font)); font-weight: 700; font-size: 12px; line-height: 1; letter-spacing: -.01em; }
  .dock .wh { border-width: 1.6px; }
  .dock .wh::before { width: 1.2px; } .dock .wh::after { height: 1.2px; }
}
@media (max-width: 374px) { .dock { --tw: 42px; --g: 6px; --dw: 34px; } }
@media (prefers-reduced-motion: reduce) {
  .dock.is-ready .du, .dock.is-ready li { transition: none; }
  .dock .du.is-moving .du-art, .dock a.is-hitch { animation: none; }
  .dock { transition: opacity .2s linear; }
}
/* 13 Nov (Tarun: "using the trailer graphic as the progress bar ... with the yellow filling up as the user scrolls").
   The current trailer's box fills left to right with --p (0-1, section progress, set by dock.js); its text turns black where
   the amber has reached. Without --p (no JS) the box is fully amber, as before. */
.dock a[aria-current="true"] .box { background: linear-gradient(90deg, var(--amber) calc(var(--p, 1) * 100%), var(--graphite-2) 0); color: var(--bone); }
.dock a[aria-current="true"] .n, .dock a[aria-current="true"] .l, .dock a[aria-current="true"] .ls { color: transparent; -webkit-background-clip: text; background-clip: text; background-image: linear-gradient(90deg, var(--black) calc(var(--p, 1) * var(--tw) - var(--tx, 10.5px)), var(--bone) 0); }
@media (max-width: 1023px) { .dock a[aria-current="true"] .n, .dock a[aria-current="true"] .l { --tx: 9.5px; } }
@media (max-width: 767px) { .dock a[aria-current="true"] .ls { width: 100%; text-align: center; --tx: 3px; } }
/* ============================================================ end dock CSS */
