/* ==========================================================================
   art.css — IDMANOS ART 作品档案页新增样式
   仅承载卡片信息层（.artwork-caption），基础画廊样式沿用 css/gallery.css
   视觉原则：极简、留白、安静，不引入色块与装饰
   ========================================================================== */

/* 整张卡片可点击进入作品详情 */
.grid-item {
    cursor: pointer;
}

.grid-item:focus-visible {
    outline: 1px solid #1a1a1a;
    outline-offset: 3px;
}

/* 卡片信息层（图片加载完成后随卡片自然增高，不破坏瀑布流） */
.artwork-caption {
    position: relative;
    z-index: 2;
    padding: 0.9rem 1rem 1.05rem;
    text-align: left;
    background: #f7f7f7;
}

.artwork-caption-title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.35;
    color: #1a1a1a;
    letter-spacing: 0.01em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: opacity 0.3s ease;
}

.artwork-caption-meta {
    margin: 0.35rem 0 0;
    font-size: 0.72rem;
    font-weight: 400;
    line-height: 1.4;
    color: #8a8a8a;
    letter-spacing: 0.06em;
}

.artwork-caption-status {
    margin: 0.5rem 0 0;
    font-size: 0.66rem;
    font-weight: 400;
    line-height: 1.4;
    color: #6f6f6f;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.grid-item:hover .artwork-caption-title {
    opacity: 0.72;
}

@media (max-width: 768px) {
    .artwork-caption {
        padding: 0.75rem 0.8rem 0.9rem;
    }

    .artwork-caption-title {
        font-size: 0.88rem;
    }

    .artwork-caption-meta {
        font-size: 0.68rem;
    }

    .artwork-caption-status {
        font-size: 0.62rem;
    }
}

/* ==========================================================================
   作品详情页（artwork.html）
   01 大图 → 02 信息 → 03 描述 → 04 状态 → 05 CTA → 06 相关作品
   视觉原则：极简、留白、安静，不引入色块与装饰
   ========================================================================== */

.artwork-detail {
    max-width: 1440px;
    margin: 0 auto;
    padding: 8.5rem 6% 6rem;
    box-sizing: border-box;
}

.artwork-detail-head {
    margin-bottom: 2.5rem;
}

.artwork-back {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #8a8a8a;
    text-decoration: none;
    transition: color 0.3s ease;
}

.artwork-back:hover {
    color: #1a1a1a;
}

.artwork-detail-body {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(290px, 0.65fr);
    gap: 4.5rem;
    align-items: start;
}

/* 01 大图 */
.artwork-figure-frame {
    background: #f7f7f7;
    border-radius: 10px;
    overflow: hidden;
}

.artwork-figure-frame img {
    display: block;
    width: 100%;
    height: auto;
}

/* 02 信息面板 */
.artwork-panel {
    position: sticky;
    top: 7.5rem;
}

.artwork-heading h1 {
    margin: 0;
    font-size: clamp(1.4rem, 2.4vw, 2rem);
    font-weight: 500;
    line-height: 1.25;
    letter-spacing: 0.01em;
    color: #1a1a1a;
}

.artwork-subtitle {
    margin: 0.45rem 0 0;
    font-size: 0.9rem;
    font-weight: 400;
    color: #8a8a8a;
    letter-spacing: 0.02em;
}

