/* ===== 首屏关键样式（core.css）：reset / 导航 / BGM / Hero / 碎片动效 ===== */
:root {
    --bg: #0F0F0E;
    --bg-elev: #1A1A18;
    --fg: #EDEAE3;
    --fg-mute: #7A7770;
    --fg-dim: #4A4843;
    --accent: #FF5C35;
    --accent-soft: rgba(255, 92, 53, .12);
    --border: #2A2A28;
    --border-soft: #1F1F1D;
    --serif: 'Fraunces', Georgia, serif;
    --sans: 'Inter', -apple-system, sans-serif;
    --mono: 'JetBrains Mono', monospace;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box
}

html {
    scroll-behavior: smooth
}

body {
    background: var(--bg);
    color: var(--fg);
    font-family: var(--sans);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1000;
    opacity: .035;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E")
}

@media (pointer: fine) {
    * {
        cursor: none !important;
    }

    .cursor-dot, .cursor-ring {
        position: fixed;
        top: 0;
        left: 0;
        pointer-events: none;
        z-index: 9999;
        transform: translate(-50%, -50%);
        mix-blend-mode: difference;
    }

    .cursor-dot {
        width: 6px;
        height: 6px;
        background: var(--accent);
        border-radius: 50%;
        transition: transform .1s;
    }

    .cursor-ring {
        width: 36px;
        height: 36px;
        border: 1px solid var(--fg);
        border-radius: 50%;
        transition: width .3s, height .3s, border-color .3s, background .3s;
    }

    .cursor-ring.hover {
        width: 64px;
        height: 64px;
        border-color: var(--accent);
        background: rgba(255, 92, 53, .05);
    }
}

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 18px 48px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(14px);
    background: rgba(15, 15, 14, .65);
    border-bottom: 1px solid var(--border)
}

/* ===== 品牌区：标题 + 访问量纵向排列 ===== */
.brand-wrap {
    display: flex;
    flex-direction: column;
    gap: 6px
}

.nav .brand {
    font-family: var(--serif);
    font-style: italic;
    font-size: 18px;
    letter-spacing: -.02em;
    display: flex;
    align-items: center;
    gap: 10px
}

.nav .brand .dot {
    width: 7px;
    height: 7px;
    background: var(--accent);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite
}

.nav .brand .sub {
    font-family: var(--mono);
    font-style: normal;
    font-size: 11px;
    color: var(--fg-mute);
    letter-spacing: .15em
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1)
    }
    50% {
        opacity: .4;
        transform: scale(1.35)
    }
}

.nav-center {
    display: flex;
    gap: 32px;
    list-style: none
}

.nav-center a {
    color: var(--fg-mute);
    text-decoration: none;
    font-size: 12px;
    font-family: var(--mono);
    letter-spacing: .08em;
    transition: color .3s
}

/* ===== 访问量：发光数字 ===== */
.nav-visits {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: .08em;
    color: var(--fg-mute)
}

.nav-visits .visits-num {
    color: var(--accent);
    font-weight: 500;
    animation: visits-pulse 2.4s ease-in-out infinite
}

@keyframes visits-pulse {
    0%, 100% {
        text-shadow: 0 0 6px rgba(255, 92, 53, .35)
    }
    50% {
        text-shadow: 0 0 16px rgba(255, 92, 53, .85)
    }
}

.nav-center a:hover {
    color: var(--accent)
}

.bgm-player {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 6px 20px 6px 6px;
    border-radius: 30px;
    background: rgba(255, 255, 255, .03);
    border: 1px solid var(--border);
    backdrop-filter: blur(10px);
    transition: all .4s ease;
    user-select: none;
}

.bgm-player:hover {
    border-color: var(--accent);
    background: rgba(255, 92, 53, .05);
    box-shadow: 0 0 20px rgba(255, 92, 53, .15);
}

.bgm-disc {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, #2a2a2a, #111, #2a2a2a, #111, #2a2a2a);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.bgm-disc::after {
    content: '';
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent);
    border: 2px solid var(--bg);
}

