/* ============================================================
   H‑3：Creawith 首页 Hero 背景系统（最终工程版 · 16:9 广播大屏并网版）
   路径：assets/css/creawith-hero.css
   设计哲学：极致中性、智能防白切线、阻尼动能、全设备防拉伸
   ============================================================ */

/* ============================
   H‑3‑1：全局变量（背景系统基础）
   ============================ */
:root {
    --hero-gradient: #ffffff; /* 当前阶段：纯白背景打底 */
    --hero-glow: rgba(0, 0, 0, 0.015); /* 🌟 灵动柔光：开启极低饱和度中性光晕，模拟展厅顶灯打光感 */
}

/* ============================
   H‑3‑2：Hero 容器结构（升级为 16:9 超级广播演播厅总线）
   ============================ */
.cw-hero {
    position: relative;
    max-width: 1600px; /* 全站统一标规最大容器宽，防超宽屏图片马赛克失真 */
    margin: 24px auto 0;
    padding: 0 48px; /* 侧边富余留白，确立画廊展墙透气感 */
    box-sizing: border-box;
}

/* 16:9 黄金轮播外壳 */
.cw-broadcast-carousel {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9; /* 硬锁 16:9 电影切流比例，绝杀松散感 */
    border-radius: 12px; /* 严锁 3.0 大框圆角序列 */
    overflow: hidden;
    background: linear-gradient(135deg, #f8f9fa 0%, #f1f3f5 100%); /* 冷调柔光画布底色 */
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.03); /* 气泡软阴影，营造微悬浮高级层级 */
}

/* 🌟 核心调优：智能色调防震网（内描边），绝杀大面积纯白海报与网页背景融化塌陷 */
.cw-broadcast-carousel::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: 12px;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.03);
    z-index: 5;
}

/* ============================
   H‑3‑3：背景层结构（渐变 / 光晕 / 噪点 · 复合轮播轨道）
   ============================ */
.cw-hero-bg {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.cw-hero-gradient {
    position: absolute;
    inset: 0;
    background: var(--hero-gradient);
    transition: background 0.6s ease;
}

.cw-hero-glow {
    position: absolute;
    width: 60vw;
    height: 60vw;
    top: -20vw;
    left: -10vw;
    background: radial-gradient(circle, var(--hero-glow) 0%, transparent 70%);
    filter: blur(80px);
    opacity: 1; /* 唤醒状态机 */
    transition: opacity 0.6s ease;
}

/* 电影胶片级灰度微噪声：建立实体画布微肌理，消除屏幕廉价发光感 */
.cw-hero-noise {
    position: absolute;
    inset: 0;
    opacity: 0.14; 
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* ============================
   H‑3‑4：Hero 内容区排版（易容转化为纯净图片滑行轨道）
   ============================ */
.cw-carousel-inner {
    position: relative;
    width: 100%;
    height: 100%;
    z-index: 2;
}

.cw-carousel-item {
    position: absolute;
    inset: 0;
    opacity: 0;
    z-index: 1;
    /* 🌟 核心动能：豪华阻尼缓动曲线，实现极其优雅的微缩放淡入效果 */
    transition: opacity 0.6s cubic-bezier(0.33, 1, 0.68, 1), transform 0.6s cubic-bezier(0.33, 1, 0.68, 1);
    transform: scale(1.01);
}

.cw-carousel-item.active {
    opacity: 1;
    z-index: 2;
    transform: scale(1);
}

.cw-carousel-link {
    display: block;
    width: 100%;
    height: 100%;
}

.cw-carousel-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px; /* 严扣内含图片圆角步长 */
}

/* 🌟 控制圆点（Indicators Dots）：以内嵌悬浮形式收拢于容器内部右下角 */
.cw-carousel-indicators {
    position: absolute;
    bottom: 18px;
    right: 40px;
    display: flex;
    align-items: center;
    gap: 0;       /* 16px 热区紧贴，两点视觉边缘留白保持 10px */
    z-index: 10;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.cw-indicator-dot {
    position: relative;
    display: inline-grid;
    place-items: center;
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.cw-indicator-dot::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(17, 17, 17, 0.18); /* 未激活态：柔和轻灰（图 2 次要点） */
    transition:
        background-color 0.24s cubic-bezier(0.16, 1, 0.3, 1),
        box-shadow 0.24s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

.cw-indicator-dot:hover::before {
    background: rgba(17, 17, 17, 0.45);
}

.cw-indicator-dot.active::before {
    background: #111111; /* 激活态：深邃炭黑（图 2 主点） */
    transform: scale(1.15);
}

.cw-indicator-dot:focus-visible {
    outline: 2px solid rgba(37, 99, 235, 0.9);
    outline-offset: 1px;
}

.cw-indicator-dot[aria-hidden="true"] {
    cursor: default;
    pointer-events: none;
}

/* 🌟 有封面海报时的反色/高对比度适配 (亮白 + 暗影防浅色海报融化) */
.cw-hero--has-media .cw-indicator-dot::before {
    background: rgba(255, 255, 255, 0.55);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12);
}

.cw-hero--has-media .cw-indicator-dot:hover::before {
    background: rgba(255, 255, 255, 0.85);
}

.cw-hero--has-media .cw-indicator-dot.active::before {
    background: #ffffff;
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.18),
        0 1px 5px rgba(0, 0, 0, 0.28);
    transform: scale(1.18);
}

/* ============================
   H‑3‑5：Hero → Masonry 节奏（56px 纯白隔离大通道）
   ============================ */
.cw-home-section {
    max-width: 1600px;
    margin: 56px auto 0; /* 严锁 56px 垂直节拍步长 */
    padding: 0 48px;
    box-sizing: border-box;
}

/* 全局分区排版总轴（精选新作、推荐作品共有） */
.cw-section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 24px;
}

