/* =============================================================
   KODILEX LANDING — the voyage
   (script: wwwroot/js/kodilex-voyage.js; loaded after kodilexLanding.css)

   The landing is one window on the solar system instead of a page
   that scrolls. Every section is a stage (.kx-stage) laid over the
   same sky; the script shows one at a time and flies the camera to
   "its" planet, which then turns slowly in the lower right corner.

   So in the voyage a stage is built for that picture:
   - its text and cards keep to the left, in the part of the window
     the planet leaves free (--kx-content), as dark glass so they
     read over a bright limb;
   - everything is sized to fit one window - compact cards, clamped
     text, sizes that follow the window's height - and where it still
     does not fit, the stage scrolls inside itself;
   - on a phone the planet rises from the lower edge and the card
     groups become rails that are swiped sideways.

   Where the planet sits and how large it is belongs to this file:
   the script reads --kx-planet-size / -max / -x / -y from the stage.

   Everything here is under html.kx-voyage-on, the class the script
   sets once it runs. Without it the stages are ordinary sections
   stacked down the page, styled by kodilexLanding.css and the few
   base rules at the top of this file.
   ============================================================= */

/* --- Base: what the stage markup needs in either mode --- */
.kx-voyage { position: relative; }

.kx-voyage-scrim,
.kx-hud,
.kx-rail,
.kx-scroll-hint { display: none; }

.kx-hero > .kx-stage-scroll { width: 100%; }

.kx-stage-head { margin-bottom: 44px; }
.kx-stage-foot { margin-top: 40px; }

.kx-projects .kx-stage-scroll > .container,
.kx-upcoming .kx-stage-scroll > .container { padding-top: 92px; position: relative; z-index: 1; }

.kx-services-grid,
.kx-launch-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 24px;
}

.kx-launch-grid { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

.kx-download-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 48px;
    align-items: center;
}

.kx-download-card { text-align: center; }
.kx-download-card h3 { margin-bottom: 8px; }
.kx-download-card .kx-download-sub { margin-bottom: 24px; }

.kx-cta-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px 22px;
    margin-top: 26px;
}

.kx-cta-info-line i { color: var(--kx-cyan); margin-right: 6px; }

