/* UKI Obsidian Glass UI — shared visual language for operational guides. */
:root {
    color-scheme: dark;
    --bg-color: #050506;
    --content-bg: rgba(12, 12, 14, 0.94);
    --text-main: #d7d7dc;
    --text-muted: #8f8f98;
    --text-strong: #ffffff;
    --border-color: rgba(255, 255, 255, 0.11);
    --brand-color: #f4f4f5;
    --brand-bg: rgba(255, 255, 255, 0.075);
    --quote-bg: rgba(255, 255, 255, 0.045);
    --quote-text: #c3c3ca;
    --quote-border: rgba(255, 255, 255, 0.45);
    --shadow-light: rgba(0, 0, 0, 0.18);
    --shadow-medium: rgba(0, 0, 0, 0.42);
    --shadow-heavy: rgba(0, 0, 0, 0.68);
    --landing-bg: #050506;
    --img-border: rgba(255, 255, 255, 0.12);
    --modal-bg: rgba(0, 0, 0, 0.92);
    --sidebar-overlay: rgba(0, 0, 0, 0.76);
    --danger-text: #ff6b6b;
    --glass: rgba(20, 20, 23, 0.68);
    --glass-strong: rgba(22, 22, 25, 0.86);
    --line-bright: rgba(255, 255, 255, 0.18);
    --radius-sm: 12px;
    --radius-md: 20px;
    --radius-lg: 28px;
}

[data-theme='light'] {
    color-scheme: light;
    --bg-color: #ececee;
    --content-bg: rgba(250, 250, 251, 0.94);
    --text-main: #29292d;
    --text-muted: #66666e;
    --text-strong: #08080a;
    --border-color: rgba(0, 0, 0, 0.11);
    --brand-color: #111114;
    --brand-bg: rgba(0, 0, 0, 0.055);
    --quote-bg: rgba(255, 255, 255, 0.62);
    --quote-text: #4a4a51;
    --quote-border: rgba(0, 0, 0, 0.38);
    --shadow-light: rgba(0, 0, 0, 0.05);
    --shadow-medium: rgba(0, 0, 0, 0.12);
    --shadow-heavy: rgba(0, 0, 0, 0.22);
    --landing-bg: #ececee;
    --img-border: rgba(0, 0, 0, 0.11);
    --modal-bg: rgba(8, 8, 10, 0.9);
    --sidebar-overlay: rgba(0, 0, 0, 0.42);
    --danger-text: #c73535;
    --glass: rgba(255, 255, 255, 0.63);
    --glass-strong: rgba(255, 255, 255, 0.84);
    --line-bright: rgba(255, 255, 255, 0.72);
}

html { background: var(--bg-color); }

body {
    background:
        radial-gradient(circle at 82% 4%, rgba(255,255,255,.075), transparent 28rem),
        radial-gradient(circle at 13% 84%, rgba(255,255,255,.045), transparent 34rem),
        var(--bg-color);
    letter-spacing: .006em;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: .22;
    background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: linear-gradient(to bottom, black, transparent 72%);
}

.landing-page {
    isolation: isolate;
    overflow: hidden;
    min-height: 100svh;
    background:
        radial-gradient(circle at 82% 4%, rgba(255,255,255,.075), transparent 28rem),
        radial-gradient(circle at 13% 84%, rgba(255,255,255,.045), transparent 34rem),
        var(--bg-color);
    padding: clamp(72px, 10vh, 118px) clamp(24px, 6vw, 84px);
}

.landing-page::before,
.landing-page::after {
    content: "";
    position: absolute;
    z-index: -1;
    border-radius: 50%;
    pointer-events: none;
}

.landing-page::before {
    width: min(62vw, 760px);
    aspect-ratio: 1;
    top: -35%;
    right: -15%;
    border: 1px solid rgba(255,255,255,.12);
    box-shadow: inset 0 0 100px rgba(255,255,255,.035), 0 0 120px rgba(255,255,255,.025);
}