.cw-section-title {
    font-size: 20px;
    font-weight: 700;
    color: #111111;
    margin: 0;
    letter-spacing: -0.02em;
}

.cw-section-more {
    font-size: 13px;
    font-weight: 500;
    color: #888885;
    text-decoration: none;
    margin-left: auto; /* 🌟 决断：右对齐，死死锚定在主展墙的最右侧边缘线上 */
    transition: color 0.2s ease;
}
.cw-section-more:hover {
    color: #111111;
}

/* ============================
   H‑3‑6：移动端排版优化
   ============================ */
@media (max-width: 768px) {
    .cw-top-broadcast, 
    .cw-home-section {
        padding: 0 20px; /* 移动端收紧侧边留白 */
        margin-top: 40px;
    }
    .cw-section-title {
        font-size: 18px;
    }
}

/* ============================
   H‑3‑7：暗色模式视觉调校
   ============================ */
@media (prefers-color-scheme: dark) {
    .cw-broadcast-carousel {
        background: #0f0f0f;
    }
    .cw-broadcast-carousel::after {
        box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02); /* 暗色隐形内切线 */
    }
    .cw-hero-gradient {
        background: linear-gradient(180deg, #0f0f0f 0%, #111 100%);
    }
    .cw-hero-glow {
        opacity: 0.05;
        background: radial-gradient(circle, #ffffff 0%, transparent 70%);
    }
    .cw-hero--empty .cw-indicator-dot::before {
        background: rgba(255, 255, 255, 0.2);
    }
    .cw-hero--empty .cw-indicator-dot.active::before {
        background: #ffffff;
    }
}

/* ============================
   H‑3‑9：性能优化
   ============================ */
.cw-hero-gradient,
.cw-hero-glow,
.cw-hero-noise,
.cw-carousel-item {
    will-change: transform, opacity; /* 挂载独立图层，激活物理显卡硬件加速，拒绝掉帧 */
}

.cw-hero-glow,
.cw-hero-noise {
    pointer-events: none;
}

.cw-hero-noise {
    image-rendering: pixelated;
}

@media (max-width: 640px) {
    .cw-carousel-indicators {
        right: 14px;
        bottom: 14px;
    }

    .cw-indicator-dot {
        width: 20px;
        height: 20px;
        flex-basis: 20px;
    }

    .cw-hero-glow,
    .cw-hero-noise {
        display: none; /* 移动端关闭高耗能图层，全力护航滚动帧率 */
    }
}

@media (prefers-reduced-motion: reduce) {
    .cw-indicator-dot::before {
        transition: none;
    }
}
