/* ==========================================================================
   MIRUREAD — OBSIDIAN BLUE DESIGN TOKENS
   ========================================================================== */

:root {
    color-scheme: dark;

    /* ----------------------------------------------------------------------
       Core backgrounds
       ---------------------------------------------------------------------- */

    --bg: #0b0d16;
    --bg-soft: #10131f;
    --bg-deep: #080a12;
    --bg-reader: #050609;

    --surface: rgba(20, 24, 39, 0.82);
    --surface-solid: #151927;
    --surface-soft: #191e2e;
    --surface-light: rgba(31, 37, 57, 0.92);
    --surface-hover: #22283a;
    --surface-active: #272e43;
    --surface-overlay: rgba(15, 18, 30, 0.88);
    --surface-glass: rgba(18, 22, 36, 0.76);

    /* ----------------------------------------------------------------------
       Typography
       ---------------------------------------------------------------------- */

    --text: #f5f7ff;
    --text-soft: #b8bfd2;
    --text-muted: #7f879d;
    --text-faint: #5f6679;
    --text-inverse: #0a0c14;

    /* ----------------------------------------------------------------------
       Signature accent
       One purple / blue family, without neon glow
       ---------------------------------------------------------------------- */

    --accent: #746df7;
    --accent-hover: #8983ff;
    --accent-active: #625ce0;
    --accent-light: #aaa7ff;
    --accent-dark: #514bbf;

    --purple: #766df2;
    --purple-light: #aaa7ff;
    --indigo: #6675ed;
    --blue: #6d8ee8;

    --accent-rgb: 116, 109, 247;
    --accent-blue-rgb: 109, 142, 232;

    --accent-gradient: linear-gradient(
        135deg,
        #796ff2 0%,
        #6d75ec 48%,
        #648add 100%
    );

    --accent-gradient-hover: linear-gradient(
        135deg,
        #8980fa 0%,
        #7881f3 48%,
        #7197e6 100%
    );

    --accent-gradient-wide: linear-gradient(
        110deg,
        #8174ee 0%,
        #716fe8 42%,
        #647fdc 72%,
        #6090d8 100%
    );

    --accent-gradient-muted: linear-gradient(
        135deg,
        rgba(121, 111, 242, 0.24) 0%,
        rgba(100, 138, 221, 0.12) 100%
    );

    --accent-subtle: rgba(var(--accent-rgb), 0.12);
    --accent-medium: rgba(var(--accent-rgb), 0.2);
    --accent-border: rgba(148, 143, 255, 0.32);
    --accent-focus: rgba(var(--accent-rgb), 0.18);

    /* ----------------------------------------------------------------------
       Semantic colors
       Kept restrained and reserved for status information
       ---------------------------------------------------------------------- */

    --success: #66b99a;
    --success-soft: rgba(102, 185, 154, 0.13);
    --success-border: rgba(102, 185, 154, 0.3);

    --warning: #d7aa63;
    --warning-soft: rgba(215, 170, 99, 0.13);
    --warning-border: rgba(215, 170, 99, 0.3);

    --danger: #d87580;
    --danger-soft: rgba(216, 117, 128, 0.13);
    --danger-border: rgba(216, 117, 128, 0.3);

    --info: #70a0d8;
    --info-soft: rgba(112, 160, 216, 0.13);
    --info-border: rgba(112, 160, 216, 0.3);

    --green: var(--success);
    --pink: var(--danger);
    --heart: #d87c91;

    /* ----------------------------------------------------------------------
       Borders
       ---------------------------------------------------------------------- */

    --border: rgba(255, 255, 255, 0.075);
    --border-soft: rgba(255, 255, 255, 0.05);
    --border-strong: rgba(255, 255, 255, 0.13);
    --border-accent: rgba(145, 139, 255, 0.3);

    /* ----------------------------------------------------------------------
       Shadows
       No luminous neon shadows
       ---------------------------------------------------------------------- */

    --shadow-xs: 0 2px 8px rgba(0, 0, 0, 0.16);
    --shadow-sm: 0 8px 22px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 16px 38px rgba(0, 0, 0, 0.26);
    --shadow-lg: 0 28px 70px rgba(0, 0, 0, 0.34);
    --shadow-xl: 0 42px 110px rgba(0, 0, 0, 0.44);

    --shadow: var(--shadow-lg);
    --shadow-purple: 0 18px 42px rgba(60, 56, 135, 0.25);
    --accent-glow: 0 12px 32px rgba(70, 67, 160, 0.22);
    --heart-glow: 0 10px 24px rgba(125, 62, 77, 0.2);

    /* ----------------------------------------------------------------------
       Layout
       ---------------------------------------------------------------------- */

    --sidebar-width: 88px;
    --header-height: 88px;
    --content-max-width: none;
    --content-padding: clamp(20px, 3vw, 52px);
    --section-gap: clamp(42px, 5vw, 72px);

    /* ----------------------------------------------------------------------
       Radius
       ---------------------------------------------------------------------- */

    --radius-xs: 8px;
    --radius-sm: 11px;
    --radius-md: 16px;
    --radius-lg: 22px;
    --radius-xl: 28px;
    --radius-2xl: 34px;
    --radius-pill: 999px;

    /* ----------------------------------------------------------------------
       Timing
       ---------------------------------------------------------------------- */

    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-spring: cubic-bezier(0.18, 1.18, 0.34, 1);
    --spring: var(--ease-spring);

    --duration-fast: 140ms;
    --duration-medium: 240ms;
    --duration-slow: 420ms;

    /* ----------------------------------------------------------------------
       Backward compatibility aliases
       ---------------------------------------------------------------------- */

    --bg-primary: var(--bg);
    --bg-secondary: var(--bg-soft);
    --bg-surface: var(--surface-solid);
    --bg-elevated: var(--surface-light);
    --bg-card: var(--surface-solid);

    --accent-hover-color: var(--accent-hover);
    --accent-dark-color: var(--accent-dark);

    --text-primary: var(--text);
    --text-secondary: var(--text-soft);
    --text-tertiary: var(--text-muted);

    --border-hover: var(--border-strong);
    --glass-bg: var(--surface-glass);
    --glass-border: var(--border);
}

