/* ========================================
   M² Digital Studio - Main Stylesheet
   ======================================== */

/* CSS Variables */
:root {
    --primary: #6366f1;
    --secondary: #8b5cf6;
    --accent: #06b6d4;
    --dark: #0a0a0f;
    --light: #f8fafc;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--dark);
    color: var(--light);
    overflow-x: hidden;
}

/* 移动端显示默认光标 */
@media (max-width: 768px) {
    body { cursor: auto; }
}

/* ========================================
   Loading Screen
   ======================================== */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--dark);
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.loading-content {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
}

.loading-logo {
    width: clamp(48px, 12vw, 72px);
    height: auto;
    object-fit: contain;
    filter: brightness(1.1);
}

.loading-bar {
    width: 120px;
    height: 1px;
    background: rgba(255,255,255,0.08);
    border-radius: 1px;
    overflow: hidden;
}

.loading-progress {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
}

/* ========================================
   Tear Effect Layers
   ======================================== */
.tear-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 8500;
    overflow: hidden;
}

.tear-left, .tear-right {
    position: absolute;
    top: 0;
    width: 100%;
    height: 100%;
    background: var(--dark);
}

.tear-left {
    clip-path: polygon(0 0, 50% 0, 45% 100%, 0 100%);
}

.tear-right {
    clip-path: polygon(50% 0, 100% 0, 100% 100%, 45% 100%);
}

.tear-line {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary), var(--accent), var(--primary));
    filter: blur(2px);
    box-shadow: 0 0 30px var(--accent), 0 0 60px var(--primary);
}

/* ========================================
   Main Content
   ======================================== */
.main-content {
    position: relative;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
    min-height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: radial-gradient(ellipse at center, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.hero-gradient {
    position: absolute;
    width: 150%;
    height: 150%;
    top: -25%;
    left: -25%;
    background: conic-gradient(from 0deg at 50% 50%,
        rgba(99, 102, 241, 0.3) 0deg,
        rgba(139, 92, 246, 0.1) 90deg,
        rgba(6, 182, 212, 0.3) 180deg,
        rgba(139, 92, 246, 0.1) 270deg,
        rgba(99, 102, 241, 0.3) 360deg);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    100% { transform: rotate(360deg); }
}

.hero-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(99, 102, 241, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99, 102, 241, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}

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

.hero-badge {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background: rgba(99, 102, 241, 0.2);
    border: 1px solid rgba(99, 102, 241, 0.5);
    border-radius: 100px;
    font-size: 0.875rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 2rem;
}

.hero-title {
    font-size: clamp(3rem, 12vw, 10rem);
    font-weight: 900;
    line-height: 0.9;
    letter-spacing: -0.05em;
    margin-bottom: 1.5rem;
}

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

.hero-title .word {
    display: inline-block;
    margin-right: 0.2em;
}

.hero-title .char {
    display: inline-block;
    transform: translateY(100%);
}

.hero-subtitle {
    font-size: clamp(1rem, 3vw, 1.5rem);
    font-weight: 300;
    opacity: 0.7;
    max-width: 600px;
    margin: 0 auto 3rem;
    line-height: 1.6;
    min-height: 3.2em;
}

/* 打字机效果 */
.typewriter {
    border-right: none;
}

.typewriter-cursor {
    display: inline-block;
    color: var(--accent);
    font-weight: 300;
    animation: blink 0.7s step-end infinite;
    margin-left: 2px;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 2.5rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
    border-radius: 100px;
    font-size: 1rem;
    font-weight: 600;
    color: white;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero-cta:hover {
    transform: scale(1.05);
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.4);
}

.hero-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s ease;
}

.hero-cta:hover::before {
    left: 100%;
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.6;
}

.scroll-line {
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, var(--accent), transparent);
    position: relative;
    overflow: hidden;
}

.scroll-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 20px;
    background: var(--accent);
    animation: scrollDown 2s ease-in-out infinite;
}

@keyframes scrollDown {
    0% { top: -20px; opacity: 0; }
    50% { opacity: 1; }
    100% { top: 60px; opacity: 0; }
}

/* ========================================
   Section Styles
   ======================================== */
section {
    position: relative;
    padding: 8rem 2rem;
}

.section-title {
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 900;
    letter-spacing: -0.03em;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.125rem;
    opacity: 0.6;
    max-width: 500px;
}

.section-label {
    display: inline-block;
    font-size: 0.75rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 1rem;
    position: relative;
    padding-left: 3rem;
}

.section-label::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 2rem;
    height: 1px;
    background: var(--accent);
}

/* ========================================
   About Section
   ======================================== */
.about {
    background: linear-gradient(180deg, var(--dark) 0%, rgba(99, 102, 241, 0.05) 50%, var(--dark) 100%);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    max-width: 1400px;
    margin: 4rem auto 0;
}

