/* --- Gallery landing page --- */
.gallery-page {
    background:
        radial-gradient(circle at 78% 8%, rgba(45, 212, 191, 0.1), transparent 28rem),
        radial-gradient(circle at 12% 30%, rgba(59, 130, 246, 0.08), transparent 32rem),
        linear-gradient(180deg, #0c1726 0%, #0f172a 42%, #09111f 100%);
}

.gallery-shell {
    width: min(1120px, calc(100% - max(2rem, env(safe-area-inset-left, 0px)) - max(2rem, env(safe-area-inset-right, 0px))));
    margin: 0 auto;
}

main.gallery-shell {
    padding-top: max(24px, env(safe-area-inset-top, 0px));
    padding-bottom: calc(var(--nav-pad) + 56px);
}

.gallery-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 8px 0 26px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    color: var(--text-primary);
    text-decoration: none;
}

.brand img {
    flex: 0 0 auto;
    border-radius: 12px;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
}

.brand span {
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
}

.brand strong {
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.brand small {
    color: var(--text-secondary);
    font-size: 0.75rem;
}

.header-note {
    margin: 0;
    color: #94a3b8;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
}

.resume-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    margin: 0 0 24px;
    padding: 18px 20px;
    border: 1px solid rgba(94, 234, 212, 0.16);
    border-radius: 18px;
    background: rgba(13, 148, 136, 0.07);
}

.resume-section h2 {
    margin: 0;
    color: #e6fffa;
    font-size: 1.05rem;
    font-weight: 500;
}

.resume-section .eyebrow {
    margin-bottom: 0.35rem;
    font-size: 0.62rem;
}

.resume-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.resume-actions .button {
    min-height: 44px;
    padding: 10px 14px;
    font-size: 0.78rem;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
    align-items: center;
    gap: clamp(2rem, 6vw, 5rem);
    min-height: min(690px, calc(100dvh - 150px));
    padding: clamp(2.5rem, 7vw, 6rem) 0 clamp(4rem, 8vw, 7rem);
}

.eyebrow {
    margin: 0 0 0.9rem;
    color: #5eead4;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.hero h1,
.section-heading h2,
.faq-section h2 {
    margin: 0;
    color: #f8fafc;
    font-weight: 500;
    letter-spacing: -0.04em;
}

.hero h1 {
    max-width: 11ch;
    font-size: clamp(3rem, 7vw, 5.8rem);
    line-height: 0.98;
}

.hero-intro {
    max-width: 39rem;
    margin: 1.6rem 0 0;
    color: #b6c4d6;
    font-size: clamp(1rem, 2vw, 1.15rem);
    font-weight: 300;
    line-height: 1.75;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 2rem;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 20px;
    border: 1px solid transparent;
    border-radius: 14px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.button-primary {
    background: #99f6e4;
    color: #08322f;
    box-shadow: 0 14px 34px rgba(45, 212, 191, 0.16);
}

.button-quiet {
    border-color: rgba(148, 163, 184, 0.24);
    background: rgba(15, 23, 42, 0.46);
    color: #e2e8f0;
}

.hero-points {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem 1.25rem;
    margin: 1.5rem 0 0;
    padding: 0;
    color: #8294aa;
    font-size: 0.78rem;
    list-style: none;
}

.hero-points li {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
}

.hero-points li:not(:first-child)::before {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #475569;
    content: '';
}

.featured-game {
    position: relative;
    display: block;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.7);
    box-shadow: 0 36px 90px rgba(0, 0, 0, 0.38), inset 0 1px rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
    text-decoration: none;
    transform: rotate(1.5deg);
    transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

.featured-game img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 8 / 5;
    object-fit: cover;
}

.featured-badge {
    position: absolute;
    top: 18px;
    left: 18px;
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    background: rgba(5, 18, 27, 0.68);
    color: #d7fff5;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    backdrop-filter: blur(10px);
}

.featured-caption {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 20px 22px;
}

.featured-caption > span:first-child {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.featured-caption small {
    color: #5eead4;
    font-size: 0.68rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.featured-caption strong {
    font-size: 1.3rem;
    font-weight: 500;
}

.featured-arrow {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 50%;
    color: #99f6e4;
    font-size: 1.2rem;
}

.games-section,
.pause-section,
.faq-section {
    scroll-margin-top: 24px;
    padding: clamp(3.5rem, 8vw, 6.5rem) 0;
    border-top: 1px solid rgba(148, 163, 184, 0.1);
}

.section-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 0.72fr);
    align-items: end;
    gap: 2rem;
    margin-bottom: 2rem;
}

.section-heading h2,
.faq-section h2 {
    font-size: clamp(2rem, 4.5vw, 3.5rem);
    line-height: 1.08;
}

.section-heading > p,
.faq-section > div:first-child > p:last-child {
    margin: 0;
    color: #94a3b8;
    font-size: 0.95rem;
    line-height: 1.7;
}

.game-filters {
    position: sticky;
    top: 12px;
    z-index: 30;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    width: fit-content;
    margin: 0 0 1.6rem;
    padding: 7px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 16px;
    background: rgba(9, 17, 31, 0.86);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.16);
    backdrop-filter: blur(14px);
}

