/*!
 * voyager-hero.css  v1.0.0
 * The countdown box on /voyager/ in deep space with NASA's 3D Voyager
 * (js/voyager-hero.js). Loads after ss-sim.css, voyager.css and
 * voyager-map.css. Signed off by Deyne in the Test Lab on 25 October
 * 2026 (claude-test-facility/voyager-hero/, mock-up 3).
 *
 * Two kinds of rule here:
 *   - Always on: the black deep space, Hide readout beside Fullscreen,
 *     and the phone layout where the box grows to fit its readout.
 *   - Only with 3D: #vg-module.is-3d (set in the page as soon as the
 *     browser says it can do WebGL) swaps the old 2D canvas for the 3D
 *     layers; .vgh-ready (set once the model has loaded) brings the
 *     invitation line and the explore pieces. If WebGL or the model
 *     fails, the script takes is-3d away and the old 2D picture from
 *     voyager.js comes back.
 *
 * Colours: controls are yellow, never blue (blue means a link). The
 * black colours are set on the box itself, not the page, so the cards
 * further down keep theirs.
 */

/* ---- deep space: black, like the map below ---- */
.ss-voyager-page #vg-module {
    --sim-module-bg:   #000;
    --sim-card-bg:     rgba(255, 255, 255, .035);
    --sim-card-border: rgba(255, 255, 255, .14);
    --sim-rule:        rgba(255, 255, 255, .12);
}
.ss-voyager-page #vg-module .ss-sim-telemetry { background: rgba(0, 0, 0, .55); }

/* Hide readout sits beside Fullscreen on the normal page as well as in
   fullscreen, so the craft can be explored without going fullscreen. */
.ss-voyager-page #vg-module .ss-sim-controls .vgh-hide-btn { display: inline-flex; }

/* The credit line is words only, no links: it must never take a tap.
   It names the 3D model only while the 3D model is what is showing. */
.ss-voyager-page #vg-module .ss-sim-credit { pointer-events: none; }
.ss-voyager-page #vg-module .vgh-credit-3d { display: none; }
.ss-voyager-page #vg-module.is-3d .vgh-credit-3d { display: inline; }

/* ---- the 3D layers ----
   Back to front: the drifting stars, the 3D craft, then Earth with the
   signal path and its pulses. Only the craft's layer takes the mouse.
   While the 3D runs, the old 2D canvas steps aside (voyager.js then
   stops drawing it, as it only draws while it can be seen). */
.ss-voyager-page #vg-module .vgh-layer {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: none;
    pointer-events: none;
}
.ss-voyager-page #vg-module.is-3d .vgh-layer { display: block; }
.ss-voyager-page #vg-module .vgh-sky { z-index: 0; }
.ss-voyager-page #vg-module .vgh-canvas { z-index: 1; pointer-events: auto; touch-action: pan-y; }
.ss-voyager-page #vg-module .vgh-signal { z-index: 1; }
.ss-voyager-page #vg-module.is-3d #vg-canvas { display: none; }

/* At rest the words let the mouse through to the craft behind them;
   buttons and links still take their clicks. */
.ss-voyager-page #vg-module.is-3d .ss-sim-overlay > * { pointer-events: none; }
.ss-voyager-page #vg-module.is-3d .ss-sim-overlay button,
.ss-voyager-page #vg-module.is-3d .ss-sim-overlay a { pointer-events: auto; }
.ss-voyager-page #vg-module.is-3d .vgh-canvas.is-over-part { cursor: pointer; }

/* While exploring the canvas takes every touch; at rest a finger can
   still scroll the page past the box. */
.ss-voyager-page #vg-module.is-chrome-hidden .vgh-canvas { touch-action: none; cursor: grab; }
.ss-voyager-page #vg-module.is-chrome-hidden .vgh-canvas:active { cursor: grabbing; }
.ss-voyager-page #vg-module.is-chrome-hidden .vgh-canvas.is-over-part { cursor: pointer; }

