/* =====================================================
   NONAME STUDIO · Brand System
   Ink Blue #12253F + Creative Orange #E3592B
   ===================================================== */

:root {
    --ink: #12253F;
    --ink-deep: #0A1729;
    --ink-soft: #1A2F4D;
    --ink-card: #15294A;

    --ember: #E3592B;
    --ember-glow: #FF7A4D;
    --ember-dim: rgba(227, 89, 43, 0.12);

    --cream: #F2EBDF;
    --cream-dim: #A8B0BA;
    --cream-faint: #6B7A8C;

    --line-dark: rgba(242, 235, 223, 0.08);
    --line-dark-2: rgba(242, 235, 223, 0.14);
    --line-light: rgba(18, 37, 63, 0.1);

    --bg-light: #F2EBDF;
    --bg-light-2: #E8DFCF;

    --font-sans: 'Inter', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    --font-serif: 'Noto Serif SC', 'STSong', serif;
    --font-mono: 'JetBrains Mono', 'SF Mono', Consolas, monospace;
    --font-sc: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;

    --radius: 4px;
    --radius-lg: 8px;

    --container: 1240px;
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-back: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* =================== RESET =================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--font-sans);
    color: var(--cream);
    background: var(--ink-deep);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex; flex-direction: column;
}
/* 让 main 区域占满剩余空间，footer 自然贴底 */
.site-main { flex: 1 0 auto; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
ul { list-style: none; }

.mono { font-family: var(--font-mono); font-size: 0.78em; letter-spacing: 0.08em; text-transform: uppercase; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 32px; }

/* =================== HEADER =================== */
.site-header {
    position: fixed; top: 0; left: 0; right: 0;
    z-index: 100;
    padding: 18px 0;
    background: rgba(10, 23, 41, 0);
    backdrop-filter: blur(0px);
    transition: background 0.4s var(--ease-out-expo), padding 0.4s var(--ease-out-expo), backdrop-filter 0.4s;
}
.site-header.scrolled {
    background: rgba(10, 23, 41, 0.78);
    backdrop-filter: blur(20px);
    padding: 10px 0;
    border-bottom: 1px solid var(--line-dark);
}

/* 三栏布局：Logo | 居中导航 | CTA */
.header-inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 32px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--cream);
    margin-left: -8px; /* 视觉上更靠左 */
}
.brand-mark {
    width: 32px;
    height: 40px;
    color: var(--cream);
    overflow: visible;
    transition: transform 0.4s var(--ease-out-expo);
}
.brand:hover .brand-mark { transform: rotate(-6deg) scale(1.05); }
.brand-wordmark {
    font-family: var(--font-sans);
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 0.06em;
    color: var(--cream);
    white-space: nowrap;
}
.brand-o { color: var(--ember); }

.primary-nav {
    display: flex;
    gap: 32px;
    justify-self: center; /* 导航在可用空间中绝对居中 */
}
.primary-nav a {
    font-size: 14px; color: var(--cream-dim);
    position: relative; padding: 6px 0;
    transition: color 0.25s;
}
.primary-nav a::after {
    content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 1px;
    background: var(--ember); transition: width 0.3s var(--ease-out-expo);
}
.primary-nav a:hover { color: var(--cream); }
.primary-nav a:hover::after { width: 100%; }

.header-cta { display: inline-flex; }

/* Header 免费咨询按钮：橙色描边，非实心 */
.btn.btn-primary.btn-sm.header-cta {
    background: transparent;
    color: var(--ember);
    border: 1.5px solid var(--ember);
    box-shadow: none;
}
.btn.btn-primary.btn-sm.header-cta::before { display: none; }
.btn.btn-primary.btn-sm.header-cta:hover {
    background: rgba(227, 89, 43, 0.1);
    color: var(--ember-glow);
    border-color: var(--ember-glow);
    transform: translateY(-2px);
}

.nav-toggle { display: none; width: 32px; height: 32px; flex-direction: column; justify-content: center; gap: 6px; }
.nav-toggle span { display: block; height: 2px; background: var(--cream); transition: transform 0.3s, opacity 0.3s; }
.nav-toggle.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* =================== BUTTONS =================== */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    padding: 14px 28px; border-radius: 999px;
    font-size: 14px; font-weight: 500; letter-spacing: 0.04em;
    transition: all 0.3s var(--ease-out-expo);
    position: relative; overflow: hidden;
    white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; transition: transform 0.3s var(--ease-out-expo); }
.btn-sm { padding: 10px 20px; font-size: 13px; }
.btn-block { width: 100%; }

