/* ============================================================
   志睿源官网 · base.css
   设计变量 / 重置 / 排版 / 通用容器
   ============================================================ */

:root {
    /* 主色 */
    --brand: #1D4ED8;
    --brand-dark: #1E3A8A;
    --brand-hover: #1741B6;
    --brand-soft: #EFF4FF;

    /* 文字 */
    --ink: #0F172A;
    --ink-2: #334155;
    --ink-3: #475569;
    --muted: #64748B;
    --muted-2: #94A3B8;

    /* 背景与描边 */
    --bg: #FFFFFF;
    --surface: #F8FAFC;
    --surface-2: #F1F5F9;
    --line: #E2E8F0;
    --line-2: #EDF1F7;

    /* 状态色 */
    --ok-bg: #E1F5EE;
    --ok-fg: #0F6E56;
    --doing-bg: #FAEEDA;
    --doing-fg: #854F0B;
    --plan-bg: #F1F5F9;
    --plan-fg: #64748B;
    --hot: #C2410C;

    /* 尺寸 */
    --maxw: 1120px;
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --header-h: 64px;

    --shadow-sm: 0 1px 2px rgba(15, 23, 42, .04);
    --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 10px 30px -18px rgba(15, 23, 42, .18);
    --shadow-lg: 0 2px 4px rgba(15, 23, 42, .04), 0 22px 48px -24px rgba(15, 23, 42, .28);

    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

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

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

body {
    margin: 0;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.75;
    color: var(--ink-2);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4,
h5 {
    margin: 0;
    color: var(--ink);
    font-weight: 650;
    line-height: 1.3;
    letter-spacing: -.01em;
}

h1 {
    font-size: 40px;
    line-height: 1.2;
    letter-spacing: -.02em;
}

h2 {
    font-size: 28px;
}

h3 {
    font-size: 19px;
}

h4 {
    font-size: 16px;
}

p {
    margin: 0 0 1em;
}

a {
    color: var(--brand);
    text-decoration: none;
    transition: color .15s ease;
}

a:hover {
    color: var(--brand-hover);
}

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

ul,
ol {
    margin: 0;
    padding: 0;
}

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

code {
    font-family: var(--mono);
    font-size: .875em;
    background: var(--surface-2);
    padding: .15em .4em;
    border-radius: 5px;
    color: var(--ink);
}

pre {
    margin: 0 0 1.25em;
    padding: 18px 20px;
    background: #0F172A;
    border-radius: var(--radius);
    overflow-x: auto;
    line-height: 1.65;
}

pre code {
    background: none;
    padding: 0;
    color: #E2E8F0;
    font-size: 13.5px;
}

hr {
    border: 0;
    border-top: 1px solid var(--line);
    margin: 32px 0;
}

::selection {
    background: #DBEAFE;
    color: var(--ink);
}

/* ── 布局容器 ─────────────────────────────────────────── */
.wrap {
    width: 100%;
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 24px;
}

.page {
    padding: 56px 0 88px;
}

.page--tight {
    padding: 40px 0 64px;
}

.section {
    padding: 72px 0;
}

.section--alt {
    background: var(--surface);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.section--tight {
    padding: 52px 0;
}

/* ── 通用小组件 ───────────────────────────────────────── */
.eyebrow {
    display: inline-block;
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--brand);
    margin-bottom: 12px;
}

.lead {
    font-size: 17.5px;
    line-height: 1.8;
    color: var(--ink-3);
    max-width: 720px;
}

.muted {
    color: var(--muted);
}

.small {
    font-size: 13.5px;
}

.center {
    text-align: center;
}

.center .lead {
    margin-left: auto;
    margin-right: auto;
}

.section-head {
    margin-bottom: 36px;
}

.section-head--center {
    text-align: center;
}

.section-head--center .lead {
    margin-left: auto;
    margin-right: auto;
}

.section-head h2 {
    margin-bottom: 10px;
}

.grid {
    display: grid;
    gap: 20px;
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.stack {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.row--between {
    justify-content: space-between;
}

.row--wrap {
    flex-wrap: wrap;
}

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

.skip-link {
    position: absolute;
    left: 16px;
    top: -60px;
    z-index: 999;
    background: var(--brand);
    color: #fff;
    padding: 10px 16px;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    transition: top .2s;
}

.skip-link:focus {
    top: 0;
    color: #fff;
}

/* ── 占位与加载 ───────────────────────────────────────── */
.skeleton {
    background: linear-gradient(90deg, var(--surface-2) 25%, #E8EEF6 37%, var(--surface-2) 63%);
    background-size: 400% 100%;
    animation: sk 1.3s ease infinite;
    border-radius: var(--radius-sm);
}

@keyframes sk {
    0% {
        background-position: 100% 50%
    }

    100% {
        background-position: 0 50%
    }
}

.empty {
    padding: 56px 24px;
    text-align: center;
    color: var(--muted);
    background: var(--surface);
    border: 1px dashed var(--line);
    border-radius: var(--radius-lg);
}

.empty__title {
    color: var(--ink-2);
    font-weight: 600;
    margin-bottom: 6px;
}

/* ── 响应式 ───────────────────────────────────────────── */
@media (max-width: 1024px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    body {
        font-size: 15.5px;
    }

    .wrap {
        padding: 0 18px;
    }

    h1 {
        font-size: 29px;
    }

    h2 {
        font-size: 23px;
    }

    .page {
        padding: 32px 0 64px;
    }

    .section {
        padding: 48px 0;
    }

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}