.bgm-player.playing .bgm-disc {
    animation: spin 4s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.bgm-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.bgm-status {
    font-family: var(--mono);
    font-size: 9px;
    color: var(--fg-mute);
    letter-spacing: .12em;
    text-transform: uppercase;
}

.bgm-title {
    font-family: var(--serif);
    font-style: italic;
    font-size: 13px;
    color: var(--fg);
    transition: color .3s;
}

.bgm-player.playing .bgm-title {
    color: var(--accent);
}

.bgm-waves {
    display: flex;
    gap: 2px;
    align-items: center;
    height: 16px;
}

.bgm-waves span {
    width: 2px;
    background: var(--fg-dim);
    height: 4px;
    border-radius: 1px;
    transition: .3s;
}

.bgm-player.playing .bgm-waves span {
    background: var(--accent);
    animation: wave 1.2s ease-in-out infinite;
}

.bgm-waves span:nth-child(1) {
    animation-delay: 0s;
}

.bgm-waves span:nth-child(2) {
    animation-delay: .2s;
}

.bgm-waves span:nth-child(3) {
    animation-delay: .4s;
}

.bgm-waves span:nth-child(4) {
    animation-delay: .1s;
}

.bgm-waves span:nth-child(5) {
    animation-delay: .3s;
}

@keyframes wave {
    0%, 100% {
        height: 4px;
    }
    50% {
        height: 16px;
    }
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.gift-control {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, .03);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color .3s, background .3s, box-shadow .3s, transform .3s;
}

.gift-control:hover {
    border-color: var(--accent);
    background: rgba(255, 92, 53, .05);
    box-shadow: 0 0 20px rgba(255, 92, 53, .15);
    transform: translateY(-2px);
}

.gift-icon {
    width: 22px;
    height: 22px;
    object-fit: contain;
    animation: pulse 2s ease-in-out infinite;
}

.gift-pop {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    min-width: 190px;
    padding: 12px 16px;
    border-radius: 10px;
    background: rgba(20, 20, 19, .95);
    border: 1px solid var(--border);
    box-shadow: 0 12px 32px rgba(0, 0, 0, .45);
    text-align: left;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity .3s, transform .3s, visibility .3s;
    pointer-events: none;
}

.gift-pop::before {
    content: '';
    position: absolute;
    top: -5px;
    right: 16px;
    width: 8px;
    height: 8px;
    background: rgba(20, 20, 19, .95);
    border-left: 1px solid var(--border);
    border-top: 1px solid var(--border);
    transform: rotate(45deg);
}

.gift-control:hover .gift-pop {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.gift-pop-title {
    font-family: var(--serif);
    font-style: italic;
    font-size: 14px;
    color: var(--accent);
    letter-spacing: .02em;
    white-space: nowrap;
}

.gift-pop-desc {
    margin-top: 4px;
    font-family: var(--mono);
    font-size: 11px;
    color: var(--fg-mute);
    letter-spacing: .05em;
    white-space: nowrap;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 48px
}

section {
    padding: 140px 0;
    position: relative
}

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 100px;
    position: relative;
    overflow: hidden
}

.hero-layout {
    display: grid;
    grid-template-columns:1.5fr 1fr;
    gap: 60px;
    width: 100%;
    position: relative;
    z-index: 2
}

.hero-left {
    display: flex;
    flex-direction: column;
    justify-content: center
}

.hero-meta {
    display: flex;
    gap: 24px;
    font-family: var(--mono);
    font-size: 11px;
    color: var(--fg-mute);
    text-transform: uppercase;
    letter-spacing: .12em;
    margin-bottom: 40px;
    flex-wrap: wrap
}

.hero-meta .available {
    color: var(--accent)
}

.hero-meta .available::before {
    content: '●';
    margin-right: 6px;
    animation: pulse 2s infinite
}

.hero-title {
    font-family: var(--serif);
    font-weight: 300;
    font-size: clamp(64px, 11vw, 180px);
    line-height: .88;
    letter-spacing: -.045em;
    margin-bottom: 36px
}

.hero-title em {
    font-style: italic;
    color: var(--accent);
    font-weight: 400
}

.hero-title .punct {
    color: var(--accent);
    font-style: italic
}

.hero-subtitle {
    font-family: var(--serif);
    font-style: italic;
    font-weight: 300;
    font-size: clamp(20px, 2.2vw, 28px);
    color: var(--fg-mute);
    max-width: 540px;
    line-height: 1.45;
    margin-bottom: 60px
}

.hero-subtitle em {
    color: var(--fg);
    font-style: italic
}

.hero-subtitle .quote {
    color: var(--accent)
}

.hero-footer {
    display: grid;
    grid-template-columns:repeat(2, 1fr);
    gap: 30px;
    padding-top: 36px;
    border-top: 1px solid var(--border);
    max-width: 540px
}

.hero-footer-item .label {
    font-family: var(--mono);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .15em;
    color: var(--fg-mute);
    margin-bottom: 8px
}

.hero-footer-item .value {
    font-family: var(--serif);
    font-size: 16px;
    font-style: italic
}

.hero-footer-item .value.live::after {
    content: '_';
    animation: blink 1s steps(1) infinite;
    color: var(--accent)
}

@keyframes blink {
    50% {
        opacity: 0
    }
}

/* ===== Hero Photo ===== */
.hero-right {
    position: relative;
    height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1400px
}

.hero-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 500px;
    height: 600px;
    transform: translate(-40%, -50%);
    background: radial-gradient(circle, rgba(255, 92, 53, 0.25), transparent 60%);
    filter: blur(60px);
    z-index: 0;
    transition: transform 0.4s cubic-bezier(.22, 1, .36, 1);
    pointer-events: none;
}