.btn-primary {
    background: var(--ember); color: var(--cream);
    box-shadow: 0 4px 20px rgba(227, 89, 43, 0.25), 0 0 0 0 var(--ember);
}
.btn-primary::before {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(135deg, var(--ember-glow), var(--ember));
    opacity: 0; transition: opacity 0.3s;
    z-index: 0;
}
.btn-primary > * { position: relative; z-index: 1; }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 14px 36px rgba(227, 89, 43, 0.45); }
.btn-primary:hover::before { opacity: 1; }
.btn-primary:hover svg { transform: translateX(4px); }

.btn-outline {
    background: transparent; color: var(--cream);
    border: 1.5px solid var(--cream-dim);
}
.btn-outline:hover { border-color: var(--ember); color: var(--ember); transform: translateY(-3px); background: rgba(227, 89, 43, 0.06); }

/* =================== HERO =================== */
.hero {
    position: relative;
    height: 100vh;        /* 老浏览器 fallback */
    height: 100dvh;       /* 动态视高（地址栏隐藏时跟随） */
    min-height: 100svh;   /* 小视高（地址栏显示时） */
    background:
        radial-gradient(ellipse 70% 60% at 50% 30%, rgba(26, 47, 77, 0.55) 0%, transparent 70%),
        radial-gradient(ellipse 90% 120% at 85% 85%, rgba(227, 89, 43, 0.10) 0%, transparent 55%),
        radial-gradient(ellipse 50% 50% at 15% 80%, rgba(227, 89, 43, 0.05) 0%, transparent 50%),
        var(--ink-deep);
    overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    padding: 100px 0 110px;
}

/* Canvas 加载前的静态星空占位（JS 接管前即可见） */
.hero-canvas-fallback {
    position: absolute; inset: 0;
    background-image:
        radial-gradient(1.5px 1.5px at 12% 18%, rgba(242,235,223,0.85), transparent),
        radial-gradient(1px 1px at 28% 64%, rgba(255,122,77,0.7), transparent),
        radial-gradient(2px 2px at 52% 32%, rgba(242,235,223,0.9), transparent),
        radial-gradient(1px 1px at 70% 76%, rgba(242,235,223,0.6), transparent),
        radial-gradient(1.5px 1.5px at 85% 22%, rgba(255,122,77,0.65), transparent),
        radial-gradient(1px 1px at 92% 55%, rgba(242,235,223,0.7), transparent),
        radial-gradient(2px 2px at 38% 88%, rgba(242,235,223,0.85), transparent),
        radial-gradient(1px 1px at 6% 70%, rgba(242,235,223,0.55), transparent),
        radial-gradient(1.5px 1.5px at 60% 12%, rgba(255,122,77,0.55), transparent),
        radial-gradient(1px 1px at 45% 50%, rgba(242,235,223,0.65), transparent),
        radial-gradient(1.5px 1.5px at 22% 38%, rgba(242,235,223,0.75), transparent),
        radial-gradient(1px 1px at 78% 92%, rgba(255,122,77,0.6), transparent),
        radial-gradient(1px 1px at 95% 38%, rgba(242,235,223,0.6), transparent),
        radial-gradient(2px 2px at 15% 88%, rgba(242,235,223,0.85), transparent);
    pointer-events: none;
    z-index: 1;
}
/* JS canvas 就绪后隐藏 fallback */
.hero.canvas-ready .hero-canvas-fallback { display: none; }

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

