/* ============================================
   重庆似水流年科技有限公司 - 企业官网样式
   ============================================ */

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

:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f5f7fc;
    --bg-card: #ffffff;
    --bg-card-hover: #f0f4ff;
    --text-primary: #1a1a2e;
    --text-secondary: #5a6278;
    --text-muted: #8e94a6;
    --accent: #2563eb;
    --accent2: #0891b2;
    --accent-light: rgba(37, 99, 235, 0.08);
    --accent-glow: rgba(37, 99, 235, 0.15);
    --gradient: linear-gradient(135deg, #2563eb 0%, #0891b2 100%);
    --gradient-v: linear-gradient(180deg, #2563eb 0%, #0891b2 100%);
    --border: #e8ecf2;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.08);
    --nav-height: 72px;
    --radius: 12px;
    --radius-lg: 20px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

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

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: #c8cdd8; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #a0a6b2; }

/* ---------- Keyframes ---------- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}
@keyframes expandRing {
    0% { transform: scale(0.8); opacity: 0.8; }
    100% { transform: scale(1.6); opacity: 0; }
}
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes barGrow {
    from { height: 0; }
    to { height: var(--h); }
}
@keyframes waveBg {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-30px) scale(1.05); }
}

/* ---------- Animation Classes ---------- */
.fade-in { opacity: 0; }
.fade-in.visible { animation: fadeInUp 0.8s ease forwards; }
.fade-in.delay-1.visible { animation-delay: 0.15s; }
.fade-in.delay-2.visible { animation-delay: 0.3s; }
.fade-in.delay-3.visible { animation-delay: 0.45s; }

.fade-in-up {
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
}
.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.6s; }

/* ---------- Navbar ---------- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--nav-height);
    transition: var(--transition);
}
.navbar.scrolled {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.logo-text {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 2px;
}

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

.nav-link {
    position: relative;
    padding: 8px 18px;
    font-size: 15px;
    color: var(--text-secondary);
    border-radius: 8px;
    transition: var(--transition);
}
.nav-link:hover {
    color: var(--accent);
    background: var(--accent-light);
}
.nav-link.active {
    color: var(--accent);
    background: var(--accent-light);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    z-index: 1001;
}
.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition);
}
.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;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    padding: 120px 24px 80px;
    background: linear-gradient(180deg, #f0f5ff 0%, #ffffff 40%, #ffffff 100%);
}

.hero-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.hero-subtitle {
    font-size: 16px;
    color: var(--accent);
    letter-spacing: 6px;
    text-transform: uppercase;
    margin-bottom: 24px;
    font-weight: 600;
}

.hero-title {
    font-size: clamp(32px, 6vw, 56px);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 24px;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-desc {
    font-size: clamp(15px, 2vw, 18px);
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 40px;
}

.hero-btns {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary,
.btn-outline {
    display: inline-flex;
    align-items: center;
    padding: 14px 36px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
}

.btn-primary {
    background: var(--gradient);
    color: #fff;
    box-shadow: 0 4px 20px var(--accent-glow);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(37, 99, 235, 0.3);
}

.btn-outline {
    border: 1.5px solid var(--border);
    color: var(--text-primary);
    background: #fff;
}
.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-light);
}

/* Hero scroll hint */
.hero-scroll-hint {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
}
.hero-scroll-hint span {
    display: block;
    width: 24px;
    height: 40px;
    border: 2px solid var(--border);
    border-radius: 12px;
    position: relative;
}
.hero-scroll-hint span::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 8px;
    width: 4px;
    height: 8px;
    margin-left: -2px;
    background: var(--accent);
    border-radius: 2px;
    animation: float 2s ease-in-out infinite;
}

/* ---------- Section Common ---------- */
section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: 2px;
    color: var(--text-primary);
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 16px;
}

/* ---------- Services / Tab ---------- */
.services {
    background: var(--bg-secondary);
}

.tab-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

