/* 
 * 传音科技 | chuanyin.cc
 * 基于 frontend-design 理念设计
 * 避免通用AI风格，注重美学细节
 */

:root {
    --color-bg: #fafafa;
    --color-text: #1a1a1a;
    --color-text-light: #666;
    --color-text-muted: #999;
    --color-accent: #2563eb;
    --color-accent-dark: #1d4ed8;
    --color-border: #e5e5e5;
    --color-code-bg: #f5f5f5;
    --font-main: "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-mono: "SF Mono", "Fira Code", "Consolas", monospace;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

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

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

a:hover {
    color: var(--color-accent);
}

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 24px 0;
    background: rgba(250, 250, 250, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid transparent;
    transition: all var(--transition);
}

.nav.scrolled {
    padding: 16px 0;
    border-bottom-color: var(--color-border);
}

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

.logo {
    font-weight: 600;
    font-size: 1.125rem;
    letter-spacing: -0.02em;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 40px;
}

.nav-menu a {
    font-size: 0.9rem;
    color: var(--color-text-light);
}

.nav-menu a:hover {
    color: var(--color-text);
}

.btn-nav {
    padding: 10px 20px;
    background: var(--color-text);
    color: var(--color-bg) !important;
    border-radius: 6px;
    font-size: 0.875rem !important;
    transition: all var(--transition);
}

.btn-nav:hover {
    background: var(--color-accent);
    transform: translateY(-1px);
}

.menu-btn {
    display: none;
    width: 32px;
    height: 24px;
    flex-direction: column;
    justify-content: space-between;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.menu-btn span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--color-text);
    transition: all var(--transition);
}

.menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.menu-btn.active span:nth-child(2) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Hero */
.hero {
    position: relative;
    min-height: 100vh;
    padding: 140px 0 100px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
}

.hero-pattern {
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: 
        linear-gradient(135deg, transparent 0%, rgba(37, 99, 235, 0.02) 100%),
        repeating-linear-gradient(90deg, transparent 0px, transparent 60px, rgba(0,0,0,0.02) 60px, rgba(0,0,0,0.02) 61px);
    pointer-events: none;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 32px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.hero-meta {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 24px;
}

.hero-title {
    font-size: clamp(2.5rem, 5.5vw, 4.5rem);
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin-bottom: 28px;
}

.hero-amp {
    color: var(--color-accent);
    font-weight: 300;
}

.hero-desc {
    font-size: 1.125rem;
    color: var(--color-text-light);
    line-height: 1.8;
    margin-bottom: 40px;
    max-width: 440px;
}

.hero-actions {
    display: flex;
    gap: 16px;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    padding: 14px 28px;
    background: var(--color-text);
    color: var(--color-bg);
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 8px;
    transition: all var(--transition);
}

.btn-primary:hover {
    background: var(--color-accent);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.25);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    padding: 14px 28px;
    background: transparent;
    color: var(--color-text);
    font-size: 0.95rem;
    font-weight: 500;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    transition: all var(--transition);
}

.btn-secondary:hover {
    border-color: var(--color-text);
    color: var(--color-text);
}

.hero-graphic {
    display: flex;
    justify-content: center;
    align-items: center;
}

.code-block {
    background: var(--color-code-bg);
    padding: 32px;
    border-radius: 12px;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    line-height: 1.8;
    border: 1px solid var(--color-border);
}

.code-line {
    white-space: nowrap;
}

.code-line.indent1 {
    padding-left: 24px;
}

.code-keyword {
    color: #9333ea;
}

.code-func {
    color: var(--color-accent);
}

.scroll-hint {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: var(--color-text-muted);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
}

.scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, var(--color-text-muted), transparent);
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.3; transform: scaleY(0.8); }
    50% { opacity: 1; transform: scaleY(1); }
}

/* Section Common */
.section-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 32px;
}

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

.section-label {
    display: block;
    font-size: 0.75rem;
    color: var(--color-text-muted);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.section-title {
    font-size: clamp(1.75rem, 3.5vw, 2.5rem);
    font-weight: 600;
    letter-spacing: -0.02em;
}

/* Services */
.services {
    padding: 120px 0;
}

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

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

.service-card:hover {
    border-color: transparent;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.06);
    transform: translateY(-4px);
}

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

.service-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 12px;
    letter-spacing: -0.01em;
}

.service-card > p {
    font-size: 0.95rem;
    color: var(--color-text-light);
    margin-bottom: 20px;
    line-height: 1.7;
}

.service-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.service-list li {
    font-size: 0.8rem;
    padding: 6px 12px;
    background: var(--color-code-bg);
    color: var(--color-text-light);
    border-radius: 4px;
}

/* Works */
.works {
    padding: 120px 0;
    background: white;
}

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

.work-card {
    group: work;
    cursor: pointer;
}

.work-preview {
    aspect-ratio: 4/3;
    border-radius: 12px;
    margin-bottom: 20px;
    overflow: hidden;
    transition: all var(--transition);
}

