/* ============================================
   RestartX 服务网站样式表
   配色：专业蓝 (#1a56db / #2563eb) + 白色
   字体：Noto Sans SC
   ============================================ */

/* --- CSS 变量 --- */
:root {
    --primary: #2563eb;
    --primary-dark: #1a56db;
    --primary-light: #3b82f6;
    --primary-bg: #eff6ff;
    --accent: #06b6d4;
    --text: #1e293b;
    --text-light: #64748b;
    --text-lighter: #94a3b8;
    --bg: #ffffff;
    --bg-gray: #f8fafc;
    --border: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.12);
    --shadow-card: 0 4px 24px rgba(37,99,235,0.08);
    --radius: 12px;
    --radius-lg: 20px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* --- 全局重置 --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition);
}

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

ul { list-style: none; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* --- 按钮 --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    border: 2px solid transparent;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37,99,235,0.3);
}

.btn-outline {
    background: transparent;
    color: #fff;
    border-color: rgba(255,255,255,0.5);
}

.btn-outline:hover {
    background: rgba(255,255,255,0.15);
    border-color: #fff;
    transform: translateY(-2px);
}

/* ============================================
   导航栏
   ============================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255,255,255,0);
    backdrop-filter: blur(0px);
    transition: all var(--transition);
    padding: 16px 0;
}

.navbar.scrolled {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-sm);
    padding: 10px 0;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 24px;
    font-weight: 700;
    z-index: 1001;
}

.logo-icon {
    font-size: 28px;
}

.logo-text {
    color: #fff;
    transition: color var(--transition);
}

.navbar.scrolled .logo-text {
    color: var(--text);
}

.logo-accent {
    color: var(--primary-light);
}

.navbar.scrolled .logo-accent {
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 8px;
}

.nav-links a {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 400;
    color: rgba(255,255,255,0.85);
    transition: all var(--transition);
}

.navbar.scrolled .nav-links a {
    color: var(--text-light);
}

.nav-links a:hover,
.nav-links a.active {
    color: #fff;
    background: rgba(255,255,255,0.15);
}

.navbar.scrolled .nav-links a:hover,
.navbar.scrolled .nav-links a.active {
    color: var(--primary);
    background: var(--primary-bg);
}

/* 移动端导航切换按钮 */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: all var(--transition);
}

.navbar.scrolled .nav-toggle span {
    background: var(--text);
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ============================================
   Hero 主视觉区
   ============================================ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 30%, #1a56db 70%, #2563eb 100%);
    z-index: 0;
}

.hero-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(37,99,235,0.3) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(6,182,212,0.2) 0%, transparent 50%);
}

/* 装饰网格 */
.hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 60px 60px;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 120px 0 100px;
}

.hero-title {
    font-size: clamp(32px, 6vw, 56px);
    font-weight: 900;
    line-height: 1.3;
    color: #fff;
    margin-bottom: 24px;
}

.hero-title-line {
    display: block;
}

.hero-title-accent {
    background: linear-gradient(135deg, #60a5fa, #06b6d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: clamp(16px, 2.5vw, 20px);
    color: rgba(255,255,255,0.75);
    max-width: 640px;
    margin: 0 auto 40px;
    line-height: 1.8;
    font-weight: 300;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-bottom: 60px;
    flex-wrap: wrap;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 60px;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 40px;
    font-weight: 900;
    color: #fff;
}

.stat-suffix {
    font-size: 28px;
    font-weight: 700;
    color: var(--accent);
}

.stat-label {
    display: block;
    font-size: 14px;
    color: rgba(255,255,255,0.6);
    margin-top: 4px;
}

/* 底部波浪 */
.hero-wave {
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    z-index: 2;
}

.hero-wave svg {
    display: block;
    width: 100%;
    height: 80px;
}

/* ============================================
   通用段落标题
   ============================================ */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-tag {
    display: inline-block;
    padding: 6px 18px;
    background: var(--primary-bg);
    color: var(--primary);
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 16px;
}

.section-title {
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 700;
    color: var(--text);
    margin-bottom: 16px;
    line-height: 1.3;
}

.section-desc {
    font-size: 17px;
    color: var(--text-light);
    max-width: 560px;
    margin: 0 auto;
}

/* ============================================
   服务项目
   ============================================ */
.services {
    padding: 100px 0;
    background: var(--bg);
}

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

.service-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px 32px;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    opacity: 0;
    transition: opacity var(--transition);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.service-card:hover::before {
    opacity: 1;
}

.service-icon {
    width: 64px;
    height: 64px;
    color: var(--primary);
    margin-bottom: 24px;
}

.service-icon-devops {
    color: #7c3aed;
}

.service-icon-consulting {
    color: #059669;
}

.service-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text);
}