/* Tab nav */
.tab-nav {
    display: flex;
    gap: 4px;
    padding: 6px;
    background: #f8fafc;
    border-radius: var(--radius);
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.tab-btn {
    flex: 1;
    min-width: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 500;
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.tab-btn:hover {
    color: var(--accent);
    background: var(--accent-light);
}

.tab-btn.active {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 4px 15px var(--accent-glow);
}

.tab-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}
.tab-icon svg {
    width: 100%;
    height: 100%;
}

/* Tab content */
.tab-slider {
    position: relative;
    min-height: 320px;
}

.tab-content {
    display: none;
    animation: slideDown 0.4s ease;
}
.tab-content.active {
    display: block;
}

.tab-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
    padding: 20px;
}

.tab-text h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.tab-text p {
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.8;
}

.tab-features {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.tab-features li {
    position: relative;
    padding-left: 28px;
    color: var(--text-secondary);
    font-size: 14px;
}
.tab-features li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 16px;
    height: 2px;
    background: var(--accent);
    border-radius: 1px;
}
.tab-features li::after {
    content: '';
    position: absolute;
    left: 14px;
    top: 3px;
    width: 6px;
    height: 10px;
    border: solid var(--accent);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Tab visuals */
.tab-visual {
    display: flex;
    align-items: center;
    justify-content: center;
}

.visual-card {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px;
    text-align: center;
    width: 100%;
    max-width: 300px;
}

.visual-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    padding: 16px;
    border-radius: 50%;
    background: var(--accent-light);
    color: var(--accent);
}
.visual-icon svg {
    width: 100%;
    height: 100%;
}

.visual-label {
    font-size: 15px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Ad formats grid */
.ad-formats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    width: 100%;
}

.format-card {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 16px;
    text-align: center;
    transition: var(--transition);
    cursor: default;
}
.format-card:hover {
    background: #f0f4ff;
    transform: translateY(-3px);
    border-color: rgba(37, 99, 235, 0.2);
    box-shadow: var(--shadow-sm);
}

.format-icon {
    width: 44px;
    height: 44px;
    margin: 0 auto 12px;
    color: var(--accent);
}
.format-icon svg {
    width: 100%;
    height: 100%;
}

.format-card span {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Target ring */
.target-ring {
    position: relative;
    width: 180px;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(37, 99, 235, 0.15);
    animation: expandRing 3s ease-out infinite;
}
.ring-1 { width: 100%; height: 100%; animation-delay: 0s; }
.ring-2 { width: 70%; height: 70%; animation-delay: 1s; }
.ring-3 { width: 40%; height: 40%; animation-delay: 2s; }
.ring-center {
    position: relative;
    z-index: 1;
    width: 64px;
    height: 64px;
    color: var(--accent);
    animation: pulse 2s ease-in-out infinite;
}
.ring-center svg {
    width: 100%;
    height: 100%;
}

/* Chart bars */
.chart-bars {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    height: 200px;
    width: 100%;
    padding: 0 12px;
}
.chart-bar {
    flex: 1;
    height: var(--h);
    background: var(--gradient-v);
    border-radius: 8px 8px 0 0;
    position: relative;
    animation: barGrow 1s ease-out forwards;
    animation-play-state: paused;
    min-height: 0;
}
.chart-bar span {
    position: absolute;
    bottom: -28px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
}

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

.adv-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px 28px;
    text-align: center;
    transition: var(--transition);
    cursor: default;
    box-shadow: var(--shadow-sm);
}
.adv-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(37, 99, 235, 0.15);
    background: #fafcff;
}

.adv-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 24px;
    padding: 14px;
    border-radius: 50%;
    background: var(--accent-light);
    color: var(--accent);
    transition: var(--transition);
}
.adv-card:hover .adv-icon {
    background: rgba(37, 99, 235, 0.15);
    transform: scale(1.05);
}
.adv-icon svg {
    width: 100%;
    height: 100%;
}

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