.work-card:hover .work-preview {
    transform: scale(1.02);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
}

.work-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    font-size: 0.9rem;
    letter-spacing: 0.05em;
}

.work-info h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.work-info p {
    font-size: 0.9rem;
    color: var(--color-text-light);
    margin-bottom: 12px;
    line-height: 1.6;
}

.work-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.work-tags span {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.work-tags span:not(:last-child)::after {
    content: "·";
    margin-left: 8px;
}

/* About */
.about {
    padding: 120px 0;
    background: var(--color-text);
    color: white;
}

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

.about .section-label {
    color: rgba(255, 255, 255, 0.5);
}

.about-content h2 {
    font-size: clamp(1.75rem, 3.5vw, 2.75rem);
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.02em;
    margin-bottom: 32px;
}

.about-content > p {
    max-width: 560px;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.8;
    margin-bottom: 16px;
}

.about-stats {
    display: flex;
    gap: 64px;
    margin-top: 48px;
    padding-top: 48px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-num {
    display: block;
    font-size: 2.5rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: white;
}

.stat-label {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.5);
}

/* Process */
.process {
    padding: 120px 0;
}

.process-timeline {
    display: flex;
    align-items: flex-start;
    gap: 24px;
}

.process-item {
    flex: 1;
    padding: 32px;
    background: white;
    border: 1px solid var(--color-border);
    border-radius: 12px;
}

.process-num {
    display: block;
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-bottom: 16px;
}

.process-item h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.process-item p {
    font-size: 0.9rem;
    color: var(--color-text-light);
    line-height: 1.6;
}

.process-arrow {
    display: flex;
    align-items: center;
    font-size: 1.25rem;
    color: var(--color-text-muted);
    padding-top: 48px;
}

/* Contact */
.contact {
    padding: 120px 0;
    background: white;
}

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

.contact-main {
    max-width: 600px;
}

.contact-main h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: 20px;
}

.contact-main > p {
    font-size: 1.125rem;
    color: var(--color-text-light);
    margin-bottom: 48px;
}

.contact-ways {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.contact-item {
    display: flex;
    align-items: baseline;
    gap: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--color-border);
}

.contact-item:last-child {
    border-bottom: none;
}

.contact-item .contact-label {
    width: 80px;
    font-size: 0.75rem;
    color: var(--color-text-muted);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    flex-shrink: 0;
}

.contact-item .contact-value {
    font-size: 1.25rem;
    font-weight: 500;
}

.contact-item a:hover {
    color: var(--color-accent);
}

/* Footer */
.footer {
    padding: 64px 0 32px;
    border-top: 1px solid var(--color-border);
}

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

.footer-top {
    display: flex;
    justify-content: space-between;
    margin-bottom: 48px;
}

.footer-brand .logo {
    display: block;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.footer-brand p {
    font-size: 0.9rem;
    color: var(--color-text-light);
}

.footer-links {
    display: flex;
    gap: 64px;
}

.link-group h4 {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.link-group a {
    display: block;
    font-size: 0.9rem;
    color: var(--color-text-light);
    margin-bottom: 8px;
}

.link-group a:hover {
    color: var(--color-text);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 32px;
    border-top: 1px solid var(--color-border);
}

.footer-bottom p {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.footer-moto {
    font-style: italic;
}

/* Responsive */
@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        gap: 60px;
    }
    
    .hero-graphic {
        order: -1;
    }
    
    .code-block {
        font-size: 0.8rem;
        padding: 24px;
    }
    
    .services-grid,
    .works-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .process-timeline {
        flex-wrap: wrap;
    }
    
    .process-arrow {
        display: none;
    }
    
    .process-item {
        flex: 1 1 45%;
    }
}

@media (max-width: 768px) {
    .nav-container {
        padding: 0 24px;
    }
    
    .nav-menu {
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 32px 24px;
        gap: 24px;
        border-bottom: 1px solid var(--color-border);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition);
    }
    
    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .menu-btn {
        display: flex;
    }
    
    .hero-container {
        padding: 0 24px;
    }
    
    .hero-title {
        font-size: 2.25rem;
    }
    
    .hero-actions {
        flex-direction: column;
    }
    
    .btn-primary, .btn-secondary {
        text-align: center;
    }
    
    .scroll-hint {
        display: none;
    }
    
    .section-container {
        padding: 0 24px;
    }
    
    .services,
    .works,
    .about,
    .process,
    .contact {
        padding: 80px 0;
    }
    
    .services-grid,
    .works-grid {
        grid-template-columns: 1fr;
    }
    
    .about-stats {
        flex-direction: column;
        gap: 32px;
    }
    
    .process-item {
        flex: 1 1 100%;
    }
    
    .footer-top {
        flex-direction: column;
        gap: 40px;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 32px;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
}

/* Animations */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-up {
    animation: fadeUp 0.6s ease forwards;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