.hero-photo-wrap {
    position: relative;
    width: 220px;
    height: 160px;
    margin: 0 auto;
    transform-style: preserve-3d;
    transition: transform .5s cubic-bezier(.22, 1, .36, 1), width 1.2s cubic-bezier(.22, 1, .36, 1), height 1.2s cubic-bezier(.22, 1, .36, 1);
    z-index: 1;
    transform: rotateY(-12deg) rotateX(4deg);
    animation: float 6s ease-in-out infinite;
}

/* 扩展后尺寸：纵向，契合迪迦胸像比例 */
.hero-photo-wrap.expanded {
    width: 420px;
    height: 520px;
}

@keyframes float {
    0%, 100% {
        transform: rotateY(-12deg) rotateX(4deg) translateY(0);
    }
    50% {
        transform: rotateY(-12deg) rotateX(4deg) translateY(-15px);
    }
}

.photo-depth-layer {
    position: absolute;
    inset: 0;
    border-radius: 12px;
    background: rgba(255, 92, 53, 0.03);
    border: 1px solid rgba(255, 92, 53, 0.15);
    transform: translateZ(-30px) translate(12px, 12px);
    box-shadow: 0 0 40px rgba(255, 92, 53, 0.1);
}

.photo-depth-layer-2 {
    position: absolute;
    inset: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transform: translateZ(-60px) translate(24px, 24px);
}

.hero-photo-card {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-elev);
    box-shadow: 0 30px 60px -10px rgba(0, 0, 0, 0.8),
    0 18px 36px -18px rgba(255, 92, 53, 0.4),
    inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    transition: box-shadow 1s ease;
}

.hero-photo-card.sharding {
    overflow: visible;
    transform-style: preserve-3d;
    animation: cardGlow 2.8s ease forwards;
}

@keyframes cardGlow {
    0%, 100% {
        box-shadow: 0 30px 60px -10px rgba(0, 0, 0, 0.8),
        0 18px 36px -18px rgba(255, 92, 53, 0.4),
        inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    }
    45% {
        box-shadow: 0 30px 80px -10px rgba(0, 0, 0, 0.85),
        0 0 70px -6px rgba(255, 92, 53, 0.85),
        inset 0 0 0 1px rgba(255, 92, 53, 0.35);
    }
}

.hero-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    -webkit-mask-image: linear-gradient(to bottom, #000 75%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 75%, transparent 100%);
    filter: contrast(1.15) saturate(0.8) brightness(0.85) sepia(0.2) hue-rotate(-10deg);
    pointer-events: none;
    animation: kenburns 20s ease-in-out infinite alternate;
}

@keyframes kenburns {
    0% {
        transform: scale(1) translate(0%, 0%);
    }
    100% {
        transform: scale(1.1) translate(-3%, 2%);
    }
}