.artwork-meta {
    margin: 2.5rem 0 0;
    padding: 0;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.artwork-meta-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.artwork-meta dt {
    flex: 0 0 auto;
    font-size: 0.66rem;
    font-weight: 400;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #9a9a9a;
}

.artwork-meta dd {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.5;
    color: #1a1a1a;
    text-align: right;
}

/* 03 描述 */
.artwork-description-block {
    margin-top: 2.5rem;
}

.artwork-about {
    margin: 0 0 0.9rem;
    font-size: 0.66rem;
    font-weight: 400;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #9a9a9a;
}

.artwork-description {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.8;
    color: #4a4a4a;
}

/* 04 状态 */
.artwork-availability {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1.5rem;
    margin-top: 2.5rem;
    padding: 0.95rem 0;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.artwork-availability-label {
    font-size: 0.66rem;
    font-weight: 400;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #9a9a9a;
}

.artwork-availability-value {
    font-size: 0.76rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #1a1a1a;
}

/* 05 CTA */
.artwork-cta {
    display: flex;
    margin-top: 2.5rem;
}

.artwork-cta-btn {
    width: 100%;
    padding: 1.05rem 2rem;
    background: #000;
    color: #f7f7f7;
    border: none;
    border-radius: 25px;
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    cursor: pointer;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.artwork-cta-btn:hover {
    transform: translateY(-2px);
}

.artwork-cta-btn:focus-visible {
    outline: 1px solid #1a1a1a;
    outline-offset: 3px;
}

/* 06 相关作品 */
.artwork-related {
    margin-top: 7rem;
}

#related-title {
    margin: 0 0 1.8rem;
    font-size: 0.7rem;
    font-weight: 400;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #9a9a9a;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 2rem;
}

.related-item {
    display: block;
    text-decoration: none;
    color: inherit;
}

.related-item-frame {
    background: #f7f7f7;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 3 / 4;
}

.related-item-frame img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease, opacity 0.3s ease;
}

.related-item:hover .related-item-frame img {
    transform: scale(1.03);
    opacity: 0.88;
}

.related-item-caption {
    display: flex;
    flex-direction: column;
    gap: 0.28rem;
    padding: 0.85rem 0 0;
}

.related-item-title {
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1.4;
    color: #1a1a1a;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: opacity 0.3s ease;
}

.related-item:hover .related-item-title {
    opacity: 0.72;
}

.related-item-meta {
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    color: #8a8a8a;
}

/* 未找到作品 */
.artwork-not-found {
    max-width: 1440px;
    margin: 0 auto;
    padding: 12rem 6% 8rem;
    text-align: center;
}

.artwork-not-found p {
    margin: 0 0 1.5rem;
    font-size: 1rem;
    color: #4a4a4a;
}

.artwork-not-found a {
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #8a8a8a;
    text-decoration: none;
    transition: color 0.3s ease;
}

.artwork-not-found a:hover {
    color: #1a1a1a;
}

/* 系统深色模式：与全站暗色语言一致（否则卡片/详情页文字在深色下不可见） */
@media (prefers-color-scheme: dark) {
    .grid-item:focus-visible {
        outline-color: #e5e5e5;
    }

    .artwork-caption {
        background: #2a2a2a;
    }

    .artwork-caption-title {
        color: #e5e5e5;
    }

    .artwork-caption-meta {
        color: #8a8a8a;
    }

    .artwork-caption-status {
        color: #9a9a9a;
    }

    .artwork-back {
        color: #8a8a8a;
    }

    .artwork-back:hover {
        color: #e5e5e5;
    }

    .artwork-figure-frame {
        background: #2a2a2a;
    }

    .artwork-heading h1 {
        color: #e5e5e5;
    }

    .artwork-subtitle {
        color: #8a8a8a;
    }

    .artwork-meta {
        border-top-color: rgba(255, 255, 255, 0.10);
    }

    .artwork-meta-row {
        border-bottom-color: rgba(255, 255, 255, 0.08);
    }

    .artwork-meta dt {
        color: #9a9a9a;
    }

    .artwork-meta dd {
        color: #e5e5e5;
    }

    .artwork-about {
        color: #9a9a9a;
    }

    .artwork-description {
        color: #bbb;
    }

    .artwork-availability {
        border-top-color: rgba(255, 255, 255, 0.10);
        border-bottom-color: rgba(255, 255, 255, 0.10);
    }

    .artwork-availability-label {
        color: #9a9a9a;
    }

    .artwork-availability-value {
        color: #e5e5e5;
    }

    .artwork-cta-btn:focus-visible {
        outline-color: #e5e5e5;
    }

    #related-title {
        color: #9a9a9a;
    }

    .related-item-frame {
        background: #2a2a2a;
    }

    .related-item-title {
        color: #e5e5e5;
    }

    .related-item-meta {
        color: #8a8a8a;
    }

    .artwork-not-found p {
        color: #bbb;
    }

    .artwork-not-found a {
        color: #8a8a8a;
    }

    .artwork-not-found a:hover {
        color: #e5e5e5;
    }
}

@media (max-width: 1024px) {
    .artwork-detail-body {
        gap: 3rem;
    }

    .related-grid {
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .artwork-detail {
        padding: 6.5rem 5% 5rem;
    }

    .artwork-detail-head {
        margin-bottom: 1.8rem;
    }

    .artwork-detail-body {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .artwork-panel {
        position: static;
        top: auto;
    }

    .artwork-meta {
        margin-top: 2rem;
    }

    .artwork-related {
        margin-top: 4.5rem;
    }

    .related-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1.2rem;
    }

    .artwork-not-found {
        padding: 9rem 5% 6rem;
    }
}