/* Home composition layers over the shared room and fixed navigation. */
.home-page main {
    display: grid;
    grid-template-rows: minmax(32rem, 1fr);
}

.command-room {
    position: relative;
    isolation: isolate;
    container-type: size;
    min-height: 0;
    color: var(--war-paper);
}

/* Both foreground copies retain the artwork's exact registration. */
.room-characters,
.table-hologram {
    position: absolute;
    inset: 0;
    background: url('./assets/marketing/command-room-foreground.png') center / 100% 100% no-repeat;
}

.table-hologram {
    opacity: 0.16;
    clip-path: ellipse(38% 14% at 50% 70%);
    mix-blend-mode: screen;
    filter: brightness(1.45) saturate(1.35);
    animation: hologram-flicker 7.7s linear infinite;
}

.table-scan {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(0deg, transparent 0 5px, rgba(181, 255, 108, 0.16) 6px, transparent 7px 10px);
    opacity: 0.5;
    clip-path: ellipse(38% 14% at 50% 70%);
    mix-blend-mode: screen;
    animation: hologram-scan 12s linear infinite;
}

.table-scan::after {
    content: '';
    position: absolute;
    inset: 52% 8% 12%;
    background: linear-gradient(180deg, transparent 25%, rgba(164, 255, 124, 0.16) 49%, transparent 67%);
    animation: hologram-sweep 9s ease-in-out infinite;
}

/* Primary story actions and the first-edition cover. */
.command-intro {
    position: relative;
    z-index: 1;
    width: min(32rem, 48%);
    margin: 0 auto;
    padding-top: clamp(1.2rem, 4cqh, 3rem);
    text-align: center;
}

.command-intro .eyebrow {
    margin-bottom: 0.8rem;
    font-size: 0.63rem;
    letter-spacing: 0.2em;
    color: rgb(207, 228, 160);
}

.command-intro h1 {
    width: 100%;
    line-height: 1;
}

.title-artwork {
    display: block;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 3px 3px rgba(0, 0, 0, 0.65));
}

.room-credit {
    margin-top: 1rem;
    font: 700 0.75rem var(--war-display);
    letter-spacing: 0.13em;
    text-shadow: 0 2px 5px rgb(0, 0, 0);
}

.room-welcome {
    margin: 1rem 0 0.85rem;
    font: 700 0.86rem var(--war-mono);
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: rgb(186, 238, 151);
    text-shadow: 0 0 12px rgb(23, 73, 16);
}

.room-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.65rem;
}

.room-actions .button {
    min-width: 17rem;
    min-height: 3rem;
    font: 800 1.05rem var(--war-mono);
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.room-actions .secondary-action {
    min-height: 2.7rem;
    border: 1px solid var(--war-paper);
    font-size: 0.85rem;
    background: rgba(16, 22, 14, 0.88);
    color: var(--war-paper);
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.45);
}

.edition-dock {
    position: absolute;
    top: 15%;
    right: 2.4%;
    width: clamp(8rem, 12vw, 12rem);
    padding: 0.7rem;
    border: 4px double rgb(145, 143, 90);
    border-radius: 10px;
    background: linear-gradient(120deg, rgb(72, 75, 43), rgb(23, 31, 21));
    box-shadow: 5px 8px 12px rgba(0, 0, 0, 0.55), inset 0 0 0 3px rgb(30, 32, 20);
    transform: rotate(2deg);
}

.edition-dock img {
    width: 100%;
    height: auto;
    border: 2px solid rgb(29, 32, 21);
    box-shadow: 0 0 13px rgba(243, 191, 95, 0.45);
}

.dock-label {
    display: block;
    margin-top: 0.6rem;
    padding: 0.5rem;
    font: 700 0.67rem var(--war-mono);
    text-align: center;
    text-transform: uppercase;
    background: var(--war-paper);
    color: var(--war-ink);
}

.dock-label strong {
    display: block;
    font: 900 1.45rem var(--war-display);
}

/* Motion state is shared by the manual control and page lifecycle. */
.motion-paused .table-hologram,
.motion-paused .table-scan,
.motion-paused .table-scan::after {
    animation-play-state: paused;
}

@keyframes hologram-flicker {
    0%,
    40%,
    47%,
    100% {
        opacity: 0.15;
    }

    42% {
        opacity: 0.08;
    }

    44% {
        opacity: 0.18;
    }

    72% {
        opacity: 0.12;
    }

    76% {
        opacity: 0.2;
    }
}

@keyframes hologram-scan {
    from {
        background-position: 0 0;
    }

    to {
        background-position: 0 60px;
    }
}

@keyframes hologram-sweep {
    0%,
    100% {
        opacity: 0.2;
        transform: translateY(-14%);
    }

    50% {
        opacity: 0.6;
        transform: translateY(28%);
    }
}

/* Responsive layout retains the scene registration and all controls. */
@media (max-width: 68rem) {
    .edition-dock {
        right: 1.5%;
        width: 8rem;
        padding: 0.5rem;
    }
}

@media (max-width: 45rem) {
    .home-page main {
        grid-template-rows: minmax(35rem, 1fr);
    }

    /* Fit all four faces while leaving the lower controls in view. */
    .room-foreground .room-canvas {
        top: auto;
        bottom: min(10rem, 20cqh);
        width: min(100cqw, calc(80cqh * 16 / 9));
        transform: translateX(-50%);
    }

    .command-intro {
        width: calc(100% - 2rem);
        padding-top: 2rem;
    }

    .room-credit {
        font-size: 0.62rem;
    }

    .room-welcome {
        margin-top: 1rem;
        font-size: 0.69rem;
    }

    .room-actions .button {
        min-width: 15rem;
    }

    .edition-dock {
        display: grid;
        grid-template-columns: 2.5rem minmax(0, 1fr);
        align-items: center;
        gap: 0.45rem;
        top: auto;
        right: 0.9rem;
        bottom: 0.65rem;
        width: min(11rem, calc(100% - 1.8rem));
        padding: 0.4rem;
        border-width: 2px;
        transform: none;
    }

    .dock-label {
        margin-top: 0;
        padding: 0.35rem;
        font-size: 0.6rem;
    }

    .dock-label strong {
        font-size: 1.1rem;
    }

}

/* Both preference owners suppress animation and pointer transforms. */
@media (prefers-reduced-motion: reduce) {
    .table-hologram,
    .table-scan,
    .table-scan::after {
        animation: none;
    }
}

:root[data-reduce-motion="true"] .table-hologram,
:root[data-reduce-motion="true"] .table-scan,
:root[data-reduce-motion="true"] .table-scan::after {
    animation: none;
}

