/* ==========================================================================
   极递 GitGo 官网样式表
   纯手写 CSS，无依赖，无预处理器
   ========================================================================== */

/* ===== 基础重置 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* 主色 */
    --primary: #4CAF50;
    --primary-dark: #388E3C;
    --primary-light: #C8E6C9;
    --secondary: #2196F3;

    /* 中性色 */
    --bg: #ffffff;
    --bg-alt: #f7f9fc;
    --bg-dark: #1a1d23;
    --text: #1a1d23;
    --text-light: #5a6472;
    --text-muted: #8b95a3;
    --border: #e4e8ee;

    /* 阴影 */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 12px 48px rgba(0, 0, 0, 0.12);

    /* 圆角 */
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 20px;

    /* 尺寸 */
    --nav-height: 64px;
    --container-max: 1200px;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--nav-height);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
                 "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue",
                 Helvetica, Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

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

ul {
    list-style: none;
}

code {
    font-family: "SF Mono", "Monaco", "Menlo", Consolas,
                 "Liberation Mono", monospace;
    background: var(--bg-alt);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.88em;
    color: var(--primary-dark);
    word-break: break-word;
}

/* ==========================================================================
   滚动进入动画（用类实现，避免与 :hover 的 transform 冲突）

   工作原理：
   - .reveal-init：未进入视口时的初始状态（透明 + 下移）
   - .reveal-in：进入视口后的最终状态（不透明 + 归位）
   - 元素被 JS 观察，进入视口后从 .reveal-init 切换到 .reveal-in
   - 因为两者都是类选择器（同优先级），元素自身的 :hover 规则
     （也是类 + 伪类，优先级更高）能正常生效。

   注意：这里的 transform 只作用于 .reveal-init 阶段；
   .reveal-in 显式声明 transform: translateY(0) 是为了让过渡有终点，
   但一旦动画结束，JS 会由 CSS 类共存的方式完成——因为 :hover
   的优先级 > .reveal-in（伪类比普通类高一级），所以悬停时
   :hover 会覆盖 .reveal-in 的 transform。
   ========================================================================== */
.reveal-init {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.6s ease-out,
                transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.reveal-in {
    opacity: 1;
    transform: translateY(0);
}

/* ===== 导航栏 ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid transparent;
    z-index: 1000;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.navbar.scrolled {
    border-bottom-color: var(--border);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--nav-height);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 18px;
    color: var(--text);
}

.logo img {
    border-radius: var(--radius-sm);
}

.nav-links {
    display: flex;
    gap: 32px;
    align-items: center;
}

.nav-links a {
    font-size: 15px;
    color: var(--text-light);
    font-weight: 500;
    position: relative;
}

.nav-links a:hover {
    color: var(--primary);
}

.btn-nav {
    background: var(--primary);
    color: white !important;
    padding: 8px 20px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    transition: background 0.2s, transform 0.2s;
}

.btn-nav:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text);
    padding: 4px;
}

/* ===== Hero ===== */
.hero {
    padding: calc(var(--nav-height) + 80px) 0 80px;
    background: linear-gradient(180deg, #f0f9f1 0%, #ffffff 100%);
    overflow: hidden;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-badge {
    display: inline-block;
    background: rgba(76, 175, 80, 0.1);
    color: var(--primary-dark);
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 20px;
}

.hero h1 {
    font-size: 52px;
    line-height: 1.15;
    font-weight: 700;
    letter-spacing: -1px;
    margin-bottom: 20px;
    color: var(--text);
}

.hero-subtitle {
    font-size: 17px;
    color: var(--text-light);
    margin-bottom: 32px;
    line-height: 1.75;
}

.hero-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
    font-family: inherit;
    white-space: nowrap;
}

.btn .icon {
    font-size: 16px;
    line-height: 1;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 16px rgba(76, 175, 80, 0.3);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(76, 175, 80, 0.35);
}

.btn-secondary {
    background: white;
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-large {
    padding: 16px 36px;
    font-size: 17px;
}

.hero-meta {
    font-size: 13px;
    color: var(--text-muted);
}

.hero-image {
    position: relative;
    perspective: 1000px;
}

.screenshot-float {
    width: 100%;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    transform: rotateY(-6deg) rotateX(2deg);
    transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.screenshot-float:hover {
    transform: rotateY(0) rotateX(0);
}

/* ===== 核心亮点 ===== */
.highlights {
    padding: 60px 0;
    background: white;
}

.highlight-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.highlight-item {
    text-align: center;
    padding: 24px 16px;
    border-radius: var(--radius);
    transition: background 0.2s;
}

.highlight-item:hover {
    background: var(--bg-alt);
}

.highlight-icon {
    font-size: 32px;
    margin-bottom: 12px;
    line-height: 1;
}

.highlight-item h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text);
}

.highlight-item p {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.6;
}

/* ===== 通用 section 样式 ===== */
.section-title {
    font-size: 36px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
    color: var(--text);
}

.section-subtitle {
    font-size: 17px;
    color: var(--text-light);
    text-align: center;
    margin-bottom: 48px;
    line-height: 1.6;
}

/* ===== 功能详情 ===== */
.features {
    padding: 80px 0;
    background: var(--bg-alt);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.feature-card {
    background: white;
    padding: 28px 24px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.feature-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow);
    transform: translateY(-4px);
}

.feature-icon {
    font-size: 32px;
    margin-bottom: 16px;
    line-height: 1;
}

.feature-card h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text);
}

