/* Gizmo Jam landing page. Builds on /assets/site.css (fonts, header, footer, buttons). */

.gj {
    --night: #0f1b16;
    --night-2: #16261f;
    --night-3: #1f3229;
    --night-line: #30473c;
    --night-ink: #eef3e8;
    --night-muted: #a9b9ac;
    --r1: #ff7a4d;
    --r2: #ffd04a;
    --r3: #62e3b0;
    --r4: #58b7ff;
    --r5: #b48cff;
    --r6: #ff6fae;
    --stripe: linear-gradient(90deg,
        var(--r1) 0 16.667%, var(--r2) 0 33.333%, var(--r3) 0 50%,
        var(--r4) 0 66.667%, var(--r5) 0 83.333%, var(--r6) 0);
    --tint: #f1ebdc;
    --tint-line: #ded3bc;
    --edge: #8a4f2a;
    --radius-lg: 16px;
    --radius-md: 12px;
}

.gj-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

/* ---------- Masthead: site header on the dark band ---------- */

.gj-masthead { background: var(--night); color: var(--night-ink); }
.gj-masthead .mark { background: var(--lime); color: var(--night); }
.gj-masthead a:focus-visible { outline-color: var(--lime); }
@media (max-width: 495px) {
    .gj-masthead .site-header { margin-block: 0; padding-block: var(--space-08) var(--space-04); }
    .gj-masthead .primary-nav { border-top-color: var(--night-line); }
}

/* ---------- Shared section pieces ---------- */

.gj-section { padding-block: clamp(56px, 8vw, 112px); }

.gj-section-head { margin-bottom: clamp(28px, 4vw, 48px); }
.gj-section-head h2 {
    font-size: clamp(2.6rem, 5.4vw, 4.4rem);
    letter-spacing: -0.01em;
    text-wrap: balance;
}
.gj-section-head > p:not(.gj-kicker) {
    max-width: 54ch;
    margin-top: var(--space-16);
    font-size: 1.05rem;
    color: var(--muted);
}

.gj-kicker {
    margin-bottom: var(--space-12) !important;
    font-size: .76rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--edge);
}

.gj kbd {
    display: inline-block;
    min-width: 1.9em;
    padding: 1px 6px;
    border: 1px solid var(--line);
    border-bottom-width: 3px;
    border-radius: 6px;
    background: #fff;
    color: var(--ink);
    font: 650 .78em/1.5 var(--sans);
    text-align: center;
    vertical-align: .08em;
}
.gj kbd + kbd { margin-left: 3px; }

.gj code {
    padding: 1px 5px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: #fff;
    font-size: .86em;
    overflow-wrap: anywhere;
}

.gj a:focus-visible, .gj button:focus-visible, .gj summary:focus-visible {
    outline: 3px solid var(--edge);
    outline-offset: 3px;
}

/* ---------- Hero ---------- */

.gj-hero {
    position: relative;
    overflow: hidden;
    padding-bottom: clamp(56px, 8vw, 104px);
    background:
        radial-gradient(820px 440px at 86% 52%, #24463a 0, transparent 65%),
        radial-gradient(700px 480px at -5% 105%, #2b2645 0, transparent 60%),
        var(--night);
    color: var(--night-ink);
}

.gj-hero a:focus-visible, .gj-hero button:focus-visible, .gj-arena a:focus-visible, .gj-together a:focus-visible, .gj-lightbox button:focus-visible {
    outline-color: var(--lime);
}

.gj-breadcrumb { color: var(--night-muted); margin-bottom: 0; }

.gj-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    gap: clamp(32px, 5vw, 80px);
    align-items: center;
    padding-top: clamp(8px, 2vw, 24px);
}

.gj-chip {
    display: inline-flex;
    align-items: center;
    gap: var(--space-08);
    padding: 6px 14px 6px 10px;
    border: 1px solid var(--night-line);
    border-radius: 999px;
    background: #ffffff0a;
    color: var(--night-muted);
    font-size: .82rem;
    font-weight: 600;
}

.gj-live {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--r3);
    box-shadow: 0 0 0 4px #62e3b02e;
}

.gj-hero h1 {
    margin-top: var(--space-24);
    font-size: clamp(4.4rem, 10.5vw, 9.4rem);
    line-height: .86;
    letter-spacing: -.02em;
}