.adv-card p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.7;
}

/* ---------- Process ---------- */
.process {
    background: var(--bg-secondary);
}

.process-steps {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.step {
    flex: 1;
    min-width: 200px;
    max-width: 260px;
    text-align: center;
    position: relative;
}

.step-num {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--gradient);
    color: #fff;
    font-size: 24px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    position: relative;
    z-index: 1;
    box-shadow: 0 4px 20px var(--accent-glow);
}

.step-line {
    position: absolute;
    top: 36px;
    left: calc(50% + 44px);
    width: calc(100% - 88px);
    height: 1px;
    background: var(--border);
    z-index: 0;
}
.step:last-child .step-line { display: none; }

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

.step p {
    color: var(--text-secondary);
    font-size: 14px;
}

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

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

.about-company {
    font-size: 15px;
    color: var(--accent);
    font-weight: 500;
    margin-bottom: 20px;
    letter-spacing: 2px;
}

.about-text p {
    color: var(--text-secondary);
    margin-bottom: 16px;
    font-size: 15px;
}

.about-contact {
    margin-top: 28px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-muted);
    font-size: 14px;
}
.contact-item svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: var(--accent);
}

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

.about-glow {
    position: relative;
    width: 220px;
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.glow-circle {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--gradient);
    opacity: 0.1;
    filter: blur(60px);
    animation: pulse 3s ease-in-out infinite;
}

/* ---------- Footer ---------- */
.footer {
    background: #f0f2f5;
    padding: 50px 0 30px;
    border-top: 1px solid var(--border);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}
.footer-brand p {
    color: var(--text-secondary);
    font-size: 14px;
}

.footer-links {
    display: flex;
    gap: 24px;
}
.footer-links a {
    font-size: 14px;
    color: var(--text-muted);
    transition: var(--transition);
}
.footer-links a:hover { color: var(--accent); }

.footer-bottom {
    text-align: center;
}
.footer-bottom p {
    font-size: 13px;
    color: var(--text-muted);
}
.footer-icp {
    margin-top: 8px;
}
.footer-icp a {
    color: var(--text-muted);
    transition: var(--transition);
}
.footer-icp a:hover { color: var(--accent); }

/* ---------- Back to Top ---------- */
.back-to-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}
.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.back-to-top:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    box-shadow: 0 4px 16px var(--accent-glow);
}
.back-to-top svg {
    width: 20px;
    height: 20px;
}

/* ========== Responsive ========== */
@media (max-width: 900px) {
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: #fff;
        box-shadow: -4px 0 20px rgba(0, 0, 0, 0.06);
        flex-direction: column;
        padding: 100px 32px 40px;
        gap: 4px;
        transition: right var(--transition);
    }
    .nav-menu.open { right: 0; }
    .nav-toggle { display: flex; }

    .tab-layout { grid-template-columns: 1fr; gap: 32px; }
    .adv-grid { grid-template-columns: 1fr; max-width: 400px; margin: 0 auto; }
    .about-grid { grid-template-columns: 1fr; gap: 40px; }
    .process-steps { flex-direction: column; align-items: center; }
    .step { max-width: 100%; }
    .step-line { display: none; }
    .ad-formats { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
    .hero-btns { flex-direction: column; align-items: center; }
    .btn-primary, .btn-outline { width: 100%; max-width: 260px; justify-content: center; }
    .footer-content { flex-direction: column; text-align: center; }
    .footer-brand { justify-content: center; }
    .ad-formats { grid-template-columns: 1fr; }
    .tab-nav { flex-direction: column; }
    .tab-btn { min-width: auto; justify-content: flex-start; padding: 12px 20px; }
}

/* Hero decorative blobs */
.hero::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.06) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
    pointer-events: none;
}
.hero::after {
    content: '';
    position: absolute;
    bottom: -80px;
    left: -80px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(8, 145, 178, 0.05) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
    pointer-events: none;
}
