/* ============================================================
   common.css — Sticky Password 中文官网公共样式
   所有子页面共用，由 <link rel="stylesheet" href="../common.css">
   或 <link rel="stylesheet" href="common.css"> 引入
   ============================================================ */

/* ===== CSS 变量 ===== */
:root {
    --primary: #1C4282;
    --primary-dark: #153660;
    --primary-light: #2B5AA0;
    --primary-lighter: #E8F0FF;

    --gray-900: #111827;
    --gray-700: #374151;
    --gray-500: #6b7280;
    --gray-300: #d1d5db;
    --gray-100: #f3f4f6;
    --gray-50: #f9fafb;
    --white: #ffffff;

    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;

    --font-sans: 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
    --font-mono: 'JetBrains Mono', 'Source Code Pro', 'SF Mono', monospace;

    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.05rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --text-4xl: 2.25rem;
    --text-5xl: 3rem;

    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);

    --radius-sm: 0.25rem;
    --radius-md: 0.375rem;
    --radius-lg: 0.5rem;
    --radius-xl: 0.75rem;
    --radius-2xl: 1rem;
}

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

body {
    font-family: var(--font-sans);
    line-height: 1.6;
    color: var(--gray-700);
    background-color: var(--white);
    overflow-x: hidden;
}

/* ===== 中英文混排优化 ===== */
.content {
    word-spacing: 0.05em;
    text-rendering: optimizeLegibility;
}

.content code,
.content .english-term {
    font-family: var(--font-mono);
    background: rgba(28, 66, 130, 0.05);
    padding: 0.125em 0.25em;
    border-radius: var(--radius-sm);
    font-size: 0.95em;
    color: var(--primary);
}

/* ===== 主内容区域 ===== */
.main-content {
    padding: 0;
}

/* ===== 英雄区域后的第一个内容区域自动间距 ===== */
.hero-section + section,
.hero-section + div {
    padding-top: var(--space-16);
}

/* ===== 英雄区域（子页面通用） ===== */
.hero-section {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
    color: white;
    padding: var(--space-20) 0 var(--space-16);
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-top: 64px;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>') repeat;
    opacity: 0.3;
}

.hero-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--space-6);
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-size: var(--text-sm);
    font-weight: 600;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(28, 66, 130, 0.3);
}

.hero-title {
    font-size: var(--text-5xl);
    font-weight: 800;
    margin-bottom: var(--space-6);
    line-height: 1.2;
}

.hero-subtitle {
    font-size: var(--text-xl);
    opacity: 0.9;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

/* ===== 通用 CTA 按钮 ===== */
.cta-button {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    padding: var(--space-4) var(--space-8);
    border-radius: var(--radius-xl);
    text-decoration: none;
    font-weight: 600;
    font-size: var(--text-lg);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(28, 66, 130, 0.2);
    margin-top: var(--space-6);
}

.cta-button:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(28, 66, 130, 0.3);
}

/* ===== 响应式：1024px ===== */
@media (max-width: 1024px) {
    .hero-title {
        font-size: var(--text-4xl);
    }

    .hero-subtitle {
        font-size: var(--text-lg);
    }
}

/* ===== 响应式：768px（英雄区 + 主内容） ===== */
@media (max-width: 768px) {
    .hero-section {
        width: 100%;
        margin-left: 0;
        padding: var(--space-12) 0 var(--space-8);
        margin-top: 56px;
    }

    .hero-container {
        padding: 0 var(--space-4);
    }

    .hero-title {
        font-size: var(--text-3xl);
        margin-bottom: var(--space-4);
    }

    .hero-subtitle {
        font-size: var(--text-base);
        margin-bottom: var(--space-6);
    }

    .hero-badge {
        font-size: var(--text-xs);
        padding: var(--space-2) var(--space-4);
        margin-bottom: var(--space-4);
    }

    .main-content {
        padding: 0;
    }
}