.gj-jam {
    background: linear-gradient(95deg, var(--r2), var(--r1) 20%, var(--r6) 38%, var(--r5) 50%, var(--r4) 64%, var(--r3) 80%, var(--r2));
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    padding-right: .06em;
    animation: gj-shimmer 7s ease-in-out infinite alternate;
}
@keyframes gj-shimmer { to { background-position: 100% 0; } }

.gj-tagline {
    margin-top: var(--space-24);
    font: 400 clamp(1.5rem, 2.6vw, 2.1rem)/1.15 var(--serif);
}

.gj-lede {
    max-width: 44ch;
    margin-top: var(--space-12);
    color: var(--night-muted);
    font-size: 1.04rem;
}

.gj-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-12);
    margin-top: var(--space-32);
}

.gj-actions .button { min-height: 50px; padding-inline: 20px; font-size: .95rem; border-radius: 999px; }
.gj-button-ghost { border-color: #ffffff4d; color: var(--night-ink); }
.gj-button-ghost:hover { background: var(--night-ink); color: var(--night); }

.gj-facts {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-16) clamp(24px, 3vw, 40px);
    margin: var(--space-48) 0 0;
    padding-top: var(--space-24);
    border-top: 1px solid var(--night-line);
}
.gj-facts dt {
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--night-muted);
}
.gj-facts dd { margin: 2px 0 0; font-weight: 650; }

/* Hero slideshow. Every card sits in the main slot (left 7%, top 9%, width 86%)
   and transforms move it into the other slots, so moves animate smoothly. */

@property --glow {
    syntax: "<color>";
    inherits: true;
    initial-value: #ff7a4d;
}

.gj-hero-stage {
    --glow: var(--r1);
    --hero-interval: 5s;
    --hero-ease: cubic-bezier(.65, 0, .25, 1);
    min-width: 0;
    transition: --glow .9s ease;
}

.gj-hero-art {
    position: relative;
    isolation: isolate;
    aspect-ratio: 16 / 11.6;
    counter-reset: shot;
    touch-action: pan-y;
}

.gj-hero-art::before {
    content: "";
    position: absolute;
    inset: -6% -4%;
    z-index: -1;
    background: radial-gradient(closest-side, color-mix(in srgb, var(--glow) 34%, transparent), transparent);
    filter: blur(24px);
    pointer-events: none;
}

.gj-hero-shot {
    position: absolute;
    top: 9%;
    left: 7%;
    width: 86%;
    display: block;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: #0a1310;
    box-shadow: 0 0 0 1px #ffffff26, 0 34px 60px -24px #000000d0;
    counter-increment: shot;
    transform-origin: 0 0;
    transition:
        transform .9s var(--hero-ease),
        opacity .6s ease,
        box-shadow .6s ease;
}
.gj-hero-shot img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    transform-origin: 62% 45%;
}

.gj-hero-shot[data-pos="main"] {
    z-index: 3;
    box-shadow: 0 0 0 3px var(--glow), 0 34px 60px -24px #000000d0;
}
.gj-hero-shot[data-pos="main"] img { animation: gj-arrive calc(var(--hero-interval) + 1.5s) ease-out both; }

.gj-hero-shot[data-pos="next"] {
    z-index: 4;
    transform: translate(61.6%, 76.2%) scale(.465) rotate(4deg);
    box-shadow: 0 0 0 6px #ffffffd9, 0 40px 60px -20px #000000d0;
    animation: gj-bob 3.4s ease-in-out infinite;
    cursor: pointer;
}

.gj-hero-shot[data-pos="prev"] {
    z-index: 1;
    transform: translate(-8.1%, -12.1%) scale(.465) rotate(-7deg);
    animation: gj-bob 4s ease-in-out -1.4s infinite;
    cursor: pointer;
}
.gj-hero-shot[data-pos="prev"] img { filter: saturate(.75) brightness(.8); transition: filter .6s; }

.gj-hero-shot[data-pos="queued"],
.gj-hero-shot[data-pos="gone"] {
    z-index: 0;
    opacity: 0;
    pointer-events: none;
}
.gj-hero-shot[data-pos="queued"] { transform: translate(84%, 100%) scale(.28) rotate(12deg); }
.gj-hero-shot[data-pos="gone"] { transform: translate(-22%, -30%) scale(.28) rotate(-16deg); }

.gj-hero-shot:focus-visible { outline-offset: 5px; }

