/* ============================================================
   ClipNest static site — tokens / base / layout / components
   ============================================================ */

:root {
    --bg: #f6f7f9;
    --bg-alt: #eef0f4;
    --surface: #ffffff;
    --surface-2: #f2f4f8;
    --border: #e3e6ec;
    --text: #16181d;
    --muted: #63697a;
    --brand: #4f7cff;
    --brand-ink: #ffffff;
    --brand-soft: rgba(79, 124, 255, .12);
    --header-bg: rgba(255, 255, 255, .72);
    --shadow-sm: 0 1px 2px rgba(18, 22, 33, .06), 0 1px 1px rgba(18, 22, 33, .04);
    --shadow-md: 0 6px 20px rgba(18, 22, 33, .08);
    --shadow-lg: 0 18px 50px rgba(18, 22, 33, .14);
    --radius: 14px;
    --radius-lg: 20px;
    --wrap: 1160px;
    --ease: cubic-bezier(.22, .61, .36, 1);
}

[data-theme="dark"] {
    --bg: #0f1117;
    --bg-alt: #141722;
    --surface: #171a24;
    --surface-2: #1d2130;
    --border: #272c3b;
    --text: #e8eaf0;
    --muted: #949cb0;
    --brand: #7ea2ff;
    --brand-ink: #10131b;
    --brand-soft: rgba(126, 162, 255, .16);
    --header-bg: rgba(15, 17, 23, .72);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-md: 0 6px 20px rgba(0, 0, 0, .45);
    --shadow-lg: 0 18px 50px rgba(0, 0, 0, .55);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
                 "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", Roboto, Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    transition: background-color .3s var(--ease), color .3s var(--ease);
}

h1, h2, h3 { line-height: 1.25; margin: 0; letter-spacing: -.01em; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; }

svg:not(.brand-mark) {
    width: 20px; height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: 780px; }
.center { text-align: center; }

.skip-link {
    position: absolute; left: -9999px; top: 0;
    background: var(--brand); color: var(--brand-ink);
    padding: 10px 16px; border-radius: 0 0 10px 0; z-index: 100;
}
.skip-link:focus { left: 0; }

/* ---------------- Header ---------------- */

.site-header {
    position: sticky; top: 0; z-index: 50;
    background: var(--header-bg);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid transparent;
    transition: border-color .25s var(--ease), background-color .3s var(--ease);
}
.site-header.is-stuck { border-bottom-color: var(--border); }

.header-inner { display: flex; align-items: center; gap: 20px; height: 64px; }

.brand { display: inline-flex; align-items: center; gap: 10px; margin-right: auto; }
.brand-mark { width: 28px; height: 28px; color: var(--brand); }
.brand-name { font-weight: 650; font-size: 17px; letter-spacing: .01em; }

.nav { display: flex; gap: 26px; }
.nav a { color: var(--muted); font-size: 15px; transition: color .2s var(--ease); }
.nav a:hover { color: var(--text); }

.header-actions { display: flex; align-items: center; gap: 10px; }

.icon-btn {
    display: inline-grid; place-items: center;
    width: 36px; height: 36px;
    border: 1px solid var(--border); border-radius: 10px;
    background: var(--surface); color: var(--text);
    cursor: pointer;
    transition: background-color .2s var(--ease), border-color .2s var(--ease), transform .15s var(--ease);
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn:active { transform: scale(.94); }
.lang-btn { font-size: 14px; font-weight: 600; }
.lang-current { line-height: 1; }

.theme-btn .ico-moon { display: none; }
[data-theme="dark"] .theme-btn .ico-sun { display: none; }
[data-theme="dark"] .theme-btn .ico-moon { display: block; }

/* ---------------- Buttons ---------------- */

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 11px 18px;
    border: 1px solid transparent; border-radius: 12px;
    font-size: 15px; font-weight: 550;
    cursor: pointer;
    transition: transform .15s var(--ease), box-shadow .2s var(--ease),
                background-color .2s var(--ease), border-color .2s var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-sm { padding: 8px 14px; font-size: 14px; border-radius: 10px; }

.btn-primary {
    background: var(--brand); color: var(--brand-ink);
    box-shadow: 0 6px 18px color-mix(in srgb, var(--brand) 30%, transparent);
}
.btn-primary:hover { box-shadow: 0 10px 26px color-mix(in srgb, var(--brand) 38%, transparent); }

.btn-ghost { background: var(--surface); border-color: var(--border); color: var(--text); }
.btn-ghost:hover { background: var(--surface-2); }

.btn .ico { width: 18px; height: 18px; fill: currentColor; stroke: none; }

/* ---------------- Hero ---------------- */

.hero { padding: 72px 0 40px; }
.hero-inner {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 520px);
    gap: 56px; align-items: center;
}