.feature-card ul {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.7;
}

.feature-card li {
    padding: 4px 0 4px 20px;
    position: relative;
}

.feature-card li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: bold;
}

/* ===== 截图展示 ===== */
.screenshots {
    padding: 80px 0;
    background: white;
}

.screenshot-tabs {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 10px 24px;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    color: var(--text);
    font-weight: 500;
}

.tab-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.tab-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.screenshot-panel {
    display: none;
    text-align: center;
}

.screenshot-panel.active {
    display: block;
    animation: fadeIn 0.35s ease-out;
}

.screenshot-panel img {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.caption {
    margin-top: 20px;
    color: var(--text-light);
    font-size: 14px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== 安装 ===== */
.install {
    padding: 80px 0;
    background: var(--bg-alt);
}

.steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 48px;
}

.step {
    background: white;
    padding: 32px 28px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    position: relative;
    transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.step-num {
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 18px;
    margin-bottom: 16px;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.step h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text);
}

.step p {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.7;
}

.code-block {
    background: var(--bg-dark);
    color: #e4e8ee;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    margin: 12px 0;
    overflow-x: auto;
}

.code-block code {
    background: none;
    color: inherit;
    padding: 0;
    white-space: nowrap;
    overflow-x: auto;
}

.copy-btn {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: none;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.2s;
    font-family: inherit;
    flex-shrink: 0;
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.copy-btn.copied {
    background: var(--primary);
}

.hint {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
}

.install-note {
    background: white;
    padding: 28px 32px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    max-width: 720px;
    margin: 0 auto;
}

.install-note h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text);
}

.install-note ul {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.8;
}

.install-note li {
    padding: 4px 0 4px 20px;
    position: relative;
}

.install-note li::before {
    content: "•";
    position: absolute;
    left: 6px;
    color: var(--primary);
    font-weight: bold;
}

/* ===== 下载 ===== */
.download {
    padding: 80px 0;
    background: white;
}

.download-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.download-card {
    background: var(--bg-alt);
    padding: 40px 28px;
    border-radius: var(--radius-lg);
    text-align: center;
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1),
                border-color 0.3s, box-shadow 0.3s, background 0.3s;
    border: 1px solid transparent;
    display: block;
    color: var(--text);
}

.download-card:hover {
    transform: translateY(-6px);
    border-color: var(--primary);
    box-shadow: var(--shadow);
    background: white;
}

.download-icon {
    font-size: 40px;
    margin-bottom: 16px;
    line-height: 1;
}

.download-card h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.download-card p {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 20px;
    line-height: 1.6;
}

.download-btn {
    display: inline-block;
    color: var(--primary);
    font-weight: 500;
    font-size: 14px;
}

/* ===== FAQ ===== */
.faq {
    padding: 80px 0;
    background: var(--bg-alt);
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: white;
    border-radius: var(--radius);
    margin-bottom: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: border-color 0.2s;
}

.faq-item.open {
    border-color: var(--primary);
}

.faq-question {
    width: 100%;
    background: none;
    border: none;
    padding: 20px 24px;
    font-size: 16px;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    transition: background 0.2s;
    color: var(--text);
    font-family: inherit;
}

.faq-question:hover {
    background: var(--bg-alt);
}

.faq-arrow {
    transition: transform 0.3s;
    color: var(--text-muted);
    font-size: 14px;
    flex-shrink: 0;
}