/* 背景水印：NONAME / STUDIO 两行 */
.hero-watermark {
    position: absolute; inset: 0;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    font-family: var(--font-sans);
    font-weight: 900;
    font-size: clamp(72px, 14vw, 230px);
    line-height: 0.78;
    letter-spacing: -0.04em;
    z-index: 2;
    user-select: none;
    pointer-events: none;
    text-align: center;
}
.hero-watermark .wm-line {
    display: block;
    background: linear-gradient(180deg, rgba(242, 235, 223, 0.05) 0%, rgba(242, 235, 223, 0.01) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-stroke: 1.5px rgba(242, 235, 223, 0.07);
    opacity: 0;
    transform: scale(1.12) translateY(30px);
    transition: opacity 1.2s var(--ease-out-expo), transform 1.4s var(--ease-out-expo);
}
.hero.animate .hero-watermark .wm-line-1 { opacity: 1; transform: scale(1) translateY(0); transition-delay: 0.2s; }
.hero.animate .hero-watermark .wm-line-2 { opacity: 1; transform: scale(1) translateY(0); transition-delay: 0.45s; }
.hero-watermark .wm-line-2 {
    /* STUDIO 用橙色微晕染做层次 */
    background: linear-gradient(180deg, rgba(227, 89, 43, 0.08) 0%, rgba(227, 89, 43, 0.02) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-stroke: 1.5px rgba(227, 89, 43, 0.12);
}

.hero-content {
    position: relative; z-index: 3;
    text-align: center;
    max-width: 1000px;
    width: 100%;
}

.hero-eyebrow {
    display: inline-flex; align-items: center; gap: 12px;
    padding: 8px 18px;
    border: 1px solid var(--line-dark-2);
    border-radius: 999px;
    background: rgba(242, 235, 223, 0.03);
    backdrop-filter: blur(10px);
    margin-bottom: 28px;
    opacity: 0; transform: translateY(20px);
    transition: opacity 0.6s var(--ease-out-expo) 0.1s, transform 0.6s var(--ease-out-expo) 0.1s;
}
.hero.animate .hero-eyebrow { opacity: 1; transform: translateY(0); }
.hero-eyebrow .dot {
    width: 6px; height: 6px; border-radius: 50%; background: var(--ember);
    box-shadow: 0 0 12px var(--ember);
    animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }

.hero-title {
    font-family: var(--font-sans);
    font-weight: 900;
    font-size: clamp(46px, 6.8vw, 96px);
    line-height: 1.03;
    letter-spacing: -0.04em;
    color: var(--cream);
    margin-bottom: 28px;
    text-shadow: 0 6px 40px rgba(0,0,0,0.35);
}
.hero-title .line {
    display: block;
    overflow: visible;
}
.hero-title .line-1 { transform: translateX(-2%); }
.hero-title .line-3 { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 0.25em; }

.hero-title .word {
    display: inline-block;
    margin-right: 0.25em;
}
.hero-title .word-ember { color: var(--ember); }

/* 每个字符初始状态：大幅弹入 */
.hero-title .char {
    display: inline-block;
    opacity: 0;
    transform: translateY(120px) rotate(-18deg) scale(0.35);
    transition: opacity 1s var(--ease-out-expo), transform 1.1s var(--ease-bounce);
    transition-delay: calc(var(--i, 0) * 55ms);
    will-change: transform, opacity;
    text-shadow: 0 0 0 transparent;
}
.hero.animate .hero-title .char {
    opacity: 1;
    transform: translateY(0) rotate(0) scale(1);
}
.hero.animate .hero-title .word-ember .char {
    text-shadow: 0 0 40px rgba(227, 89, 43, 0.35);
}

.hero-sub {
    font-size: clamp(14px, 1.3vw, 17px);
    color: var(--cream-dim);
    max-width: 560px; margin: 0 auto 32px;
    line-height: 1.7;
    opacity: 0; transform: translateY(20px);
    transition: opacity 0.8s var(--ease-out-expo) 1.6s, transform 0.8s var(--ease-out-expo) 1.6s;
}
.hero.animate .hero-sub { opacity: 1; transform: translateY(0); }

.hero-actions {
    display: flex; gap: 16px; justify-content: center; flex-wrap: wrap;
    opacity: 0; transform: translateY(20px);
    transition: opacity 0.8s var(--ease-out-expo) 1.9s, transform 0.8s var(--ease-out-expo) 1.9s;
}
.hero.animate .hero-actions { opacity: 1; transform: translateY(0); }

.hero-scroll {
    position: absolute; bottom: 28px; left: 32px;
    z-index: 3;
    display: flex; flex-direction: column; align-items: center; gap: 14px;
    color: var(--cream-dim);
    font-size: 10px;
    opacity: 0;
    transition: opacity 0.8s var(--ease-out-expo) 2.4s;
}
.hero.animate .hero-scroll { opacity: 1; }
.hero-scroll span:first-child {
    writing-mode: vertical-rl;
    letter-spacing: 0.12em;
    transform: rotate(180deg);
}
.hero-scroll-line {
    width: 1px; height: 48px;
    background: linear-gradient(180deg, var(--cream-dim), transparent);
    position: relative;
    overflow: hidden;
}
.hero-scroll-line::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 50%;
    background: var(--ember);
    animation: scrollDown 2s ease-in-out infinite;
}
@keyframes scrollDown {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(200%); }
}

/* =================== SECTIONS =================== */
.section { padding: 120px 0; position: relative; }
.section-dark { background: var(--ink); color: var(--cream); }
.section-light { background: var(--bg-light); color: var(--ink); }
.section-contact { padding-bottom: 0; }

