/* ============================================================
   IMEICheck 落地页样式 v80.3
   - 移动优先（base） → 桌面渐进增强（min-width 媒体查询）
   - 修复 step 重复数字 bug（去掉 .step::before，只用 .step-num）
   - 合并重复 .trust-bar / .step 规则
   - 紧凑节奏：mobile 8/16/24，desktop 16/24/32/48
   ============================================================ */

:root {
    --c-primary: #FF6B35;
    --c-primary-dark: #E55A24;
    --c-primary-soft: rgba(255, 107, 53, 0.08);
    --c-text: #1a1a1a;
    --c-text-2: #4b5563;
    --c-text-3: #6b7280;
    --c-bg: #ffffff;
    --c-bg-soft: #F8F9FB;
    --c-bg-mute: #F2F4F7;
    --c-border: #e8eaed;
    --c-border-2: #d1d5db;

    --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.04), 0 1px 3px rgba(16, 24, 40, 0.06);
    --shadow-md: 0 4px 12px rgba(16, 24, 40, 0.06), 0 2px 4px rgba(16, 24, 40, 0.04);
    --shadow-lg: 0 12px 32px rgba(16, 24, 40, 0.08), 0 4px 8px rgba(16, 24, 40, 0.04);

    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;

    --max-w: 1200px;
    --gap: 16px;
    --section-py: 40px;
    --container-px: 16px;
}

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

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
                 "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--c-text);
    background: var(--c-bg);
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--c-primary); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--c-primary-dark); }

code {
    background: var(--c-bg-mute);
    padding: 1px 6px;
    border-radius: 4px;
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
    font-size: 0.9em;
    color: var(--c-text-2);
}

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

/* ===== Header ===== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--c-border);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
    gap: 12px;
}
.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 17px;
    color: var(--c-text);
    letter-spacing: -0.01em;
}
.logo img { width: 28px; height: 28px; border-radius: 6px; }
.main-nav {
    display: none;
    gap: 28px;
    flex: 1;
    justify-content: center;
}
.main-nav a {
    color: var(--c-text-2);
    font-size: 14px;
    font-weight: 500;
    padding: 6px 0;
    white-space: nowrap;
    position: relative;
}
.main-nav a:hover { color: var(--c-primary); }
.main-nav a:hover::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: -2px;
    height: 2px;
    background: var(--c-primary);
    border-radius: 2px;
}
.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: var(--c-text-3);
    padding: 6px 10px;
    border: 1px solid var(--c-border);
    border-radius: 999px;
    background: var(--c-bg);
    transition: all 0.15s;
}
.lang-switch:hover {
    background: var(--c-bg-soft);
    color: var(--c-text);
    border-color: var(--c-border-2);
}
.lang-switch .globe { font-size: 14px; line-height: 1; }
.lang-switch .label { display: none; }  /* mobile: 隐藏 "English" 文字，只留图标 */
.btn-app {
    background: var(--c-primary);
    color: #fff !important;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.25);
}
.btn-app:hover { background: var(--c-primary-dark); }