@media (max-width: 968px) {
    .about-grid {
        grid-template-columns: 1fr;
    }
}

.about-visual {
    position: relative;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.about-shape {
    position: absolute;
    width: 80%;
    height: 80%;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.3), rgba(6, 182, 212, 0.3));
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    filter: blur(60px);
}

.about-inner {
    position: relative;
    width: 60%;
    aspect-ratio: 1;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    font-weight: 900;
}

.about-text p {
    font-size: 1.125rem;
    line-height: 1.8;
    opacity: 0.8;
    margin-bottom: 1.5rem;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 3rem;
    padding-top: 3rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

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

.stat-number {
    font-size: 3rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.875rem;
    opacity: 0.6;
    margin-top: 0.5rem;
}

/* ========================================
   Services Section
   ======================================== */
.services {
    overflow: hidden;
}

.services-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: rgba(255,255,255,0.05);
    max-width: 1400px;
    margin: 4rem auto 0;
}

.service-item {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    align-items: center;
    padding: 3rem;
    background: var(--dark);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: background 0.3s ease;
}

@media (max-width: 768px) {
    .service-item {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

.service-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(6, 182, 212, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.service-number {
    font-size: 4rem;
    font-weight: 900;
    opacity: 0.2;
    transition: opacity 0.3s ease;
}

.service-item:hover .service-number {
    opacity: 0.5;
}

.service-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.service-desc {
    opacity: 0.6;
    font-size: 0.95rem;
}

.service-arrow {
    width: 60px;
    height: 60px;
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    transition: all 0.3s ease;
}

.service-item:hover .service-arrow {
    border-color: var(--accent);
    background: rgba(6, 182, 212, 0.2);
    transform: translateX(10px);
}

/* ========================================
   Cases Section
   ======================================== */
.cases {
    background: linear-gradient(180deg, var(--dark) 0%, rgba(99, 102, 241, 0.03) 50%, var(--dark) 100%);
}

.cases-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    max-width: 1400px;
    margin: 4rem auto 0;
}

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

@media (max-width: 640px) {
    .cases-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

.case-card {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    border-radius: 16px;
    cursor: pointer;
    border: 1px solid rgba(255,255,255,0.06);
}

.case-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.case-card:hover .case-bg {
    transform: scale(1.05);
}

.case-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.5) 60%, transparent 100%);
    transform: translateY(0);
    opacity: 1;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 5;
}

.case-tag {
    display: inline-block;
    padding: 0.3rem 0.75rem;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
    color: rgba(255,255,255,0.9);
}

.case-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: white;
}

.case-desc {
    font-size: 0.8rem;
    line-height: 1.5;
    color: rgba(255,255,255,0.6);
    margin-bottom: 0.75rem;
}

.case-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.case-meta span {
    padding: 0.2rem 0.5rem;
    background: rgba(255,255,255,0.08);
    border-radius: 4px;
    font-size: 0.65rem;
    color: rgba(255,255,255,0.5);
    font-weight: 500;
}

/* ========================================
   Contact Section
   ======================================== */
.contact {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
}

.contact-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.2) 0%, transparent 70%);
    filter: blur(80px);
}

.contact-content {
    position: relative;
    z-index: 10;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.contact-title {
    font-size: clamp(3rem, 10vw, 8rem);
    font-weight: 900;
    letter-spacing: -0.05em;
    margin-bottom: 2rem;
}

.contact-text {
    font-size: 1.25rem;
    opacity: 0.7;
    max-width: 500px;
    margin: 0 auto 3rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 500px;
    margin: 0 auto;
}

.contact-input {
    width: 100%;
    padding: 1rem 1.5rem;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
    font-family: inherit;
}

.contact-input:focus {
    border-color: var(--accent);
    background: rgba(255,255,255,0.1);
}

.contact-input::placeholder {
    color: rgba(255,255,255,0.4);
}

.contact-textarea {
    min-height: 120px;
    resize: vertical;
    line-height: 1.6;
}

.contact-btn {
    width: 100%;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 52px;
}

.contact-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
}

.contact-btn:active {
    transform: translateY(0);
}

.contact-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-loading {
    display: flex;
    align-items: center;
    justify-content: center;
}