.pill {
    display: inline-block;
    padding: 5px 12px; margin-bottom: 18px;
    border-radius: 999px;
    background: var(--brand-soft); color: var(--brand);
    font-size: 13px; font-weight: 600; letter-spacing: .02em;
}

.hero-title { font-size: clamp(32px, 5.2vw, 52px); font-weight: 700; }
.hero-sub { margin-top: 16px; max-width: 30em; color: var(--muted); font-size: 17px; }

.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-cta.center { justify-content: center; }
.hero-note { margin-top: 14px; color: var(--muted); font-size: 13.5px; }

/* Hero 里的产品面板 */
.panel {
    border: 1px solid var(--border); border-radius: var(--radius-lg);
    background: var(--surface); box-shadow: var(--shadow-lg);
    overflow: hidden;
}
.panel-head {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 16px; border-bottom: 1px solid var(--border);
    background: var(--surface-2);
}
.panel-title { font-weight: 650; font-size: 15px; }
.panel-search {
    display: flex; align-items: center; gap: 8px;
    flex: 1; padding: 7px 12px;
    border: 1px solid var(--border); border-radius: 10px;
    background: var(--surface); color: var(--muted); font-size: 13px;
}
.panel-search svg { width: 16px; height: 16px; }

.panel-list { list-style: none; margin: 0; padding: 8px; }
.panel-list li {
    display: flex; align-items: center; gap: 10px;
    padding: 10px; border-radius: 10px; font-size: 14px;
}
.panel-list li + li { border-top: 1px solid var(--border); border-radius: 0; }
.panel-list .txt {
    flex: 1; min-width: 0;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.panel-list .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }
.panel-list time { color: var(--muted); font-size: 12.5px; }