@keyframes gj-arrive {
    from { transform: scale(1.14); }
    to { transform: scale(1); }
}
@keyframes gj-bob {
    50% { translate: 0 -10px; }
}

.gj-hero-label {
    position: absolute;
    inset: auto 0 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 12px;
    padding: 48px 20px 16px;
    background: linear-gradient(transparent, #050a08f0 70%);
    color: #fff;
    opacity: 0;
    translate: 0 12px;
    transition: opacity .3s ease, translate .3s ease;
    pointer-events: none;
}
.gj-hero-shot[data-pos="main"] .gj-hero-label {
    opacity: 1;
    translate: 0 0;
    transition: opacity .5s ease .5s, translate .5s ease .5s;
}
.gj-hero-num {
    display: inline-grid;
    place-items: center;
    min-width: 38px;
    height: 24px;
    padding-inline: 7px;
    border-radius: 999px;
    background: var(--glow);
    color: var(--night);
    font-size: .74rem;
    font-weight: 800;
}
.gj-hero-num::before { content: counter(shot, decimal-leading-zero); }
.gj-hero-label strong { font: 400 clamp(1.5rem, 2.4vw, 2rem)/1 var(--serif); }
.gj-hero-label [data-hero-caption] { flex-basis: 100%; color: #d7e0d5; font-size: .88rem; }

.gj-hero-controls:not([hidden]) {
    display: flex;
    align-items: center;
    gap: var(--space-16);
    margin-top: var(--space-24);
}

.gj-hero-toggle {
    flex: none;
    display: grid;
    place-items: center;
    width: var(--tap-size);
    height: var(--tap-size);
    padding: 0;
    border: 1px solid #ffffff40;
    border-radius: 50%;
    background: #ffffff10;
    color: var(--night-ink);
    cursor: pointer;
}
.gj-hero-toggle:hover { background: var(--night-ink); color: var(--night); }
.gj-hero-toggle::before {
    content: "";
    width: 10px;
    height: 12px;
    border-inline: 3px solid currentColor;
}
.gj-hero-stage.is-paused .gj-hero-toggle::before {
    width: 0;
    height: 0;
    margin-left: 3px;
    border-inline: 0;
    border-block: 7px solid transparent;
    border-left: 11px solid currentColor;
}

.gj-hero-dots {
    flex: 1;
    min-width: 0;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    gap: var(--space-08);
}
.gj-hero-dots button {
    position: relative;
    display: grid;
    align-content: center;
    gap: var(--space-08);
    min-width: 0;
    min-height: var(--tap-size);
    padding: 0;
    border: 0;
    background: none;
    color: var(--night-muted);
    font: 650 .76rem/1.2 var(--sans);
    text-align: left;
    cursor: pointer;
}
.gj-hero-dots button:hover .gj-hero-bar { background: #ffffff4d; }
.gj-hero-dots button > span:last-child { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.gj-hero-bar {
    display: block;
    height: 5px;
    overflow: hidden;
    border-radius: 2px;
    background: #ffffff26;
}
.gj-hero-fill {
    display: block;
    height: 100%;
    background: var(--glow);
    transform: scaleX(0);
    transform-origin: left;
}
.gj-hero-dots button[aria-current="true"] .gj-hero-fill {
    animation: gj-hero-fill var(--hero-interval) linear forwards;
}
.gj-hero-stage.is-paused button[aria-current="true"] .gj-hero-fill { animation: none; transform: none; }
.gj-hero-stage:has(:focus-visible) .gj-hero-dots button[aria-current="true"] .gj-hero-fill { animation-play-state: paused; }
@media (hover: hover) {
    .gj-hero-stage:hover .gj-hero-dots button[aria-current="true"] .gj-hero-fill { animation-play-state: paused; }
}
@keyframes gj-hero-fill { to { transform: scaleX(1); } }

.gj-stripe {
    position: absolute;
    inset: auto 0 0;
    height: 6px;
    background: var(--stripe);
}

/* ---------- Minigames ---------- */

.gj-arena {
    padding-block: clamp(64px, 9vw, 120px);
    background: var(--night);
    color: var(--night-ink);
}
.gj-arena .gj-kicker { color: var(--r2); }
.gj-arena .gj-section-head > p:not(.gj-kicker) { color: var(--night-muted); }

.gj-modes {
    display: grid;
    gap: clamp(56px, 8vw, 112px);
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: mode;
}

.gj-mode {
    --accent: var(--r1);
    counter-increment: mode;
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: clamp(28px, 4.5vw, 64px);
    align-items: center;
    scroll-margin-top: var(--space-24);
}
.gj-mode:nth-child(6n + 2) { --accent: var(--r3); }
.gj-mode:nth-child(6n + 3) { --accent: var(--r4); }
.gj-mode:nth-child(6n + 4) { --accent: var(--r6); }
.gj-mode:nth-child(6n + 5) { --accent: var(--r2); }
.gj-mode:nth-child(6n + 6) { --accent: var(--r5); }
.gj-mode:nth-child(even) .gj-mode-shot { order: 2; }

.gj-mode-shot {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: #0a1310;
    box-shadow: 0 0 0 1px #ffffff1f, 0 30px 60px -30px #000000e0;
}
.gj-mode-shot::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: inset 0 0 0 0 var(--accent);
    transition: box-shadow .2s;
}
.gj-mode-shot:hover::after { box-shadow: inset 0 0 0 4px var(--accent); }
.gj-mode-shot img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    transition: transform .5s cubic-bezier(.2, .8, .2, 1);
}
.gj-mode-shot:hover img { transform: scale(1.025); }

.gj-mode-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-08) var(--space-12);
    color: var(--accent);
    font-size: .9rem;
    font-weight: 650;
}
.gj-mode-num {
    display: inline-grid;
    place-items: center;
    min-width: 42px;
    height: 28px;
    padding-inline: 8px;
    border-radius: 999px;
    background: var(--accent);
    color: var(--night);
    font-size: .8rem;
    font-weight: 800;
    letter-spacing: .04em;
}
.gj-mode-num::before { content: counter(mode, decimal-leading-zero); }

