/* Talisman site shell: the pieces every page shares with the homepage.
   The doors bar docked at the top, the haze pools that keep text readable over the network,
   and the quiet way-in button. Tokens come from styles.css :root; none are redeclared.
   The homepage and all surrounding pages load this shell after their own styles. */

/* styles.css hides sideways overflow on html and body, which makes body its own scroller and
   stops position: sticky from sticking. clip trims the same overflow without a scroller. */
html, body { overflow-x: clip; }

/* styles.css puts translateZ(0) on body as a GPU hint. Any transform there turns body into the
   containing block for position: fixed, so a fixed bar would scroll away. */
body { transform: none; }

/* The same fixed navigation stays visible on every public page. Reserve its
   height before scripts run; on phones all links fit into two rows. */
:root { --site-bar-height: 60px; }
body { padding-top: var(--site-bar-height); }
.site-bar {
    position: fixed;
    z-index: 50;
    inset: 0 0 auto;
    min-height: var(--site-bar-height);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    background: rgba(0, 0, 0, 0.88);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.site-doors { margin: 0; display: flex; gap: 8px; justify-content: center; }
.site-doors a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 6px 10px;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: var(--weight-light);
    letter-spacing: 0.06em;
    line-height: 1.4;
    text-transform: uppercase;
    white-space: nowrap;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid transparent;
    transition: var(--transition);
}
.site-doors a:hover, .site-doors a:focus-visible { background: rgba(64, 224, 208, 0.12); color: #5ffbf1; }
.site-doors a[aria-current="page"] { color: #fff; border-bottom-color: var(--color-turquoise); }
.site-doors .site-join { color: var(--color-turquoise); border: 1px solid rgba(64, 224, 208, 0.5); background: rgba(64, 224, 208, 0.06); }
.skip-link { z-index: 70; }
/* Page-specific rules previously reserved space for their own header. */
.home-story, .art, .sub { padding-top: 0; }
main [id], main[id], .artists-page [id], .sub [id], #align-world,
.manifesto, #join, #story { scroll-margin-top: calc(var(--site-bar-height) + 20px); }
@media (max-width: 760px) {
    :root { --site-bar-height: 100px; }
    .site-bar { padding: 8px 12px; }
    .site-doors { width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
    .site-doors a { min-height: 40px; padding: 6px 2px; font-size: 0.6rem; letter-spacing: 0.02em; white-space: normal; text-align: center; }
    .site-doors .site-join { grid-column: auto; }
}

/* ---- The haze: a soft pool of dark behind a block of text ------------------------
   The network (mesh-animation.js's fixed canvas, z-index -1) floats behind the page, and its
   lines cut through the type. A pool is a pseudo-element behind the block: translucent black that
   also blurs what lies beneath, feathered to nothing by a mask, so there is no box, only a dimming
   where the words are. .pool is a column of reading; .pool--glow a centred ellipse for a headline. */

.pool { position: relative; isolation: isolate; --haze-depth: 0.74; --haze-blur: 12px; }
.pool::before {
    content: '';
    position: absolute;
    z-index: -1;
    pointer-events: none;
    inset: -2.5rem -3.5rem;
    background: rgba(0, 0, 0, var(--haze-depth));
    -webkit-backdrop-filter: blur(var(--haze-blur));
    backdrop-filter: blur(var(--haze-blur));
    transition: background 1.4s ease-out;
    -webkit-mask-image: linear-gradient(to right, transparent, #000 5rem, #000 calc(100% - 5rem), transparent),
                        linear-gradient(to bottom, transparent, #000 4rem, #000 calc(100% - 4rem), transparent);
    mask-image: linear-gradient(to right, transparent, #000 5rem, #000 calc(100% - 5rem), transparent),
                linear-gradient(to bottom, transparent, #000 4rem, #000 calc(100% - 4rem), transparent);
    -webkit-mask-composite: source-in;
    mask-composite: intersect;
}
.pool--glow::before {
    inset: 0;
    -webkit-mask-image: radial-gradient(ellipse 58% 36% at 50% var(--haze-centre, 50%), #000 35%, transparent 100%);
    mask-image: radial-gradient(ellipse 58% 36% at 50% var(--haze-centre, 50%), #000 35%, transparent 100%);
}
.pool--light { --haze-depth: 0.5; }
@media (max-width: 640px) {
    .pool { --haze-blur: 4px; }
    .pool::before {
        inset: -1.5rem -1rem;
        -webkit-mask-image: linear-gradient(to right, transparent, #000 2rem, #000 calc(100% - 2rem), transparent),
                            linear-gradient(to bottom, transparent, #000 2.5rem, #000 calc(100% - 2.5rem), transparent);
        mask-image: linear-gradient(to right, transparent, #000 2rem, #000 calc(100% - 2rem), transparent),
                    linear-gradient(to bottom, transparent, #000 2.5rem, #000 calc(100% - 2.5rem), transparent);
    }
    .pool--glow::before {
        inset: 0;
        -webkit-mask-image: radial-gradient(ellipse 70% 40% at 50% var(--haze-centre, 50%), #000 35%, transparent 100%);
        mask-image: radial-gradient(ellipse 70% 40% at 50% var(--haze-centre, 50%), #000 35%, transparent 100%);
    }
}

/* ---- The way in: the homepage's quiet boxed link ------------------------------ */

.door {
    display: inline-block;
    padding: 0.9rem 1.6rem;
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--color-turquoise);
    text-decoration: none;
    border: 1px solid rgba(64, 224, 208, 0.6);
    background: rgba(64, 224, 208, 0.08);
    transition: var(--transition);
}
.door:hover, .door:focus-visible { background: rgba(64, 224, 208, 0.18); color: #5ffbf1; }

/* A quiet underlined link in the same voice. */
.thread {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.25);
    padding-bottom: 3px;
    transition: color 0.3s, border-color 0.3s;
}
.thread:hover, .thread:focus-visible { color: var(--color-turquoise); border-bottom-color: var(--color-turquoise); }

a:focus-visible { outline: 1px solid var(--color-turquoise); outline-offset: 4px; }
