/* fingerdash.vilegacy.games, in the layout of catchflex.com:
 *   .stage  the landing page, one screen: the gameplay blurred behind the logo, the pitch and the
 *           store button, with the trailer and screenshots as a strip along the bottom
 *   .doc    the privacy policy, a long document made to be read
 */

/* Noto Sans Black Italic: the lettering of the trailer captions. Latin subset, headings only;
 * text is set in the device's own font, so nothing else loads. */
@font-face {
    font-family: 'Noto Sans';
    font-style: italic;
    font-weight: 900;
    font-display: swap;
    src: url('fonts/noto-sans-black-italic.woff2') format('woff2');
}

:root {
    --bg: #0b0a10;
    --line: rgba(255, 255, 255, .12);
    --line-strong: rgba(255, 255, 255, .28);
    --text: #ffffff;
    --text-dim: #b9b6c4;
    --text-faint: #7f7b8c;
    --accent: #5fe3ec;      /* the cyan of the hand outline in the game */
    --heading: 'Noto Sans', system-ui, sans-serif;
    color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100svh;
}

img, svg, video { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
::selection { background: var(--accent); color: #0b0a10; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.skip {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 300;
    padding: 10px 18px;
    background: var(--text);
    color: var(--bg);
    font-weight: 700;
}
.skip:focus { left: 12px; top: 12px; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------------------------------------------------------------- header of the inner pages: the mark, home */

.topnav {
    display: flex;
    justify-content: center;
    padding: 16px 24px;
    border-bottom: 1px solid var(--line);
}
.topnav-mark { display: inline-flex; border-radius: 6px; transition: transform .15s ease; }
.topnav-mark:hover { transform: translateY(-1px); }
.topnav-mark img { height: 34px; width: auto; }

/* ---------------------------------------------------------------- landing page */

.stage {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
    padding: 40px 24px 18px;
    isolation: isolate;
    overflow: hidden;
}

/* The gameplay, blurred in the encode rather than by the browser: a CSS blur over a playing
 * video costs every frame, and a blurred encode is a quarter of the size of a sharp one. */
.stage-bg {
    position: absolute;
    inset: 0;
    z-index: -2;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

.stage-scrim {
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        linear-gradient(180deg, rgba(8, 7, 12, .8) 0%, rgba(8, 7, 12, 0) 24%),
        linear-gradient(0deg, rgba(8, 7, 12, .92) 0%, rgba(8, 7, 12, 0) 38%),
        radial-gradient(120% 80% at 50% 45%, rgba(8, 7, 12, 0) 35%, rgba(8, 7, 12, .55) 100%),
        rgba(11, 10, 16, .34);
}

.stage-inner {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: clamp(20px, 3.4vh, 34px);
    width: 100%;
    max-width: 660px;
    text-align: center;
}

.mark { line-height: 0; }
.mark img {
    width: min(420px, 74vw);
    height: auto;
    filter: drop-shadow(0 10px 40px rgba(0, 0, 0, .55));
}

.stage-copy { display: grid; gap: 10px; max-width: 50ch; }
.stage-copy h2 {
    font-family: var(--heading);
    font-style: italic;
    font-weight: 900;
    text-transform: uppercase;
    font-size: clamp(24px, 3.4vw, 34px);
    line-height: 1.05;
    text-shadow: 0 2px 18px rgba(8, 7, 12, .95), 0 0 5px rgba(8, 7, 12, .8);
}
.stage-copy p {
    color: #d5d2df;
    font-size: 16.5px;
    text-shadow: 0 1px 14px rgba(8, 7, 12, .9), 0 0 4px rgba(8, 7, 12, .7);
}

/* ---------------------------------------------------------------- store button */

.cta {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-height: 54px;
    padding: 0 28px 0 22px;
    border-radius: 999px;
    background: #ffffff;
    color: #0b0a10;
    text-decoration: none;
    font-size: 17px;
    font-weight: 700;
    box-shadow: 0 10px 34px rgba(0, 0, 0, .45);
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.cta svg { width: 26px; height: 26px; flex: none; color: #0866ff; }
.cta:hover { transform: translateY(-2px); box-shadow: 0 14px 40px rgba(0, 0, 0, .55); background: #f1f0f6; }
.cta:active { transform: translateY(0); }

/* ---------------------------------------------------------------- the strip: trailer and screenshots */

.reel { width: 100%; max-width: 1240px; }
.reel-track {
    list-style: none;
    display: flex;
    justify-content: safe center;
    gap: 12px;
    overflow-x: auto;
    padding: 6px 4px 10px;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, .25) transparent;
}
.reel-track li { flex: none; scroll-snap-align: start; }

.reel-item {
    position: relative;
    display: block;
    /* Eight across on a wide screen, so the strip needs no scrollbar there; narrower screens scroll it. */
    width: clamp(140px, calc((min(100vw - 48px, 1240px) - 7 * 12px - 8px) / 8), 184px);
    aspect-ratio: 16 / 9;
    padding: 0;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    overflow: hidden;
    background: #000;
    cursor: pointer;
    box-shadow: 0 6px 22px rgba(0, 0, 0, .45);
    transition: transform .2s ease, border-color .2s ease;
}
.reel-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.reel-item:hover { transform: translateY(-3px); border-color: var(--accent); }
.reel-item:hover img { transform: scale(1.05); }

.reel-play {
    position: absolute;
    top: 50%; left: 50%;
    width: 38px; height: 38px;
    margin: -19px 0 0 -19px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, .94);
    color: #0b0a10;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .5);
}
.reel-play svg { width: 16px; height: 16px; margin-left: 2px; }
.reel-label {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: 14px 8px 5px;
    background: linear-gradient(0deg, rgba(0, 0, 0, .75), rgba(0, 0, 0, 0));
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
    text-align: left;
}

/* ---------------------------------------------------------------- footer */

.footnote {
    flex: none;
    padding: 12px 24px 16px;
    text-align: center;
    font-size: 10.5px;
    line-height: 1.45;
    color: rgba(255, 255, 255, .32);
}
.footnav { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 20px; margin-bottom: 8px; }
.footnav a {
    color: var(--text-faint);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-size: 11px;
    font-weight: 700;
    transition: color .15s ease;
}
.footnav a:hover { color: var(--text); }

/* ---------------------------------------------------------------- lightbox: the trailer and the screenshots */

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: grid;
    grid-template-rows: 1fr auto;
    place-items: center;
    gap: 12px;
    padding: 64px 72px 20px;
    /* Near opaque, so no backdrop blur: a full-screen backdrop-filter costs every frame and
     * shows nothing through a 97% wash. */
    background: rgba(5, 4, 8, .97);
}
.lightbox[hidden] { display: none; }
.lightbox-frame {
    width: min(1280px, 100%);
    max-height: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 30px 90px rgba(0, 0, 0, .7);
}
.lightbox-frame video, .lightbox-frame img { width: 100%; height: 100%; object-fit: contain; }
.lightbox-frame [hidden] { display: none; }

.lightbox-close, .lightbox-step {
    position: absolute;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border: 1px solid var(--line-strong);
    border-radius: 50%;
    background: rgba(255, 255, 255, .07);
    cursor: pointer;
    transition: background .15s ease;
}
.lightbox-close:hover, .lightbox-step:hover { background: rgba(255, 255, 255, .16); }
.lightbox-close svg, .lightbox-step svg { width: 24px; height: 24px; }
.lightbox-close { top: 14px; right: 14px; }
.lightbox-step { top: 50%; margin-top: -23px; }
.lightbox-prev { left: 14px; }
.lightbox-next { right: 14px; }
.lightbox-count { color: var(--text-faint); font-size: 13px; letter-spacing: .08em; }

body.is-locked { overflow: hidden; }

/* ---------------------------------------------------------------- privacy policy */

.doc {
    flex: 1;
    width: 100%;
    max-width: 740px;
    margin: 0 auto;
    padding: 40px 20px 64px;
}
.doc h1 {
    font-family: var(--heading);
    font-style: italic;
    font-weight: 900;
    text-transform: uppercase;
    font-size: clamp(30px, 6vw, 42px);
    line-height: 1.05;
    margin: 18px 0 6px;
}
.doc h2 { font-size: 21px; font-weight: 800; margin: 34px 0 8px; padding-top: 16px; border-top: 1px solid var(--line); }
.doc h3 { font-size: 17px; font-weight: 800; margin: 20px 0 4px; }
.doc p, .doc li { color: var(--text-dim); }
.doc p + p { margin-top: 10px; }
.doc ul, .doc ol { padding-left: 22px; display: grid; gap: 6px; margin: 8px 0; }
.doc strong { color: var(--text); }
.doc a { color: var(--accent); }
.muted { color: var(--text-faint); font-size: 14px; }
body > footer:not(.footnote) { text-align: center; color: var(--text-faint); padding: 24px 16px; font-size: 14px; }
body > footer:not(.footnote) a { color: var(--accent); }

/* ---------------------------------------------------------------- narrow screens */

@media (max-width: 560px) {
    .stage { padding: 32px 16px 14px; gap: 22px; }
    .topnav-mark img { height: 30px; }
    .stage-copy p { font-size: 15.5px; }
    .cta { min-height: 50px; font-size: 16px; padding: 0 22px 0 18px; }
    .reel-track { justify-content: flex-start; }
    .reel-item { width: 148px; }
    .lightbox { padding: 60px 12px 16px; }
    .lightbox-step { top: auto; bottom: 14px; margin-top: 0; }
}
