/* ============================================================
   BITBI — Shared Base Styles
   @layer base — fonts, body, typography, glass, reveal, keyframes
   Used by: index.html, privacy.html, imprint.html
   ============================================================ */

@layer base {

    /* --- @font-face --- */
    @font-face {
        font-family: 'Inter';
        font-style: normal;
        font-weight: 400;
        font-display: swap;
        src: url('../fonts/inter-v20-latin_latin-ext-regular.woff2') format('woff2');
    }

    @font-face {
        font-family: 'Inter';
        font-style: normal;
        font-weight: 500;
        font-display: swap;
        src: url('../fonts/inter-v20-latin_latin-ext-500.woff2') format('woff2');
    }

    @font-face {
        font-family: 'Inter';
        font-style: normal;
        font-weight: 600;
        font-display: swap;
        src: url('../fonts/inter-v20-latin_latin-ext-600.woff2') format('woff2');
    }

    @font-face {
        font-family: 'Playfair Display';
        font-style: normal;
        font-weight: 700;
        font-display: swap;
        src: url('../fonts/playfair-display-latin-ext.woff2') format('woff2');
        unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
    }
    @font-face {
        font-family: 'Playfair Display';
        font-style: normal;
        font-weight: 700;
        font-display: swap;
        src: url('../fonts/playfair-display-latin.woff2') format('woff2');
        unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
    }
    @font-face {
        font-family: 'Playfair Display';
        font-style: normal;
        font-weight: 900;
        font-display: swap;
        src: url('../fonts/playfair-display-latin-ext.woff2') format('woff2');
        unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
    }
    @font-face {
        font-family: 'Playfair Display';
        font-style: normal;
        font-weight: 900;
        font-display: swap;
        src: url('../fonts/playfair-display-latin.woff2') format('woff2');
        unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
    }

    @font-face {
        font-family: 'JetBrains Mono';
        font-style: normal;
        font-weight: 400;
        font-display: swap;
        src: url('../fonts/jetbrains-mono-latin-ext.woff2') format('woff2');
        unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
    }
    @font-face {
        font-family: 'JetBrains Mono';
        font-style: normal;
        font-weight: 400;
        font-display: swap;
        src: url('../fonts/jetbrains-mono-latin.woff2') format('woff2');
        unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
    }
    @font-face {
        font-family: 'JetBrains Mono';
        font-style: normal;
        font-weight: 500;
        font-display: swap;
        src: url('../fonts/jetbrains-mono-latin-ext.woff2') format('woff2');
        unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
    }
    @font-face {
        font-family: 'JetBrains Mono';
        font-style: normal;
        font-weight: 500;
        font-display: swap;
        src: url('../fonts/jetbrains-mono-latin.woff2') format('woff2');
        unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
    }

    /* --- Body --- */
    body {
        background: var(--color-midnight);
        color: var(--color-text);
        font-family: var(--font-body);
    }

    /* --- Gradient Text --- */
    .gt-hero {
        background: linear-gradient(135deg, #FFB300 0%, #FF6B00 25%, #00F0FF 65%, #C026D3 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        color: transparent;
    }

    .gt-gold-cyan {
        background: linear-gradient(90deg, #FFB300, #00F0FF);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        color: transparent;
    }

    .gt-cyan-mag {
        background: linear-gradient(90deg, #00F0FF, #C026D3);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        color: transparent;
    }

    /* --- Glass Effects --- */
    .glass {
        background: rgba(13, 27, 42, 0.45);
        backdrop-filter: blur(24px);
        -webkit-backdrop-filter: blur(24px);
        border: 1px solid rgba(255, 255, 255, 0.06);
    }

    .glass-nav {
        background: rgba(10, 10, 10, 0.75);
        backdrop-filter: blur(30px);
        -webkit-backdrop-filter: blur(30px);
        border-block-end: 1px solid rgba(255, 255, 255, 0.04);
    }

    /* --- Reveal Animation --- */
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.7s var(--ease-smooth), transform 0.7s var(--ease-smooth);

        &.visible {
            opacity: 1;
            transform: translateY(0);
        }
    }

    /* --- Keyframes --- */
    @keyframes float {
        0%, 100% { transform: translateY(0); }
        50% { transform: translateY(-12px); }
    }

    @keyframes binaryFall {
        0% { transform: translateY(-100%); opacity: 0; }
        5% { opacity: 1; }
        95% { opacity: 1; }
        100% { transform: translateY(calc(100vh + 100%)); opacity: 0; }
    }

    /* --- Section Divider --- */
    .section-divider {
        block-size: 1px;
        margin-inline: auto;
        max-inline-size: 90%;
        background: linear-gradient(90deg, transparent, rgba(0, 240, 255, 0.15) 30%, rgba(255, 179, 0, 0.15) 70%, transparent);
        position: relative;
        z-index: 1;
    }

    /* --- Binary Footer --- */
    .binary-footer-text {
        font-family: var(--font-mono);
        font-size: 8px;
        color: rgba(0, 240, 255, 0.05);
        line-height: 1.5;
        word-break: break-all;
        overflow: hidden;
        max-block-size: 50px;
        user-select: none;
        margin-block-end: var(--space-5);
    }

    /* --- Hero Canvas --- */
    #heroCanvas {
        position: absolute;
        inset: 0;
        inline-size: 100%;
        block-size: 100%;
        pointer-events: none;
    }

    /* --- Reduced Motion --- */
    @media (prefers-reduced-motion: reduce) {
        .reveal {
            opacity: 1;
            transform: none;
            transition: none;
        }

        *,
        *::before,
        *::after {
            animation-duration: 0.01ms !important;
            animation-iteration-count: 1 !important;
            transition-duration: 0.01ms !important;
        }
    }
}