.landing-page::after {
    width: min(42vw, 520px);
    aspect-ratio: 1;
    bottom: -34%;
    left: -12%;
    background: radial-gradient(circle at 60% 35%, rgba(255,255,255,.10), transparent 62%);
    filter: blur(2px);
}

.landing-title {
    max-width: 980px;
    margin-bottom: 18px;
    border: 0;
    font-size: clamp(2.55rem, 6vw, 5.6rem);
    line-height: .98;
    letter-spacing: -.06em;
    font-weight: 720;
    background: linear-gradient(125deg, var(--text-strong) 12%, var(--text-muted) 88%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.landing-subtitle {
    max-width: 720px;
    margin: 0 0 42px;
    color: var(--text-muted);
    font-size: clamp(1rem, 2vw, 1.2rem);
}

.landing-cards {
    width: min(100%, 1040px);
    gap: 18px;
}

.landing-card,
.landing-symptoms,
.sidebar,
.theme-toggle,
.menu-toggle,
.return-home-float,
.back-to-top {
    background: var(--glass);
    border: 1px solid var(--border-color);
    box-shadow: inset 0 1px 0 var(--line-bright), 0 18px 60px var(--shadow-medium);
    -webkit-backdrop-filter: blur(24px) saturate(125%);
    backdrop-filter: blur(24px) saturate(125%);
}

.landing-card {
    position: relative;
    overflow: hidden;
    min-height: 230px;
    border-radius: var(--radius-lg);
    padding: 30px;
    transform: translateZ(0);
}

.landing-card::after {
    content: "↗";
    position: absolute;
    top: 24px;
    right: 26px;
    color: var(--text-muted);
    font-size: 1.2rem;
    transition: transform .3s ease, color .3s ease;
}

.landing-card:hover {
    border-color: rgba(255,255,255,.28);
    background: var(--glass-strong);
    transform: translateY(-5px);
    box-shadow: inset 0 1px 0 var(--line-bright), 0 28px 80px var(--shadow-heavy);
}

.landing-card:hover::after { transform: translate(3px,-3px); color: var(--text-strong); }
.card-logo { width: 72px; height: 72px; border-radius: 18px; filter: grayscale(1) contrast(1.06); }
.card-icon { font-size: 3.2rem; filter: grayscale(1); }
.card-title { margin-top: 26px; color: var(--text-strong); font-size: clamp(1.2rem, 2vw, 1.55rem); letter-spacing: -.025em; }
.card-desc { color: var(--text-muted); max-width: 38rem; }

.landing-symptoms {
    width: min(100%, 1040px);
    margin-top: 18px;
    border-radius: var(--radius-md);
    padding: 22px;
}

.landing-symptoms h2 { margin-top: 0; border: 0; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--text-muted); }
.symptom-link { background: rgba(255,255,255,.04); border-radius: 999px; color: var(--text-main); }
.symptom-link:hover { color: var(--text-strong); border-color: rgba(255,255,255,.3); }

.sidebar {
    width: 284px;
    margin: 14px;
    height: calc(100vh - 28px);
    border-radius: var(--radius-md);
    padding: 26px 18px;
}

.sidebar h3 { padding: 0 10px 14px; margin: 0 0 12px; border-bottom: 1px solid var(--border-color); font-size: .76rem; letter-spacing: .15em; text-transform: uppercase; }
.sidebar a { border-radius: 10px; padding: 9px 11px; color: var(--text-muted); }
.sidebar a:hover { padding-left: 14px; color: var(--text-strong); background: rgba(255,255,255,.055); }
.sidebar a.active { color: var(--text-strong); background: rgba(255,255,255,.10); box-shadow: inset 0 1px 0 var(--line-bright); }

.content { margin-left: 312px; background: transparent; box-shadow: none; }
.content-inner { max-width: 1060px; padding: clamp(54px, 7vw, 90px) clamp(28px, 7vw, 92px) 120px; }
.page-section { padding: clamp(24px, 5vw, 52px); border: 1px solid var(--border-color); border-radius: var(--radius-lg); background: var(--content-bg); box-shadow: 0 30px 90px var(--shadow-medium); }
.page-section > h1 { font-size: clamp(2.1rem, 4vw, 3.8rem); line-height: 1.04; letter-spacing: -.05em; border: 0; padding: 0; margin-bottom: 22px; }
h2 { scroll-margin-top: 34px; margin-top: 3.2em; font-size: clamp(1.35rem, 2.2vw, 1.8rem); letter-spacing: -.025em; border-color: var(--border-color); }
.page-section > h3 { color: var(--text-strong); margin-top: 2.4em; }
p, li { line-height: 1.78; }

.maintenance-strip { border-radius: 999px; padding: 8px 13px; background: var(--brand-bg); box-shadow: inset 0 1px 0 var(--line-bright); font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; }
.quick-links { padding: 13px; border: 1px solid var(--border-color); border-radius: 16px; background: rgba(255,255,255,.025); }
.quick-links a, .symptom-link, .route-link { color: var(--text-main); border-color: var(--border-color); background: rgba(255,255,255,.045); }
.quick-links a:hover, .route-link:hover { color: var(--text-strong); background: rgba(255,255,255,.11); border-color: rgba(255,255,255,.25); }

.route-panel, .route-step, .check-card, .report-template, .info-panel, blockquote, .alert-troubleshoot {
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    box-shadow: inset 0 1px 0 var(--line-bright);
}

.route-panel, .check-card { background: rgba(255,255,255,.035); }
.route-step, .report-template { background: rgba(255,255,255,.025); }
.info-panel { background: rgba(255,255,255,.05); border-left: 1px solid var(--border-color); }
blockquote { border-left: 3px solid var(--quote-border); background: var(--quote-bg); }
.alert-troubleshoot { background: rgba(255,107,107,.055); border-left: 3px solid var(--danger-text); }

img.zoomable {
    border-radius: var(--radius-sm);
    padding: 6px;
    background: rgba(255,255,255,.04);
    box-shadow: 0 20px 55px var(--shadow-medium), inset 0 1px 0 var(--line-bright);
}
[data-theme='dark'] img.zoomable { filter: brightness(.9) saturate(.86); }
img.zoomable:hover { transform: translateY(-2px) scale(1.006); }
.modal-content { border-radius: 16px; border: 1px solid rgba(255,255,255,.15); }

.tools-area { top: 18px; right: 20px; }
.theme-toggle, .return-home-float, .back-to-top, .menu-toggle { color: var(--text-main); }
.theme-toggle:hover, .return-home-float:hover, .back-to-top:hover { transform: translateY(-2px); color: var(--text-strong); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(127,127,133,.38); border: 3px solid transparent; border-radius: 999px; background-clip: padding-box; }
::selection { color: var(--bg-color); background: var(--text-strong); }

@media (max-width: 1024px) {
    .content { margin-left: 0; }
    .sidebar { margin: 0; height: 100vh; border-radius: 0 22px 22px 0; transform: translateX(calc(-100% - 20px)); }
    .sidebar.open { transform: translateX(0); }
    .menu-toggle { display: flex; align-items: center; justify-content: center; top: 16px; left: 16px; width: 44px; height: 44px; padding: 0; border-radius: 50%; }
    .tools-area { top: 16px; right: 16px; }
}

@media (max-width: 720px) {
    .landing-page { align-items: flex-start; padding: 92px 18px 44px; }
    .landing-cards, .route-grid, .check-grid { grid-template-columns: 1fr; }
    .landing-card { min-height: 190px; padding: 24px; border-radius: 22px; }
    .landing-title { font-size: clamp(2.35rem, 13vw, 4rem); }
    .content-inner { padding: 86px 12px 70px; }
    .page-section { padding: 26px 18px 48px; border-radius: 22px; }
    .page-section > h1 { font-size: 2.2rem; }
    .quick-links { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
    .quick-links a { flex: 0 0 auto; }
}

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