/* Arianna HAO Engine — Layout & regions
   Derived from Pyragogy.org (MIT · FTG-003 / Fabrizio Terzi).
   ============================================================ */

/* --- Canvas background (neural network) --- */
#neuralCanvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    display: block;
}

/* --- Film grain overlay --- */
.grain {
    position: fixed;
    inset: -50%;
    width: 200%;
    height: 200%;
    z-index: 2;
    pointer-events: none;
    opacity: 0.040;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* --- Chrome editoriale --- */
.frame {
    position: fixed;
    z-index: 20;
    font-family: var(--font-sans);
    font-weight: 500;
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(var(--ghost), 0.50);
}

.frame.top {
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px clamp(20px, 4vw, 48px);
}

.frame .status {
    display: inline-flex;
    align-items: center;
    gap: 9px;
}

.frame.bottom-left {
    bottom: 0;
    left: 0;
    padding: 20px clamp(20px, 4vw, 48px);
}

.frame.bottom-right {
    bottom: 0;
    right: 0;
    padding: 20px clamp(20px, 4vw, 48px);
    text-align: right;
}

.frame a {
    color: rgba(var(--ghost), 0.55);
    transition: color 0.3s ease;
}

.frame a:hover {
    color: rgb(var(--ai));
}

/* --- Wordmark brand nel frame top --- */
.brand-wordmark {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.brand-pyra {
    font-size: 14px;
    color: rgb(var(--human));
}

.brand-text {
    font-size: 11px;
    letter-spacing: 0.20em;
    font-weight: 600;
    color: rgba(var(--ghost), 0.65);
}

/* --- Stage: palco centrale --- */
#stage {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: var(--stage-max);
    padding: 0 1.5rem;
}

/* --- Mobile --- */
@media (max-width: 640px) {
    .frame.bottom-left,
    .frame.bottom-right {
        display: none;
    }

    .frame.top {
        padding: 18px 20px;
    }
}

@media (max-width: 380px) {
    .frame .status {
        font-size: 10px;
    }
}