/* ===== Hero ===== */
.hero {
    padding: 36px 0 28px;
    text-align: center;
    background:
        radial-gradient(60% 50% at 50% 0%, rgba(255, 107, 53, 0.06) 0%, transparent 70%),
        linear-gradient(180deg, #fff 0%, var(--c-bg-soft) 100%);
}
.hero h1 {
    font-size: clamp(24px, 6vw, 32px);
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 12px;
    background: linear-gradient(90deg, #1a1a1a 0%, var(--c-primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}
.hero p.lead {
    font-size: 14px;
    color: var(--c-text-3);
    margin: 0 auto 24px;
    max-width: 640px;
    line-height: 1.65;
}

/* ===== IMEI Form ===== */
.imei-form {
    max-width: 560px;
    margin: 0 auto 8px;
}
.imei-form-inner {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #fff;
    padding: 6px;
    border-radius: 999px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--c-border);
    transition: box-shadow 0.2s, border-color 0.2s;
}
.imei-form-inner:focus-within {
    border-color: var(--c-primary);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.15), var(--shadow-md);
}
.imei-input {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    padding: 10px 14px;
    font-size: 15px;
    background: transparent;
    color: var(--c-text);
}
.imei-input::placeholder { color: #9ca3af; }
.imei-submit {
    background: var(--c-primary);
    color: #fff;
    border: none;
    padding: 10px 18px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
    white-space: nowrap;
    letter-spacing: 0.01em;
}
.imei-submit:hover { background: var(--c-primary-dark); }
.imei-submit:active { transform: scale(0.98); }
.imei-hint {
    text-align: center;
    font-size: 12px;
    color: var(--c-text-3);
    margin-top: 10px;
}

/* ===== Section ===== */
section { padding: var(--section-py) 0; }
.section-title {
    font-size: 22px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
    color: var(--c-text);
}
.section-subtitle {
    text-align: center;
    color: var(--c-text-3);
    font-size: 14px;
    margin: 0 auto 28px;
    max-width: 640px;
    line-height: 1.6;
}

/* ===== Trust Bar (Stats — homepage) ===== */
.trust-bar {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    max-width: 560px;
    margin: 24px auto 0;
    padding: 16px;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--c-border);
}
.trust-item { text-align: center; padding: 4px; }
.trust-num {
    font-size: 22px;
    font-weight: 800;
    color: var(--c-primary);
    line-height: 1.1;
    letter-spacing: -0.02em;
}
.trust-label {
    font-size: 11px;
    color: var(--c-text-3);
    margin-top: 4px;
    letter-spacing: 0.04em;
}

/* ===== Brand Cards ===== */
.brands-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
.brand-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}
.brand-card {
    background: #fff;
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    padding: 20px 12px;
    text-align: center;
    transition: all 0.2s ease;
    color: var(--c-text);
    height: 100%;
}
.brand-card-link:hover .brand-card {
    border-color: var(--c-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.brand-emoji {
    font-size: 32px;
    line-height: 1;
    margin-bottom: 8px;
}
.brand-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--c-text);
}
.brand-desc {
    font-size: 11px;
    color: var(--c-text-3);
    margin-top: 4px;
    line-height: 1.4;
}

/* ===== Feature Cards ===== */
.features {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}
.feature-card {
    background: #fff;
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    padding: 18px;
    transition: all 0.2s;
    display: flex;
    gap: 14px;
    align-items: flex-start;
}
.feature-card:hover {
    border-color: var(--c-primary);
    box-shadow: var(--shadow-sm);
}
.feature-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--c-primary-soft);
    color: var(--c-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    line-height: 1;
}
.feature-body { flex: 1; min-width: 0; }
.feature-card h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--c-text);
}
.feature-card p {
    color: var(--c-text-3);
    font-size: 13px;
    line-height: 1.55;
}

/* ===== Steps (FIXED: 单一 .step-num 来源) ===== */
.steps {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    counter-reset: step;
}
.step {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px;
    background: #fff;
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    text-align: left;
    transition: all 0.2s;
}
.step:hover {
    border-color: var(--c-primary);
    box-shadow: var(--shadow-sm);
}
.step-num {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--c-primary);
    color: #fff;
    font-weight: 700;
    font-size: 16px;
    line-height: 1;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
}
.step-body { flex: 1; min-width: 0; }
.step h4 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--c-text);
}
.step p {
    color: var(--c-text-3);
    font-size: 13px;
    line-height: 1.55;
}

/* ===== FAQ ===== */
.faq-list {
    max-width: 760px;
    margin: 0 auto;
}
.faq-item {
    background: #fff;
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    margin-bottom: 10px;
    overflow: hidden;
    transition: border-color 0.2s;
}
.faq-item[open] { border-color: var(--c-border-2); }
.faq-question {
    padding: 14px 18px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 14px;
    list-style: none;
    user-select: none;
    color: var(--c-text);
    line-height: 1.5;
}
.faq-question::-webkit-details-marker { display: none; }
.faq-question::after {
    content: '+';
    font-size: 22px;
    color: var(--c-text-3);
    transition: transform 0.2s;
    flex-shrink: 0;
    margin-left: 12px;
    line-height: 1;
    font-weight: 300;
}
.faq-item[open] .faq-question::after {
    content: '−';
    color: var(--c-primary);
}
.faq-answer {
    padding: 0 18px 14px;
    color: var(--c-text-3);
    line-height: 1.65;
    font-size: 13px;
}
.faq-answer p { margin-bottom: 8px; }
.faq-answer p:last-child { margin-bottom: 0; }
.faq-answer code {
    background: var(--c-bg-mute);
    padding: 1px 6px;
    border-radius: 4px;
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
    color: var(--c-text-2);
}