.gj-mode h3 {
    margin-top: var(--space-16);
    font-size: clamp(2.6rem, 4.6vw, 4rem);
    letter-spacing: -.01em;
}

.gj-mode-desc {
    margin-top: var(--space-16);
    color: #d7e0d5;
    font-size: 1.02rem;
}

.gj-controls {
    display: grid;
    gap: var(--space-12);
    margin: var(--space-24) 0 0;
    padding: var(--space-16) 18px;
    border: 1px solid var(--night-line);
    border-left: 3px solid var(--accent);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    background: var(--night-2);
}
.gj-controls > div:not([hidden]) {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    gap: var(--space-12);
    align-items: baseline;
}
.gj-controls dt {
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--night-muted);
}
.gj-controls dd { margin: 0; font-size: .93rem; line-height: 1.75; }

.gj-arena kbd {
    border-color: #3f5b4d;
    background: var(--night-3);
    color: var(--night-ink);
}

.gj-mode-tag:not([hidden]) {
    display: flex;
    align-items: center;
    gap: var(--space-08);
    margin-top: var(--space-16);
    color: var(--night-muted);
    font-size: .88rem;
}
.gj-mode-tag::before {
    content: "";
    flex: none;
    width: 8px;
    height: 8px;
    border-radius: 2px;
    background: var(--accent);
    transform: rotate(45deg);
}
.gj-mode-tag strong { color: var(--night-ink); }

/* ---------- Good to know ---------- */

.gj-tiles {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-16);
    margin: 0;
    padding: 0;
    list-style: none;
}

.gj-tile {
    padding: clamp(22px, 2.6vw, 32px);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
}
.gj-tile::before {
    content: "";
    display: block;
    width: 44px;
    height: 6px;
    margin-bottom: var(--space-24);
    border-radius: 3px;
    background: var(--r1);
}
.gj-tile:nth-child(2)::before { background: var(--r4); }
.gj-tile:nth-child(3)::before { background: var(--r3); }
.gj-tile h3 { font-size: clamp(1.9rem, 2.6vw, 2.3rem); margin-bottom: var(--space-12); }
.gj-tile p { color: var(--muted); }

.gj-keys {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-12) var(--space-32);
    margin: var(--space-16) 0 0;
    padding: var(--space-16) var(--space-24);
    border-radius: var(--radius-lg);
    background: var(--tint);
    list-style: none;
    font-size: .92rem;
    font-weight: 600;
}
.gj-keys kbd { margin-right: 6px; }

/* ---------- Play or download ---------- */

