/* ============================================
   Landing — sections below the hero (Cosmic Arcade, 2026-09-23)
   ============================================
   Genre quick-start, how-it-works, showcase (bento / carousels / genre switcher),
   top creators, CTA band. Loaded after landing.css; mobile.css still loads last.
   Sections that load data carry [hidden] until they have something to show.
   ============================================ */

.landing-section {
    position: relative;
    margin: 0 0 clamp(44px, 5vw, 64px);
}

.landing-section[hidden] {
    display: none !important;
}

/* ============================================
   Start from a genre — art tiles rail
   ============================================ */
.genre-start__hint {
    font-size: 13px;
    color: var(--text-tertiary);
    white-space: nowrap;
}

/* Every genre visible at once — no sideways scroll. 10 genres + the double-width "free"
   tile = 12 cells, so 6 / 4 / 3 columns always fill evenly. */
.genre-rail {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
}

.genre-rail .genre-tile--free {
    grid-column: span 2;
    aspect-ratio: auto;
}

/* the wide tile takes its row height from its neighbours, not from its art */
.genre-rail .genre-tile--free .genre-tile__art {
    position: absolute;
    inset: 0;
}

@media (max-width: 1024px) {
    .genre-rail {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .genre-rail {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
    }

    .genre-rail .genre-tile__label {
        left: 8px;
        right: 8px;
        bottom: 6px;
        font-size: 12.5px;
    }

    .genre-rail .genre-tile__go {
        display: none;
    }
}

@keyframes tile-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: none; }
}

.genre-tile {
    position: relative;
    display: block;
    aspect-ratio: 3 / 2;
    padding: 0;
    overflow: hidden;
    border-radius: 16px;
    border: 1px solid var(--line-1);
    background: var(--surface-raised);
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    box-shadow: var(--shadow-card);
    animation: tile-in 0.45s var(--ease-out) both;
    animation-delay: calc(var(--i, 0) * 40ms);
    transition: transform var(--duration-normal) var(--ease-out), border-color var(--duration-fast) ease, box-shadow var(--duration-normal) ease;
}

/* Art rests a step darker / less saturated so eleven busy illustrations read as one calm
   set; hover lifts the tile back to full colour. */
.genre-tile__art {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: saturate(0.72) brightness(0.78);
    transition: transform 0.6s var(--ease-out), filter var(--duration-normal) ease;
}

.genre-tile::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(10, 8, 28, 0.1) 30%, rgba(10, 8, 28, 0.9) 100%);
    pointer-events: none;
}

.genre-tile__label {
    position: absolute;
    left: 12px;
    right: 44px;
    bottom: 10px;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 6px;
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: -0.01em;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.genre-tile__name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.genre-tile__go {
    position: absolute;
    right: 10px;
    bottom: 10px;
    z-index: 1;
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: #fff;
    opacity: 0;
    transform: translateX(-6px);
    transition: opacity var(--duration-fast) ease, transform var(--duration-normal) var(--ease-spring);
}

.genre-tile__go svg {
    width: 14px;
    height: 14px;
}

.genre-tile:hover {
    transform: translateY(-3px);
    border-color: var(--line-2);
    box-shadow: 0 22px 40px -20px rgba(0, 0, 0, 0.95);
}

.genre-tile:hover .genre-tile__art {
    transform: scale(1.05);
    filter: none;
}

.genre-tile:hover .genre-tile__go {
    opacity: 1;
    transform: none;
}

/* ============================================
   How it works — three steps with mini UI demos
   ============================================ */
.how__steps {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Quiet connector behind the step cards */
.how__steps::before {
    content: '';
    position: absolute;
    top: 96px;
    left: 8%;
    right: 8%;
    height: 1px;
    background: var(--line-2);
}

.how-step {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 18px 20px 22px;
    background: var(--surface-1);
    border: 1px solid var(--line-1);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-card);
    transition: transform 0.15s ease-out, border-color var(--duration-normal) ease;
    will-change: transform;
}

.how-step:hover {
    border-color: var(--line-2);
}

.how-step__num {
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.14em;
    color: var(--accent-400);
}

.how-step__title {
    margin: 6px 0 0;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #fff;
}

.how-step__desc {
    margin: 0;
    font-size: 13.5px;
    line-height: 1.55;
    color: var(--text-tertiary);
}

.how-demo {
    position: relative;
    height: 132px;
    margin-top: 4px;
    padding: 14px;
    border-radius: var(--radius-xl);
    background: rgba(8, 6, 24, 0.55);
    border: 1px solid var(--line-1);
    overflow: hidden;
}

/* 01 — prompt pill with a blinking caret + chips */
.how-demo__prompt {
    display: flex;
    align-items: center;
    height: 42px;
    padding: 0 14px;
    border-radius: var(--radius-full);
    background: var(--surface-2);
    border: 1px solid var(--line-accent);
    box-shadow: var(--focus-ring);
    font-size: 13px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
}

@keyframes caret-blink {
    50% { opacity: 0; }
}

.how-demo__caret {
    width: 2px;
    height: 16px;
    margin-left: 2px;
    background: #22d3ee;
    animation: caret-blink 1s steps(1) infinite;
}

.how-demo__chips {
    display: flex;
    gap: 6px;
    margin-top: 12px;
}

.how-demo__chips span {
    height: 26px;
    padding: 0 10px;
    display: inline-flex;
    align-items: center;
    border-radius: var(--radius-full);
    background: var(--accent-soft);
    border: 1px solid var(--line-accent);
    font-size: 11.5px;
    font-weight: 700;
    color: #fff;
}

/* 02 — mini game sheet */


.how-demo__sheet-title {
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 700;
    color: #fff;
}

.how-demo__bars {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin-top: 12px;
}

.how-demo__bars i {
    display: block;
    height: 7px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.12);
}