.service-desc {
    font-size: 15px;
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 20px;
}

.service-features {
    margin-bottom: 24px;
}

.service-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--text);
    padding: 6px 0;
}

.feature-icon {
    color: var(--primary);
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

.service-link {
    font-size: 15px;
    font-weight: 500;
    color: var(--primary);
    transition: all var(--transition);
}

.service-link:hover {
    color: var(--primary-dark);
    letter-spacing: 1px;
}

/* ============================================
   服务流程
   ============================================ */
.process {
    padding: 100px 0;
    background: var(--bg-gray);
}

.process-timeline {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

/* 中间的连接线 */
.process-timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--primary), var(--accent));
    transform: translateX(-50%);
}

.process-step {
    display: flex;
    align-items: center;
    margin-bottom: 48px;
    position: relative;
}

.process-step:last-child {
    margin-bottom: 0;
}

.process-step:nth-child(odd) {
    flex-direction: row;
    text-align: right;
}

.process-step:nth-child(even) {
    flex-direction: row-reverse;
    text-align: left;
}

.step-number {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    font-size: 22px;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    margin: 0 auto;
    box-shadow: 0 4px 16px rgba(37,99,235,0.3);
}

.step-content {
    flex: 1;
    padding: 24px 32px;
    background: var(--bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
}

.step-content:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.step-content h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text);
}

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

/* ============================================
   客户案例
   ============================================ */
.cases {
    padding: 100px 0;
    background: var(--bg);
}

.cases-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
}

.case-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 36px;
    transition: all var(--transition);
    position: relative;
}

.case-card:hover {
    box-shadow: var(--shadow-card);
    border-color: rgba(37,99,235,0.15);
    transform: translateY(-4px);
}

.case-quote {
    font-size: 64px;
    font-weight: 900;
    color: var(--primary);
    opacity: 0.15;
    line-height: 1;
    position: absolute;
    top: 20px;
    right: 32px;
    font-family: Georgia, serif;
}

.case-text {
    font-size: 15px;
    color: var(--text-light);
    line-height: 1.9;
    margin-bottom: 24px;
    position: relative;
    z-index: 1;
}

.case-author {
    display: flex;
    align-items: center;
    gap: 14px;
}

.case-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.case-info {
    display: flex;
    flex-direction: column;
}

.case-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
}

.case-company {
    font-size: 13px;
    color: var(--text-lighter);
}

/* ============================================
   关于我们
   ============================================ */
.about {
    padding: 100px 0;
    background: var(--bg-gray);
}

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

.about-text {
    font-size: 16px;
    color: var(--text-light);
    line-height: 1.9;
    margin-bottom: 16px;
}

.about-values {
    margin-top: 32px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.value-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.value-icon {
    font-size: 28px;
    flex-shrink: 0;
    margin-top: 2px;
}

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

.value-item p {
    font-size: 14px;
    color: var(--text-light);
}

.about-visual {
    display: flex;
    justify-content: center;
}

.about-card-stack {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    max-width: 320px;
}

.about-stat-card {
    background: var(--bg);
    border-radius: var(--radius);
    padding: 28px 32px;
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: all var(--transition);
}

.about-stat-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: var(--shadow-lg);
}

.about-stat-num {
    display: block;
    font-size: 36px;
    font-weight: 900;
    color: var(--primary);
    margin-bottom: 4px;
}

.about-stat-label {
    font-size: 14px;
    color: var(--text-light);
}

/* ============================================
   联系方式
   ============================================ */
.contact {
    padding: 100px 0;
    background: var(--bg);
}

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

.contact-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px 32px;
    text-align: center;
    transition: all var(--transition);
}

.contact-card:hover {
    box-shadow: var(--shadow-card);
    border-color: rgba(37,99,235,0.15);
    transform: translateY(-4px);
}

.contact-icon {
    width: 56px;
    height: 56px;
    color: var(--primary);
    margin: 0 auto 20px;
}

.contact-card h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text);
}

.contact-detail {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 16px;
}

.contact-link {
    display: inline-block;
    font-size: 16px;
    font-weight: 500;
    color: var(--primary);
    padding: 8px 24px;
    border-radius: 50px;
    background: var(--primary-bg);
    transition: all var(--transition);
}

