/* ============================================
   瑞莱米科技官网 - 样式表
   ============================================ */

/* --- Reset & Base --- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --primary-bg: #eff6ff;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --bg-white: #ffffff;
    --bg-light: #f8fafc;
    --bg-dark: #0f172a;
    --border: #e2e8f0;
    --radius: 12px;
    --radius-lg: 20px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.1);
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

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

ul {
    list-style: none;
}

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

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

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    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: var(--primary);
    border-color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-2px);
}

/* --- Navbar --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid transparent;
    transition: all var(--transition);
}

.navbar.scrolled {
    border-bottom-color: var(--border);
    box-shadow: var(--shadow-sm);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
}

.logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--primary);
    color: #fff;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 800;
}

.logo-text {
    font-size: 18px;
    color: var(--text-primary);
}

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

.nav-links a {
    padding: 8px 18px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all var(--transition);
}

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

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

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

/* --- Hero --- */
.hero {
    position: relative;
    padding: 160px 0 100px;
    overflow: hidden;
    background: linear-gradient(135deg, #f0f5ff 0%, #e8f0fe 50%, #f5f0ff 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.hero-title {
    font-size: clamp(36px, 6vw, 64px);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}

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

.hero-title .highlight {
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-desc {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 640px;
    margin: 0 auto 40px;
    line-height: 1.8;
}

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

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

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

.stat-number {
    font-size: 42px;
    font-weight: 800;
    color: var(--primary);
    display: inline;
}

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

.stat-label {
    display: block;
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Hero background shapes */
.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 1;
    overflow: hidden;
}

.hero-shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.12;
}

.shape-1 {
    width: 500px;
    height: 500px;
    background: var(--primary);
    top: -100px;
    right: -100px;
    animation: float 8s ease-in-out infinite;
}

.shape-2 {
    width: 300px;
    height: 300px;
    background: #7c3aed;
    bottom: -50px;
    left: -50px;
    animation: float 10s ease-in-out infinite reverse;
}

.shape-3 {
    width: 200px;
    height: 200px;
    background: var(--primary-light);
    top: 40%;
    left: 60%;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(20px, -30px); }
}

/* --- Sections Common --- */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

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

.section-title {
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 800;
    margin-bottom: 16px;
    letter-spacing: -0.01em;
}

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

/* --- Services --- */
.services {
    padding: 100px 0;
    background: var(--bg-white);
}

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

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

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

.service-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-bg);
    border-radius: 14px;
    margin-bottom: 24px;
    color: var(--primary);
}

.service-icon svg {
    width: 30px;
    height: 30px;
}

.service-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 12px;
}

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

.service-features {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.service-features li {
    font-size: 14px;
    color: var(--text-secondary);
    padding-left: 20px;
    position: relative;
}

.service-features li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary);
}

/* --- Tech --- */
.tech {
    padding: 100px 0;
    background: var(--bg-light);
}

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

.tech-category {
    padding: 32px;
    background: var(--bg-white);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.tech-category-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tech-tag {
    padding: 8px 18px;
    background: var(--primary-bg);
    color: var(--primary);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all var(--transition);
}

.tech-tag:hover {
    background: var(--primary);
    color: #fff;
}

/* --- Process --- */
.process {
    padding: 100px 0;
    background: var(--bg-white);
}

.process-steps {
    display: flex;
    gap: 20px;
    position: relative;
}

.process-steps::before {
    content: '';
    position: absolute;
    top: 32px;
    left: 48px;
    right: 48px;
    height: 2px;
    background: linear-gradient(to right, var(--primary), var(--primary-light), #7c3aed);
    z-index: 0;
}

.process-step {
    flex: 1;
    text-align: center;
    position: relative;
    z-index: 1;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--bg-white);
    border: 3px solid var(--primary);
    color: var(--primary);
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 20px;
}

.step-title {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 8px;
}

.step-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    padding: 0 8px;
}

/* --- About --- */
.about {
    padding: 100px 0;
    background: var(--bg-light);
}

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

.about-text .section-tag {
    margin-bottom: 16px;
}

.about-text .section-title {
    text-align: left;
    margin-bottom: 24px;
}

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

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

.highlight-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    font-weight: 500;
}

.highlight-icon {
    width: 22px;
    height: 22px;
    color: var(--primary);
    flex-shrink: 0;
}

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

.about-card {
    width: 100%;
    aspect-ratio: 1;
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    gap: 24px;
    box-shadow: 0 20px 60px rgba(37, 99, 235, 0.25);
}

.about-card-icon svg {
    width: 80px;
    height: 80px;
}

.about-card-text {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.05em;
}

/* --- Contact --- */
.contact {
    padding: 100px 0;
    background: var(--bg-white);
}

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

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

.contact-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.contact-icon {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-bg);
    border-radius: 14px;
    margin: 0 auto 20px;
    color: var(--primary);
}

.contact-icon svg {
    width: 24px;
    height: 24px;
}

.contact-label {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
}

.contact-info {
    font-size: 15px;
    color: var(--text-secondary);
}

/* --- Footer --- */
.footer {
    background: var(--bg-dark);
    color: #fff;
    padding: 60px 0 0;
}

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

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

.footer-desc {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 16px;
    line-height: 1.7;
}

.footer-links h4 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 20px;
}

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

.footer-links li,
.footer-links a {
    font-size: 14px;
    color: var(--text-muted);
}

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

.footer-bottom {
    padding: 24px 0;
}

.copyright {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
    font-size: 13px;
    color: var(--text-muted);
}

.copyright a {
    color: var(--text-muted);
}

.copyright a:hover {
    color: #fff;
}

/* --- Scroll Animations --- */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* --- Responsive --- */
@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .about-content {
        grid-template-columns: 1fr;
    }

    .about-visual {
        max-width: 320px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 16px 24px;
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow-md);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-toggle {
        display: flex;
    }

    .hero {
        padding: 120px 0 60px;
        min-height: auto;
    }

    .hero-desc br {
        display: none;
    }

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

    .hero-stats {
        gap: 32px;
    }

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

    .services-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }

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

    .process-steps {
        flex-direction: column;
        gap: 32px;
    }

    .process-steps::before {
        top: 0;
        bottom: 0;
        left: 32px;
        right: auto;
        width: 2px;
        height: auto;
    }

    .process-step {
        text-align: left;
        display: flex;
        gap: 20px;
        align-items: flex-start;
    }

    .step-number {
        width: 48px;
        height: 48px;
        font-size: 16px;
        flex-shrink: 0;
        margin-bottom: 0;
    }

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

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

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .hero-title {
        font-size: 32px;
    }

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

    .hero-stats {
        flex-wrap: wrap;
        gap: 24px;
    }

    .stat-item {
        min-width: 80px;
    }

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

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