/* Prism Stack: as páginas do jogo dentro do site da Wx Desenvolvimento.
   Mesma fonte da página principal; as cores vêm do jogo (a noite índigo do
   menu e o dourado dos Prisms). */
:root {
    --paper: #fafafa;
    --surface: #ffffff;
    --ink: #17132b;
    --text: #454158;
    --muted: #757189;
    --line: #e3e1ec;
    --link: #4a2fc4;
    --prism: #ffd166;
    --night-top: #1a1634;
    --night-mid: #2f2363;
    --night-low: #5a3e98;
    --measure: 68ch;
}

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

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: 1.5rem;
}

body {
    font-family: 'Space Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
    font-size: 1.0625rem;
    line-height: 1.65;
    color: var(--text);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--link);
    text-underline-offset: 0.18em;
    text-decoration-thickness: 1px;
}

a:focus-visible,
summary:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
    border-radius: 4px;
}

.wrap {
    width: min(100% - 2.5rem, 1040px);
    margin-inline: auto;
}

/* ---------------------------------------------------------- barra */

.bar {
    border-bottom: 1px solid var(--line);
    background: var(--paper);
}

.bar-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 0.9rem 0;
}

.trail {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    min-width: 0;
    flex-wrap: wrap;
}

.mark {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    color: var(--ink);
    font-weight: 600;
    text-decoration: none;
    letter-spacing: -0.01em;
}

.mark-icon {
    width: 1.5rem;
    height: 1.8rem;
    flex: none;
}

.crumb,
.crumb-here {
    color: var(--muted);
}

.langs {
    display: flex;
    gap: 1.1rem;
    font-size: 0.92rem;
}

.langs a {
    color: var(--muted);
    text-decoration: none;
}

.langs a:hover {
    color: var(--ink);
}

.langs a[aria-current] {
    color: var(--ink);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 0.35em;
}

/* ------------------------------------------------------ documentos */

.doc {
    display: grid;
    grid-template-columns: 14.5rem minmax(0, var(--measure));
    gap: 3.5rem;
    align-items: start;
    padding: 3.25rem 0 5rem;
}

.toc {
    position: sticky;
    top: 1.5rem;
    font-size: 0.9rem;
    line-height: 1.4;
}

.toc-title {
    color: var(--ink);
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.toc ol {
    list-style: none;
    counter-reset: toc;
    display: grid;
    gap: 0.5rem;
}

.toc li {
    counter-increment: toc;
    display: grid;
    grid-template-columns: 1.6rem 1fr;
}

.toc li::before {
    content: counter(toc);
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

.toc a {
    color: var(--text);
    text-decoration: none;
}

.toc a:hover {
    color: var(--link);
    text-decoration: underline;
}

.doc-body {
    counter-reset: sec;
    min-width: 0;
}

.doc-body h1 {
    color: var(--ink);
    font-size: clamp(2rem, 4.5vw, 2.75rem);
    font-weight: 600;
    line-height: 1.12;
    letter-spacing: -0.025em;
}

.meta {
    color: var(--muted);
    margin-top: 0.6rem;
}

.summary {
    margin: 2rem 0 0.5rem;
    padding: 1.35rem 1.5rem 1.5rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-left: 4px solid var(--night-low);
    border-radius: 4px 10px 10px 4px;
}

.doc-body .summary-title {
    font-size: 1rem;
    margin: 0 0 0.6rem;
}

.doc-body .summary-title::before {
    content: none;
}

.doc-body section {
    padding-top: 2.5rem;
}

.doc-body h2 {
    color: var(--ink);
    font-size: 1.375rem;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -0.015em;
    margin-bottom: 0.85rem;
}

.doc-body section > h2::before {
    counter-increment: sec;
    content: counter(sec) ". ";
    color: var(--muted);
    font-weight: 500;
}

.doc-body h3 {
    color: var(--ink);
    font-size: 1.0625rem;
    font-weight: 600;
    margin: 1.5rem 0 0.6rem;
}

.doc-body p + p,
.doc-body ul + p,
.doc-body .table-wrap + p {
    margin-top: 0.9rem;
}

.doc-body ul {
    margin: 0.75rem 0 0;
    padding-left: 1.25rem;
    display: grid;
    gap: 0.45rem;
}

.doc-body li::marker {
    color: var(--night-low);
}

.doc-body strong {
    color: var(--ink);
    font-weight: 600;
}

.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
    line-height: 1.5;
}

th,
td {
    text-align: left;
    vertical-align: top;
    padding: 0.8rem 1rem;
}

th {
    color: var(--ink);
    font-weight: 600;
    border-bottom: 1px solid var(--line);
}

tbody tr + tr td {
    border-top: 1px solid var(--line);
}

td:first-child {
    width: 56%;
}

/* O sumário recolhível das telas pequenas; nas largas vale o da lateral. */
.toc-fold {
    display: none;
}

/* ---------------------------------------------------------- rodapé */

.foot {
    border-top: 1px solid var(--line);
    font-size: 0.92rem;
    color: var(--muted);
}

.foot-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem 2rem;
    flex-wrap: wrap;
    padding: 1.75rem 0 2.25rem;
}