/* ---- how far everything sits in from the box's edges ----
   One setting for every piece that hugs an edge: the hint, the card,
   the parts list, the eye and the Fullscreen button beside it. In the
   page it is 16px; in fullscreen it grows with the screen (3.5% of the
   width, 28 to 80px), so on a big screen or a TV that crops its edges
   nothing sits on the very rim or falls off it. */
.ss-voyager-page #vg-module { --vgh-edge: 16px; }
.ss-voyager-page #vg-module:fullscreen { --vgh-edge: clamp(28px, 3.5vw, 80px); }
.ss-voyager-page #vg-module:-webkit-full-screen { --vgh-edge: clamp(28px, 3.5vw, 80px); }

/* ---- the invitation at the very top, at rest ----
   A button in words: pressing it opens explore, like a click on the
   craft. Yellow like every other control here. */
.ss-voyager-page #vg-module .vgh-prompt {
    position: absolute;
    z-index: 3;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: none;
    margin: 0;
    padding: .3rem .7rem;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: rgba(250, 219, 103, .92);
    font: 500 .8rem/1.3 Inter, Arial, sans-serif;
    letter-spacing: .03em;
    white-space: nowrap;
    text-shadow: 0 1px 4px #000;
    cursor: pointer;
}
.ss-voyager-page #vg-module.is-3d.vgh-ready .vgh-prompt { display: block; }
.ss-voyager-page #vg-module.is-3d.vgh-ready.is-chrome-hidden .vgh-prompt { display: none; }
.ss-voyager-page #vg-module .vgh-prompt:focus-visible { outline: 2px solid #fadb67; outline-offset: 2px; }
@media (hover: hover) {
    .ss-voyager-page #vg-module .vgh-prompt:hover { background: #fadb67; color: #1A0C08; text-shadow: none; }
}
.ss-voyager-page #vg-module:fullscreen .vgh-prompt,
.ss-voyager-page #vg-module:-webkit-full-screen .vgh-prompt { top: var(--vgh-edge); font-size: .9rem; }
/* After 18 November the countdown becomes a smaller box under the map
   (voyager-map.css), with less room at its top: a little more, so the
   invitation line clears the kicker. */
.ss-voyager-page.vg-after-milestone #vg-module.is-3d.vgh-ready:not(.is-fullscreen) .ss-sim-overlay { padding-top: 3rem; }

/* ---- explore: only while the readout is hidden, and only with 3D ---- */
.ss-voyager-page #vg-module .vgh-explore { display: none; }
.ss-voyager-page #vg-module.is-3d.vgh-ready.is-chrome-hidden .vgh-explore { display: block; }

/* Hint, summary and model credit stack in one block top left, so a
   line that wraps pushes the next one down instead of running under it. */
.ss-voyager-page #vg-module .vgh-top {
    position: absolute;
    z-index: 3;
    top: var(--vgh-edge);
    left: var(--vgh-edge);
    width: min(430px, calc(100% - 2 * var(--vgh-edge)));
    text-align: left;
    text-shadow: 0 1px 4px #000;
    pointer-events: none;
}
.ss-voyager-page #vg-module .vgh-top p { margin: 0 0 .35rem; }
.ss-voyager-page #vg-module .vgh-hint {
    font-size: .64rem;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: #C9D3DA;
}
.ss-voyager-page #vg-module .vgh-hint-touch { display: none; }
@media (hover: none) {
    .ss-voyager-page #vg-module .vgh-hint-mouse { display: none; }
    .ss-voyager-page #vg-module .vgh-hint-touch { display: inline; }
}
.ss-voyager-page #vg-module .vgh-summary {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.05rem;
    color: #F7FAFC;
}
.ss-voyager-page #vg-module .vgh-model-credit {
    font-size: .66rem;
    line-height: 1.5;
    color: #9AA7B2;
}

/* The parts list: one button per part, so keyboard and touch users can
   pick a part without aiming at a thin boom. It stops short of the two
   round buttons. */
