/* ============================================================
   LifePath — Base layer
   Variables, reset, typography, ambient background.
============================================================ */

:root {
    --bg-0: #050710;
    --bg-1: #0a0e1c;
    --bg-2: #11172a;
    --bg-3: #1a223a;

    --fg: #f5f7fc;
    --fg-2: rgba(245, 247, 252, 0.82);
    --fg-3: rgba(245, 247, 252, 0.58);
    --fg-4: rgba(245, 247, 252, 0.34);

    --accent: #7aa7ff;
    --accent-2: #b395ff;
    --accent-3: #5dd9ff;
    --warm: #ffb673;
    --hot: #ff7aa5;
    --good: #6ce5a6;
    --warn: #ffd25e;
    --bad: #ff6b8a;

    --stat-happy: #ffd25e;
    --stat-health: #ff7aa5;
    --stat-smart: #5dd9ff;
    --stat-looks: #b395ff;

    --r-xs: 6px;
    --r-sm: 10px;
    --r-md: 16px;
    --r-lg: 22px;
    --r-xl: 30px;
    --r-pill: 999px;

    --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-spring: cubic-bezier(0.34, 1.1, 0.64, 1);
    --ease-smooth: cubic-bezier(0.33, 1, 0.68, 1);

    --glass-stroke: 1px solid rgba(255, 255, 255, 0.10);
    --glass-stroke-strong: 1px solid rgba(255, 255, 255, 0.16);
    --glass-shadow:
        0 1px 0 rgba(255, 255, 255, 0.08) inset,
        0 0 0 1px rgba(255, 255, 255, 0.04) inset,
        0 24px 60px -20px rgba(0, 0, 0, 0.55),
        0 8px 24px -8px rgba(0, 0, 0, 0.4);

    --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;
    --font-body: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;

    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-muted: rgba(255, 255, 255, 0.11);
    --border-strong: rgba(255, 255, 255, 0.16);

    --lh-tight: 1.22;
    --lh-body: 1.48;
    --lh-relaxed: 1.58;

    --focus-ring: 0 0 0 2px rgba(5, 7, 16, 0.92), 0 0 0 4px rgba(122, 167, 255, 0.42);
}

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

html, body {
    height: 100%;
    width: 100%;
    overflow: hidden;
    overscroll-behavior: none;
}

body {
    font-family: var(--font-body);
    font-size: 14px;
    line-height: var(--lh-body);
    color: var(--fg);
    color-scheme: dark;
    background:
        radial-gradient(ellipse 100% 80% at 50% -20%, rgba(122, 167, 255, 0.12) 0%, transparent 55%),
        radial-gradient(120% 100% at 50% -10%, #1a223a 0%, #0a0e1c 48%, #050710 100%);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    overscroll-behavior: none;
    -webkit-user-select: none;
    user-select: none;
}

button {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

button:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
    border-radius: var(--r-sm);
}

input, select, textarea {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    background: transparent;
    border: none;
    outline: none;
}

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

.hidden { display: none !important; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    transition: background 0.2s;
}
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.18); }

/* ----------- Ambient aurora background ----------- */
.aurora {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.aurora-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.45;
    mix-blend-mode: screen;
    animation: drift 32s ease-in-out infinite alternate;
    will-change: transform;
    contain: layout style paint;
}

.aurora-blob.a1 {
    width: 560px;
    height: 560px;
    top: -180px;
    left: -140px;
    background: radial-gradient(circle, #5dd9ff, transparent 68%);
}

.aurora-blob.a2 {
    width: 640px;
    height: 640px;
    bottom: -220px;
    right: -200px;
    background: radial-gradient(circle, #b395ff, transparent 68%);
    animation-duration: 38s;
    animation-delay: -8s;
}

.aurora-blob.a3 {
    width: 400px;
    height: 400px;
    top: 28%;
    left: calc(50% - 200px);
    background: radial-gradient(circle, rgba(122, 167, 255, 0.7), transparent 68%);
    opacity: 0.18;
    animation-duration: 44s;
    animation-delay: -20s;
}

.aurora-grain {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 18% 22%, rgba(255, 255, 255, 0.05) 0, transparent 1.5px),
        radial-gradient(circle at 78% 64%, rgba(255, 255, 255, 0.04) 0, transparent 1.5px);
    background-size: 280px 280px;
    opacity: 0.4;
    pointer-events: none;
}

@keyframes drift {
    0%   { transform: translate3d(0, 0, 0) scale(1); }
    50%  { transform: translate3d(40px, -30px, 0) scale(1.08); }
    100% { transform: translate3d(-30px, 40px, 0) scale(0.96); }
}

/* ----------- Layout primitives ----------- */
.screen {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    z-index: 1;
}

.screen.boot {
    align-items: center;
    justify-content: center;
    padding: 24px;
}

@media (prefers-reduced-motion: reduce) {
    .aurora-blob { animation: none !important; }
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        transition-duration: 0.001ms !important;
    }
}