.photo-light {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 50%, rgba(255, 92, 53, 0.35), transparent 40%);
    mix-blend-mode: overlay;
    transition: background .2s ease-out;
    pointer-events: none;
    animation: kenburns 20s ease-in-out infinite alternate;
}

/* ===== [TRANSFORM] 碎片分解与重组动效 ===== */
.fragment-shard {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-template-rows: repeat(10, 1fr);
    z-index: 5;
    opacity: 0;
    pointer-events: none;
    transform-style: preserve-3d;
    --freeze: none;
    transition: opacity 0.35s ease;
}

.fragment-shard.active {
    opacity: 1;
}

/* 分解时固定居中，不受容器扩展影响；--freeze 冻结主图 kenburns 的实时变换，保证碎裂瞬间无缝 */
.fragment-shard.fixed {
    inset: auto !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) var(--freeze, none);
}

/* 只动画 transform / opacity（纯合成器属性），滤镜与遮罩为静态，保证 60fps */
.fragment {
    background-repeat: no-repeat;
    backface-visibility: hidden;
    will-change: transform, opacity;
}

.fragment.decompose {
    animation: shardBreak var(--dur, 820ms) cubic-bezier(0.15, 0.65, 0.35, 1) var(--delay, 0s) both;
}

.fragment.recompose {
    animation: shardBuild var(--dur, 950ms) cubic-bezier(0.22, 1, 0.36, 1) var(--delay, 0s) both;
}

@keyframes shardBreak {
    0% {
        transform: translate3d(0, 0, 0) rotate(0deg) scale(1);
        opacity: 1;
    }
    55% {
        opacity: 0.95;
    }
    100% {
        transform: translate3d(var(--tx), var(--ty), var(--tz)) rotate(var(--rot)) scale(var(--sc));
        opacity: 0;
    }
}

@keyframes shardBuild {
    0% {
        transform: translate3d(var(--tx), var(--ty), var(--tz)) rotate(var(--rot)) scale(var(--sc));
        opacity: 0;
    }
    28% {
        opacity: 1;
    }
    100% {
        transform: translate3d(0, 0, 0) rotate(0deg) scale(1);
        opacity: 1;
    }
}

/* ===== [TRANSFORM] End ===== */

.scroll-indicator {
    position: absolute;
    bottom: 36px;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--mono);
    font-size: 10px;
    color: var(--fg-mute);
    text-transform: uppercase;
    letter-spacing: .2em;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    z-index: 5
}

.scroll-indicator::after {
    content: '';
    width: 1px;
    height: 42px;
    background: linear-gradient(180deg, var(--accent), transparent);
    animation: scrollLine 2s ease-in-out infinite
}

@keyframes scrollLine {
    0% {
        transform: scaleY(0);
        transform-origin: top
    }
    50% {
        transform: scaleY(1);
        transform-origin: top
    }
    51% {
        transform: scaleY(1);
        transform-origin: bottom
    }
    100% {
        transform: scaleY(0);
        transform-origin: bottom
    }
}

.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity .9s cubic-bezier(.22, 1, .36, 1), transform .9s cubic-bezier(.22, 1, .36, 1)
}

.reveal.in-view {
    opacity: 1;
    transform: translateY(0)
}

/* ===== 首屏响应式 ===== */
@media (max-width: 1024px) {
    .hero-layout {
        grid-template-columns:1fr;
        gap: 40px
    }

    .hero-right {
        height: 50vh;
        order: -1;
        max-width: 400px;
        margin: 0 auto
    }

    .nav-center {
        display: none
    }

    .hero-glow {
        width: 300px;
        height: 400px;
    }

    .hero-photo-wrap.expanded {
        width: 340px;
        height: 420px;
    }
}

@media (max-width: 768px) {
    .nav {
        padding: 14px 16px
    }

    .bgm-info {
        display: none
    }

    .bgm-player {
        padding: 6px
    }

    .container {
        padding: 0 22px
    }

    section {
        padding: 90px 0
    }

    .hero-meta {
        flex-wrap: wrap;
        gap: 12px
    }

    .hero-footer {
        grid-template-columns:1fr 1fr;
        gap: 20px
    }

    .hero-photo-wrap {
        width: 180px;
        height: 130px;
    }

    .hero-photo-wrap.expanded {
        width: 280px;
        height: 340px;
    }
}