.gj-download {
    padding-block: clamp(64px, 9vw, 120px);
    border-block: 1px solid var(--tint-line);
    background: var(--tint);
}

.gj-download-grid {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: var(--space-16);
}

.gj-play-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: var(--space-24);
    overflow: hidden;
    padding: clamp(24px, 3vw, 36px) clamp(24px, 3vw, 36px) clamp(30px, 3.4vw, 42px);
    border-radius: var(--radius-lg);
    background:
        radial-gradient(420px 260px at 100% 0, #2a5243 0, transparent 70%),
        var(--night);
    color: var(--night-ink);
    text-decoration: none;
    transition: transform .2s;
}
.gj-play-card::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 6px;
    background: var(--stripe);
}
.gj-play-card:hover { transform: translateY(-3px); }
.gj-play-card:focus-visible { outline-color: var(--ink); }

.gj-play-icon {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--lime);
}
.gj-play-icon::before {
    content: "";
    width: 0;
    height: 0;
    margin-left: 5px;
    border-block: 11px solid transparent;
    border-left: 18px solid var(--night);
}
.gj-play-text { display: grid; gap: var(--space-08); margin-top: auto; }
.gj-play-card .os { font: 400 clamp(2.4rem, 4vw, 3.4rem)/1 var(--serif); }
.gj-play-card .meta { color: var(--night-muted); max-width: 34ch; }
.gj-play-card .gj-get {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: var(--space-08);
    min-height: var(--tap-size);
    padding-inline: 18px;
    border-radius: 999px;
    background: var(--lime);
    color: var(--night);
    font-size: .92rem;
    font-weight: 700;
}

.gj-platforms {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-16);
}

.gj-platform {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: var(--space-04);
    min-height: 150px;
    padding: 22px 24px;
    border: 1px solid var(--tint-line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    text-decoration: none;
    transition: transform .2s, border-color .2s, box-shadow .2s;
}
.gj-platform:hover { border-color: var(--ink); transform: translateY(-3px); box-shadow: 0 14px 30px -18px #20332b80; }
.gj-platform .os { font: 400 2rem/1 var(--serif); }
.gj-platform .meta { color: var(--muted); font-size: .85rem; overflow-wrap: anywhere; }
.gj-platform .gj-get {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
    padding-top: var(--space-16);
    font-size: .88rem;
    font-weight: 700;
}
.gj-platform:hover .gj-get { text-decoration: underline; text-underline-offset: 4px; }

.gj-platform.is-recommended { border: 2px solid var(--ink); padding: 21px 23px; }
.gj-badge {
    position: absolute;
    top: 18px;
    right: 18px;
    padding: 3px 9px;
    border-radius: 999px;
    background: var(--lime);
    color: var(--ink);
    font-size: .72rem;
    font-weight: 700;
}

.gj-note {
    max-width: 82ch;
    margin-top: var(--space-24);
    color: var(--muted);
    font-size: .93rem;
}

/* ---------- Installing & playing together ---------- */

.gj-setup-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(40px, 5vw, 80px);
    align-items: start;
}
.gj-setup .gj-section-head h2 { font-size: clamp(2.4rem, 4.2vw, 3.6rem); }

.gj-accordion details { border-top: 1px solid var(--line); }
.gj-accordion details:last-child { border-bottom: 1px solid var(--line); }
.gj-accordion summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-16);
    min-height: 60px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 650;
    list-style: none;
}
.gj-accordion summary::-webkit-details-marker { display: none; }
.gj-accordion summary::after {
    content: "";
    flex: none;
    width: 10px;
    height: 10px;
    margin-right: 6px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-3px) rotate(45deg);
    transition: transform .2s;
}
.gj-accordion details[open] summary::after { transform: translateY(2px) rotate(-135deg); }
.gj-accordion summary:hover { color: var(--edge); }
.gj-accordion ol { margin: 0 0 var(--space-24); padding-left: 1.3rem; }
.gj-accordion li + li { margin-top: var(--space-08); }
.gj-accordion li::marker { color: var(--edge); font-weight: 700; }

.gj-together {
    padding: clamp(24px, 3.2vw, 40px);
    border-radius: var(--radius-lg);
    background: var(--night);
    color: var(--night-ink);
}
.gj-together .gj-kicker { color: var(--r3); }
.gj-together code { border-color: var(--night-line); background: var(--night-3); color: var(--night-ink); }

