﻿/* ================================
   重庆科之梦科技有限公司 - 响应式样式
   responsive.css
================================ */

/* ===== 大屏桌面 (1200px 以下) ===== */
@media screen and (max-width: 1200px) {
    .container {
        max-width: 100%;
        padding: 0 32px;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

/* ===== 平板 (992px 以下) ===== */
@media screen and (max-width: 992px) {
    .section {
        padding: 80px 0;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 300px;
        height: 100vh;
        background: var(--bg-secondary);
        flex-direction: column;
        justify-content: center;
        gap: 30px;
        padding: 40px;
        transition: right 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        border-left: 1px solid var(--border);
        box-shadow: -10px 0 40px rgba(0, 0, 0, 0.3);
    }
    .nav-menu.active {
        right: 0;
    }
    .nav-link {
        font-size: 18px;
    }
    .nav-cta {
        display: none;
    }
    .nav-toggle {
        display: flex;
        z-index: 1001;
    }

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

    .hero-stats {
        gap: 20px;
    }
    .stat-number {
        font-size: 34px;
    }

    .tech-layout {
        grid-template-columns: 1fr;
        gap: 48px;
    }

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

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

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

/* ===== 手机 (768px 以下) ===== */
@media screen and (max-width: 768px) {
    .section {
        padding: 64px 0;
    }

    .container {
        padding: 0 20px;
    }

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

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

    .section-desc {
        font-size: 14px;
    }

    /* Hero */
    .hero {
        justify-content: center;
        text-align: center;
        padding: 100px 20px 60px;
        background-position: 62% center;
    }

    .hero::before {
        background:
            linear-gradient(180deg, rgba(6, 10, 20, 0.86) 0%, rgba(6, 10, 20, 0.68) 42%, rgba(6, 10, 20, 0.86) 100%),
            linear-gradient(90deg, rgba(6, 10, 20, 0.72) 0%, rgba(6, 10, 20, 0.35) 100%);
    }

    .hero-content {
        max-width: 560px;
    }

    .hero-badge {
        font-size: 11px;
        padding: 6px 16px;
        margin-bottom: 24px;
    }

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

    .hero-subtitle {
        font-size: 16px;
    }

    .hero-desc {
        font-size: 14px;
        line-height: 1.7;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
        margin-bottom: 48px;
    }

    .btn {
        width: 100%;
        justify-content: center;
        padding: 14px 24px;
    }

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

    .stat-divider {
        display: none;
    }

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

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

    .stat-label {
        font-size: 11px;
    }

    .scroll-indicator {
        display: none;
    }

    /* Services */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

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

    /* Cases */
    .cases-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .cases-filter {
        gap: 8px;
    }

    .filter-btn {
        padding: 8px 16px;
        font-size: 13px;
    }

    /* Tech */
    .tech-advantages {
        gap: 12px;
    }

    .tech-adv-item {
        padding: 18px;
        gap: 14px;
    }

    .adv-number {
        font-size: 20px;
    }

    .adv-content h4 {
        font-size: 15px;
    }

    .adv-content p {
        font-size: 12px;
    }

    .code-body {
        font-size: 12px;
        padding: 16px;
    }

    /* Process Timeline */
    .process-timeline {
        padding-left: 30px;
    }

    .process-line {
        left: 20px;
    }

    .process-step {
        width: 100%;
        left: 0 !important;
        text-align: left !important;
        padding: 12px 0 12px 50px;
    }

    .process-step::before {
        left: 0 !important;
        right: auto !important;
        top: 16px;
        width: 40px;
        height: 40px;
        font-size: 14px;
    }

    /* About */
    .about-lead {
        font-size: 18px;
    }

    .about-text p {
        font-size: 14px;
    }

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

    /* Contact */
    .contact-form-wrapper {
        padding: 28px 24px;
    }

    .contact-methods {
        gap: 12px;
    }

    .contact-method {
        padding: 16px;
    }

    .method-value {
        font-size: 14px;
    }

    /* Footer */
    .footer-links {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    .floating-contact {
        right: 18px;
        bottom: 74px;
        gap: 10px;
    }

    .floating-contact-item,
    .floating-contact-btn {
        width: 42px;
        height: 42px;
    }

    .floating-icon {
        font-size: 12px;
    }

    .floating-label {
        font-size: 10px;
    }

    .floating-account {
        display: none;
    }

    .floating-qr {
        right: 52px;
        bottom: -8px;
        width: min(210px, calc(100vw - 88px));
        padding: 10px;
    }
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 42px;
        height: 42px;
    }
}

/* ===== 小手机 (480px 以下) ===== */
@media screen and (max-width: 480px) {
    .hero-title {
        font-size: 26px;
    }

    .hero-badge {
        font-size: 10px;
    }

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

    .hero-stats {
        gap: 12px;
    }

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

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

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

    .service-card h3 {
        font-size: 18px;
    }

    .case-info h3 {
        font-size: 16px;
    }

    .mockup-screen {
        width: 180px;
    }

    .contact-heading {
        font-size: 20px;
    }

    .form-title {
        font-size: 18px;
    }

    .footer-desc {
        font-size: 13px;
    }
}

/* ===== 超小屏幕 (360px 以下) ===== */
@media screen and (max-width: 360px) {
    .hero-title {
        font-size: 22px;
    }

    .hero-stats {
        flex-direction: column;
        gap: 16px;
    }

    .stat-item {
        min-width: auto;
    }

    .nav-logo {
        font-size: 16px;
    }

    .logo-icon {
        width: 32px;
        height: 32px;
        font-size: 18px;
    }
}

/* ===== 打印样式 ===== */
@media print {
    .navbar,
    .nav-toggle,
    .back-to-top,
    #particle-canvas,
    .scroll-indicator,
    .hero-buttons,
    .contact-form-wrapper,
    .cases-filter {
        display: none !important;
    }

    body {
        background: #fff;
        color: #000;
    }

    .section {
        padding: 20px 0;
    }
}

/* ===== 高分屏适配 ===== */
@media screen and (-webkit-min-device-pixel-ratio: 2),
       screen and (min-resolution: 192dpi) {
    .logo-icon {
        box-shadow: 0 4px 20px rgba(0, 212, 255, 0.3);
    }
}

/* ===== 暗色模式偏好 ===== */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: #060a14;
    }
}

/* ===== 减少动画偏好 ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }
}



