/* PairClip marketing site — light, WeChat-IME layout grammar.
   Color tokens match docs/ui/design-tokens.md (light). Gate: G10. */

:root {
    --canvas: #ffffff;
    --band: #f7f7f8;
    --sidebar: #f9f9f9;
    --border: #ededed;
    --text: #1a1c1f;
    --text-2: #6b6c6d;
    --text-3: #898a8b;
    --accent: #339cff;
    --accent-fill: rgba(51, 156, 255, 0.12);
    --ready: #00a240;
    --shadow: 0 18px 60px rgba(26, 28, 31, 0.08);
    --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
        "Noto Sans SC", "Microsoft YaHei", "Segoe UI", sans-serif;
    --header-h: 56px;
    --max: 1080px;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font);
    background: var(--canvas);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

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

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

button {
    font-family: inherit;
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

.skip {
    position: absolute;
    left: 12px;
    top: -40px;
    z-index: 100;
    padding: 8px 12px;
    background: var(--text);
    color: #fff;
    border-radius: 8px;
}

.skip:focus {
    top: 12px;
}

/* Header */

.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    height: var(--header-h);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid transparent;
    transition-property: border-color;
    transition-duration: 180ms;
    transition-timing-function: ease-out;
}

.site-header.is-scrolled {
    border-bottom-color: var(--border);
}

.header-inner {
    max-width: 1200px;
    height: 100%;
    margin: 0 auto;
    padding: 0 28px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.brand-mark {
    width: 28px;
    height: 28px;
    border-radius: 7px;
}

.news {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    margin-left: auto;
    font-size: 0.82rem;
    color: var(--text-2);
}

.news-kicker {
    flex-shrink: 0;
    color: var(--text-3);
    display: flex;
    align-items: center;
    gap: 12px;
}

.news-kicker::after {
    content: "";
    width: 1px;
    height: 12px;
    background: var(--border);
}

.news-viewport {
    position: relative;
    min-width: 0;
    height: 1.4em;
    overflow: hidden;
}

.news-line {
    display: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-2);
}

.news-line.is-current {
    display: block;
}

.news-line:hover {
    color: var(--text);
}

.news-more {
    flex-shrink: 0;
    color: var(--text-3);
}

.news-more:hover {
    color: var(--accent);
}

.lang {
    margin-left: auto;
    flex-shrink: 0;
    font-size: 0.85rem;
    color: var(--text-2);
    padding: 8px 4px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
}

.news + .lang {
    margin-left: 0;
}

.lang:hover {
    color: var(--text);
}

/* Hero */

.hero {
    max-width: var(--max);
    margin: 0 auto;
    padding: 72px 24px 56px;
    text-align: center;
}

.hero h1 {
    font-size: clamp(2.6rem, 8vw, 4.6rem);
    font-weight: 600;
    letter-spacing: -0.04em;
    line-height: 1.12;
    text-wrap: balance;
}

html[lang="zh-CN"] .hero h1 {
    font-weight: 400;
    letter-spacing: 0.12em;
}

.hero-ver {
    margin-top: 12px;
    font-size: 0.92rem;
    color: var(--text-3);
}

.hero-sub {
    margin: 16px auto 0;
    max-width: 28em;
    font-size: 1.05rem;
    color: var(--text-2);
    text-wrap: pretty;
}

.platforms {
    margin-top: 48px;
}

.platform-tabs {
    display: flex;
    justify-content: center;
    gap: 8px;
    list-style: none;
}

.platform-tab {
    appearance: none;
    border: 0;
    background: transparent;
    min-width: 96px;
    min-height: 76px;
    padding: 8px 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--text-3);
    cursor: pointer;
    border-radius: 12px;
    transition-property: color;
    transition-duration: 150ms;
    transition-timing-function: ease-out;
}

.platform-tab:hover {
    color: var(--text);
}

.platform-tab.is-active {
    color: var(--accent);
}

.platform-tab svg {
    width: 28px;
    height: 28px;
    fill: currentColor;
}

