/* ==========================================
   墨玩产品展示站
   ========================================== */

:root {
    --bg: #FCFCFC;
    --bg-alt: #F5F5F5;
    --card-bg: #FFFFFF;
    --border: #E5E5E5;
    --text-primary: #1A1A1A;
    --text-secondary: #555555;
    --text-muted: #888888;
    --accent: #0066CC;
    --accent-hover: #0052A3;
    --accent-light: rgba(0, 102, 204, 0.05);
    --accent-soft: rgba(0, 102, 204, 0.12);
    --max-width: 1100px;
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.02);
    --shadow-md: 0 4px 12px rgba(0, 102, 204, 0.04);
    --shadow-lg: 0 12px 30px rgba(0, 102, 204, 0.06);
    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --font-body: 'Outfit', -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    --font-serif: 'Noto Serif SC', serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

.container {
    width: min(var(--max-width), calc(100% - 48px));
    margin: 0 auto;
}

/* ==========================================
   滚动入场动画
   ========================================== */

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.about-grid .about-card:nth-child(1) { transition-delay: 0s; }
.about-grid .about-card:nth-child(2) { transition-delay: 0.1s; }
.about-grid .about-card:nth-child(3) { transition-delay: 0.2s; }

.works-grid .work-card:nth-child(1) { transition-delay: 0s; }
.works-grid .work-card:nth-child(2) { transition-delay: 0.15s; }
.works-grid .work-card:nth-child(3) { transition-delay: 0.3s; }

/* ==========================================
   导航
   ========================================== */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 24px 48px;
    transition: var(--transition);
}

.navbar.scrolled {
    background: rgba(252, 252, 252, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 16px 48px;
    box-shadow: 0 1px 0 var(--border);
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    font-family: var(--font-serif);
    font-size: 20px;
    font-weight: 800;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: 1px;
    transition: var(--transition);
}

.nav-brand:hover { color: var(--accent); }

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

.nav-links a {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
    position: relative;
}

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

.nav-links a:hover { color: var(--accent); }
.nav-links a:hover::after { width: 100%; }

/* ==========================================
   Hero
   ========================================== */

.hero {
    padding: 180px 0 100px;
    position: relative;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: -100px;
    right: -100px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(0, 102, 204, 0.05) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    animation: float 8s ease-in-out infinite;
}

.hero-bg-2 {
    position: absolute;
    bottom: -80px;
    left: -120px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(0, 102, 204, 0.03) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    animation: float 10s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-20px, 15px) scale(1.05); }
}

.hero-content { position: relative; }

.hero-eyebrow {
    font-size: 11px;
    letter-spacing: 3px;
    color: var(--text-muted);
    margin-bottom: 32px;
    font-weight: 500;
}

.hero-title {
    font-family: var(--font-serif);
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 700;
    line-height: 1.6;
    margin-bottom: 32px;
    color: var(--text-primary);
}

.title-line {
    display: block;
}

.title-highlight {
    color: var(--accent);
    font-size: clamp(32px, 5vw, 52px);
    font-weight: 900;
    position: relative;
    display: inline-block;
    animation: titleGlow 3s ease-in-out infinite;
}

@keyframes titleGlow {
    0%, 100% { text-shadow: none; }
    50% { text-shadow: 0 0 40px rgba(0, 102, 204, 0.1); }
}

.hero-desc {
    font-size: 18px;
    color: var(--text-secondary);
    line-height: 2.2;
    margin-bottom: 16px;
    font-weight: 400;
}

.hero-sub {
    font-size: 15px;
    color: var(--text-muted);
    margin-bottom: 40px;
}

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

.btn-primary {
    display: inline-flex;
    align-items: center;
    padding: 12px 28px;
    background: var(--accent);
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 102, 204, 0.2);
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    padding: 12px 28px;
    background: transparent;
    color: var(--accent);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid var(--accent-soft);
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.btn-ghost:hover {
    background: var(--accent-light);
    border-color: var(--accent);
    transform: translateY(-2px);
}

/* ==========================================
   通用 Section
   ========================================== */

.section { padding: 120px 0; }
.section-alt { background: var(--bg-alt); }
.section-connect { padding: 40px 0 80px; }

/* 过渡引言 */
.section-quote {
    padding: 20px 0;
    text-align: center;
}

.quote-text {
    font-family: var(--font-serif);
    font-size: 20px;
    color: var(--text-muted);
    letter-spacing: 1px;
}

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

.section-title {
    font-family: var(--font-serif);
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.section-sub {
    font-size: 15px;
    color: var(--text-muted);
}

/* ==========================================
   关于我
   ========================================== */

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

.about-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 36px 32px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.about-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.about-card:hover::before { transform: scaleX(1); }

.about-card:hover {
    border-color: rgba(0, 102, 204, 0.2);
    box-shadow: var(--shadow-lg);
    transform: translateY(-6px);
}

.about-num {
    font-family: var(--font-serif);
    font-size: 32px;
    font-weight: 900;
    color: var(--accent-soft);
    margin-bottom: 16px;
    line-height: 1;
}

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

.about-card p {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.9;
}

.about-card strong {
    color: var(--accent);
    font-weight: 600;
}

/* ==========================================
   产品卡片
   ========================================== */

.works-grid {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.work-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    display: flex;
    overflow: hidden;
    transition: var(--transition);
}

.work-card:hover {
    border-color: rgba(0, 102, 204, 0.2);
    box-shadow: 0 16px 40px rgba(0, 102, 204, 0.08);
    transform: translateX(8px);
}

.work-card-img {
    width: 520px;
    flex-shrink: 0;
    background: var(--bg-alt);
    overflow: hidden;
    min-height: 280px;
}

.work-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
}