.form-message {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.9rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.form-message.show {
    opacity: 1;
}

.form-message.success {
    color: #10b981;
}

.form-message.error {
    color: #ef4444;
}

.contact-info {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 4rem;
    flex-wrap: wrap;
}

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

.contact-item-label {
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    opacity: 0.5;
    margin-bottom: 0.5rem;
}

.contact-item-value {
    font-size: 1.125rem;
    font-weight: 600;
}

/* ========================================
   Footer
   ======================================== */
.footer {
    padding: 2rem;
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.footer-text {
    opacity: 0.5;
    font-size: 0.875rem;
}

/* ========================================
   Navigation
   ======================================== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1.5rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    mix-blend-mode: difference;
}

.nav-logo {
    height: 36px;
    width: auto;
    max-width: 120px;
    object-fit: contain;
    transition: opacity 0.3s ease;
}

.nav-logo:hover {
    opacity: 0.8;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

@media (max-width: 768px) {
    .nav {
        padding: 1rem 1.5rem;
    }
    .nav-links {
        display: none;
    }
}

.nav-link {
    font-size: 0.875rem;
    text-decoration: none;
    color: white;
    position: relative;
    padding: 0.5rem 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* ========================================
   Mobile Menu
   ======================================== */
.mobile-menu-btn {
    display: none;
    width: 44px;
    height: 44px;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 10px;
    cursor: pointer;
    position: relative;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.mobile-menu-btn span {
    width: 20px;
    height: 2px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 10, 15, 0.98);
    z-index: 999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.mobile-menu.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu a {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    text-decoration: none;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    min-height: 44px;
    display: flex;
    align-items: center;
    -webkit-tap-highlight-color: transparent;
}

.mobile-menu.active a {
    opacity: 1;
    transform: translateY(0);
}

.mobile-menu a:nth-child(1) { transition-delay: 0.1s; }
.mobile-menu a:nth-child(2) { transition-delay: 0.15s; }
.mobile-menu a:nth-child(3) { transition-delay: 0.2s; }
.mobile-menu a:nth-child(4) { transition-delay: 0.25s; }

/* ========================================
   Utility Classes
   ======================================== */
.tear-hover {
    position: relative;
    overflow: hidden;
}

.tear-hover::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent 40%, rgba(6, 182, 212, 0.3) 50%, transparent 60%);
    transition: left 0.6s ease;
}

.tear-hover:hover::before {
    left: 100%;
}

/* ========================================
   Floating Particles
   ======================================== */
.particle {
    position: fixed;
    width: 4px;
    height: 4px;
    background: var(--accent);
    border-radius: 50%;
    pointer-events: none;
    opacity: 0.5;
    z-index: 1;
}

/* ========================================
   Cinematic Bars
   ======================================== */
.cinematic-bar {
    position: fixed;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--dark);
    z-index: 8000;
    opacity: 0;
    visibility: hidden;
}

.cinematic-bar-top { top: 0; }
.cinematic-bar-bottom { bottom: 0; }

/* ========================================
   Responsive - Mobile (<=768px)
   ======================================== */
@media (max-width: 768px) {
    /* 安全区域适配（刘海屏/底部横条） */
    .nav {
        padding: 1rem 1rem;
        padding-top: max(1rem, env(safe-area-inset-top));
    }

    .mobile-menu {
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
    }

    section {
        padding: 4rem 1.25rem;
    }

    /* Hero */
    .hero {
        min-height: 100svh;
    }

    .hero-content {
        padding: 1rem;
    }

    .hero-badge {
        font-size: 0.7rem;
        padding: 0.4rem 1rem;
        margin-bottom: 1.5rem;
    }

    .hero-title {
        font-size: clamp(2.5rem, 14vw, 5rem);
        margin-bottom: 1rem;
    }

    .hero-subtitle {
        font-size: 0.95rem;
        padding: 0 0.5rem;
        margin-bottom: 2rem;
        line-height: 1.7;
    }

    .hero-cta {
        padding: 0.875rem 1.75rem;
        font-size: 0.9rem;
        min-height: 48px;
    }

    .scroll-indicator {
        bottom: 1.5rem;
    }

    .scroll-line {
        height: 40px;
    }

    /* Section Titles */
    .section-title {
        font-size: clamp(2rem, 9vw, 3.5rem);
        line-height: 1.1;
    }

    .section-subtitle {
        font-size: 1rem;
    }

    .section-label {
        padding-left: 2.5rem;
    }

    .section-label::before {
        width: 1.5rem;
    }

    /* About */
    .about-visual {
        width: 100%;
        max-width: 200px;
        margin: 0 auto 2rem;
    }

    .about-shape {
        width: 100%;
        height: 100%;
        filter: blur(40px);
    }

    .about-inner {
        width: 70%;
        font-size: 2.5rem;
        font-weight: 900;
        letter-spacing: -0.02em;
    }

    .about-text p {
        font-size: 1rem;
        line-height: 1.7;
    }

    .about-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
        margin-top: 2rem;
        padding-top: 2rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    .stat-label {
        font-size: 0.7rem;
    }

    /* Services */
    .services-wrapper {
        margin-top: 2rem;
    }

    .service-item {
        padding: 1.5rem 1.25rem;
        grid-template-columns: auto 1fr auto;
        gap: 1rem;
    }

    .service-number {
        font-size: 2rem;
        min-width: 40px;
    }

    .service-title {
        font-size: 1.1rem;
    }

    .service-desc {
        font-size: 0.85rem;
        margin-top: 0.25rem;
    }

    .service-arrow {
        width: 36px;
        height: 36px;
    }

    .service-arrow svg {
        width: 18px;
        height: 18px;
    }

    /* Cases */
    .cases-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin-top: 2rem;
    }

    .case-card {
        aspect-ratio: 16/10;
    }

    .case-content {
        padding: 1.25rem;
        background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.7) 70%, transparent 100%);
    }

    .case-title {
        font-size: 1.1rem;
    }

    .case-desc {
        font-size: 0.8rem;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .case-meta {
        display: none;
    }

    /* Contact */
    .contact {
        min-height: auto;
        padding: 5rem 1.25rem;
    }

    .contact-bg {
        width: 400px;
        height: 400px;
    }

    .contact-title {
        font-size: clamp(2.5rem, 13vw, 5rem);
        margin-bottom: 1rem;
    }

    .contact-text {
        font-size: 1rem;
        margin-bottom: 2rem;
    }

    .contact-form {
        flex-direction: column;
        gap: 0.75rem;
    }

    .contact-input,
    .contact-btn {
        width: 100%;
        min-height: 48px;
    }

    .contact-textarea {
        min-height: 120px;
    }

    .contact-info {
        flex-direction: column;
        gap: 1.5rem;
        margin-top: 2.5rem;
    }

    .contact-item-label {
        font-size: 0.7rem;
    }

    .contact-item-value {
        font-size: 0.95rem;
    }

    /* Footer */
    .footer {
        padding: 1.5rem 1rem;
        padding-bottom: max(1.5rem, env(safe-area-inset-bottom));
    }

    /* Loading */
    .loading-logo {
        width: clamp(40px, 15vw, 56px);
    }

    .loading-content {
        gap: 1.5rem;
    }

    .loading-bar {
        width: 80px;
    }

    /* Navigation */
    .nav-logo {
        height: 28px;
    }

    .nav-links {
        display: none !important;
    }

    .mobile-menu-btn {
        display: flex;
        min-width: 44px;
        min-height: 44px;
        justify-content: center;
        align-items: center;
    }
}