.platform-tab span {
    font-size: 0.85rem;
    font-weight: 500;
}

.platform-panel {
    margin: 28px auto 0;
    max-width: 420px;
}

.platform-panel[hidden] {
    display: none;
}

.platform-status {
    font-size: 0.95rem;
    color: var(--text-2);
    line-height: 1.7;
    text-wrap: pretty;
}

.platform-status strong {
    display: block;
    margin-bottom: 6px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
}

/* Product mock — app shell */

.hero-product {
    margin: 56px auto 0;
    max-width: 760px;
}

.app-frame {
    display: flex;
    width: 100%;
    aspect-ratio: 16 / 10;
    background: var(--canvas);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow);
    overflow: hidden;
    text-align: left;
}

.app-sidebar {
    width: 27%;
    flex-shrink: 0;
    background: var(--sidebar);
    border-right: 1px solid var(--border);
    padding: 20px 12px 12px;
}

.app-kicker {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-3);
    padding: 0 8px 10px;
}

.app-peer {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border-radius: 8px;
    font-size: 12px;
    color: var(--text-2);
}

.app-peer.is-on {
    background: var(--accent-fill);
    color: var(--accent);
    font-weight: 500;
}

.app-avatar {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    background: #dbeafe;
    flex-shrink: 0;
}

.app-peer.is-on .app-avatar {
    background: var(--accent);
}

.app-main {
    flex: 1;
    padding: 20px;
    min-width: 0;
}

.app-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.app-card {
    aspect-ratio: 16 / 10;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--accent-fill);
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.app-card strong {
    font-size: 12px;
    font-weight: 600;
    color: var(--text);
}

.app-card span {
    font-size: 10px;
    color: var(--text-2);
}

.app-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--ready);
    box-shadow: 0 0 0 3px rgba(0, 162, 64, 0.15);
}

/* Feature bands */

.feature {
    padding: 96px 24px;
}

.feature:nth-of-type(even) {
    background: var(--band);
}

.feature-inner {
    max-width: var(--max);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    gap: 64px;
    align-items: center;
}

.feature.is-flip .feature-inner {
    grid-template-columns: 1.15fr 1fr;
}

.feature.is-flip .feature-copy {
    order: 2;
}

.feature-copy h2 {
    font-size: clamp(1.7rem, 3vw, 2.2rem);
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.25;
    text-wrap: balance;
}

html[lang="zh-CN"] .feature-copy h2 {
    font-weight: 500;
    letter-spacing: 0.04em;
}

.feature-copy p {
    margin-top: 12px;
    font-size: 1rem;
    color: var(--text-2);
    text-wrap: pretty;
}

.mock {
    background: var(--canvas);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.feature:nth-of-type(even) .mock {
    background: #fff;
}

.mock-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    padding: 0 14px;
    border-bottom: 1px solid var(--border);
    background: var(--sidebar);
}

.traffic {
    display: flex;
    gap: 6px;
}

.traffic i {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #d0d0d0;
}

