/* Extensão do armazém: o conteúdo continua legível sem JavaScript. */
:root { --font-mono: "JetBrains Mono", ui-monospace, monospace; }

#main-content {
    background-image: radial-gradient(ellipse at 100% 45%, #20342D55, transparent 55%),
        linear-gradient(#6CD6A405 1px, transparent 1px),
        linear-gradient(90deg, #6CD6A405 1px, transparent 1px);
    background-size: auto, 48px 48px, 48px 48px;
}

.warehouse-address {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .75rem;
    margin-bottom: 1rem;
    color: var(--color-primary);
    font: 500 .75rem/1.6 var(--font-mono);
    letter-spacing: .045em;
    text-transform: uppercase;
}

.manifest-caption {
    color: var(--color-primary);
    font: 500 .7rem/1.7 var(--font-mono);
    letter-spacing: .07em;
    text-transform: uppercase;
}

.manifest-game { margin-top: 3rem; border-block: 1px dashed var(--color-border); background: var(--color-surface); }
.manifest-game summary { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.5rem; cursor: pointer; list-style: none; }
.manifest-game summary::-webkit-details-marker { display: none; }
.manifest-game summary strong { display: block; margin-top: .25rem; font: 700 clamp(1.25rem, 2vw, 1.6rem)/1.3 var(--font-display); }
.game-invitation { flex-shrink: 0; color: var(--color-amber); font: .75rem/1.5 var(--font-mono); }
.game-invitation > span { display: inline-block; transition: transform .2s; }
.manifest-game[open] .game-invitation > span { transform: rotate(90deg); }
.game-body { padding: 0 1.5rem 1.5rem; }
.game-body > p { max-width: 70ch; color: var(--color-muted); font-size: 1.05rem; }
.manifest-table-wrap { overflow-x: auto; margin-block: 1.5rem; }
.manifest-table { width: 100%; min-width: 58rem; table-layout: fixed; border-collapse: collapse; text-align: center; font: .9rem/1.6 var(--font-mono); }
.manifest-table caption { text-align: left; color: var(--color-muted); font-size: .75rem; padding-bottom: 1rem; }
.manifest-table th, .manifest-table td { padding: .8rem .7rem; border-bottom: 1px solid var(--color-border); white-space: nowrap; }
.manifest-table thead th { color: var(--color-muted); font-size: .7rem; font-weight: 500; }
.manifest-table th:first-child { text-align: left; }
.manifest-table thead th:first-child { width: 11rem; }
.manifest-table .manifest-operator { padding-inline: .4rem; text-align: center; font: 700 2rem/1 var(--font-mono); }
.manifest-table .audit-source > td:last-child { position: relative; }
.manifest-table .audit-badge { position: absolute; top: calc(50% + .8rem); left: 0; width: 100%; margin-left: 0; text-align: center; }
.manifest-table .audit-info { position: absolute; top: 50%; left: calc(50% + 1rem); margin-left: 0; transform: translateY(-50%); }
.manifest-table .operator-minus { color: #ff8b88; }
.manifest-table .operator-plus { color: var(--color-primary); }
.manifest-table .operator-equals { color: var(--color-amber); }
.manifest-table label { display: flex; align-items: center; gap: .5rem; min-height: 2.75rem; cursor: pointer; }
.manifest-table input { width: 1.2rem; height: 1.2rem; accent-color: var(--color-primary); cursor: pointer; }
.manifest-table tr:has(input:checked) { background: var(--color-surface-accent); }
.game-feedback { margin-top: 1rem; font-size: 1.05rem; color: var(--color-amber); }
.game-feedback:empty { display: none; }
.game-feedback.is-success { color: var(--color-primary); }
.game-actions[hidden] { display: none; }
.game-actions button { cursor: pointer; }
.game-actions button:disabled { opacity: .55; cursor: default; }

#experiencia .experience-entry { position: relative; margin-top: 0; padding: 2rem 0 2rem 1.75rem; border-top: 0; border-left: 1px solid var(--color-border); }
#experiencia .section-heading { margin-bottom: 2rem; }
.experience-entry::before { content: ""; position: absolute; top: 2.3rem; left: -.35rem; width: .65rem; height: .65rem; background: var(--color-bg); border: 2px solid var(--color-primary); border-radius: 50%; }
.experience-entry:first-of-type::before { background: var(--color-primary); box-shadow: 0 0 0 5px #6CD6A412; }

.skill-inventory { margin-top: 2.5rem; border-block: 1px solid var(--color-border); }
.inventory-index { display: flex; flex-wrap: wrap; border-bottom: 1px solid var(--color-border); }
.inventory-index[hidden], .inventory-panel[hidden] { display: none; }
.inventory-index button {
    display: flex; flex: 1 1 12rem; align-items: center; gap: .75rem;
    min-height: 4.5rem; padding: 1rem; border: 0; border-bottom: 2px solid transparent;
    background: transparent; color: var(--color-muted); cursor: pointer;
    font-size: 1rem; font-weight: 600; text-align: left;
    transition: color .2s, background-color .2s, border-color .2s;
}
.inventory-index button > span:first-child { color: var(--color-primary); font: .7rem var(--font-mono); }
.inventory-index button > span:last-child { margin-left: auto; opacity: 0; }
.inventory-index button:hover { color: var(--color-text); background: var(--color-surface); }
.inventory-index button[aria-selected="true"] { color: var(--color-primary); background: var(--color-surface); border-bottom-color: var(--color-primary); }
.inventory-index button[aria-selected="true"] > span:last-child { opacity: 1; }
.inventory-panel { padding-block: clamp(1.5rem, 4vw, 3rem); }
.inventory-panel h3 { margin-block: .75rem 2rem; font-size: clamp(1.8rem, 3.5vw, 3rem); line-height: 1.15; letter-spacing: -.035em; }
.inventory-panel h3 em { color: var(--color-primary); font-style: normal; }
.inventory-technologies { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; list-style: none; }
.inventory-technologies li { display: flex; align-items: center; gap: .75rem; min-width: 0; font-size: 1.05rem; font-weight: 600; }
.inventory-technologies i { font-size: 1.6rem; flex-shrink: 0; }
.inventory-technologies .devicon-nextjs-plain { color: var(--color-text); }
.inventory-technologies .devicon-cypressio-plain { color: var(--color-text); }
.inventory-technologies .devicon-amazonwebservices-plain-wordmark { color: #FF9900; }
.inventory-evidence { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px dashed var(--color-border); }
.inventory-evidence > span { color: var(--color-amber); font: .7rem/1.5 var(--font-mono); text-transform: uppercase; letter-spacing: .08em; }
.inventory-evidence p { max-width: 65ch; margin-block: .75rem; color: var(--color-muted); font-size: 1.1rem; }
.inventory-evidence a { display: inline-block; padding-block: .5rem; color: var(--color-primary); font-size: 1rem; text-underline-offset: .3rem; }
.inventory-evidence a, .contact-links a, .contact-item a { text-decoration: none; }
.inventory-evidence a:hover, .inventory-evidence a:focus-visible,
.contact-links a:hover, .contact-links a:focus-visible,
.contact-item a:hover, .contact-item a:focus-visible { text-decoration: underline; }
#habilidades { padding-bottom: 0; }
.inventory-complement { margin-top: 0; padding-top: 0; border-top: 0; }
.inventory-complement[open] { padding-bottom: 2rem; }
.inventory-complement summary { display: flex; align-items: center; gap: 1rem; justify-content: space-between; min-height: 6rem; padding: 1.25rem 1.5rem; cursor: pointer; color: var(--color-muted); list-style: none; font-size: 1rem; }
.inventory-complement summary::-webkit-details-marker { display: none; }
.inventory-complement summary span { display: grid; place-items: center; flex: 0 0 2rem; width: 2rem; height: 2rem; color: var(--color-primary); font: 400 2rem/1 var(--font-mono); transition: transform .2s; }
.inventory-complement[open] summary span { transform: rotate(45deg); }
.inventory-index button:focus-visible, .inventory-panel:focus-visible, .inventory-complement summary:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 3px; }

@media (min-width: 75rem) {
    .inventory-panel { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); column-gap: 3rem; }
    .inventory-panel > .manifest-caption { grid-column: 1 / -1; }
    .inventory-panel h3 { grid-column: 1; }
    .inventory-technologies { grid-column: 1; align-self: start; }
    .inventory-evidence { grid-column: 2; grid-row: 2 / 4; align-self: center; margin: 0; padding: 0 0 0 2rem; border-top: 0; border-left: 1px dashed var(--color-border); }
}

@media print {
    .inventory-index { display: none; }
    .inventory-panel[hidden] { display: block; }
}

.warehouse-contact { display: grid; align-items: center; gap: 2rem; padding-bottom: 3rem; border-bottom: 0; }
.contact-avatar { max-width: 26rem; margin: auto; mask-image: radial-gradient(ellipse, #000 35%, transparent 72%); }
.contact-copy h2 { font-size: clamp(2rem, 4vw, 3.3rem); line-height: 1.15; margin-bottom: 1.25rem; }
.contact-copy > p:not(.warehouse-address):not(.contact-origin) { max-width: 48ch; color: var(--color-muted); }
.contact-origin { margin-top: 2rem; }
.manifest-game summary:focus-visible, .manifest-table-wrap:focus-visible, .manifest-table input:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 4px; }

@media (min-width: 45rem) {
    .warehouse-contact { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); }
}

@media (max-width: 32rem) {
    .manifest-game summary { align-items: flex-start; flex-direction: column; }
    .game-body, .manifest-game summary { padding-inline: 1rem; }
}

@media (forced-colors: active) {
    .inventory-index button, .manifest-game { border: 1px solid CanvasText; }
    .inventory-index button[aria-selected="true"] { outline: 2px solid Highlight; outline-offset: -3px; }
}

/* TrackAssets acompanha a mesma largura, tipografia e ritmo das outras seções. */
#projeto { width: min(100% - 2 * var(--gutter), 78rem); padding-block: var(--space-section); }
#projeto .project-heading { max-width: 65ch; }
#projeto .project-heading h2 { font-size: clamp(2.25rem, 4vw, 3rem); }
#projeto .project-lead { font-size: 1.4rem; }
#projeto .section-description { font-size: var(--text-body); }
.project-story { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem; margin-top: 2rem; }
.project-story p { font-size: 1.1rem; }
.project-gallery { margin-top: 2.5rem; }
.gallery-stage { position: relative; container-type: inline-size; }
.gallery-heading { display: flex; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: 1rem; }
.gallery-heading h3 { font-size: 1.4rem; }
.gallery-heading > p { font-size: 1rem; color: var(--color-muted); }
.gallery-slide[hidden], .gallery-controls[hidden], .audit-result[hidden] { display: none; }
.gallery-slide + .gallery-slide:not([hidden]) { margin-top: 1rem; }
.gallery-slides:has(.gallery-slide[hidden]) .gallery-slide { margin-top: 0; }
.gallery-slide .image-zoom-trigger { overflow: hidden; }
.gallery-slide > .image-zoom-trigger img { aspect-ratio: 16 / 9; object-fit: contain; background: #f5f6fb; }
.gallery-slide figcaption { display: flex; gap: .5rem 1rem; flex-wrap: wrap; font-size: 1rem; }
.gallery-slide figcaption strong { color: var(--color-text); }
.gallery-mobile { display: flex; justify-content: center; gap: 1.5rem; aspect-ratio: 16 / 9; padding: 1.25rem; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); }
.gallery-mobile .image-zoom-trigger { width: auto; min-width: 0; background: transparent; border: 0; }
.gallery-mobile img { width: auto; height: 100%; object-fit: contain; }
.gallery-controls { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: 1rem; }
.gallery-controls p { font: .8rem var(--font-mono); color: var(--color-muted); text-align: center; }
.gallery-controls button { position: absolute; top: 28.125cqw; transform: translateY(-50%); z-index: 2; display: grid; place-items: center; width: 3.5rem; height: 5rem; padding: 0; border: 0; color: var(--color-primary); background: transparent; font: 400 clamp(4rem, 6vw, 6rem)/1 Arial, sans-serif; text-shadow: 0 2px 6px #0B1110CC; cursor: pointer; transition: color .2s, scale .2s; }
.gallery-controls [data-gallery-prev] { left: .5rem; }
.gallery-controls [data-gallery-next] { right: .5rem; }
@media (min-width: 75rem) {
    .gallery-controls [data-gallery-prev] { left: -3.75rem; }
    .gallery-controls [data-gallery-next] { right: -3.75rem; }
}
.gallery-controls button:hover { color: var(--color-text); scale: 1.1; }
.gallery-controls button:focus-visible, .project-decisions summary:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 4px; }
.project-decisions { border-block: 1px solid var(--color-border); margin-top: 2rem; }
.project-decisions summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.25rem 1.5rem; cursor: pointer; list-style: none; }
.project-decisions summary::-webkit-details-marker { display: none; }
.project-decisions summary strong { display: block; font: 700 1.4rem var(--font-display); }
.project-decisions summary small { display: block; margin-top: .4rem; color: var(--color-muted); font-size: 1rem; }
.project-decisions summary > span:last-child { display: grid; place-items: center; flex: 0 0 2rem; width: 2rem; height: 2rem; color: var(--color-primary); font: 400 2rem/1 var(--font-mono); transition: transform .2s; }
.inventory-complement summary, .project-decisions summary { transition: background-color .2s; }
.inventory-complement summary:hover, .project-decisions summary:hover,
.inventory-complement summary:focus-visible, .project-decisions summary:focus-visible { background-color: #6CD6A40D; }
.project-decisions[open] summary > span:last-child { transform: rotate(45deg); }
.decision-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem 2rem; padding-bottom: 1.5rem; }
.decision-grid h4 { margin: 0 0 .5rem; color: var(--color-primary); font-size: 1.05rem; }
.decision-grid p { color: var(--color-muted); font-size: 1.05rem; }
.decision-grid p + p, .contact-copy > p + p { margin-top: .75rem; }
.architecture-infrastructure p + p { margin-top: .5rem; }
#game-instructions { max-width: 70ch; color: var(--color-muted); font-size: 1.05rem; }
#game-instructions p + p { margin-top: .75rem; }
.game-feedback { white-space: pre-line; }
#projeto .architecture-section { margin-top: 2rem; padding-top: 0; border: 0; gap: 1.25rem; }
#projeto .architecture-disclosure .architecture-section { margin-top: 0; padding: 0 1.5rem 1.5rem; }
#projeto .architecture-copy p, #projeto .architecture-infrastructure p { font-size: 1.05rem; }
#projeto .architecture-node { padding: 1rem; }
#projeto .manifest-game { margin-top: 2rem; }
.game-guide { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; margin-top: 1.5rem; }
.game-guide p { font-size: 1rem; }
.game-guide strong, .game-guide span { display: block; }
.game-guide strong { color: var(--color-primary); margin-bottom: .4rem; }
.game-guide span { color: var(--color-muted); }
.audit-source { position: relative; --result-color: var(--color-amber); }
.audit-source.answer-correct { --result-color: var(--color-primary); }
.audit-source.answer-wrong { --result-color: #ff8b88; background: #ff8b880a; }
.audit-result { --result-color: #ff8b88; }
.audit-result.is-correct { --result-color: var(--color-primary); }
.manifest-table .audit-result td { padding: .75rem; text-align: left; white-space: normal; }
.audit-verdict { color: var(--result-color); font: 1rem/1.6 var(--font-body); }
.audit-road { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 1; }
.audit-trail { position: absolute; top: 50%; left: 0; width: calc(100% - 6rem); height: 3px; background: var(--result-color); transform-origin: left; }
.audit-truck { position: absolute; left: 0; top: calc(50% - 2.35rem); width: 6rem; height: 3rem; color: var(--result-color); }
.audit-truck svg { width: 100%; height: 100%; position: relative; filter: drop-shadow(0 2px 2px #0008); }
.truck-wheel { transform-box: fill-box; transform-origin: center; animation: truck-wheel-spin .325s linear 8; }
.truck-smoke { position: absolute; left: -.3rem; bottom: .4rem; width: .5rem; height: .5rem; border-radius: 50%; background: var(--color-muted); animation: truck-puff .65s ease-out 4 both; }
.audit-badge { display: inline-block; margin-left: .75rem; color: var(--result-color); font: .8rem var(--font-body); }
.audit-info { position: relative; z-index: 2; margin-left: .5rem; width: 2rem; height: 2rem; border: 1px solid var(--result-color); border-radius: 50%; color: var(--result-color); background: var(--color-bg); font: 700 1rem Georgia, serif; cursor: pointer; }
.audit-info:focus-visible { outline: 2px solid var(--color-text); outline-offset: 3px; }
.audit-info[hidden], .audit-badge[hidden], .audit-road[hidden], .game-actions button[hidden] { display: none; }
.audit-source:has(.audit-badge:not([hidden])) .audit-road { opacity: .35; }
.audit-source:has(.audit-badge:not([hidden])) .audit-truck { visibility: hidden; }
.audit-source:has(.audit-badge:not([hidden])) .audit-trail { width: 100%; }
@keyframes truck-wheel-spin { to { transform: rotate(360deg); } }
@keyframes truck-puff { from { opacity: .6; transform: translate(0, 0) scale(.5); } to { opacity: 0; transform: translate(-1.5rem, -1rem) scale(2); } }
@media (max-width: 44.99rem) {
    .project-story, .decision-grid, .game-guide { grid-template-columns: 1fr; gap: 1.25rem; }
    .gallery-heading { align-items: start; flex-direction: column; gap: .4rem; }
    .gallery-mobile { gap: .5rem; padding: .5rem; }
    .gallery-controls { gap: .5rem; }
    .gallery-slide figcaption { display: grid; }
}
/* Movimento opt-in do jogo: o controle local permite ver ou pular a conferência. */
.game-motion-option { display: inline-flex; align-items: center; gap: .5rem; min-height: 2.75rem; color: var(--color-muted); font-size: .95rem; cursor: pointer; }
.game-motion-option input { width: 1.1rem; height: 1.1rem; accent-color: var(--color-primary); }
.audit-animated .truck-wheel { animation: truck-wheel-spin calc(var(--audit-duration) / 10) linear 10 !important; }
.audit-animated .truck-smoke { animation: truck-puff calc(var(--audit-duration) / 5) ease-out 5 both !important; }
#audit-form:not(.audit-animated) .audit-road { display: none; }

.lightbox-stage { position: relative; padding-inline: 3rem; }
.lightbox-nav { position: absolute; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 2.75rem; height: 5rem; padding: 0; border: 0; background: transparent; color: var(--color-primary); font: 400 5rem/1 Arial, sans-serif; cursor: pointer; }
.lightbox-prev { left: 0; }
.lightbox-next { right: 0; }
.lightbox-nav:hover { color: var(--color-text); }
.lightbox-nav:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }
.lightbox-close { z-index: 3; }
@media (max-width: 44.99rem) {
    .lightbox-stage { padding-inline: 1.75rem; }
    .lightbox-nav { width: 1.75rem; font-size: 3.5rem; }
}