.ss-voyager-page #vg-module .vgh-parts {
    position: absolute;
    z-index: 3;
    left: var(--vgh-edge);
    right: calc(var(--vgh-edge) + 112px);
    bottom: var(--vgh-edge);
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
}
.ss-voyager-page #vg-module .vgh-part {
    padding: .4rem .75rem;
    border: 1px solid rgba(250, 219, 103, .4);
    border-radius: 999px;
    background: rgba(0, 0, 0, .6);
    color: #E2E8F0;
    font: 500 .72rem/1.2 Inter, Arial, sans-serif;
    letter-spacing: .03em;
    white-space: nowrap;
    cursor: pointer;
}
.ss-voyager-page #vg-module .vgh-part[aria-pressed="true"] {
    border-color: #fadb67;
    color: #fadb67;
    background: rgba(250, 219, 103, .12);
}
.ss-voyager-page #vg-module .vgh-part:focus-visible { outline: 2px solid #fadb67; outline-offset: 2px; }
@media (hover: hover) {
    .ss-voyager-page #vg-module .vgh-part:hover { background: #fadb67; border-color: #fadb67; color: #1A0C08; }
}

/* The eye (made by ss-sim.js) and, beside it, Fullscreen: both round,
   both the same size, both in from the corner by the edge setting. */
.ss-voyager-page #vg-module .ss-sim-show-btn {
    right: var(--vgh-edge);
    bottom: var(--vgh-edge);
}
.ss-voyager-page #vg-module .vgh-fs {
    position: absolute;
    z-index: 4;
    right: calc(var(--vgh-edge) + 54px);
    bottom: var(--vgh-edge);
    width: 44px;
    height: 44px;
    padding: 0;
    justify-content: center;
}
.ss-voyager-page #vg-module .vgh-fs[hidden] { display: none; }
.ss-voyager-page #vg-module .vgh-fs svg { width: 18px; height: 18px; }
.ss-voyager-page #vg-module .vgh-fs .vgh-fs-out { display: none; }
.ss-voyager-page #vg-module:fullscreen .vgh-fs .vgh-fs-in,
.ss-voyager-page #vg-module:-webkit-full-screen .vgh-fs .vgh-fs-in { display: none; }
.ss-voyager-page #vg-module:fullscreen .vgh-fs .vgh-fs-out,
.ss-voyager-page #vg-module:-webkit-full-screen .vgh-fs .vgh-fs-out { display: inline; }

/* The card about the chosen part. */
.ss-voyager-page #vg-module .vgh-card {
    position: absolute;
    z-index: 4;
    top: var(--vgh-edge);
    right: var(--vgh-edge);
    width: min(360px, calc(100% - 2 * var(--vgh-edge)));
    max-height: calc(100% - 2 * var(--vgh-edge) - 70px);
    overflow: auto;
    padding: 1rem 1.1rem 1.05rem;
    border-radius: 12px;
    background: rgba(8, 10, 14, .9);
    border: 1px solid rgba(250, 219, 103, .45);
    box-shadow: 0 6px 30px rgba(0, 0, 0, .7);
    text-align: left;
    color: #E2E8F0;
}
.ss-voyager-page #vg-module .vgh-card[hidden] { display: none; }
.ss-voyager-page #vg-module .vgh-card-title {
    margin: 0 1.8rem .55rem 0;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.15rem;
    line-height: 1.25;
    color: #F7FAFC;
}
.ss-voyager-page #vg-module .vgh-card-close {
    position: absolute;
    top: .45rem;
    right: .5rem;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #C9D3DA;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
}
.ss-voyager-page #vg-module .vgh-card-close:hover,
.ss-voyager-page #vg-module .vgh-card-close:focus-visible { background: #fadb67; color: #1A0C08; outline: none; }
.ss-voyager-page #vg-module .vgh-card-status {
    list-style: none;
    margin: 0 0 .6rem;
    padding: 0;
    font-size: .74rem;
    line-height: 1.45;
}
.ss-voyager-page #vg-module .vgh-card-status li { display: flex; align-items: baseline; gap: .45rem; margin: .15rem 0; }
.ss-voyager-page #vg-module .vgh-card-status li::before {
    content: "";
    flex: none;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    transform: translateY(-1px);
    background: #6B7480;
}
.ss-voyager-page #vg-module .vgh-card-status li.is-on { color: #8EF0B4; font-weight: 600; }
.ss-voyager-page #vg-module .vgh-card-status li.is-on::before { background: #38EF7D; box-shadow: 0 0 6px #38EF7D; }
.ss-voyager-page #vg-module .vgh-card-status li.is-off { color: #9AA7B2; }
.ss-voyager-page #vg-module .vgh-card-text { margin: 0; font-size: .86rem; line-height: 1.6; }

