/* Landing field canvas + development tuning panel.
   Loaded after ergodic-landing.css, which remains the token source. */

canvas#field {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* The canvas paints its own backdrop and bloom, so the body gradient underneath
   would never be seen. A flat base avoids a visible flash before first paint. */
body {
    background: #050d1a;
}

/* The mark sits in the canvas clearing; its own halo would double up on the
   well and read as a smudge, so it is dialled back rather than removed. */
.mark-glow {
    opacity: .38;
}

.mark-btn:hover .mark-glow {
    opacity: .62;
}

@media (prefers-reduced-motion: reduce) {
    canvas#field {
        display: block;
    }
}

/* ---------- Tuning panel ---------- */

.tuner-toggle,
.tuner {
    position: fixed;
    right: 16px;
    bottom: 64px;
    z-index: 40;
    font-family: 'IBM Plex Mono', monospace;
}

.tuner-toggle {
    appearance: none;
    padding: 7px 13px;
    background: rgba(8, 17, 31, .82);
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 3px;
    color: var(--text-muted);
    font-size: 10.5px;
    letter-spacing: .12em;
    text-transform: uppercase;
    cursor: pointer;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

    .tuner-toggle:hover {
        color: var(--accent);
        border-color: rgba(0, 153, 255, .45);
    }

.tuner {
    width: 292px;
    padding: 13px 15px 15px;
    background: rgba(8, 17, 31, .93);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 4px;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    color: var(--text-muted);
    font-size: 11px;
}

.tuner[hidden] {
    display: none;
}

.tuner-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    letter-spacing: .14em;
    text-transform: uppercase;
    font-size: 10px;
    color: var(--text-faint);
    padding-bottom: 9px;
    margin-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, .09);
}

.tuner-close {
    appearance: none;
    background: none;
    border: none;
    color: var(--text-faint);
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
    padding: 0 2px;
}

    .tuner-close:hover {
        color: var(--accent);
    }

.tuner-row {
    display: grid;
    grid-template-columns: 68px 1fr 38px;
    align-items: center;
    gap: 9px;
    margin-bottom: 7px;
}

.tuner-label {
    font-size: 10px;
    letter-spacing: .05em;
    color: var(--text-faint);
}

.tuner-value {
    font-size: 10px;
    text-align: right;
    color: var(--accent);
}

.tuner-row input[type=range] {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, .16);
    border-radius: 2px;
    outline: none;
}

    .tuner-row input[type=range]::-webkit-slider-thumb {
        -webkit-appearance: none;
        width: 11px;
        height: 11px;
        border-radius: 50%;
        background: var(--accent);
        cursor: pointer;
    }

    .tuner-row input[type=range]::-moz-range-thumb {
        width: 11px;
        height: 11px;
        border: none;
        border-radius: 50%;
        background: var(--accent);
        cursor: pointer;
    }

.tuner-row input[type=checkbox] {
    accent-color: var(--accent);
    justify-self: start;
}

.tuner-actions {
    display: flex;
    gap: 7px;
    margin-top: 11px;
}

    .tuner-actions button {
        appearance: none;
        flex: 1;
        padding: 6px 8px;
        background: transparent;
        border: 1px solid rgba(255, 255, 255, .16);
        border-radius: 3px;
        color: var(--text-muted);
        font-family: inherit;
        font-size: 9.5px;
        letter-spacing: .08em;
        text-transform: uppercase;
        cursor: pointer;
    }

        .tuner-actions button:hover {
            color: var(--accent);
            border-color: rgba(0, 153, 255, .45);
        }

.tuner-out {
    width: 100%;
    height: 96px;
    margin-top: 10px;
    padding: 8px;
    background: rgba(0, 0, 0, .35);
    border: 1px solid rgba(255, 255, 255, .09);
    border-radius: 3px;
    color: var(--text-muted);
    font-family: inherit;
    font-size: 9.5px;
    line-height: 1.5;
    resize: vertical;
}

@media (max-width: 640px) {
    .tuner,
    .tuner-toggle {
        display: none;
    }
}

/* ---------- Reveal screen ---------- */

/* The thesis belongs with the mark, but only once the visitor has asked for it.
   ergodic-landing.css shows .tagline on load and hides it on open; this inverts
   that, keeping the closed hero as spare as it already is. */
.tagline {
    margin-top: 0;
    height: auto;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    animation: none;
    font-size: 12.5px;
    letter-spacing: .04em;
    color: var(--text-muted);
    max-width: 460px;
    transition: opacity .55s var(--ease), max-height .7s var(--ease), margin-top .7s var(--ease);
}

body.opened .tagline {
    margin-top: 30px;
    /* ergodic-landing.css collapses this with height:0; max-height alone
       will not reopen it, so height must be reset explicitly. */
    height: auto;
    max-height: 90px;
    opacity: 1;
    transition-delay: .28s;
}

/* Both directions are statements of what the company is, not navigation.
   Only the external one currently has somewhere to send you. */
.option-static {
    cursor: default;
    display: flex;
    flex-direction: column;
}

    .option-static:hover {
        border-color: rgba(255,255,255,.09);
        background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,0));
    }

.option-link,
.option-note {
    margin-top: auto;
    padding-top: 18px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10.5px;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.option-link {
    color: var(--accent);
    text-decoration: none;
    align-self: flex-start;
    border-bottom: 1px solid transparent;
    transition: border-color .25s var(--ease);
}

    .option-link:hover {
        border-bottom-color: var(--accent);
    }

    .option-link:focus-visible {
        outline: 1.5px solid var(--accent);
        outline-offset: 3px;
    }

.option-note {
    color: var(--text-faint);
}

@media (max-width: 640px) {
    .tagline {
        font-size: 11.5px;
    }

    body.opened .tagline {
        margin-top: 18px;
    }

    .option-link,
    .option-note {
        padding-top: 12px;
        font-size: 9.5px;
    }
}

@media (max-width: 400px), (max-height: 600px) and (max-width: 640px) {
    body.opened .tagline {
        margin-top: 10px;
        max-height: 60px;
    }
}

/* The home hero is a fixed-height screen, so its footer is pinned. Every other
   page scrolls and uses the static default set in ergodic-site.css. */
.site-footer {
    position: fixed;
}