.section-head { max-width: 720px; margin-bottom: 72px; }
.section-tag {
    display: inline-flex; align-items: center; gap: 12px;
    margin-bottom: 24px;
    color: var(--ember);
    font-size: 13px;
    opacity: 0; transform: translateY(20px);
    transition: opacity 0.7s var(--ease-out-expo), transform 0.7s var(--ease-out-expo);
}
.section-head.in-view .section-tag { opacity: 1; transform: translateY(0); }
.section-title {
    font-family: var(--font-sans);
    font-weight: 800;
    font-size: clamp(36px, 5vw, 64px);
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin-bottom: 20px;
    opacity: 0; transform: translateY(30px);
    transition: opacity 0.8s var(--ease-out-expo) 0.1s, transform 0.8s var(--ease-out-expo) 0.1s;
}
.section-head.in-view .section-title { opacity: 1; transform: translateY(0); }
/* 标题中的字母 O 用品牌橙强调（NONAME 中的 O） */
.section-title .o { color: var(--ember); }
.section-lede {
    font-size: 17px; line-height: 1.7;
    color: var(--cream-dim);
    opacity: 0; transform: translateY(20px);
    transition: opacity 0.8s var(--ease-out-expo) 0.2s, transform 0.8s var(--ease-out-expo) 0.2s;
}
.section-light .section-lede { color: rgba(18, 37, 63, 0.7); }
.section-head.in-view .section-lede { opacity: 1; transform: translateY(0); }

/* =================== SERVICES =================== */
.services-matrix {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}
.service-row {
    display: flex;
    background: var(--ink-soft);
    border: 1px solid var(--line-dark);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: border-color 0.4s var(--ease-out-expo), transform 0.4s var(--ease-out-expo);
}
.service-row:hover {
    border-color: var(--line-dark-2);
    transform: translateY(-4px);
}

.service-title {
    flex: 0 0 220px;
    padding: 32px;
    border-right: 1px solid var(--line-dark);
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.service-no {
    display: block;
    color: var(--ember);
    font-size: 12px;
    margin-bottom: 14px;
}
.service-title h3 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: -0.01em;
}
.service-title p {
    color: var(--cream-dim);
    font-size: 14px;
    line-height: 1.65;
}

.service-scroll {
    flex: 1;
    position: relative;
    overflow: hidden;
    cursor: grab;
    user-select: none;
    touch-action: pan-y;
}
.service-scroll:active,
.service-scroll.is-dragging { cursor: grabbing; }

.service-track {
    display: flex;
    align-items: center;
    gap: 14px;
    height: 100%;
    padding: 32px;
    will-change: transform;
}

.service-chip {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    padding: 10px 18px;
    border: 1px solid var(--line-dark-2);
    border-radius: 999px;
    background: rgba(242, 235, 223, 0.04);
    color: var(--cream);
    font-size: 14px;
    white-space: nowrap;
    transition: border-color 0.3s, background 0.3s, color 0.3s;
}
.service-chip:hover { border-color: var(--ember); background: rgba(227, 89, 43, 0.10); color: var(--ember-glow); }

.service-fade {
    position: absolute;
    top: 0; right: 0; bottom: 0;
    width: 80px;
    background: linear-gradient(90deg, transparent, var(--ink-soft));
    pointer-events: none;
    transition: opacity 0.3s;
}
.service-scroll.is-dragging .service-fade,
.service-scroll:hover .service-fade { opacity: 0.6; }

/* =================== PORTFOLIO =================== */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 16px;
}
.pf-item {
    position: relative;
    grid-column: span 4;
    height: 300px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    background: linear-gradient(135deg, var(--ink-soft), var(--ink-deep));
    box-shadow: 0 1px 0 rgba(255,255,255,0.04) inset;
    transition: transform 0.5s var(--ease-out-expo), box-shadow 0.5s var(--ease-out-expo);
}
/* editorial 错落排版：每行凑满 12 栏，大小交错显节奏 */
.pf-item:nth-child(1) { grid-column: span 8;  height: 480px; }
.pf-item:nth-child(2) { grid-column: span 4;  height: 480px; }
.pf-item:nth-child(6) { grid-column: span 6;  height: 420px; }
.pf-item:nth-child(7) { grid-column: span 6;  height: 420px; }
.pf-item:hover { transform: translateY(-4px); box-shadow: 0 24px 60px -24px rgba(10,23,41,0.55); }