.traffic i:nth-child(1) { background: #ff5f57; }
.traffic i:nth-child(2) { background: #febc2e; }
.traffic i:nth-child(3) { background: #28c840; }

.mock-title {
    flex: 1;
    text-align: center;
    font-size: 12px;
    color: var(--text-2);
}

.mock-body {
    display: flex;
    min-height: 240px;
}

.mock-side {
    width: 132px;
    flex-shrink: 0;
    padding: 14px 10px;
    background: var(--sidebar);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 12px;
    color: var(--text-3);
}

.mock-side .is-on {
    background: #fff;
    color: var(--text);
    border-radius: 6px;
    padding: 6px 8px;
    font-weight: 500;
}

.mock-files {
    flex: 1;
    padding: 12px 8px;
}

.file {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    font-size: 13px;
    color: var(--text);
    border-radius: 8px;
}

.file:hover {
    background: var(--band);
}

.file i {
    width: 28px;
    height: 22px;
    border-radius: 4px;
    background: #cfe8ff;
    flex-shrink: 0;
}

.file i.is-doc {
    background: #e8e8ea;
    height: 28px;
    width: 22px;
}

/* Honesty */

.honesty {
    padding: 96px 24px 120px;
    text-align: center;
}

.honesty h2 {
    font-size: clamp(1.7rem, 3vw, 2.2rem);
    font-weight: 600;
    letter-spacing: -0.03em;
    text-wrap: balance;
}

html[lang="zh-CN"] .honesty h2 {
    font-weight: 500;
    letter-spacing: 0.04em;
}

.honesty-lead {
    margin: 14px auto 0;
    max-width: 32em;
    color: var(--text-2);
    text-wrap: pretty;
}

.honesty-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    max-width: var(--max);
    margin: 48px auto 0;
    text-align: left;
}

.honesty-list li {
    padding-top: 16px;
    border-top: 1px solid var(--border);
    font-size: 0.92rem;
    color: var(--text-2);
    text-wrap: pretty;
}

.honesty-list strong {
    display: block;
    margin-bottom: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
}

/* Changelog */

.changelog-page {
    max-width: 680px;
    margin: 48px auto 80px;
    padding: 0 24px;
    color: var(--text-2);
    line-height: 1.7;
}

.changelog-page .hero-ver {
    margin: 0;
}

.changelog-page h1 {
    font-size: 2rem;
    font-weight: 600;
    letter-spacing: -0.03em;
    color: var(--text);
    margin: 8px 0 16px;
}

.changelog-page h2 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text);
    margin: 32px 0 10px;
}

.changelog-page ul {
    padding-left: 1.15em;
}

.changelog-page li {
    margin-bottom: 8px;
}

.changelog-page a {
    color: var(--accent);
}

.changelog-page a:hover {
    text-decoration: underline;
}

.changelog-page code {
    font-size: 0.9em;
    background: var(--band);
    padding: 0.1em 0.35em;
    border-radius: 4px;
}

/* Footer */

.site-footer {
    border-top: 1px solid var(--border);
    padding: 32px 24px 40px;
    text-align: center;
    color: var(--text-3);
    font-size: 0.78rem;
    line-height: 1.8;
}

.site-footer p + p {
    margin-top: 2px;
}

.footer-beian,
.footer-copy {
    color: var(--text-3);
}

.site-footer a {
    color: var(--text-3);
}

.site-footer a:hover {
    color: var(--text-2);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 10px;
}

.footer-links a {
    color: var(--text-2);
}

/* Reveal — only hide when JS is running */

.js .reveal {
    opacity: 0;
    transform: translateY(16px);
    transition-property: opacity, transform;
    transition-duration: 500ms;
    transition-timing-function: var(--ease);
}

.js .reveal.is-visible {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .js .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* Responsive */

@media (max-width: 900px) {
    .feature-inner,
    .feature.is-flip .feature-inner {
        grid-template-columns: 1fr;
        gap: 36px;
    }

    .feature.is-flip .feature-copy {
        order: 0;
    }

    .honesty-list {
        grid-template-columns: 1fr 1fr;
    }

    .app-sidebar {
        width: 34%;
    }

    .app-cards {
        grid-template-columns: 1fr;
    }

    .app-card:nth-child(n + 3) {
        display: none;
    }
}

@media (max-width: 720px) {
    .header-inner {
        padding: 0 16px;
        gap: 12px;
    }

    .news {
        display: none;
    }

    .news + .lang {
        margin-left: auto;
    }

    .lang {
        margin-left: auto;
    }

    .hero {
        padding: 48px 20px 40px;
    }

    .hero-product {
        margin-top: 36px;
    }

    .app-kicker,
    .app-peer span:not(.app-avatar) {
        font-size: 10px;
    }

    .mock-side {
        display: none;
    }

    .honesty-list {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .platform-tab {
        min-width: 88px;
    }
}