/* Fullscreen is seen from further away: the explore words a size up. */
.ss-voyager-page #vg-module:fullscreen .vgh-summary,
.ss-voyager-page #vg-module:-webkit-full-screen .vgh-summary { font-size: 1.25rem; }
.ss-voyager-page #vg-module:fullscreen .vgh-card-text,
.ss-voyager-page #vg-module:-webkit-full-screen .vgh-card-text { font-size: .95rem; }

/* The part name that follows the mouse. */
.ss-voyager-page #vg-module .vgh-tip {
    position: absolute;
    z-index: 5;
    left: 0;
    top: 0;
    margin: 0;
    padding: .25rem .55rem;
    border-radius: 6px;
    background: rgba(0, 0, 0, .8);
    border: 1px solid rgba(250, 219, 103, .5);
    color: #fadb67;
    font: 600 .72rem/1.2 Inter, Arial, sans-serif;
    white-space: nowrap;
    pointer-events: none;
    visibility: hidden;
}

/* Fullscreen with the readout hidden shows the site's faint watermark
   bottom left (ss-sim.css, 2.6% in, 1.7% of the height tall): the
   parts list sits just above it. */
.ss-voyager-page #vg-module:fullscreen .vgh-parts,
.ss-voyager-page #vg-module:-webkit-full-screen .vgh-parts { bottom: max(var(--vgh-edge), calc(4.3vh + 16px)); }

/* Phones: the box grows to fit the readout instead of a fixed height.
   On a short phone (360 x 640, or an iPhone 13 at 664 px inside
   Safari) the fixed height clipped the kicker at the top and the
   buttons at the bottom; that was live on 25 October 2026. The canvas
   layers still fill whatever height results. Exploring keeps the same
   height (the faded readout keeps its space), so the page never jumps.
   The top padding leaves room for the invitation line above the kicker. */
@media (max-width: 640px) {
    .ss-voyager-page #vg-module:not(:fullscreen) { height: auto; min-height: 560px; }
    .ss-voyager-page #vg-module:not(:fullscreen) .ss-sim-overlay {
        position: relative;
        inset: auto;
        /* The top padding (2.75rem until 31 October 2026) now makes a
           band for the 3D craft to rest in on phones (voyager-hero.js,
           topBand), under the invitation line and above the kicker. */
        padding: 13rem 1rem 3.25rem;
    }
    .ss-voyager-page #vg-module .vgh-prompt { top: 10px; font-size: .74rem; }

    /* The card becomes a solid sheet along the bottom, over the parts
       list, clear of the two round buttons below it. */
    .ss-voyager-page #vg-module .vgh-card {
        top: auto;
        bottom: calc(var(--vgh-edge) + 54px);
        left: var(--vgh-edge);
        right: var(--vgh-edge);
        width: auto;
        max-height: 52%;
        background: #080a0e;
    }
    .ss-voyager-page #vg-module .vgh-summary { font-size: .95rem; }
    .ss-voyager-page #vg-module .vgh-model-credit { display: none; }
}