/* ---------- Real-image grid layout (index-real.html) ---------- */
/* 根据真实图片内容与比例重新排布，避免横幅图被压扁 */
.real-grid .pf-item:nth-child(1) { grid-column: span 8;  height: 480px; }
.real-grid .pf-item:nth-child(2) { grid-column: span 4;  height: 480px; }
/* 第 3 项为 1148×388 超宽文化墙，独占整行并按真实图片比例居中显示 */
.real-grid .pf-item:nth-child(3) {
    grid-column: span 12;
    height: auto;
    aspect-ratio: 1148 / 388;
    display: flex;
    align-items: center;
    justify-content: center;
}
@supports not (aspect-ratio: 1148 / 388) {
    .real-grid .pf-item:nth-child(3) { height: 420px; }
}
.real-grid .pf-item:nth-child(3) .pf-img {
    position: relative;
    inset: auto;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center !important;
}
.real-grid .pf-item:nth-child(4) { grid-column: span 6;  height: 420px; }
.real-grid .pf-item:nth-child(5) { grid-column: span 6;  height: 420px; }
.real-grid .pf-item:nth-child(6) { grid-column: span 4;  height: 320px; }
.real-grid .pf-item:nth-child(7) { grid-column: span 4;  height: 320px; }
.real-grid .pf-item:nth-child(8) { grid-column: span 4;  height: 320px; }
.real-grid .pf-item:nth-child(9) { grid-column: span 6;  height: 420px; }
.real-grid .pf-item:nth-child(10){ grid-column: span 6;  height: 420px; }

/* 图片 */
.pf-img {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.7s var(--ease-out-expo);
}
.pf-item:hover .pf-img { transform: scale(1.06); }

/* 图未到位时的占位水印 */
.pf-placeholder {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-mono);
    font-size: 13px; letter-spacing: 0.22em;
    color: rgba(242, 235, 223, 0.20);
    z-index: 0;
}
.pf-img { z-index: 1; }

/* 左侧滑出信息面板 */
.pf-overlay {
    position: absolute; inset: 0;
    z-index: 2;
    pointer-events: none;
    overflow: hidden;
}
.pf-panel {
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: clamp(170px, 42%, 260px);
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 14px;
    background: rgba(18, 37, 63, 0.92);
    border-right: 2px solid var(--ember);
    backdrop-filter: blur(8px);
    transform: translateX(-110%);
    transition: transform 0.55s var(--ease-out-expo);
}
.pf-item:hover .pf-panel { transform: translateX(0); }

.pf-subtitle {
    color: var(--cream);
    font-size: 17px;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: -0.01em;
}
.pf-meta {
    display: flex; align-items: center; gap: 12px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.12em;
    color: var(--cream-dim);
    text-transform: uppercase;
}
.pf-meta .pf-cat {
    color: var(--ember);
    padding: 0;
    border: 0;
    background: transparent;
    font-size: inherit;
    letter-spacing: inherit;
}
.pf-year::before {
    content: '/';
    margin-right: 10px;
    color: rgba(242, 235, 223, 0.35);
}

/* ============ Portfolio Modal / Lightbox ============ */
.modal-pf { max-width: 860px; position: relative; }
.pf-modal-imgwrap {
    position: relative;
    background: linear-gradient(135deg, var(--ink-soft), var(--ink-deep));
}
.pf-modal-imgwrap img {
    display: block;
    width: 100%;
    max-height: 62vh;
    object-fit: cover;
}
.pf-modal-body { padding: 28px 32px 32px; }
.pf-modal-top {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 10px;
}
.pf-modal-body .pf-cat { display: inline-block; }
.pf-counter { color: var(--cream-dim); font-size: 12px; letter-spacing: 0.1em; }
.pf-modal-body h3 { font-size: 26px; font-weight: 700; margin-bottom: 12px; }
.pf-modal-body p { color: var(--cream-dim); line-height: 1.7; font-size: 15px; }

/* Lightbox 左右切换 */
.pf-nav {
    position: absolute;
    top: 50%; transform: translateY(-50%);
    z-index: 10;
    width: 44px; height: 44px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: rgba(18, 37, 63, 0.75);
    border: 1px solid rgba(242, 235, 223, 0.18);
    color: var(--cream);
    cursor: pointer;
    backdrop-filter: blur(6px);
    transition: background 0.3s, border-color 0.3s, color 0.3s;
}
.pf-nav svg { width: 20px; height: 20px; }
.pf-nav:hover { background: var(--ember); border-color: var(--ember); color: var(--cream); }
.pf-prev { left: 16px; }
.pf-next { right: 16px; }