/* ==========================================================================
   RESET
   ========================================================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html {
    min-height: 100%;
    background: var(--bg);
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-height) + 18px);
}

body {
    min-width: 320px;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;

    background:
        radial-gradient(
            circle at 14% -8%,
            rgba(91, 86, 178, 0.18),
            transparent 30%
        ),
        radial-gradient(
            circle at 92% 12%,
            rgba(73, 105, 168, 0.13),
            transparent 28%
        ),
        linear-gradient(
            180deg,
            #111522 0%,
            var(--bg) 38%,
            #0a0c14 100%
        );

    color: var(--text);

    font-family:
        "Inter",
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    font-size: 16px;
    line-height: 1.5;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;

    background:
        linear-gradient(
            rgba(255, 255, 255, 0.012) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(255, 255, 255, 0.01) 1px,
            transparent 1px
        );

    background-size: 72px 72px;
    opacity: 0.2;
}

button,
input,
select,
textarea {
    color: inherit;
    font: inherit;
}

button {
    border: 0;
}

button,
select,
label,
[role="button"] {
    touch-action: manipulation;
}

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

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

img {
    height: auto;
}

input,
select,
textarea {
    min-width: 0;
}

input::placeholder,
textarea::placeholder {
    color: var(--text-muted);
    opacity: 1;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid var(--accent-light);
    outline-offset: 3px;
}

::selection {
    color: #ffffff;
    background: rgba(var(--accent-rgb), 0.58);
}

/* ==========================================================================
   SCROLLBARS
   ========================================================================== */

* {
    scrollbar-width: thin;
    scrollbar-color: rgba(153, 160, 185, 0.25) transparent;
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    border: 2px solid transparent;
    border-radius: var(--radius-pill);
    background: rgba(153, 160, 185, 0.25);
    background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(170, 177, 205, 0.4);
    background-clip: padding-box;
}

/* ==========================================================================
   UTILITY STATES
   ========================================================================== */

[hidden] {
    display: none !important;
}

.is-visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.is-disabled,
:disabled {
    cursor: not-allowed;
    opacity: 0.58;
}

@media (max-width: 760px) {
    :root {
        --header-height: 72px;
        --content-padding: 14px;
        --section-gap: 40px;
        --radius-xl: 23px;
        --radius-2xl: 27px;
    }

    html {
        scroll-behavior: auto;
    }

    body {
        background:
            linear-gradient(
                180deg,
                #121625 0%,
                #0c0f19 42%,
                #090b12 100%
            );

        overscroll-behavior-y: none;
    }

    body::before {
        display: none;
    }
}