.contact-link:hover {
    background: var(--primary);
    color: #fff;
}

.contact-note {
    font-size: 14px;
    color: var(--text-lighter);
    font-style: italic;
}

.wechat-placeholder {
    width: 140px;
    height: 140px;
    margin: 0 auto;
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-lighter);
    font-size: 14px;
    gap: 4px;
}

.wechat-placeholder small {
    font-size: 12px;
}

/* ============================================
   页脚
   ============================================ */
.footer {
    background: #0f172a;
    color: rgba(255,255,255,0.7);
    padding: 60px 0 0;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-brand .logo-text {
    color: #fff;
}

.footer-desc {
    font-size: 14px;
    margin-top: 12px;
    line-height: 1.7;
    max-width: 300px;
    color: rgba(255,255,255,0.5);
}

.footer-links h4 {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 16px;
}

.footer-links ul {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links a {
    font-size: 14px;
    color: rgba(255,255,255,0.5);
    transition: color var(--transition);
}

.footer-links a:hover {
    color: #fff;
}

.footer-bottom {
    padding: 20px 0;
    text-align: center;
    font-size: 13px;
    color: rgba(255,255,255,0.35);
}

/* ============================================
   回到顶部按钮
   ============================================ */
.back-to-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(37,99,235,0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all var(--transition);
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-4px);
}

.back-to-top svg {
    width: 20px;
    height: 20px;
}

/* ============================================
   动画
   ============================================ */
[data-aos] {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-aos="fade-up"].aos-animate {
    opacity: 1;
    transform: translateY(0);
}

[data-aos="fade-right"] {
    transform: translateX(-30px);
}

[data-aos="fade-right"].aos-animate {
    opacity: 1;
    transform: translateX(0);
}

[data-aos="fade-left"] {
    transform: translateX(30px);
}

[data-aos="fade-left"].aos-animate {
    opacity: 1;
    transform: translateX(0);
}

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

/* 平板 */
@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: 1fr;
        max-width: 600px;
        margin: 0 auto;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .about-content .section-title {
        text-align: center !important;
    }

    .about-content {
        text-align: center;
    }

    .about-values {
        align-items: center;
    }

    .value-item {
        max-width: 360px;
    }

    .about-card-stack {
        flex-direction: row;
        max-width: 100%;
    }

    .cases-grid {
        grid-template-columns: 1fr;
        max-width: 600px;
        margin: 0 auto;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-desc {
        margin: 12px auto 0;
    }

    /* 服务流程 - 平板下改为纵向 */
    .process-timeline::before {
        left: 32px;
    }

    .process-step,
    .process-step:nth-child(odd),
    .process-step:nth-child(even) {
        flex-direction: row;
        text-align: left;
        gap: 20px;
    }

    .step-number {
        margin: 0;
        width: 56px;
        height: 56px;
        font-size: 18px;
    }
}

/* 手机 */
@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(15,23,42,0.97);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 8px;
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition);
    }

    .nav-links.open {
        opacity: 1;
        visibility: visible;
    }

    .nav-links a {
        font-size: 20px;
        padding: 12px 32px;
        color: rgba(255,255,255,0.85) !important;
    }

    .nav-links a:hover,
    .nav-links a.active {
        color: #fff !important;
        background: rgba(255,255,255,0.1) !important;
    }

    /* 移动端菜单打开时，toggle 始终白色 */
    .nav-toggle.active span {
        background: #fff !important;
    }

    .hero-content {
        padding: 100px 0 80px;
    }

    .hero-stats {
        gap: 32px;
    }

    .stat-number {
        font-size: 32px;
    }

    .hero-wave svg {
        height: 40px;
    }

    .services,
    .process,
    .cases,
    .about,
    .contact {
        padding: 70px 0;
    }

    .section-header {
        margin-bottom: 40px;
    }

    .about-card-stack {
        flex-direction: column;
        align-items: center;
    }

    .about-stat-card {
        width: 100%;
        max-width: 280px;
    }

    .process-timeline::before {
        left: 28px;
    }

    .step-number {
        width: 48px;
        height: 48px;
        font-size: 16px;
    }

    .step-content {
        padding: 18px 20px;
    }

    .step-content h3 {
        font-size: 18px;
    }

    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 42px;
        height: 42px;
    }
}

/* 超小屏 */
@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 280px;
    }

    .service-card {
        padding: 28px 20px;
    }

    .case-card {
        padding: 24px 20px;
    }
}