/* =================== WHY US =================== */
.why-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    margin-bottom: 80px;
}
.why-card {
    padding: 40px 32px;
    background: var(--ink-soft);
    border-radius: var(--radius-lg);
    border: 1px solid var(--line-dark);
    position: relative;
    transition: all 0.4s var(--ease-out-expo);
    overflow: hidden;
}
.why-card::after {
    content: ''; position: absolute; bottom: -100%; left: 0; right: 0; height: 100%;
    background: linear-gradient(180deg, transparent, var(--ember-dim));
    transition: bottom 0.6s var(--ease-out-expo);
}
.why-card:hover { transform: translateY(-6px); border-color: var(--ember); }
.why-card:hover::after { bottom: 0; }
.why-num { font-size: 48px; font-weight: 800; color: var(--ember); line-height: 1; margin-bottom: 24px; }
.why-card h3 { font-size: 22px; font-weight: 700; margin-bottom: 12px; }
.why-card p { color: var(--cream-dim); line-height: 1.7; font-size: 15px; }
.why-card strong { color: var(--ember); font-weight: 600; }
.count-highlight { color: var(--ember); font-weight: 700; }
.count-highlight .count { color: inherit; font-weight: inherit; }

.stats-strip {
    display: grid; grid-template-columns: repeat(4, 1fr);
    padding: 40px 0;
    border-top: 1px solid var(--line-dark);
    border-bottom: 1px solid var(--line-dark);
    gap: 24px;
}
.stat { text-align: center; }
.stat-num { font-size: 48px; font-weight: 800; color: var(--cream); line-height: 1; margin-bottom: 8px; letter-spacing: -0.02em; }
.stat-label { color: var(--cream-dim); font-size: 13px; }