/* ===== CTA Banner ===== */
.cta-banner {
    background: linear-gradient(135deg, var(--c-primary) 0%, var(--c-primary-dark) 100%);
    color: #fff;
    padding: 28px 20px;
    border-radius: var(--radius-lg);
    text-align: center;
    margin: 0;
    position: relative;
    overflow: hidden;
}
.cta-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 70%);
    pointer-events: none;
}
.cta-banner h2 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.01em;
    position: relative;
}
.cta-banner p {
    font-size: 13px;
    opacity: 0.95;
    margin: 0 auto 18px;
    max-width: 480px;
    position: relative;
}
.cta-banner .btn {
    background: #fff;
    color: var(--c-primary);
    padding: 11px 24px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 14px;
    display: inline-block;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.cta-banner .btn:hover { background: #fff; color: var(--c-primary-dark); }

/* ===== Buttons ===== */
.btn-secondary {
    display: inline-block;
    padding: 10px 22px;
    background: #fff;
    color: var(--c-primary);
    border: 1.5px solid var(--c-primary);
    border-radius: 999px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s;
    text-align: center;
}
.btn-secondary:hover {
    background: var(--c-primary);
    color: #fff;
}

/* ===== Article (brand pages) ===== */
.article {
    max-width: 760px;
    margin: 0 auto;
    line-height: 1.8;
    font-size: 15px;
    color: var(--c-text);
}
.article h2 {
    font-size: 22px;
    font-weight: 700;
    margin: 32px 0 12px;
    letter-spacing: -0.01em;
}
.article h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 24px 0 8px;
}
.article p, .article ul, .article ol { margin-bottom: 14px; }
.article ul, .article ol { padding-left: 22px; }
.article li { margin-bottom: 6px; }
.article strong { color: var(--c-text); font-weight: 600; }
.article code {
    background: var(--c-bg-mute);
    padding: 1px 6px;
    border-radius: 4px;
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
    font-size: 0.9em;
    color: var(--c-text-2);
}

/* ===== Breadcrumb ===== */
.breadcrumb {
    padding: 10px 0;
    font-size: 12px;
    color: var(--c-text-3);
    background: var(--c-bg-soft);
}
.breadcrumb a { color: var(--c-text-3); }
.breadcrumb a:hover { color: var(--c-primary); }
.breadcrumb .sep { margin: 0 6px; color: #d1d5db; }

/* ===== Footer ===== */
.site-footer {
    background: #111418;
    color: #c9ccd1;
    padding: 36px 0 20px;
    margin-top: 36px;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px 16px;
    margin-bottom: 24px;
}
.footer-col h4 {
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.footer-col a {
    display: block;
    color: #8a8f96;
    font-size: 13px;
    padding: 4px 0;
}
.footer-col a:hover { color: var(--c-primary); }
.footer-col p { font-size: 12px; color: #8a8f96; line-height: 1.6; }
.footer-bottom {
    border-top: 1px solid #2a2e34;
    padding-top: 16px;
    text-align: center;
}
.footer-bottom p {
    font-size: 11px;
    color: #6c7079;
    margin-bottom: 6px;
    line-height: 1.6;
}
.footer-disc { font-size: 11px; color: #555a62; max-width: 640px; margin: 0 auto; }

/* ===================================================================
   桌面端渐进增强 (min-width 媒体查询 — mobile first 哲学)
   =================================================================== */

/* sm ≥ 480 — 略宽手机：6 卡 3x2、stats 4 列 */
@media (min-width: 480px) {
    :root {
        --container-px: 20px;
    }
    .brands-grid { grid-template-columns: repeat(3, 1fr); }
    .trust-bar { grid-template-columns: repeat(4, 1fr); max-width: 720px; }
    .trust-num { font-size: 26px; }
    .trust-label { font-size: 12px; }
}

/* md ≥ 768 — 平板：主导航出现，features 2 列 */
@media (min-width: 768px) {
    :root {
        --container-px: 24px;
        --section-py: 56px;
    }
    .header-inner { height: 64px; gap: 24px; }
    .main-nav { display: flex; }
    .lang-switch { padding: 6px 14px; }
    .lang-switch .label { display: inline; }   /* desktop: 显示 English */
    .btn-app { padding: 8px 18px; font-size: 14px; }
    .hero { padding: 60px 0 48px; }
    .hero h1 { font-size: 40px; }
    .hero p.lead { font-size: 17px; }
    .imei-input { font-size: 16px; padding: 14px 18px; }
    .imei-submit { font-size: 16px; padding: 14px 28px; }
    .section-title { font-size: 30px; }
    .section-subtitle { font-size: 16px; margin-bottom: 40px; }
    .features { grid-template-columns: repeat(2, 1fr); gap: 20px; }
    .feature-card { padding: 24px; }
    .feature-icon { width: 48px; height: 48px; font-size: 24px; }
    .feature-card h3 { font-size: 17px; }
    .feature-card p { font-size: 14px; }
    .step { padding: 24px; }
    .step-num { width: 48px; height: 48px; font-size: 20px; }
    .step h4 { font-size: 17px; }
    .faq-question { padding: 18px 24px; font-size: 15px; }
    .faq-answer { padding: 0 24px 18px; font-size: 14px; }
    .cta-banner { padding: 40px 32px; }
    .cta-banner h2 { font-size: 26px; }
    .cta-banner p { font-size: 15px; }
    .footer-grid { gap: 32px 24px; }
    .footer-col h4 { font-size: 13px; }
}

/* lg ≥ 1024 — 桌面：features 3 列、steps 3 列、container 全宽 */
@media (min-width: 1024px) {
    :root {
        --container-px: 32px;
        --section-py: 80px;
    }
    .header-inner { height: 72px; }
    .logo { font-size: 18px; }
    .logo img { width: 32px; height: 32px; }
    .hero { padding: 80px 0 64px; }
    .hero h1 { font-size: 48px; margin-bottom: 16px; }
    .hero p.lead { font-size: 18px; margin-bottom: 32px; }
    .imei-form-inner { padding: 8px; gap: 8px; }
    .imei-input { font-size: 17px; padding: 16px 20px; }
    .imei-submit { font-size: 17px; padding: 16px 32px; }
    .section-title { font-size: 36px; }
    .section-subtitle { font-size: 17px; margin-bottom: 48px; }
    .brands-grid { grid-template-columns: repeat(6, 1fr); gap: 16px; }
    .brand-card { padding: 28px 12px; }
    .brand-emoji { font-size: 40px; margin-bottom: 10px; }
    .brand-name { font-size: 15px; }
    .brand-desc { font-size: 12px; }
    .features { grid-template-columns: repeat(3, 1fr); gap: 24px; }
    .feature-card { padding: 28px; flex-direction: column; gap: 0; }
    .feature-card .feature-icon { margin-bottom: 16px; }
    .feature-card h3 { font-size: 18px; margin-bottom: 8px; }
    .feature-card p { font-size: 14px; }
    .steps { grid-template-columns: repeat(3, 1fr); gap: 20px; }
    .step { flex-direction: column; align-items: center; text-align: center; padding: 28px 20px; }
    .step-num { margin-bottom: 16px; }
    .step h4 { font-size: 18px; margin-bottom: 8px; }
    .step p { font-size: 14px; }
    .cta-banner { padding: 56px 40px; }
    .cta-banner h2 { font-size: 32px; }
    .cta-banner p { font-size: 16px; }
    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr 1fr;
        gap: 40px;
    }
    .footer-col p { font-size: 14px; }
    .footer-bottom p { font-size: 12px; }
    .site-footer { padding: 60px 0 24px; margin-top: 60px; }
}
