/*
 * CollatCred — Layout
 * Page-level structural rules: background layers, mobile menu.
 * No component visual styles belong here.
 * Depends on: variables.css
 */

/* ── Ambient Background Grid ─────────────────────────── */

.bg-grid-pattern {
    background-size: 40px 40px;
    background-image:
        linear-gradient(to right, rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255,255,255,0.03) 1px, transparent 1px);
    mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
}

/* ── Ambient Orbs ────────────────────────────────────── */
/*
 * CP4 reduced opacity range: 0.06–0.12 (was 0.1–0.2).
 * Keyframe values live in animations.css (@keyframes pulse-orb).
 * Duration slowed to 15s (was 10s) for less visual noise.
 */

/*
 * position: fixed (not absolute) is load-bearing for mobile layout.
 * These orbs are 600-700px wide and the pulse-orb keyframe scales them to
 * 1.2, so as absolutely positioned elements they extended the document to
 * ~578px on a 412px phone. Mobile browsers then zoomed out to fit that
 * width while body content stayed at 412px, leaving the page rendered in a
 * narrow column with dead space on the right. Fixed elements do not
 * contribute to the document's scrollable overflow, so the document now
 * matches the viewport width.
 */
.dynamic-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    animation: pulse-orb 15s infinite alternate;
    pointer-events: none;
    z-index: var(--z-bg);
}

/* ── Mobile Menu ─────────────────────────────────────── */

#mobile-menu {
    transition:
        opacity    var(--dur-slow) ease,
        visibility var(--dur-slow) ease;
}
