/* Front page upgrade 3 (2026-12-05): airship in the sky band, destination dock, lit door plates.
   Switches: FX at the top of upgrade3.js. Remove this link and the script line in page.html to drop it all. */

/* 1. airship: crosses the empty band under the title, links to /cloud/ (wide layout only: smaller screens have no free band) */
.u3-ship{display:none;position:fixed;z-index:3;left:0;top:clamp(140px,15vh,190px);width:clamp(190px,14vw,290px);color:#cfe9f2;text-decoration:none;outline:none;
  animation:u3-fly 90s linear -34s infinite;will-change:transform}
.u3-ship .bob{display:block;animation:u3-bob 7s ease-in-out infinite}
.u3-ship svg{display:block;width:100%;height:auto;overflow:visible}
.u3-ship .hull{fill:#0a1322;stroke:#5fe9f5;stroke-width:1.2;stroke-linejoin:round}
.u3-ship .deck{fill:#13223a;stroke:#5fe9f5;stroke-width:1}
.u3-ship .win{fill:var(--cyan)}
.u3-ship .pk{fill:var(--pink)}
.u3-ship .ln{fill:none;stroke:#3b74a6;stroke-width:1}
.u3-ship .prop{transform-box:fill-box;transform-origin:center;animation:u3-prop .18s linear infinite}
.u3-ship .tag{position:absolute;left:50%;top:calc(100% + 6px);transform:translateX(-50%);white-space:nowrap;padding:5px 10px;
  font:500 11px var(--data);letter-spacing:.24em;text-transform:uppercase;color:#fff;background:rgba(3,6,13,.9);box-shadow:inset 0 0 0 1px rgba(0,243,255,.45);
  opacity:0;transition:opacity .2s}
.u3-ship:hover,.u3-ship:focus-visible{animation-play-state:paused}
.u3-ship:hover .bob,.u3-ship:focus-visible .bob{animation-play-state:paused}
.u3-ship:hover .tag,.u3-ship:focus-visible .tag{opacity:1}
.u3-ship:hover .hull,.u3-ship:focus-visible .hull{stroke:#fff}
@keyframes u3-fly{from{transform:translateX(calc(100vw + 60px))}to{transform:translateX(calc(-100% - 60px))}}
@keyframes u3-bob{0%,100%{transform:translateY(0)}50%{transform:translateY(-6px)}}
@keyframes u3-prop{0%{transform:scaleY(1)}50%{transform:scaleY(.15)}100%{transform:scaleY(1)}}
html.intro .u3-ship{opacity:0}
.u3-ship{transition:opacity 1.2s}

/* 2. dock: the bottom links span the whole width, one cell each, a lit bar slides over the hovered cell */
@media (min-width:761px){
  .links.u3-dock{display:grid;grid-auto-flow:column;grid-auto-columns:1fr;width:100%;margin-top:4px;
    border-top:1px solid rgba(0,243,255,.22);background:rgba(3,6,13,.72)}
  .links.u3-dock::before{content:"";position:absolute;left:0;right:0;top:-7px;height:6px;pointer-events:none;
    background:repeating-linear-gradient(90deg,rgba(0,243,255,.35) 0 1px,transparent 1px 24px)}
  .links.u3-dock a{display:flex;align-items:center;justify-content:center;gap:4px;padding:18px 10px 16px;font-size:14px;white-space:nowrap;transition:color .15s,background .15s}
  .links.u3-dock a+a{border-left:1px solid rgba(0,243,255,.16)}
  .links.u3-dock a:hover,.links.u3-dock a:focus-visible{background:rgba(0,243,255,.07);color:#fff}
  .links.u3-dock .up-mk{display:none}
  .links.u3-dock .u3-bar{position:absolute;top:-1px;left:0;height:2px;width:0;background:var(--cyan);opacity:0;pointer-events:none;
    transition:transform .3s cubic-bezier(.2,.9,.1,1),width .3s cubic-bezier(.2,.9,.1,1),opacity .2s}
}

/* 3. door plates (wide layout): the plate's top edge fills with the door's colour on hover / focus */
@media (min-width:1100px) and (min-height:820px){
  .door .txt{transition:background .25s}
  .door .txt::before{content:"";position:absolute;left:0;top:0;height:2px;width:100%;background:var(--ac);transform:scaleX(.18);transform-origin:left;
    transition:transform .45s cubic-bezier(.2,.9,.1,1)}
  .door.r .txt::before{transform-origin:right}
  .door:hover .txt,.door:focus-within .txt{background:rgba(3,6,13,.94)}
  .door:hover .txt::before,.door:focus-within .txt::before{transform:scaleX(1)}
}

.u3-noplates .door .txt::before{display:none}
@media (min-width:1100px) and (min-height:820px){ .u3-ship{display:block} }
@media (prefers-reduced-motion:reduce){
  .u3-ship{animation:none;transform:translateX(62vw)}
  .u3-ship .bob,.u3-ship .prop{animation:none}
  .links.u3-dock .u3-bar,.door .txt::before{transition:none}
}
