/* =============================================================
   LogoMonkey — Reset & Backdrop
   Reset, baseline typography, status dots, canvas and grain layers.
   ============================================================= */

/* ------------------------------------------------------------- Reset & Baseline */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    /* Keep anchor targets clear of the fixed site header when a nav link is tapped. */
    scroll-padding-top: calc(var(--header-h) + 16px);
    color-scheme: dark;
    background-color: var(--bg);
    color: var(--text);
}

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 1.7;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-tap-highlight-color: transparent;
    overflow-x: hidden;
    position: relative;
}

/* WebKit turns `overflow-x: hidden` on <body> into a scroll container, which makes
   `position: fixed` children (header, footer bar) resolve against the wrong box on
   iOS. `overflow-x: clip` clips horizontally without creating that container. */
@supports (overflow-x: clip) {
    body {
        overflow-x: clip;
    }
}

::selection {
    background: var(--accent);
    color: #10141b;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font: inherit;
    color: inherit;
    background: none;
    border: none;
    cursor: pointer;
}

:focus-visible {
    outline: 1px dashed var(--accent);
    outline-offset: 3px;
}

/* Scrollbar */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #232a35; border: 2px solid var(--bg); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: #2f3845; }

/* Shared status dots */
.dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--text-faint);
    flex-shrink: 0;
}

.dot-live {
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent-glow);
    animation: dotPulse 2.4s ease-in-out infinite;
}

@keyframes dotPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.35; transform: scale(0.8); }
}

/* ------------------------------------------------------------- Background & Film Grain */
#gl {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    /* Use Large Viewport Height on mobile so collapsing/expanding browser
       toolbars never expose a gap at the bottom or trigger buffer resizes. */
    height: 100lvh;
    z-index: 0;
    pointer-events: none;
    background: var(--bg);
}

#grain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    height: 100lvh;
    z-index: 40;
    pointer-events: none;
    opacity: 0.035;
    background-size: 200px 200px;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