.tag {
    flex: none; padding: 2px 8px; border-radius: 7px;
    font-size: 12px; font-weight: 600;
}
.tag-text  { background: rgba(79, 124, 255, .12); color: #4f7cff; }
.tag-link  { background: rgba(56, 189, 148, .14);  color: #1f9b76; }
.tag-color { background: rgba(244, 162, 97, .16);  color: #c2762a; }
.tag-file  { background: rgba(148, 130, 255, .14); color: #6d5bd0; }
[data-theme="dark"] .tag-text  { color: #9db6ff; }
[data-theme="dark"] .tag-link  { color: #4fd1a5; }
[data-theme="dark"] .tag-color { color: #f0b072; }
[data-theme="dark"] .tag-file  { color: #b3a4ff; }

.panel-foot {
    display: flex; align-items: center; gap: 8px;
    padding: 12px 16px; border-top: 1px solid var(--border);
    background: var(--surface-2); color: var(--muted); font-size: 12.5px;
}
kbd {
    padding: 2px 7px; border: 1px solid var(--border); border-bottom-width: 2px;
    border-radius: 6px; background: var(--surface);
    font-family: inherit; font-size: 11.5px; color: var(--text);
}
.panel-foot kbd + span { margin-right: 8px; }

/* ---------------- Sections ---------------- */

.section { padding: 76px 0; }
.section-alt { background: var(--bg-alt); }

.section-head { margin-bottom: 36px; }
.section-head h2 { font-size: clamp(24px, 3.4vw, 34px); font-weight: 700; }
.section-head p { margin-top: 10px; color: var(--muted); }

.grid { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.card {
    padding: 24px;
    border: 1px solid var(--border); border-radius: var(--radius);
    background: var(--surface); box-shadow: var(--shadow-sm);
    transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: color-mix(in srgb, var(--brand) 32%, var(--border)); }
.card-ico {
    display: grid; place-items: center;
    width: 42px; height: 42px; margin-bottom: 14px;
    border-radius: 12px; background: var(--brand-soft); color: var(--brand);
}
.card h3 { font-size: 16.5px; font-weight: 650; }
.card p { margin-top: 8px; color: var(--muted); font-size: 14.5px; }

/* ---------------- Gallery ---------------- */

.gallery { display: grid; gap: 16px; }
.gal-viewport {
    position: relative;
    border: 1px solid var(--border); border-radius: var(--radius-lg);
    background: var(--surface); box-shadow: var(--shadow-md);
    padding: 18px;
}
.gal-slide { display: none; margin: 0; }
.gal-slide.is-active { display: block; }
.gal-slide figcaption { margin-top: 14px; text-align: center; color: var(--muted); font-size: 14px; }

.mock {
    border: 1px solid var(--border); border-radius: 14px;
    background: var(--surface-2); overflow: hidden;
}
.mock-bar { display: flex; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.mock-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--border); }
.mock-body { padding: 18px; display: grid; gap: 12px; }
.mock-row { height: 12px; width: var(--w, 70%); border-radius: 6px; background: var(--border); }
.mock-search { height: 32px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); }
.mock-chips { display: flex; gap: 8px; }
.mock-chips span { width: 58px; height: 22px; border-radius: 999px; background: var(--brand-soft); }
.mock-toggle { height: 20px; width: 96px; border-radius: 999px; background: var(--brand); opacity: .7; justify-self: start; }

.gal-controls { display: flex; align-items: center; justify-content: center; gap: 14px; }
.gal-btn {
    width: 38px; height: 38px; font-size: 20px; line-height: 1;
    border: 1px solid var(--border); border-radius: 10px;
    background: var(--surface); color: var(--text); cursor: pointer;
    transition: background-color .2s var(--ease), transform .15s var(--ease);
}
.gal-btn:hover { background: var(--surface-2); }
.gal-btn:active { transform: scale(.94); }
.gal-dots { display: flex; gap: 8px; }
.gal-dot {
    width: 8px; height: 8px; padding: 0;
    border: 0; border-radius: 999px; background: var(--border); cursor: pointer;
    transition: width .25s var(--ease), background-color .25s var(--ease);
}
.gal-dot.is-active { width: 24px; background: var(--brand); }

/* ---------------- FAQ ---------------- */

.faq { display: grid; gap: 12px; }
.faq-item {
    border: 1px solid var(--border); border-radius: var(--radius);
    background: var(--surface); overflow: hidden;
    transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.faq-item[open] { border-color: color-mix(in srgb, var(--brand) 30%, var(--border)); box-shadow: var(--shadow-sm); }
.faq-item summary {
    display: flex; align-items: center; gap: 12px;
    padding: 16px 18px; cursor: pointer;
    font-weight: 600; font-size: 15.5px; list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary span { flex: 1; }
.chev {
    flex: none; width: 9px; height: 9px;
    border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
    transform: rotate(45deg); transition: transform .25s var(--ease);
}
.faq-item[open] .chev { transform: rotate(-135deg); }
.faq-body { padding: 0 18px 18px; color: var(--muted); font-size: 14.5px; }

/* ---------------- CTA / Footer ---------------- */

.cta { padding-bottom: 96px; }
.cta h2 { font-size: clamp(24px, 3.4vw, 34px); font-weight: 700; }
.cta p { margin-top: 10px; color: var(--muted); }

.site-footer { border-top: 1px solid var(--border); padding: 40px 0; background: var(--surface); }
.footer-inner { display: grid; gap: 14px; }
.footer-brand .brand-name { font-size: 16px; }
.footer-brand p { margin-top: 6px; color: var(--muted); font-size: 14px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 20px; }
.footer-links a { color: var(--muted); font-size: 14.5px; }
.footer-links a:hover { color: var(--brand); }
.footer-copy { color: var(--muted); font-size: 13px; }

/* ---------------- Toast ---------------- */

.toast {
    position: fixed; left: 50%; bottom: 28px; z-index: 80;
    transform: translate(-50%, 16px);
    padding: 10px 16px; border-radius: 12px;
    background: var(--text); color: var(--bg);
    font-size: 14px; box-shadow: var(--shadow-md);
    opacity: 0; pointer-events: none;
    transition: opacity .25s var(--ease), transform .25s var(--ease);
}
.toast.is-show { opacity: 1; transform: translate(-50%, 0); }

/* ---------------- Responsive ---------------- */

@media (max-width: 960px) {
    .hero-inner { grid-template-columns: 1fr; gap: 40px; }
    .hero-copy { text-align: left; }
    .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .nav { display: none; }
}

@media (max-width: 620px) {
    .hero { padding: 48px 0 24px; }
    .section { padding: 56px 0; }
    .grid-3 { grid-template-columns: 1fr; }
    .header-actions .btn-sm { display: none; }
    .hero-cta .btn { flex: 1; }
    .wrap { padding: 0 18px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