.filter-button {
    min-height: 40px;
    padding: 9px 15px;
    border: 1px solid transparent;
    border-radius: 11px;
    background: transparent;
    color: #94a3b8;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.filter-button.active,
.filter-button[aria-pressed="true"] {
    border-color: rgba(94, 234, 212, 0.2);
    background: rgba(45, 212, 191, 0.12);
    color: #ccfbf1;
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.game-card {
    min-width: 0;
}

.game-card-link {
    display: flex;
    height: 100%;
    overflow: hidden;
    flex-direction: column;
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.54), rgba(15, 23, 42, 0.72));
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.14);
    color: var(--text-primary);
    text-decoration: none;
    transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

.card-preview {
    position: relative;
    overflow: hidden;
    aspect-ratio: 8 / 5;
    background: #0b1725;
}

.card-preview::after {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 55%, rgba(4, 11, 20, 0.24));
    content: '';
    pointer-events: none;
}

.card-preview img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.card-number {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 1;
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    background: rgba(5, 14, 24, 0.56);
    color: #cbd5e1;
    font-size: 0.66rem;
    font-variant-numeric: tabular-nums;
    backdrop-filter: blur(8px);
}

.card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: flex-start;
    padding: 20px;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 0.8rem;
}

.card-tags span {
    padding: 5px 8px;
    border: 1px solid rgba(94, 234, 212, 0.12);
    border-radius: 999px;
    background: rgba(45, 212, 191, 0.06);
    color: #8ee8db;
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.card-body h3 {
    margin: 0;
    color: #f1f5f9;
    font-size: 1.16rem;
    font-weight: 500;
    letter-spacing: -0.02em;
}

.card-body p {
    margin: 0.7rem 0 1.2rem;
    color: #94a3b8;
    font-size: 0.84rem;
    line-height: 1.68;
}

.card-action {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-top: auto;
    color: #c7fff3;
    font-size: 0.78rem;
    font-weight: 600;
}

.card-action span {
    transition: transform 0.2s ease;
}

.benefit-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.benefit-card {
    padding: 26px;
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.4);
}

.benefit-icon {
    display: grid;
    width: 44px;
    height: 44px;
    margin-bottom: 1.2rem;
    place-items: center;
    border: 1px solid rgba(94, 234, 212, 0.18);
    border-radius: 14px;
    background: rgba(45, 212, 191, 0.08);
    color: #99f6e4;
    font-size: 1.25rem;
}

.benefit-card h3 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 500;
}

.benefit-card p {
    margin: 0.65rem 0 0;
    color: #94a3b8;
    font-size: 0.85rem;
    line-height: 1.7;
}

.faq-section {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(320px, 1.2fr);
    gap: clamp(2rem, 6vw, 5rem);
}

.faq-section > div:first-child > p:last-child {
    max-width: 28rem;
    margin-top: 1rem;
}

