/* ============================================================
   base.css — reset, typography, global background.
   Depends on tokens.css (load tokens.css FIRST).
   ============================================================ */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-base);
    color: var(--text);
    line-height: var(--leading-normal);
    font-size: var(--text-base);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color var(--dur) var(--ease-out),
                color var(--dur) var(--ease-out);
}

/* Animated ambient gradient orbs (fixed, behind everything).
   Gray-dark base with a dark-purple wash; sky-blue accent orb. */
body::before,
body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(60vw 60vw at 12% 8%, var(--orb-1), var(--orb-3) 60%),
        radial-gradient(50vw 50vw at 88% 18%, var(--orb-2), var(--orb-3) 55%);
    filter: blur(20px);
    opacity: 0.9;
    animation: orb-drift 22s var(--ease-in-out) infinite alternate;
}

body::after {
    background: radial-gradient(40vw 40vw at 70% 90%, var(--orb-1), var(--orb-3) 60%);
    animation-duration: 28s;
    animation-direction: alternate-reverse;
    opacity: 0.6;
}

@keyframes orb-drift {
    0%   { transform: translate3d(0, 0, 0) scale(1); }
    100% { transform: translate3d(-3%, 4%, 0) scale(1.08); }
}

/* All real content sits above the orb layer. */
#app {
    position: relative;
    z-index: var(--z-base);
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--dur-fast) var(--ease-out);
}
a:hover { color: var(--accent-hover); }

h1, h2, h3, h4 {
    line-height: var(--leading-tight);
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.02em;
}

h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }

p { color: var(--text-muted); }

img, svg { display: block; max-width: 100%; }

button { font-family: inherit; cursor: pointer; }

input, textarea, select { font-family: inherit; }

ul { list-style: none; }

::selection {
    background: var(--accent-soft);
    color: var(--text);
}

/* Custom scrollbar (dark aesthetic) */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: var(--border-strong);
    border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* Utility */
.hidden { display: none !important; }
.text-center { text-align: center; }
.container {
    width: 100%;
    max-width: var(--container-max);
    margin-inline: auto;
    padding-inline: var(--space-5);
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
    body::before, body::after { animation: none; }
}