/* ========================================
   Responsive - Small Phone (<=480px)
   ======================================== */
@media (max-width: 480px) {
    .hero-title {
        font-size: clamp(2.2rem, 16vw, 3.5rem);
    }

    .hero-badge {
        font-size: 0.65rem;
        padding: 0.35rem 0.85rem;
    }

    .section-title {
        font-size: clamp(1.8rem, 10vw, 2.8rem);
    }

    .about-visual {
        max-width: 160px;
    }

    .about-inner {
        font-size: 2rem;
    }

    .about-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
    }

    .stat-number {
        font-size: 1.5rem;
    }

    .stat-label {
        font-size: 0.65rem;
    }

    .service-item {
        grid-template-columns: 1fr auto;
    }

    .service-number {
        display: none;
    }

    .case-card {
        aspect-ratio: 16/10;
        border-radius: 12px;
    }

    .case-title {
        font-size: 1rem;
    }

    .contact-title {
        font-size: clamp(2rem, 14vw, 4rem);
    }

    .mobile-menu a {
        font-size: 1.5rem;
    }
}

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

/* Smooth scroll sections */
[data-scroll-section] {
    opacity: 0;
    transform: translateY(50px);
}

/* ========================================
   Touch & Mobile Utilities
   ======================================== */
/* 移除移动端点击高亮 */
a, button, [role="button"] {
    -webkit-tap-highlight-color: transparent;
}

/* 触控友好的最小点击区域 */
@media (max-width: 768px) {
    .nav-link {
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    .hero-cta,
    .contact-btn,
    .contact-input {
        min-height: 48px;
    }

    /* 禁止移动端文本选择（提升交互体验） */
    .hero-badge,
    .section-label,
    .case-tag,
    .service-number {
        user-select: none;
        -webkit-user-select: none;
    }

    /* iOS 弹性滚动修正 */
    .hero {
        min-height: -webkit-fill-available;
    }

    /* 防止水平溢出 */
    .hero-content,
    .about-text,
    .contact-content {
        word-break: break-word;
        overflow-wrap: break-word;
    }
}

/* iOS 底部安全区域 */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .footer {
        padding-bottom: calc(1.5rem + env(safe-area-inset-bottom));
    }

    .mobile-menu {
        padding-bottom: env(safe-area-inset-bottom);
    }
}

/* 移动端暗色滚动条 */
@media (max-width: 768px) {
    ::-webkit-scrollbar {
        width: 4px;
    }

    ::-webkit-scrollbar-track {
        background: var(--dark);
    }

    ::-webkit-scrollbar-thumb {
        background: rgba(255,255,255,0.15);
        border-radius: 4px;
    }
}