.work-card:hover .work-preview {
    transform: scale(1.03);
}

.work-card-body {
    padding: 36px 40px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.work-name-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.work-logo {
    width: 36px;
    height: 36px;
    object-fit: contain;
    border-radius: var(--radius-sm);
}

.work-name-row h3 {
    font-family: var(--font-serif);
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
}

.work-tagline {
    font-size: 14px;
    color: var(--accent);
    margin-bottom: 16px;
    letter-spacing: 0.3px;
}

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

.work-desc strong {
    color: var(--accent);
    font-weight: 600;
}

.work-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: auto;
}

.btn-sm {
    display: inline-flex;
    align-items: center;
    padding: 8px 18px;
    background: var(--accent);
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid var(--accent);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
}

.btn-sm:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.15);
}

.btn-sm-outline {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent-soft);
}

.btn-sm-outline:hover {
    background: var(--accent-light);
    border-color: var(--accent);
    color: var(--accent);
}

/* ==========================================
   找到我
   ========================================== */

.connect-block {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 48px;
    text-align: center;
}

.connect-block .section-title {
    margin-bottom: 8px;
}

.connect-slogan {
    font-size: 15px;
    color: var(--text-muted);
    margin-bottom: 32px;
}

.connect-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 32px;
}

.connect-item-inline {
    display: flex;
    align-items: center;
    gap: 6px;
}

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

.wechat-id {
    font-size: 15px;
    font-weight: 600;
    color: var(--accent);
}

.connect-value {
    font-size: 15px;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
    transition: var(--transition);
}

.connect-value:hover { color: var(--accent-hover); }

.connect-note {
    font-size: 12px;
    color: var(--text-muted);
}

.connect-sep {
    color: var(--border);
    font-size: 14px;
}

.copy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: none;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
    vertical-align: middle;
}

.copy-btn:hover {
    color: var(--accent);
}

.copy-btn.copied {
    color: #22c55e;
}

.copy-btn .icon-check {
    display: none;
    color: #22c55e;
}

.copy-btn.copied .icon-copy {
    display: none;
}

.copy-btn.copied .icon-check {
    display: block;
}

.sponsor-text {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 20px;
    text-align: center;
}

.sponsor-center {
    display: flex;
    justify-content: center;
}

.sponsor-qr {
    width: 200px;
    height: 200px;
    object-fit: contain;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    transition: var(--transition);
    cursor: pointer;
}

.sponsor-qr:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
}

/* ==========================================
   小程序二维码弹窗
   ========================================== */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    background: #fff;
    border-radius: 20px;
    padding: 40px 36px;
    max-width: 380px;
    width: 90%;
    text-align: center;
    position: relative;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active .modal-content {
    transform: scale(1) translateY(0);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 20px;
    font-size: 24px;
    color: var(--text-muted);
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.2s;
}

.modal-close:hover { color: var(--text-primary); }

.modal-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
    margin-bottom: 16px;
    border-radius: var(--radius-md);
}

.modal-title {
    font-family: var(--font-serif);
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.modal-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 12px;
    text-align: left;
}

.modal-highlight {
    color: var(--accent);
    font-weight: 600;
}

.modal-qr-wrap {
    margin: 24px 0;
    padding: 20px;
    background: var(--bg-alt);
    border-radius: var(--radius-lg);
}

.modal-qr {
    width: 160px;
    height: 160px;
    object-fit: contain;
}

.modal-qr-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 8px;
}

.modal-btn {
    width: 100%;
    padding: 14px;
    background: var(--accent);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition);
}

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

/* ==========================================
   图片灯箱
   ========================================== */

.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    cursor: zoom-out;
}

.lightbox.active {
    opacity: 1;
    pointer-events: all;
}

.lightbox-inner {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    font-size: 32px;
    color: #fff;
    background: none;
    border: none;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.lightbox-close:hover { opacity: 1; }

.lightbox-img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: var(--radius-md);
    transition: transform 0.3s ease;
    cursor: zoom-in;
}

.lightbox.active .lightbox-img {
    /* initial scale handled by JS */
}

/* ==========================================
   页脚
   ========================================== */

.site-footer {
    padding: 32px 0 16px;
    text-align: center;
}

.footer-copy {
    font-size: 12px;
    color: var(--text-muted);
}

.beian {
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    padding: 12px 0 20px;
    border-top: 1px solid var(--border);
}

.beian a {
    color: var(--text-muted);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin: 0 8px;
    transition: color 0.2s;
}

.beian a:hover { color: var(--text-secondary); }
.beian img { width: 14px; height: 14px; }

/* ==========================================
   响应式
   ========================================== */

@media (max-width: 900px) {
    .navbar { padding: 16px 24px; }
    .navbar.scrolled { padding: 12px 24px; }
    .container { width: calc(100% - 32px); }

    .hero { padding: 140px 0 80px; }
    .hero-title { font-size: 24px; }
    .title-highlight { font-size: 30px; }
    .hero-desc { font-size: 16px; line-height: 2; }

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

    .work-card { flex-direction: column; }
    .work-card-img { width: 100%; height: 220px; }
    .work-card-body { padding: 24px; }

    .connect-block { padding: 32px 24px; }

    .connect-row {
        flex-direction: column;
        gap: 10px;
    }

    .connect-sep { display: none; }

    .nav-links { gap: 20px; }
    .nav-links a { font-size: 13px; }
}

@media (max-width: 480px) {
    .hero { padding: 120px 0 60px; }
    .hero-actions { flex-direction: column; align-items: flex-start; gap: 12px; }
    .section { padding: 60px 0; }
    .work-card-img { height: 160px; }
}