.how-demo__bars i:nth-child(1) { width: 92%; }
.how-demo__bars i:nth-child(2) { width: 74%; }
.how-demo__bars i:nth-child(3) { width: 58%; }

.how-demo__swatches {
    position: absolute;
    right: 14px;
    bottom: 14px;
    display: flex;
    gap: 4px;
}

.how-demo__swatches i {
    width: 18px;
    height: 18px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.how-demo__swatches i:nth-child(1) { background: #7c3aed; }
.how-demo__swatches i:nth-child(2) { background: #22d3ee; }
.how-demo__swatches i:nth-child(3) { background: #f472b6; }
.how-demo__swatches i:nth-child(4) { background: #fcd34d; }

/* 03 — tiny game screen + modify bubble */
.how-demo--play {
    padding: 10px;
}

.how-demo__screen {
    position: relative;
    height: 100%;
    border-radius: 10px;
    background:
        radial-gradient(1px 1px at 20% 30%, #fff, transparent),
        radial-gradient(1px 1px at 70% 20%, #c4b5fd, transparent),
        radial-gradient(1px 1px at 45% 70%, #a5f3fc, transparent),
        linear-gradient(180deg, #1c1150 0%, #0b0a24 100%);
    overflow: hidden;
}

.how-demo__ship {
    position: absolute;
    left: 30%;
    bottom: 14px;
    width: 0;
    height: 0;
    border-left: 9px solid transparent;
    border-right: 9px solid transparent;
    border-bottom: 18px solid #22d3ee;
}

.how-demo__enemy {
    position: absolute;
    top: 18px;
    left: 22%;
    width: 14px;
    height: 14px;
    border-radius: 4px;
    background: #f472b6;
}

.how-demo__enemy--2 {
    left: 52%;
    top: 34px;
    background: #fcd34d;
}

.how-demo__bubble {
    position: absolute;
    right: 16px;
    bottom: 16px;
    max-width: 62%;
    padding: 7px 11px;
    border-radius: 12px 12px 4px 12px;
    background: var(--gradient-primary);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

/* ============================================
   Final CTA band
   ============================================ */
.cta-band {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr) auto;
    align-items: center;
    gap: 28px;
    padding: 22px 32px 22px 22px;
    border-radius: var(--radius-3xl);
    overflow: hidden;
    border: 1px solid var(--line-2);
    background: linear-gradient(120deg, rgba(76, 29, 149, 0.42), rgba(24, 16, 64, 0.7) 60%);
    box-shadow: var(--shadow-card);
}

.cta-band__art {
    aspect-ratio: 3 / 2;
    border-radius: 18px;
    overflow: hidden;
    rotate: -4deg;
    box-shadow: 0 24px 50px -20px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.cta-band__art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cta-band__eyebrow {
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent-400);
}

.cta-band__title {
    margin: 6px 0 6px;
    font-family: var(--font-display);
    font-size: clamp(24px, 2.4vw, 34px);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.15;
    color: #fff;
}

.cta-band__title span {
    color: var(--accent-300);
}

.cta-band__desc {
    margin: 0;
    font-size: 14px;
    color: var(--text-secondary);
}

.cta-band__btn.ui-btn {
    height: 52px;
    padding: 0 26px;
    border-radius: var(--radius-full);
    font-size: 15px;
}

.cta-band__btn svg {
    width: 18px;
    height: 18px;
}

/* ============================================
   Responsive (quick start / how / CTA)
   ============================================ */
@media (max-width: 1024px) {
    .how__steps {
        grid-template-columns: minmax(0, 1fr);
    }

    .how__steps::before {
        display: none;
    }

    .cta-band {
        grid-template-columns: minmax(0, 1fr);
        text-align: center;
        justify-items: center;
    }

    .cta-band__art {
        width: 220px;
    }

    .genre-start__hint {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .genre-tile,
    .how-demo__caret {
        animation: none;
    }
}