.faq-list {
    border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.faq-list details {
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.faq-list summary {
    position: relative;
    padding: 20px 36px 20px 0;
    color: #e2e8f0;
    font-size: 0.94rem;
    font-weight: 500;
    cursor: pointer;
    list-style: none;
}

.faq-list summary::-webkit-details-marker {
    display: none;
}

.faq-list summary::after {
    position: absolute;
    top: 50%;
    right: 4px;
    color: #5eead4;
    font-size: 1.15rem;
    content: '+';
    transform: translateY(-50%);
}

.faq-list details[open] summary::after {
    content: '−';
}

.faq-list details p {
    margin: -4px 0 20px;
    color: #94a3b8;
    font-size: 0.86rem;
    line-height: 1.7;
}

.header-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 18px;
}

.header-actions .bmc-btn-container {
    position: static !important;
    flex: 0 0 auto;
    transform: none;
}

@media (max-width: 700px) {
    .gallery-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .header-actions {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

    .header-actions .bmc-btn-container {
        transform: scale(0.86);
        transform-origin: left center;
    }
}

.gallery-footer {
    border-top: 1px solid rgba(148, 163, 184, 0.1);
    background: rgba(4, 10, 19, 0.5);
}

.footer-inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1.5rem 2rem;
    padding-top: 34px;
    padding-bottom: calc(var(--nav-pad) + 36px);
}

.brand-footer strong {
    font-size: 0.9rem;
}

.footer-inner > p {
    margin: 0;
    color: #73869d;
    font-size: 0.78rem;
}

.footer-inner > nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.6rem 1rem;
}

.footer-inner > nav a {
    color: #94a3b8;
    font-size: 0.74rem;
    text-decoration: none;
}

.footer-inner > small {
    grid-column: 1 / -1;
    color: #5f7188;
    font-size: 0.7rem;
}

@media (hover: hover) {
    .button-primary:hover {
        background: #ccfbf1;
        transform: translateY(-2px);
    }

    .button-quiet:hover,
    .filter-button:hover {
        border-color: rgba(148, 163, 184, 0.32);
        color: #f8fafc;
    }

    .featured-game:hover {
        border-color: rgba(94, 234, 212, 0.34);
        box-shadow: 0 42px 100px rgba(0, 0, 0, 0.44), 0 0 0 1px rgba(94, 234, 212, 0.05);
        transform: rotate(0deg) translateY(-5px);
    }

    .game-card-link:hover {
        border-color: rgba(94, 234, 212, 0.3);
        box-shadow: 0 26px 60px rgba(0, 0, 0, 0.26);
        transform: translateY(-5px);
    }

    .game-card-link:hover .card-preview img {
        transform: scale(1.035);
    }

    .game-card-link:hover .card-action span,
    .footer-inner > nav a:hover {
        color: #99f6e4;
        transform: translateX(2px);
    }

    .footer-inner > nav a:hover {
        color: #cbd5e1;
    }
}

@media (max-width: 960px) {
    .hero {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .hero h1 {
        max-width: 13ch;
    }

    .featured-game {
        width: min(100%, 620px);
        transform: none;
    }

    .game-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .footer-inner {
        grid-template-columns: 1fr auto;
    }

    .footer-inner > p {
        grid-column: 1 / -1;
        grid-row: 2;
    }
}

@media (max-width: 700px) {
    .gallery-header {
        align-items: flex-start;
        padding-bottom: 12px;
    }

    .header-note {
        display: none;
    }

    .resume-section {
        align-items: flex-start;
        flex-direction: column;
    }

    .hero {
        gap: 2.5rem;
        padding-top: 2.5rem;
        padding-bottom: 4rem;
    }

    .hero h1 {
        font-size: clamp(2.7rem, 13vw, 4.3rem);
    }

    .section-heading,
    .faq-section {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }

    .game-grid,
    .benefit-grid {
        grid-template-columns: 1fr;
    }

    .game-card-link {
        border-radius: 20px;
    }

    .card-preview {
        aspect-ratio: 16 / 9;
    }

    .card-body {
        padding: 20px 22px 22px;
    }

    .game-filters {
        top: 8px;
        width: 100%;
        justify-content: center;
    }

    .filter-button {
        flex: 1 1 auto;
    }

    .footer-inner {
        grid-template-columns: 1fr;
    }

    .footer-inner > nav {
        justify-content: flex-start;
    }

    .footer-inner > small {
        grid-column: auto;
    }
}

@media (max-width: 420px) {
    .hero-actions .button {
        width: 100%;
    }

    .featured-caption {
        padding: 16px 18px;
    }

    .featured-badge {
        top: 14px;
        left: 14px;
    }
}