.foot nav {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.foot a {
    color: var(--text);
}

/* ----------------------------------------------- página do jogo */

.hub .bar {
    position: absolute;
    inset: 0 0 auto 0;
    z-index: 2;
    background: transparent;
    border-bottom: 0;
}

.hub .mark,
.hub .langs a[aria-current] {
    color: #ffffff;
}

.hub .langs a {
    color: rgba(255, 255, 255, 0.7);
}

.hub .langs a:hover {
    color: #ffffff;
}

.night {
    background: linear-gradient(180deg, var(--night-top) 0%, var(--night-mid) 52%, var(--night-low) 100%);
    color: rgba(255, 255, 255, 0.82);
    overflow: hidden;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 2.5rem;
    align-items: end;
    min-height: min(92svh, 860px);
    padding-top: 5.5rem;
}

.hero-text {
    align-self: center;
    padding-bottom: 4rem;
}

/* O logotipo do jogo: fino, em caixa alta e bem espaçado. */
.wordmark {
    color: #ffffff;
    font-size: clamp(1.9rem, 5.4vw, 3.5rem);
    font-weight: 300;
    line-height: 1.15;
    letter-spacing: 0.3em;
    text-transform: uppercase;
}

.tagline {
    margin-top: 1rem;
    color: #ffffff;
    font-size: clamp(1.15rem, 2.2vw, 1.45rem);
    line-height: 1.35;
}

.lede {
    margin-top: 1.1rem;
    max-width: 44ch;
}

.soon {
    margin-top: 1.1rem;
    color: var(--prism);
    font-weight: 500;
}

.doors {
    list-style: none;
    margin-top: 2.25rem;
    max-width: 30rem;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.doors a {
    display: block;
    padding: 0.95rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
    color: #ffffff;
    text-decoration: none;
}

.door-name {
    display: block;
    font-weight: 500;
    font-size: 1.1rem;
}

.door-note {
    display: block;
    color: rgba(255, 255, 255, 0.66);
    font-size: 0.95rem;
    line-height: 1.45;
}

.doors a:hover .door-name {
    color: var(--prism);
}

.hero-art {
    align-self: end;
}

.tower {
    display: block;
    width: 100%;
    max-width: 440px;
    height: auto;
    margin-inline: auto;
}

/* O único movimento da página: o bloco vai e volta sobre a torre, como
   no jogo. */
.moving {
    animation: glide 2.8s ease-in-out infinite alternate;
}

@keyframes glide {
    from {
        transform: translate(-104px, -52px);
    }
    to {
        transform: translate(104px, 52px);
    }
}

.support {
    padding: 4.5rem 0 5rem;
}

.support-grid {
    display: grid;
    grid-template-columns: 14.5rem minmax(0, var(--measure));
    gap: 3.5rem;
    align-items: start;
}

.support h2 {
    color: var(--ink);
    font-size: 1.75rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.faq {
    border-top: 1px solid var(--line);
}

.faq details {
    border-bottom: 1px solid var(--line);
}

.faq summary {
    cursor: pointer;
    padding: 1rem 0;
    color: var(--ink);
    font-weight: 500;
}

.faq details p {
    padding: 0 0 1.15rem 1.15rem;
}

.contact {
    margin-top: 1.75rem;
}

/* ------------------------------------------------------ telas menores */

@media (max-width: 860px) {
    .doc,
    .support-grid {
        grid-template-columns: 1fr;
        gap: 1.75rem;
    }

    .doc {
        padding: 2rem 0 3.5rem;
    }

    .toc,
    .crumb,
    .crumb-here {
        display: none;
    }

    .toc-fold {
        display: block;
        margin-top: 1.25rem;
        padding: 0.2rem 1.25rem;
        background: var(--surface);
        border: 1px solid var(--line);
        border-radius: 10px;
        font-size: 0.95rem;
    }

    .toc-fold summary {
        cursor: pointer;
        padding: 0.7rem 0;
        color: var(--ink);
        font-weight: 600;
    }

    .toc-fold ol {
        list-style: none;
        counter-reset: toc;
        display: grid;
        gap: 0.55rem;
        padding: 0.2rem 0 1rem;
    }

    .toc-fold li {
        counter-increment: toc;
        display: grid;
        grid-template-columns: 1.9rem 1fr;
    }

    .toc-fold li::before {
        content: counter(toc);
        color: var(--muted);
    }

    .toc-fold a {
        color: var(--text);
        text-decoration: none;
    }

    .hero {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        min-height: 0;
    }

    .hero-text {
        padding-bottom: 1.5rem;
    }

    .wordmark {
        letter-spacing: 0.22em;
    }

    .tower {
        max-width: 300px;
    }

    td:first-child {
        width: 50%;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .moving {
        animation: none;
        transform: translate(-64px, -32px);
    }
}