/* =================== PARTNERS =================== */
.partners-marquee {
    overflow: hidden;
    position: relative;
    margin-bottom: 64px;
    mask-image: linear-gradient(to right, transparent, #000 80px, #000 calc(100% - 80px), transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, #000 80px, #000 calc(100% - 80px), transparent);
}
.partners-track {
    display: flex;
    align-items: center;
    gap: 24px;
    width: max-content;
    animation: partnersScroll 32s linear infinite;
    will-change: transform;
}
.partners-marquee:hover .partners-track { animation-play-state: paused; }

.partner-card {
    flex: none;
    height: 120px;
    min-width: 160px;
    max-width: 480px;
    padding: 22px 32px;
    background: #fff;
    border: 1px solid var(--line-light);
    border-radius: var(--radius);
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 18px rgba(18, 37, 63, 0.06);
    transition: transform .3s var(--ease-out-expo), box-shadow .3s, border-color .3s;
}
.partner-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(18, 37, 63, 0.12);
    border-color: rgba(227, 89, 43, 0.35);
}
.partner-card img {
    max-height: 76px;
    max-width: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

@keyframes partnersScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@media (max-width: 1024px) {
    .partner-card { height: 100px; padding: 18px 24px; }
    .partner-card img { max-height: 64px; }
    .partners-marquee {
        mask-image: linear-gradient(to right, transparent, #000 48px, #000 calc(100% - 48px), transparent);
        -webkit-mask-image: linear-gradient(to right, transparent, #000 48px, #000 calc(100% - 48px), transparent);
    }
}
@media (max-width: 720px) {
    .partners-track { gap: 16px; animation-duration: 24s; }
    .partner-card { height: 84px; min-width: 130px; max-width: 300px; padding: 14px 18px; }
    .partner-card img { max-height: 56px; }
    .partners-marquee {
        mask-image: linear-gradient(to right, transparent, #000 32px, #000 calc(100% - 32px), transparent);
        -webkit-mask-image: linear-gradient(to right, transparent, #000 32px, #000 calc(100% - 32px), transparent);
    }
}

.partner-cta {
    display: flex; align-items: center; justify-content: space-between;
    gap: 40px;
    padding: 48px 56px;
    background: var(--ink);
    color: var(--cream);
    border-radius: var(--radius-lg);
    position: relative;
    overflow: hidden;
}
.partner-cta::before {
    content: 'PARTNER'; position: absolute;
    right: -20px; bottom: -40px;
    font-size: 200px; font-weight: 900;
    color: var(--ember);
    opacity: 0.08;
    line-height: 1;
    font-family: var(--font-sans);
    letter-spacing: -0.05em;
    pointer-events: none;
}
.partner-cta h3 { font-size: 24px; font-weight: 700; margin-bottom: 8px; }
.partner-cta p { color: var(--cream-dim); font-size: 15px; }

/* =================== CONTACT =================== */
.contact-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 64px;
    margin-bottom: 80px;
}

.contact-form { display: flex; flex-direction: column; gap: 24px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 13px; color: var(--cream-dim); font-family: var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; }
.field input, .field select, .field textarea {
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--line-dark-2);
    color: var(--cream);
    padding: 12px 0;
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.3s;
    outline: none;
    border-radius: 0;
}
.field select option { background: var(--ink); }
.field textarea { resize: vertical; min-height: 80px; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--ember); }
.field input::placeholder, .field textarea::placeholder { color: var(--cream-faint); }

.contact-aside {
    background: var(--ink-soft);
    border: 1px solid var(--line-dark);
    border-radius: var(--radius-lg);
    padding: 32px;
    display: flex; flex-direction: column; gap: 24px;
    align-self: start;
}
.info-block { padding-bottom: 20px; border-bottom: 1px solid var(--line-dark); }
.info-block:last-of-type { border-bottom: 0; padding-bottom: 0; }
.info-label { color: var(--ember); font-size: 11px; margin-bottom: 8px; }
.info-value {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    font-size: 16px; cursor: pointer;
    transition: color 0.25s;
}
.info-value:hover { color: var(--ember); }
.copy-tag {
    font-size: 11px; color: var(--cream-faint);
    font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.08em;
    padding: 3px 8px; border: 1px solid var(--line-dark-2); border-radius: 4px;
    transition: all 0.25s;
}
.info-value:hover .copy-tag { color: var(--ember); border-color: var(--ember); }

.qr-trigger {
    margin-top: 12px;
    padding: 8px 16px;
    background: var(--ember);
    color: var(--cream);
    border-radius: 999px;
    font-size: 12px;
    font-family: var(--font-mono);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: all 0.25s;
}
.qr-trigger:hover { background: var(--ember-glow); transform: translateY(-2px); }

/* =================== FOOTER =================== */
.site-footer {
    padding: 32px 0;
    border-top: 1px solid var(--line-dark);
    background: var(--ink-deep);
    flex-shrink: 0;
    margin-top: auto;
}
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.footer-brand { color: var(--cream); font-size: 13px; }
.footer-meta { display: flex; gap: 24px; color: var(--cream-dim); font-size: 12px; }

/* =================== MODAL =================== */
.modal {
    position: fixed; inset: 0; z-index: 200;
    display: none; align-items: center; justify-content: center;
    padding: 24px;
}
.modal.open { display: flex; }
.modal-mask { position: absolute; inset: 0; background: rgba(10, 23, 41, 0.85); backdrop-filter: blur(8px); }
.modal-card {
    position: relative;
    background: var(--ink);
    border: 1px solid var(--line-dark-2);
    border-radius: var(--radius-lg);
    padding: 40px;
    max-width: 500px; width: 100%;
    animation: modalIn 0.4s var(--ease-out-expo);
}
@keyframes modalIn { from { opacity: 0; transform: translateY(20px) scale(0.95); } }
.modal-close {
    position: absolute; top: 16px; right: 16px;
    width: 32px; height: 32px;
    font-size: 24px; color: var(--cream-dim);
    transition: color 0.2s;
}
.modal-close:hover { color: var(--ember); }

.modal-qr { text-align: center; }
.modal-qr h3 { font-size: 22px; margin-bottom: 24px; }
.qr-box { display: flex; justify-content: center; margin-bottom: 16px; }
.qr-box img { max-width: 220px; width: 100%; height: auto; border-radius: 16px; box-shadow: 0 12px 40px rgba(0,0,0,0.25); }
.qr-tip { color: var(--cream-dim); font-size: 13px; }

.modal-pf { padding: 0; overflow: hidden; max-width: 860px; }
.pf-modal-body h3 { font-size: 26px; font-weight: 700; margin-bottom: 12px; }
.pf-modal-body p { color: var(--cream-dim); }

@media (max-width: 720px) {
    .pf-panel { width: 70%; padding: 20px; }
    .pf-subtitle { font-size: 15px; }
    .pf-prev { left: 10px; }
    .pf-next { right: 10px; }
    .pf-modal-body { padding: 22px 24px 24px; }
    .pf-modal-body h3 { font-size: 22px; }
}

/* =================== TOAST =================== */
.toast {
    position: fixed; bottom: 32px; left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--ember);
    color: var(--cream);
    padding: 14px 24px;
    border-radius: 999px;
    font-size: 14px;
    box-shadow: 0 12px 32px rgba(227, 89, 43, 0.35);
    opacity: 0;
    transition: all 0.4s var(--ease-out-expo);
    pointer-events: none;
    z-index: 300;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* =================== RESPONSIVE =================== */
@media (max-width: 1024px) {
    .container { padding: 0 24px; }
    .section { padding: 80px 0; }
    .services-matrix { grid-template-columns: 1fr; }
    .service-title { flex: 0 0 180px; padding: 24px; }
    .service-title h3 { font-size: 20px; }
    .service-track { padding: 24px; }
    .portfolio-grid { grid-template-columns: repeat(6, 1fr); }
    .pf-item, .pf-item:nth-child(n) { grid-column: span 3; height: 280px; }
    .pf-item:nth-child(1) { grid-column: span 6; height: 360px; }
    /* real-grid 平板适配 */
    .real-grid .pf-item:nth-child(n) { grid-column: span 3; height: 260px; }
    .real-grid .pf-item:nth-child(1),
    .real-grid .pf-item:nth-child(3),
    .real-grid .pf-item:nth-child(9),
    .real-grid .pf-item:nth-child(10) { grid-column: span 6; }
    .real-grid .pf-item:nth-child(3) {
        height: auto;
        aspect-ratio: 1148 / 388;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .real-grid .pf-item:nth-child(3) .pf-img {
        position: relative;
        inset: auto;
        width: 100%;
        height: 100%;
        object-position: center center !important;
    }
    @supports not (aspect-ratio: 1148 / 388) {
        .real-grid .pf-item:nth-child(3) { height: 280px; }
    }
    .why-grid { grid-template-columns: 1fr; }
    .contact-grid { grid-template-columns: 1fr; gap: 40px; }
    .stats-strip { grid-template-columns: repeat(2, 1fr); gap: 32px; }
    .partner-cta { flex-direction: column; align-items: flex-start; padding: 36px; }
}

@media (max-width: 720px) {
    /* Header 在 mobile 改用 flex，logo 左、nav-toggle 右 */
    .header-inner {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
    }
    .primary-nav, .header-cta { display: none; }
    /* nav-toggle 在右上角显眼显示 */
    .nav-toggle {
        display: flex;
        width: 44px;
        height: 44px;
        gap: 6px;
        padding: 10px;
        border: 1px solid rgba(242, 235, 223, 0.30);
        border-radius: 8px;
        background: rgba(10, 23, 41, 0.55);
        backdrop-filter: blur(8px);
        align-items: center;
        justify-content: center;
    }
    .nav-toggle span {
        width: 22px;
        height: 2px;
        background: var(--cream);
    }
    .primary-nav.open {
        display: flex; flex-direction: column;
        position: absolute; top: 100%; left: 0; right: 0;
        background: rgba(10, 23, 41, 0.96);
        backdrop-filter: blur(20px);
        padding: 24px 32px; gap: 20px;
        border-bottom: 1px solid var(--line-dark);
    }

    .brand { margin-left: 0; }
    .brand-wordmark { font-size: 14px; letter-spacing: 0.04em; }
    .brand-mark { width: 28px; height: 36px; }
    .hero { padding: 100px 0 96px; }
    .hero-scroll { left: 24px; bottom: 24px; gap: 10px; }
    .hero-scroll-line { height: 36px; }
    .hero-watermark { font-size: 16vw; }
    .hero-title { font-size: clamp(40px, 12vw, 64px); }

    .portfolio-grid { grid-template-columns: 1fr; gap: 14px; }
    .pf-item, .pf-item:nth-child(n) { grid-column: span 1; height: 240px; }
    .pf-item:nth-child(1) { height: 300px; }
    /* real-grid 手机适配：文化墙横幅保持真实比例 */
    .real-grid .pf-item:nth-child(n) { grid-column: span 1; height: 240px; }
    .real-grid .pf-item:nth-child(3) {
        height: auto;
        aspect-ratio: 1148 / 388;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .real-grid .pf-item:nth-child(3) .pf-img {
        position: relative;
        inset: auto;
        width: 100%;
        height: 100%;
        object-position: center center !important;
    }
    @supports not (aspect-ratio: 1148 / 388) {
        .real-grid .pf-item:nth-child(3) { height: 160px; }
    }
    .stats-strip { grid-template-columns: repeat(2, 1fr); }
    .service-row { flex-direction: column; }
    .service-title {
        flex: none;
        border-right: 0;
        border-bottom: 1px solid var(--line-dark);
        padding: 24px;
    }
    .service-title p { max-width: 320px; }
    .service-scroll { min-height: 88px; }
    .service-track { padding: 24px; }

    .footer-inner { flex-direction: column; align-items: flex-start; }
}