.kx-section-title .kx-accent-word,
.kx-accent-word {
    background: linear-gradient(90deg, #3cc7ff, #2be2a6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* =============================================================
   THE WINDOW
   ============================================================= */
html.kx-voyage-on,
html.kx-voyage-on body {
    height: 100%;
    overflow: hidden;
    overscroll-behavior: none;
}

html.kx-voyage-on .kx-voyage {
    /* where a stop's planet stands (its centre, as a share of the window) and how large
       it is (a share of the window's height, and at most that share of its width) */
    --kx-planet-size: 0.78;
    --kx-planet-max: 0.62;
    --kx-planet-x: 0.8;
    --kx-planet-y: 0.64;
    /* how much of the container the text and cards may take */
    --kx-content: 58%;
    --kx-card: rgba(9, 14, 26, 0.6);

    position: fixed;
    inset: 0;
    overflow: hidden;
    z-index: 1;
    counter-reset: kx-stop -1;
    background:
        radial-gradient(ellipse 65% 55% at 72% 38%, rgba(60, 199, 255, 0.09) 0%, transparent 65%),
        radial-gradient(ellipse 45% 45% at 12% 88%, rgba(43, 226, 166, 0.05) 0%, transparent 60%),
        radial-gradient(ellipse 55% 40% at 40% 0%, rgba(90, 70, 200, 0.08) 0%, transparent 65%),
        var(--kx-void);
}

/* the close-up of the planet (kodilex-planet-gl.js), over the 2D sky and system */
.kx-voyage > .kx-solar-gl {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

/* a little night behind the text, so it reads over stars and a planet's limb alike */
html.kx-voyage-on .kx-voyage-scrim {
    display: block;
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(5, 7, 13, 0.78) 0%, rgba(5, 7, 13, 0.5) 32%, rgba(5, 7, 13, 0) 62%),
        linear-gradient(180deg, rgba(5, 7, 13, 0.55) 0%, rgba(5, 7, 13, 0) 20%);
}

/* the header floats over the window */
html.kx-voyage-on .kx-header-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(5, 7, 13, 0.55);
}

/* =============================================================
   STAGES
   ============================================================= */
html.kx-voyage-on .kx-stage {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: block;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    overflow: visible;
    counter-increment: kx-stop;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.32s ease, visibility 0s linear 0.32s;
}

html.kx-voyage-on .kx-stage.is-active {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transition: opacity 0.45s ease;
}

html.kx-voyage-on .kx-stage.is-leaving { visibility: visible; }

/* the sections' own backdrops belong to the scrolling page */
html.kx-voyage-on .kx-upcoming::before,
html.kx-voyage-on .kx-cta::before { display: none; }

/* A stage scrolls inside itself when its content is taller than the window; shorter
   content is centred (auto margins give way as soon as it no longer fits). */
html.kx-voyage-on .kx-stage-scroll {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: calc(var(--kx-header-h, 72px) + clamp(14px, 3.4vh, 40px)) 0 clamp(18px, 3.6vh, 40px);
    scrollbar-width: thin;
    scrollbar-color: rgba(140, 175, 255, 0.22) transparent;
}

html.kx-voyage-on .kx-stage-scroll > .container {
    flex: none;
    margin-top: auto;
    margin-bottom: auto;
    padding-top: 0;
}

/* --- Entrance: the parts of a stage come in one after the other as it arrives.
       An animation, not a transition, and only filled backwards: once it has run the
       card is its own again, so its hover lift is not held down. --- */
@keyframes kx-rise { from { opacity: 0; transform: translate3d(0, 30px, 0); } }
@keyframes kx-rise-up { from { opacity: 0; transform: translate3d(0, -30px, 0); } }

html.kx-voyage-on .kx-stage.is-active [data-rise] {
    animation: kx-rise 0.85s cubic-bezier(0.22, 1, 0.36, 1) backwards;
    animation-delay: calc(var(--i, 0) * 65ms + 40ms);
}

/* flying back, they come from above */
html.kx-voyage-on .kx-stage.is-active[data-dir="up"] [data-rise] { animation-name: kx-rise-up; }

/* --- Heads --- */
html.kx-voyage-on .kx-stage-head { margin-bottom: clamp(16px, 3vh, 32px); text-align: left; }

/* the eyebrow carries the stop's number: "// 01 — what we do" */
html.kx-voyage-on .kx-stage .kx-section-label::before { content: '// ' counter(kx-stop, decimal-leading-zero) ' \2014  '; }

html.kx-voyage-on .kx-stage .kx-section-label { margin-bottom: 10px; }

html.kx-voyage-on .kx-stage .kx-section-title,
html.kx-voyage-on .kx-stage .kx-iwc-heading h2,
html.kx-voyage-on .kx-cta h2 {
    font-size: clamp(1.65rem, 1.1rem + 1.5vw + 1vh, 2.75rem);
    line-height: 1.12;
    margin-bottom: 12px;
    text-wrap: balance;
}

html.kx-voyage-on .kx-stage .kx-section-sub,
html.kx-voyage-on .kx-stage .kx-iwc-heading p,
html.kx-voyage-on .kx-cta .kx-cta-content > p {
    font-size: clamp(0.92rem, 0.82rem + 0.2vw + 0.2vh, 1.04rem);
    line-height: 1.65;
    max-width: 600px;
    margin: 0;
    color: #a9b6cc;
}

html.kx-voyage-on .kx-stage-foot { margin-top: clamp(14px, 2.6vh, 28px); }

/* =============================================================
   THE OVERVIEW (hero)
   ============================================================= */
html.kx-voyage-on .kx-hero .kx-3d-scene { height: clamp(300px, 54vh, 500px); }

html.kx-voyage-on .kx-hero-title { font-size: clamp(2.1rem, 3.75vw, 3.9rem); text-wrap: balance; }

/* "scroll to explore" */
html.kx-voyage-on .kx-scroll-hint {
    position: absolute;
    left: 50%;
    bottom: clamp(14px, 3vh, 30px);
    z-index: 4;
    transform: translateX(-50%);
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    border: 0;
    background: none;
    color: var(--kx-dim);
    font-family: var(--kx-font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    cursor: pointer;
    transition: color 0.2s ease;
}

html.kx-voyage-on .kx-scroll-hint:hover { color: var(--kx-cyan); }

html.kx-voyage-on .kx-scroll-hint:focus-visible,
html.kx-voyage-on .kx-rail-stop:focus-visible {
    outline: 2px solid var(--kx-cyan);
    outline-offset: 3px;
    border-radius: 8px;
}

.kx-scroll-mouse {
    width: 22px;
    height: 34px;
    border: 1.5px solid currentColor;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    padding-top: 6px;
    opacity: 0.8;
}

.kx-scroll-mouse > span {
    width: 3px;
    height: 7px;
    border-radius: 2px;
    background: var(--kx-grad);
    animation: kx-wheel 1.9s cubic-bezier(0.45, 0, 0.2, 1) infinite;
}

@keyframes kx-wheel {
    0% { transform: translateY(0); opacity: 0; }
    25% { opacity: 1; }
    100% { transform: translateY(12px); opacity: 0; }
}

/* =============================================================
   THE READ-OUT — which planet this stop is
   ============================================================= */
html.kx-voyage-on .kx-hud {
    display: block;
    position: absolute;
    z-index: 5;
    top: calc(var(--kx-header-h, 72px) + clamp(14px, 3.4vh, 36px));
    right: clamp(52px, 5vw, 96px);
    width: max-content;
    min-width: 236px;
    max-width: 330px;
    padding: 16px 18px 14px;
    border: 1px solid var(--kx-line-strong);
    border-radius: 16px;
    background: rgba(7, 11, 20, 0.74);
    -webkit-backdrop-filter: blur(14px) saturate(1.2);
    backdrop-filter: blur(14px) saturate(1.2);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
    pointer-events: none;
    opacity: 0;
    transform: translate3d(0, -12px, 0);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

html.kx-voyage-on .kx-hud::before {
    content: '';
    position: absolute;
    left: -1px;
    top: 16px;
    bottom: 16px;
    width: 2px;
    border-radius: 2px;
    background: var(--kx-grad);
}

html.kx-voyage-on .kx-hud.is-on {
    opacity: 1;
    transform: none;
    transition: opacity 0.6s ease 0.1s, transform 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.1s;
}

.kx-hud-stop {
    font-family: var(--kx-font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    color: var(--kx-cyan);
}

.kx-hud-stop i { font-style: normal; margin: 0 6px; opacity: 0.45; }
.kx-hud-stop span:last-child { color: var(--kx-faint); }

.kx-hud-name {
    margin-top: 6px;
    font-family: var(--kx-font-display);
    font-size: 1.55rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    line-height: 1.1;
    text-transform: uppercase;
    color: var(--kx-ink);
}

.kx-hud-type {
    margin-top: 4px;
    font-family: var(--kx-font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    color: var(--kx-dim);
}

.kx-hud-facts {
    margin: 12px 0 0;
    padding-top: 10px;
    border-top: 1px solid var(--kx-line);
    display: grid;
    gap: 5px;
}

.kx-hud-facts > div {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
}

.kx-hud-facts dt {
    font-family: var(--kx-font-mono);
    font-size: 0.64rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #7f8ea8;
    white-space: nowrap;
}

.kx-hud-facts dd {
    margin: 0;
    font-family: var(--kx-font-mono);
    font-size: 0.74rem;
    color: #c9d4e6;
    text-align: right;
    white-space: nowrap;
}

/* =============================================================
   THE RAIL — one mark per stop, the Sun first
   ============================================================= */
html.kx-voyage-on .kx-rail {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    position: absolute;
    z-index: 6;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
}

/* the line the marks sit on */
html.kx-voyage-on .kx-rail::before {
    content: '';
    position: absolute;
    right: 12.5px;
    top: 14px;
    bottom: 14px;
    width: 1px;
    background: linear-gradient(180deg, transparent, var(--kx-line-strong) 12%, var(--kx-line-strong) 88%, transparent);
}

.kx-rail-stop {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    height: 26px;
    padding: 0 8px 0 10px;
    border: 0;
    background: none;
    color: var(--kx-dim);
    cursor: pointer;
}

.kx-rail-dot {
    width: 10px;
    height: 10px;
    flex: none;
    border-radius: 50%;
    border: 1.5px solid rgba(140, 175, 255, 0.45);
    background: var(--kx-void);
    transition: transform 0.3s ease, background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* the Sun's mark is the only amber one */
.kx-rail-stop:first-child .kx-rail-dot { border-color: rgba(255, 176, 46, 0.8); }
.kx-rail-stop:first-child.is-active .kx-rail-dot { background: var(--kx-amber); box-shadow: 0 0 0 4px rgba(255, 176, 46, 0.16), 0 0 14px rgba(255, 176, 46, 0.6); }

.kx-rail-stop.is-past .kx-rail-dot { background: rgba(60, 199, 255, 0.55); border-color: rgba(60, 199, 255, 0.55); }

.kx-rail-stop.is-active .kx-rail-dot {
    transform: scale(1.25);
    border-color: transparent;
    background: var(--kx-grad);
    box-shadow: 0 0 0 4px rgba(60, 199, 255, 0.14), 0 0 14px rgba(60, 199, 255, 0.6);
}

.kx-rail-stop:hover .kx-rail-dot { border-color: var(--kx-cyan); transform: scale(1.25); }

.kx-rail-label {
    font-family: var(--kx-font-mono);
    font-size: 0.64rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    white-space: nowrap;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(7, 11, 20, 0.72);
    opacity: 0;
    transform: translateX(6px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
}

.kx-rail-stop:hover .kx-rail-label,
.kx-rail-stop:focus-visible .kx-rail-label { opacity: 1; transform: none; color: var(--kx-ink); }

/* --- The rest of the page's fixed parts, moved out of the rail's and the planet's way --- */
html.kx-voyage-on .kx-progress > span { transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1); }

html.kx-voyage-on .kx-cal-toggle,
html.kx-voyage-on .kx-ann-toggle,
html.kx-voyage-on .kx-stock-toggle { top: auto; bottom: 78px; }

html.kx-voyage-on .kx-stock-toggle { bottom: 140px; }

/* =============================================================
   CARDS — dark glass over the planet
   ============================================================= */
html.kx-voyage-on .kx-service-card,
html.kx-voyage-on .kx-proj,
html.kx-voyage-on .kx-download-card,
html.kx-voyage-on .kx-download-steps,
html.kx-voyage-on .kx-check-list li {
    background: var(--kx-card);
    border-color: rgba(140, 175, 255, 0.16);
    -webkit-backdrop-filter: blur(14px) saturate(1.25);
    backdrop-filter: blur(14px) saturate(1.25);
}

html.kx-voyage-on .kx-service-card:hover,
html.kx-voyage-on .kx-proj:hover,
html.kx-voyage-on .kx-proj:focus-visible { background: rgba(14, 22, 40, 0.72); }

/* --- Services: icon beside the text --- */
html.kx-voyage-on .kx-services-grid { gap: 12px; }

html.kx-voyage-on .kx-service-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    height: auto;
    padding: clamp(14px, 2.1vh, 20px) 20px;
    border-radius: 16px;
}

html.kx-voyage-on .kx-service-card:hover { transform: translateY(-3px); }

html.kx-voyage-on .kx-service-icon {
    flex: none;
    width: 46px;
    height: 46px;
    margin: 0;
    border-radius: 12px;
    font-size: 1.2rem;
}

html.kx-voyage-on .kx-service-card h5 { font-size: 1rem; margin-bottom: 4px; }
html.kx-voyage-on .kx-service-card p { font-size: 0.84rem; line-height: 1.55; }

/* --- Recent projects: six even cards --- */
html.kx-voyage-on .kx-bento { gap: 12px; }

html.kx-voyage-on .kx-proj { border-radius: 16px; }
html.kx-voyage-on .kx-proj:hover,
html.kx-voyage-on .kx-proj:focus-visible { transform: translateY(-3px); }

html.kx-voyage-on .kx-proj--wide { grid-column: auto; flex-direction: column; }

html.kx-voyage-on .kx-proj .kx-proj-visual,
html.kx-voyage-on .kx-proj--wide .kx-proj-visual {
    order: 0;
    flex: none;
    height: clamp(64px, 10vh, 108px);
    min-height: 0;
    border-left: 0;
    border-bottom: 1px solid var(--kx-line);
}

html.kx-voyage-on .kx-proj .kx-proj-body { padding: 14px 16px 14px; }
html.kx-voyage-on .kx-proj-top { gap: 10px; margin-bottom: 10px; }
html.kx-voyage-on .kx-proj-icon { width: 34px; height: 34px; border-radius: 10px; font-size: 0.98rem; }
html.kx-voyage-on .kx-proj-cat { font-size: 0.62rem; }

html.kx-voyage-on .kx-proj .kx-proj-title {
    font-size: 0.98rem;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

html.kx-voyage-on .kx-proj .kx-proj-text {
    font-size: 0.8rem;
    line-height: 1.55;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* the technologies are in the opened card */
html.kx-voyage-on .kx-proj > .kx-proj-body > .kx-proj-tech { display: none; }
html.kx-voyage-on .kx-proj-more { font-size: 0.78rem; }

/* --- The moving strips sit along the lower edge, like a read-out under the planet --- */
html.kx-voyage-on .kx-stage > .kx-stack,
html.kx-voyage-on .kx-stage > .kx-tape {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    height: 46px;
    border-top: 1px solid var(--kx-line);
    border-bottom: 0;
    background: rgba(5, 7, 13, 0.6);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}

html.kx-voyage-on .kx-stack-label,
html.kx-voyage-on .kx-tape-label { padding-top: 0; padding-bottom: 0; align-self: stretch; }

html.kx-voyage-on .kx-projects > .kx-stage-scroll,
html.kx-voyage-on .kx-upcoming > .kx-stage-scroll { bottom: 46px; }

/* --- Coming soon --- */
html.kx-voyage-on .kx-launch-grid { gap: 14px; }
html.kx-voyage-on .kx-launch-cell { min-width: 0; }
html.kx-voyage-on .kx-launch { border-radius: 18px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45); }
html.kx-voyage-on .kx-launch-screen { height: clamp(110px, 20vh, 230px); }
html.kx-voyage-on .kx-launch-body { padding: 16px 20px 18px; }
html.kx-voyage-on .kx-launch-body h3 { font-size: 1.15rem; margin-bottom: 6px; }

html.kx-voyage-on .kx-launch-body p {
    font-size: 0.85rem;
    line-height: 1.6;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

html.kx-voyage-on .kx-launch-features {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}

html.kx-voyage-on .kx-launch-features li {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    margin: 0;
    font-size: 0.78rem;
    line-height: 1.45;
}

/* --- About: the points as chips --- */
html.kx-voyage-on .kx-check-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
}

html.kx-voyage-on .kx-check-list li {
    margin: 0;
    padding: 14px 16px;
    border: 1px solid rgba(140, 175, 255, 0.16);
    border-radius: 14px;
    font-size: 0.88rem;
    line-height: 1.5;
}

/* --- News / best practices: one framed strip of panels --- */
html.kx-voyage-on .kx-stage .kx-iwc-heading { margin-bottom: clamp(16px, 3vh, 30px); }

html.kx-voyage-on .kx-stage .kx-panel-row {
    height: clamp(210px, 40vh, 420px);
    border: 1px solid var(--kx-line-strong);
    border-radius: 20px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}

html.kx-voyage-on .kx-stage .kx-panel { min-height: 0; }
html.kx-voyage-on .kx-stage .kx-panel-content { padding: 22px 22px 20px; }
html.kx-voyage-on .kx-stage .kx-panel-content .kx-card-title { font-size: 1.08rem; margin-bottom: 8px; }

html.kx-voyage-on .kx-stage .kx-panel-content .kx-card-text {
    flex: none;
    font-size: 0.82rem;
    line-height: 1.55;
    margin-bottom: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

html.kx-voyage-on .kx-stage .kx-panel-btn { padding: 8px 18px; font-size: 0.8rem; }

/* --- Download --- */
html.kx-voyage-on .kx-download-header { max-width: none; margin-bottom: clamp(16px, 3vh, 32px); }

html.kx-voyage-on .kx-download-grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    gap: clamp(16px, 2.4vw, 30px);
    align-items: start;
}

html.kx-voyage-on .kx-download-card { padding: clamp(18px, 3vh, 28px) 22px; border-radius: 18px; }

/* the steps are a card of their own: plain text would be lost against a bright limb */
html.kx-voyage-on .kx-download-steps {
    padding: clamp(16px, 2.6vh, 24px) 22px clamp(6px, 1vh, 10px);
    border: 1px solid rgba(140, 175, 255, 0.16);
    border-radius: 18px;
}
html.kx-voyage-on .kx-download-icon { font-size: clamp(2.4rem, 5.5vh, 3.6rem); margin-bottom: 10px; line-height: 1; }
html.kx-voyage-on .kx-download-card h3 { font-size: 1.2rem; margin-bottom: 4px; }
html.kx-voyage-on .kx-download-card .kx-download-sub { margin-bottom: 16px; }
html.kx-voyage-on .kx-download-steps-title { font-size: 1.02rem; margin-bottom: 14px; }
html.kx-voyage-on .kx-download-step { gap: 14px; margin-bottom: clamp(10px, 1.8vh, 16px); }
html.kx-voyage-on .kx-download-step h6 { font-size: 0.94rem; margin-bottom: 2px; }
html.kx-voyage-on .kx-download-step p { font-size: 0.83rem; line-height: 1.55; }
html.kx-voyage-on .kx-step-num { width: 34px; height: 34px; font-size: 0.85rem; }

/* --- Contact: the call to action as plain type, the footer as a glass deck under it --- */
html.kx-voyage-on .kx-cta { --kx-planet-size: 0.68; --kx-planet-y: 0.44; }

html.kx-voyage-on .kx-cta > .kx-stage-scroll { padding-bottom: 0; }

html.kx-voyage-on .kx-cta-content {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
}

html.kx-voyage-on .kx-cta h2 { font-size: clamp(1.9rem, 1.2rem + 1.9vw + 1.2vh, 3.2rem); }
html.kx-voyage-on .kx-cta-actions { margin-top: clamp(16px, 3vh, 28px); }

html.kx-voyage-on .kx-cta-info-line {
    font-family: var(--kx-font-mono);
    font-size: 0.82rem;
    color: #c3cddf;
}

html.kx-voyage-on .kx-contact-foot { flex: none; margin-top: clamp(18px, 3.4vh, 36px); }

html.kx-voyage-on .kx-contact-foot .footer-section {
    padding: clamp(14px, 2.6vh, 26px) 0 10px;
    border-top: 1px solid var(--kx-line-strong);
    background: rgba(5, 8, 15, 0.62) !important;
    -webkit-backdrop-filter: blur(18px) saturate(1.2);
    backdrop-filter: blur(18px) saturate(1.2);
}

html.kx-voyage-on .kx-contact-foot .footer-section .row.gy-5 { --bs-gutter-y: 1.1rem; }
html.kx-voyage-on .kx-contact-foot .footer-section h6 { margin-bottom: 0.7rem !important; }
html.kx-voyage-on .kx-contact-foot .footer-section hr { margin: 0.7rem 0 !important; }
html.kx-voyage-on .kx-contact-foot .footer-section .mb-3 { margin-bottom: 0.6rem !important; }
html.kx-voyage-on .kx-contact-foot .footer-section #txtEmail { height: 44px; }

/* the reCAPTCHA box is a fixed 304 x 78: a touch smaller, with the room it leaves taken back */
html.kx-voyage-on .kx-contact-foot .g-recaptcha {
    transform: scale(0.86);
    transform-origin: 0 0;
    height: 68px;
    margin-bottom: 0.4rem !important;
}

/* =============================================================
   DESKTOP — text on the left, the planet on the right
   ============================================================= */
@media (min-width: 992px) {
    html.kx-voyage-on .kx-stage:not(.kx-hero) .kx-stage-scroll > .container > * { max-width: var(--kx-content); }

    /* the overview: text and system share the window half and half, so a title line stays whole */
    html.kx-voyage-on .kx-hero .kx-hero-content,
    html.kx-voyage-on .kx-hero .kx-hero-visual { flex: 0 0 50%; width: 50%; max-width: 50%; }

    html.kx-voyage-on .kx-services { --kx-content: 60%; }
    html.kx-voyage-on .kx-services-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

    /* the two fullest stages take more of the window, and push their planet further out */
    html.kx-voyage-on .kx-projects { --kx-content: 70%; --kx-planet-x: 0.87; }
    html.kx-voyage-on .kx-bento { grid-template-columns: repeat(3, minmax(0, 1fr)); }

    html.kx-voyage-on .kx-upcoming { --kx-content: 66%; --kx-planet-x: 0.86; }
    html.kx-voyage-on .kx-launch-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

    html.kx-voyage-on .kx-about { --kx-content: 56%; }
    html.kx-voyage-on .kx-section { --kx-content: 64%; --kx-planet-x: 0.85; }
    html.kx-voyage-on .kx-download { --kx-content: 62%; --kx-planet-x: 0.84; }
    html.kx-voyage-on .kx-cta { --kx-content: 56%; }

    /* the read-out stands clear of the wide stages' cards */
    html.kx-voyage-on .kx-voyage[data-stop] .kx-hud { right: clamp(52px, 5vw, 96px); }
}

/* a short window (a small laptop): the drawings and the extras give way first */
@media (min-width: 992px) and (max-height: 820px) {
    html.kx-voyage-on .kx-proj .kx-proj-visual { display: none; }
    html.kx-voyage-on .kx-launch-features { display: none; }
    html.kx-voyage-on .kx-launch-body p { margin-bottom: 0; }
    html.kx-voyage-on .kx-hud-facts { display: none; }
}

@media (min-width: 992px) and (max-height: 680px) {
    html.kx-voyage-on .kx-scroll-hint-text { display: none; }
    html.kx-voyage-on .kx-stage .kx-section-sub { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
}

/* between a laptop and a wide screen the read-out would sit on the cards */
@media (min-width: 992px) and (max-width: 1279.98px) {
    html.kx-voyage-on .kx-hud-facts { display: none; }
    html.kx-voyage-on .kx-hud { min-width: 0; padding: 12px 16px; }
    html.kx-voyage-on .kx-hud-name { font-size: 1.25rem; }
}

/* =============================================================
   TABLET AND PHONE — the planet rises from the lower edge
   ============================================================= */
@media (max-width: 991.98px) {
    html.kx-voyage-on .kx-voyage {
        --kx-planet-size: 0.5;
        --kx-planet-max: 0.98;
        --kx-planet-x: 0.74;
        --kx-planet-y: 0.86;
        --kx-card: rgba(9, 14, 26, 0.8);
    }

    html.kx-voyage-on .kx-cta { --kx-planet-size: 0.42; --kx-planet-y: 0.3; --kx-planet-x: 0.8; }

    html.kx-voyage-on .kx-voyage-scrim {
        background: linear-gradient(180deg, rgba(5, 7, 13, 0.82) 0%, rgba(5, 7, 13, 0.58) 46%, rgba(5, 7, 13, 0.12) 78%);
    }

    html.kx-voyage-on .kx-stage-scroll { padding-top: calc(var(--kx-header-h, 64px) + 16px); }

    /* under the read-out chip */
    html.kx-voyage-on .kx-stage:not(.kx-hero) > .kx-stage-scroll { padding-top: calc(var(--kx-header-h, 64px) + 58px); }

    html.kx-voyage-on .kx-stage-scroll > .container { margin-top: 0; }
    html.kx-voyage-on .kx-hero .kx-stage-scroll > .container { margin-top: auto; }

    html.kx-voyage-on .kx-hero-visual { margin-top: 12px; }
    html.kx-voyage-on .kx-hero .kx-3d-scene { height: clamp(250px, 40vh, 420px); }
    html.kx-voyage-on .kx-hero-sub { margin-bottom: 1.6rem; }

    /* the read-out is one line under the header: 01 / 08  MERCURY  terrestrial planet */
    html.kx-voyage-on .kx-hud {
        top: calc(var(--kx-header-h, 64px) + 12px);
        left: 20px;
        right: auto;
        width: auto;
        max-width: calc(100% - 64px);
        display: flex;
        align-items: baseline;
        gap: 12px;
        padding: 8px 14px 8px 16px;
        border-radius: 12px;
        box-shadow: none;
    }

    html.kx-voyage-on .kx-hud::before { top: 9px; bottom: 9px; }
    html.kx-voyage-on .kx-hud-name { margin: 0; font-size: 0.86rem; letter-spacing: 0.2em; }
    html.kx-voyage-on .kx-hud-type { margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    html.kx-voyage-on .kx-hud-facts { display: none; }

    /* the rail shrinks to its dots */
    html.kx-voyage-on .kx-rail { right: 2px; gap: 0; }
    html.kx-voyage-on .kx-rail::before { right: 9.5px; }
    .kx-rail-stop { height: 22px; padding: 0 6px; }
    .kx-rail-dot { width: 8px; height: 8px; }
    .kx-rail-label { display: none; }

    html.kx-voyage-on .kx-scroll-hint-text { display: none; }

    /* glass is costly on a phone: solid enough to read without the blur */
    html.kx-voyage-on .kx-service-card,
    html.kx-voyage-on .kx-proj,
    html.kx-voyage-on .kx-download-card,
    html.kx-voyage-on .kx-download-steps,
    html.kx-voyage-on .kx-check-list li {
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }

    html.kx-voyage-on .kx-cal-toggle,
    html.kx-voyage-on .kx-ann-toggle,
    html.kx-voyage-on .kx-stock-toggle { width: 40px; height: 40px; font-size: 1rem; bottom: 54px; }

    html.kx-voyage-on .kx-stock-toggle { bottom: 100px; }

    /* at the last stop the footer's form reaches the edges: the drawers' buttons step aside */
    html.kx-voyage-on.kx-at-end .kx-cal-toggle,
    html.kx-voyage-on.kx-at-end .kx-ann-toggle,
    html.kx-voyage-on.kx-at-end .kx-stock-toggle { opacity: 0; pointer-events: none; }

    html.kx-voyage-on .kx-download-grid { grid-template-columns: minmax(0, 1fr); }

    html.kx-voyage-on .kx-contact-foot .footer-section .container { padding-left: 1.25rem; padding-right: 1.25rem; }
}

/* a tablet keeps grids, two across */
@media (min-width: 768px) and (max-width: 991.98px) {
    html.kx-voyage-on .kx-services-grid,
    html.kx-voyage-on .kx-bento,
    html.kx-voyage-on .kx-launch-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

    html.kx-voyage-on .kx-stage .kx-panel-row { flex-wrap: nowrap; }
    html.kx-voyage-on .kx-stage .kx-panel { flex: 1; }
}

/* --- Phone: the cards stand one under the other and the stage scrolls through them, each
       card coming in as the scroll reaches it (kodilex-voyage.js); the planet waits under
       the last one, and a further swipe flies on to the next stop --- */
@media (max-width: 767.98px) {
    /* no room for the rail beside the cards: the read-out's "02 / 08" says where one is */
    html.kx-voyage-on .kx-rail { display: none; }

    /* room under the last card for the planet to show before the next flight */
    html.kx-voyage-on .kx-stage:not(.kx-hero):not(.kx-cta) > .kx-stage-scroll { padding-bottom: 30vh; }

    /* what scrolls up under the read-out chip fades out before it reaches it */
    html.kx-voyage-on .kx-stage:not(.kx-hero) > .kx-stage-scroll {
        -webkit-mask-image: linear-gradient(180deg, transparent calc(var(--kx-header-h, 64px) + 34px), #000 calc(var(--kx-header-h, 64px) + 78px));
        mask-image: linear-gradient(180deg, transparent calc(var(--kx-header-h, 64px) + 34px), #000 calc(var(--kx-header-h, 64px) + 78px));
    }

    html.kx-voyage-on .kx-hud { background: rgba(7, 11, 20, 0.9); }

    /* outline buttons over a bright limb */
    html.kx-voyage-on .kx-stage .kx-btn-glass,
    html.kx-voyage-on .kx-stage .kx-btn-outline { background: rgba(7, 11, 20, 0.78); }

    html.kx-voyage-on .kx-services-grid,
    html.kx-voyage-on .kx-bento,
    html.kx-voyage-on .kx-launch-grid {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
    }

    html.kx-voyage-on .kx-service-card { padding: 16px 18px; }
    html.kx-voyage-on .kx-service-card p { font-size: 0.86rem; }

    html.kx-voyage-on .kx-proj .kx-proj-visual { height: 110px; }
    html.kx-voyage-on .kx-proj .kx-proj-title { font-size: 1.05rem; }
    html.kx-voyage-on .kx-proj .kx-proj-text { font-size: 0.86rem; -webkit-line-clamp: 3; }

    html.kx-voyage-on .kx-launch-screen { height: clamp(150px, 24vh, 210px); }
    html.kx-voyage-on .kx-launch-body { padding: 18px 20px 20px; }
    html.kx-voyage-on .kx-launch-features { grid-template-columns: minmax(0, 1fr); }

    /* the panels: one under the other, each whole, its text always shown */
    html.kx-voyage-on .kx-stage .kx-panel-row {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
        height: auto;
        border: 0;
        border-radius: 0;
        box-shadow: none;
        overflow: visible;
    }

    html.kx-voyage-on .kx-stage .kx-panel,
    html.kx-voyage-on .kx-stage .kx-panel:hover {
        flex: none;
        height: clamp(190px, 30vh, 260px);
        min-height: 0;
        border: 1px solid var(--kx-line-strong);
        border-radius: 18px;
    }

    html.kx-voyage-on .kx-stage .kx-panel-content { opacity: 1; transform: none; }
    html.kx-voyage-on .kx-stage .kx-panel-overlay { background: linear-gradient(180deg, rgba(5, 7, 13, 0.3) 0%, rgba(5, 7, 13, 0.88) 100%); }

    html.kx-voyage-on .kx-check-list { grid-template-columns: minmax(0, 1fr); }
    html.kx-voyage-on .kx-check-list li { padding: 12px 14px; font-size: 0.88rem; }

    html.kx-voyage-on .kx-download-card {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        align-items: center;
        gap: 4px 16px;
        text-align: left;
        padding: 16px 18px;
    }

    html.kx-voyage-on .kx-download-icon { margin: 0; font-size: 2.6rem; }
    html.kx-voyage-on .kx-download-card .kx-download-sub { margin-bottom: 0; }
    html.kx-voyage-on .kx-download-card .kx-btn-primary { grid-column: 1 / -1; margin-top: 12px; }

    html.kx-voyage-on .kx-stage > .kx-stack .kx-stack-label,
    html.kx-voyage-on .kx-stage > .kx-tape .kx-tape-date { display: none; }

    html.kx-voyage-on .kx-stage .kx-btn-primary,
    html.kx-voyage-on .kx-stage .kx-btn-outline,
    html.kx-voyage-on .kx-stage .kx-btn-glass { padding: 12px 22px; }

    /* a card below the window waits for the scroll to reach it, then comes in on its own */
    html.kx-voyage-on .kx-stage.is-active [data-rise].kx-below { animation: none; opacity: 0; }
    html.kx-voyage-on .kx-stage.is-active [data-rise].kx-seen { animation-delay: 0ms; }
}

/* a phone held sideways, or a very short one: the stage scrolls, nothing is squeezed */
@media (max-width: 991.98px) and (max-height: 520px) {
    html.kx-voyage-on .kx-hero .kx-3d-scene { height: 250px; }
}

@media (prefers-reduced-motion: reduce) {
    html.kx-voyage-on .kx-stage.is-active [data-rise] { animation: none; }
    html.kx-voyage-on .kx-stage,
    html.kx-voyage-on .kx-hud,
    html.kx-voyage-on .kx-progress > span { transition: none; }
    .kx-scroll-mouse > span { animation: none; }
}
