/*
 * subspaceflux.com placeholder page.
 *
 * Layout: the title artwork fills the window, with the logo, wishlist button
 * and screenshot carousel stacked in one column. On wide screens the column
 * sits to the right of the funnel in the artwork; on narrow or tall screens
 * it is centred and the artwork is re-framed.
 */

:root { color-scheme: dark; }
*, *::before, *::after { box-sizing: border-box; }

html { background: #03040c; }
body {
    margin: 0;
    color: #e8ecff;
    font-family: Arial, Helvetica, sans-serif;
}

/* ---------- Background artwork ---------- */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background: #03040c url(../images/background-1920.webp) 0% 50% / cover no-repeat;
}
@media (min-width: 1921px), (min-width: 1100px) and (min-resolution: 1.5dppx) {
    body::before { background-image: url(../images/background-2560.webp); }
}

/* ---------- Content column ---------- */
.hero {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100vh;
    min-height: 100svh;
    padding: clamp(16px, 4vh, 48px) clamp(16px, 4vw, 80px);
}
.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: min(58vw, 1000px);
    margin-left: auto;
}

.logo {
    width: 100%;
    margin: 0;
}
.logo img {
    display: block;
    width: 100%;
    height: auto;
}

.wishlist {
    display: block;
    width: clamp(230px, 26vw, 400px);
    margin-top: clamp(0px, 1vh, 12px);
    border-radius: 28px;
    transition: transform 0.15s ease, filter 0.15s ease;
}
.wishlist img {
    display: block;
    width: 100%;
    height: auto;
}
.wishlist:hover { transform: scale(1.05); filter: brightness(1.1); }
.wishlist:active { transform: scale(0.98); }
.wishlist:focus-visible { outline: 3px solid #ffd800; outline-offset: -8px; }

/* ---------- Screenshot carousel (see js/carousel.js) ---------- */
.sf-carousel {
    --sf-carousel-height: clamp(130px, 22vh, 210px);
    position: relative;
    width: 100%;
    margin-top: clamp(8px, 3vh, 32px);
    overflow: hidden;
    touch-action: pan-y;
    -webkit-user-select: none;
    user-select: none;
    /* Fade the strip out at both ends. */
    -webkit-mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
    mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
}
.sf-carousel-track {
    position: relative;
    display: flex;
    width: max-content;
    margin: 0;
    padding: 0;
    list-style: none;
    will-change: transform;
}
.sf-carousel-track li {
    flex: none;
    margin: 0;
    padding: 0 6px;
}
.sf-carousel-track a {
    display: block;
    border: 1px solid rgba(120, 160, 255, 0.45);
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.15s ease, filter 0.15s ease;
}
.sf-carousel-track a:hover { border-color: #ffd800; filter: brightness(1.15); }
.sf-carousel-track a:focus-visible { outline: 3px solid #ffd800; outline-offset: -3px; }
.sf-carousel-track img {
    display: block;
    width: auto;
    height: var(--sf-carousel-height);
    aspect-ratio: 16 / 9;
    -webkit-user-drag: none;
}

/* ---------- Narrow or tall screens: centred column, re-framed artwork ---------- */
@media (max-width: 900px), (max-aspect-ratio: 1/1) {
    body::before {
        background-position: 38% 50%;
    }
    .hero {
        justify-content: flex-start;
        padding: clamp(24px, 9vh, 96px) 0 32px;
    }
    .hero-content {
        width: 100%;
        max-width: 760px;
        margin: 0 auto;
    }
    .logo { padding: 0 8px; }
    .wishlist { width: clamp(230px, 66vw, 400px); }
    .sf-carousel {
        --sf-carousel-height: min(210px, calc((100vw - 56px) * 0.5625));
        margin-top: clamp(16px, 4vh, 40px);
    }
}

/* ---------- Screenshot viewer ---------- */
.sf-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(2, 3, 10, 0.96);
    touch-action: none;
}
.sf-lightbox[hidden] { display: none; }
.sf-lightbox-image {
    display: block;
    width: auto;
    height: auto;
    max-width: calc(100vw - 24px);
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
    border: 1px solid rgba(120, 160, 255, 0.6);
    border-radius: 6px;
    -webkit-user-drag: none;
    user-select: none;
}
.sf-lightbox button {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    margin: 0;
    padding: 0;
    border: 1px solid rgba(120, 160, 255, 0.5);
    border-radius: 50%;
    background: rgba(5, 8, 30, 0.7);
    color: #fff;
    cursor: pointer;
}
.sf-lightbox button:hover { border-color: #ffd800; color: #ffd800; }
.sf-lightbox button:focus-visible { outline: 3px solid #ffd800; }
.sf-lightbox button svg {
    width: 26px;
    height: 26px;
    fill: none;
    stroke: currentColor;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.sf-lightbox-close { top: 12px; right: 12px; }
.sf-lightbox-prev  { left: 12px;  top: 50%; margin-top: -26px; }
.sf-lightbox-next  { right: 12px; top: 50%; margin-top: -26px; }
.sf-lightbox-counter {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 14px;
    text-align: center;
    pointer-events: none;
    color: #e8ecff;
    font-size: 14px;
    text-shadow: 0 1px 3px #000;
}