.gj-steps { margin: 0; padding: 0; list-style: none; counter-reset: step; }
.gj-steps li {
    position: relative;
    padding-left: 48px;
    color: #d7e0d5;
    counter-increment: step;
}
.gj-steps li + li { margin-top: var(--space-16); }
.gj-steps li::before {
    content: counter(step);
    position: absolute;
    top: -1px;
    left: 0;
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--r3);
    color: var(--night);
    font-size: .85rem;
    font-weight: 800;
}
.gj-steps li:nth-child(2)::before { background: var(--r4); }
.gj-steps li:nth-child(3)::before { background: var(--r5); }
.gj-steps li:nth-child(4)::before { background: var(--r6); }
.gj-steps li:nth-child(5)::before { background: var(--r1); }
.gj-steps strong { color: var(--night-ink); }

/* ---------- Gallery ---------- */

.gj-shots { padding-top: 0; }
.gj-gallery {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--space-24) var(--space-16);
    margin: 0;
    padding: 0;
    list-style: none;
}
.gj-gallery a {
    display: block;
    overflow: hidden;
    border-radius: var(--radius-md);
    background: var(--night);
    box-shadow: 0 0 0 1px var(--line);
}
.gj-gallery img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    transition: transform .4s cubic-bezier(.2, .8, .2, 1), opacity .2s;
}
.gj-gallery a:hover img { transform: scale(1.04); }
.gj-gallery figcaption { padding-top: var(--space-08); color: var(--muted); font-size: .85rem; line-height: 1.4; }

/* ---------- Lightbox ---------- */

.gj-lightbox {
    width: min(1280px, calc(100vw - 32px));
    max-width: none;
    max-height: none;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--night-ink);
    overflow: visible;
}
.gj-lightbox::backdrop { background: #060c09f7; }
.gj-lightbox figure { margin: 0; }
.gj-lightbox img {
    width: 100%;
    height: auto;
    max-height: calc(100vh - 140px);
    object-fit: contain;
    border-radius: var(--radius-md);
    background: #000;
}
.gj-lightbox figcaption { margin-top: var(--space-12); font-weight: 600; text-align: center; }
.gj-lightbox-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-12);
    margin-top: var(--space-12);
}
.gj-lightbox-bar [data-lightbox-count] { min-width: 5ch; color: var(--night-muted); font-size: .85rem; text-align: center; }
.gj-lightbox button {
    display: grid;
    place-items: center;
    width: var(--tap-size);
    height: var(--tap-size);
    padding: 0;
    border: 1px solid #ffffff40;
    border-radius: 50%;
    background: #ffffff12;
    color: var(--night-ink);
    font: 600 1.15rem/1 var(--sans);
    cursor: pointer;
}
.gj-lightbox button:hover { background: var(--night-ink); color: var(--night); }
.gj-lightbox [data-lightbox-close] { margin-left: var(--space-24); }

/* ---------- Responsive ---------- */

@media (max-width: 1000px) {
    .gj-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .gj-download-grid { grid-template-columns: minmax(0, 1fr); }
    .gj-play-card { min-height: 0; }
}

@media (max-width: 860px) {
    .gj-hero-grid, .gj-mode, .gj-setup-grid { grid-template-columns: minmax(0, 1fr); }
    .gj-mode:nth-child(even) .gj-mode-shot { order: 0; }
    .gj-hero-art { margin-top: var(--space-16); }
    .gj-tiles { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 620px) {
    .gj-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-16) var(--space-12); }
    .gj-platforms { grid-template-columns: minmax(0, 1fr); }
    .gj-platform { min-height: 0; }
    .gj-hero-label { padding: 36px 14px 12px; }
    .gj-hero-label [data-hero-caption] { display: none; }
    .gj-hero-dots { gap: 6px; }
    .gj-actions .button { flex: 1 1 auto; justify-content: center; }
    .gj-keys { gap: var(--space-12) var(--space-24); }
}

@media (prefers-reduced-motion: reduce) {
    .gj *, .gj *::before, .gj *::after { transition: none !important; }
    .gj :not(.gj-hero-fill) { animation: none !important; }
}

@media (forced-colors: active) {
    .gj-jam { color: CanvasText; background: none; }
    .gj-platform.is-recommended { border-color: Highlight; }
    .gj-mode-num, .gj-steps li::before { border: 1px solid CanvasText; }
}