.faq-item.open .faq-arrow {
    transform: rotate(180deg);
    color: var(--primary);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease-out, padding 0.35s ease-out;
    padding: 0 24px;
}

.faq-item.open .faq-answer {
    max-height: 500px;
    padding: 0 24px 20px;
}

.faq-answer p {
    color: var(--text-light);
    font-size: 15px;
    line-height: 1.75;
}

/* ===== CTA ===== */
.cta {
    padding: 100px 0;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta::before {
    content: "";
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.cta h2 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 12px;
    position: relative;
}

.cta p {
    font-size: 17px;
    opacity: 0.9;
    margin-bottom: 32px;
    position: relative;
}

.cta .btn-primary {
    background: white;
    color: var(--primary-dark);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    position: relative;
}

.cta .btn-primary:hover {
    background: #f5f5f5;
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.2);
}

/* ===== 页脚 ===== */
.footer {
    padding: 60px 0 30px;
    background: var(--bg-dark);
    color: #a4adba;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 12px;
}

.footer-logo img {
    border-radius: 6px;
}

.footer-col p {
    font-size: 14px;
    color: #8b95a3;
    line-height: 1.6;
}

.footer-col h4 {
    color: white;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 16px;
}

.footer-col li {
    margin-bottom: 8px;
}

.footer-col a {
    font-size: 14px;
    transition: color 0.2s;
}

.footer-col a:hover {
    color: var(--primary);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 24px;
    text-align: center;
    font-size: 13px;
    color: #8b95a3;
}

/* ==========================================================================
   响应式设计
   ========================================================================== */

/* 平板 */
@media (max-width: 1024px) {
    .hero h1 {
        font-size: 42px;
    }

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

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

    .screenshot-float {
        transform: none;
    }
}

/* 小屏平板 / 大屏手机 */
@media (max-width: 900px) {
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }

    .hero h1 {
        font-size: 36px;
    }

    .hero-subtitle {
        font-size: 16px;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-image {
        margin-top: 20px;
    }

    .steps {
        grid-template-columns: 1fr;
    }

    .download-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }

    .nav-links {
        display: none;
    }

    .nav-links.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: var(--nav-height);
        left: 0;
        right: 0;
        background: white;
        padding: 20px 24px;
        gap: 16px;
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow-sm);
        align-items: stretch;
    }

    .nav-links.open a {
        padding: 8px 0;
        font-size: 16px;
    }

    .nav-links.open .btn-nav {
        text-align: center;
        padding: 12px 20px;
    }

    .menu-toggle {
        display: block;
    }

    .section-title {
        font-size: 28px;
    }

    .section-subtitle {
        font-size: 15px;
    }
}

/* 手机 */
@media (max-width: 600px) {
    .container {
        padding: 0 16px;
    }

    .hero {
        padding: calc(var(--nav-height) + 48px) 0 48px;
    }

    .hero h1 {
        font-size: 28px;
        letter-spacing: -0.5px;
    }

    .hero-subtitle {
        font-size: 15px;
    }

    .hero-actions {
        flex-direction: column;
    }

    .hero-actions .btn {
        justify-content: center;
        width: 100%;
    }

    .highlight-grid,
    .feature-grid {
        grid-template-columns: 1fr;
    }

    .section-title {
        font-size: 24px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .footer {
        padding: 48px 0 24px;
    }

    .cta {
        padding: 64px 0;
    }

    .cta h2 {
        font-size: 22px;
    }

    .cta p {
        font-size: 15px;
    }

    .step {
        padding: 24px 20px;
    }

    .download-card {
        padding: 32px 24px;
    }

    .faq-question {
        font-size: 15px;
        padding: 16px 20px;
    }

    .faq-answer {
        padding: 0 20px;
    }

    .faq-item.open .faq-answer {
        padding: 0 20px 16px;
    }

    .install-note {
        padding: 24px 20px;
    }
}

/* ===== 无障碍：尊重系统的减弱动效偏好 ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ===== 打印样式 ===== */
@media print {
    .navbar,
    .menu-toggle,
    .cta,
    .footer,
    .copy-btn {
        display: none;
    }

    body {
        color: #000;
        background: #fff;
    }

    .hero {
        padding: 20px 0;
        background: none;
    }

    .screenshot-float {
        transform: none;
        box-shadow: none;
    }

    a {
        text-decoration: underline;
    }
}