/* ============================================================
   MONOLITO NEXT — BASE SYSTEM & TOKENS
   ============================================================ */

/* ── Typography definitions ── */
@font-face {
    font-family: 'Metropolis';
    src: url('/resources/fonts/metropolis-regular-webfont.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Metropolis';
    src: url('/resources/fonts/metropolis-medium-webfont.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Metropolis';
    src: url('/resources/fonts/metropolis-semibold-webfont.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Metropolis';
    src: url('/resources/fonts/metropolis-bold-webfont.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Metropolis';
    src: url('/resources/fonts/metropolis-extralight-webfont.woff2') format('woff2');
    font-weight: 200;
    font-style: normal;
    font-display: swap;
}

/* ── Design tokens / Custom HSL Palette ── */
:root {
    /* Harmonious HSL colors for atmospheric darkness */
    --color-bg-base: hsl(270, 60%, 4%);       /* Deep cinematic indigo/black */
    --color-bg-violet: hsl(265, 40%, 8%);     /* Deep muted violet */
    --color-bg-panel: rgba(10, 4, 16, 0.45);   /* Semi-transparent dark backing */
    
    /* Neon glow highlights (restrained and aesthetic) */
    --color-glow-violet: hsl(270, 70%, 45%);
    --color-glow-blue: hsl(220, 80%, 40%);
    --color-accent: hsl(270, 80%, 75%);        /* Light violet neon */
    --color-accent-dim: rgba(180, 140, 240, 0.15);
    
    /* Editorial typography colors */
    --color-text-primary: hsl(0, 0%, 94%);     /* Off-white */
    --color-text-secondary: hsl(270, 10%, 65%);/* Muted silver-purple */
    --color-text-muted: hsl(270, 5%, 45%);     /* Faded purple */
    
    /* Layout constants */
    --transition-cinematic: all 0.8s cubic-bezier(0.25, 1, 0.5, 1);
    --transition-micro: all 0.25s ease;
    --border-subtle: 1px solid rgba(255, 255, 255, 0.06);
    --border-active: 1px solid rgba(255, 255, 255, 0.15);
    --font-sans: 'Metropolis', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

html,
body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    overflow-clip-margin: clamp(24px, 3vw, 56px);
    background-color: var(--color-bg-base);
    color: var(--color-text-primary);
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ── Custom scrollbars for overlays ── */
::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--color-accent);
}

/* ── Base elements styling ── */
a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-micro);
}

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

/* ── Global elements ── */
#portal-bg-canvas {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
    pointer-events: none;
    background: radial-gradient(circle at 60% 40%, var(--color-bg-violet) 0%, var(--color-bg-base) 100%);
}

.preload * {
    transition: none !important;
}
