/* ============================================================
   作品 / App 介绍页
   与全站暖色手账风格一致，局部借用格物志的深蓝 + 琥珀配色
   ============================================================ */

:root {
    --app-navy: #141e33;
    --app-navy-soft: #1d2a45;
    --app-amber: #d97706;
    --app-amber-hover: #b45309;
    --app-cream: #faf6ed;
    --app-ink: #0f1a2e;
    --app-muted: #64748b;
    --app-faint: #94a3b8;
    /* 直接落在背景上的正文/说明文字：比 muted 更深，保证可读性 */
    --app-body: #55637a;
    /* 区块底色：格子按它调深浅，改这里格子会跟着变 */
    --app-section-bg: #fbe7d1;
    --app-line: rgba(180, 160, 140, 0.28);
    --app-card-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* ---------- 通用容器 ---------- */
.app-section {
    padding: 72px 20px;
    /* 有底色，避免露出页面底层的斜向色带 */
    background: var(--app-section-bg);
}

.app-section--cream {
    background: #faf6ed;
    border-top: 1px solid var(--app-line);
    border-bottom: 1px solid var(--app-line);
}

.app-section-inner {
    max-width: 1080px;
    margin: 0 auto;
}

.app-section-inner--narrow {
    max-width: 760px;
}

.app-section-title {
    font-size: 26px;
    font-weight: 700;
    color: var(--app-ink);
    letter-spacing: 0.5px;
    margin: 0 0 10px;
}

.app-section-title.center {
    text-align: center;
}

.app-section-sub {
    font-size: 15px;
    color: var(--app-body);
    margin: 0 0 34px;
    letter-spacing: 0.3px;
}

.app-section-sub.center {
    text-align: center;
}

/* ---------- 英雄区 ---------- */
.app-hero {
    position: relative;
    background: var(--app-navy);
    color: #f2eee6;
    overflow: hidden;
    isolation: isolate;
}

.app-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    background-image:
        linear-gradient(to right, rgba(217, 119, 6, 0.16) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(217, 119, 6, 0.16) 1px, transparent 1px);
    background-size: 30px 30px;
    -webkit-mask-image: radial-gradient(130% 90% at 78% 10%, #000 0%, rgba(0, 0, 0, 0.35) 45%, transparent 72%);
    mask-image: radial-gradient(130% 90% at 78% 10%, #000 0%, rgba(0, 0, 0, 0.35) 45%, transparent 72%);
    pointer-events: none;
}

.app-hero::after {
    content: '';
    position: absolute;
    inset: auto 0 0 0;
    height: 8px;
    z-index: 3;
    pointer-events: none;
    background: linear-gradient(to right,
        #f5e0b0 0%, #f5e0b0 16.66%,
        #f5c894 16.66%, #f5c894 33.33%,
        #e8b07a 33.33%, #e8b07a 50%,
        #d49664 50%, #d49664 66.66%,
        #c08050 66.66%, #c08050 83.33%,
        #f5e0b0 83.33%, #f5e0b0 100%);
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.08);
}

.app-hero-inner {
    position: relative;
    z-index: 2;
    max-width: 1180px;
    margin: 0 auto;
    padding: 64px 32px 78px;
    display: grid;
    grid-template-columns: 1fr 1.05fr;
    gap: 56px;
    align-items: center;
}

.app-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #c9a06a;
    margin: 0 0 18px;
}

.app-eyebrow::before {
    content: '';
    width: 26px;
    height: 1px;
    background: currentColor;
    opacity: 0.7;
}

.app-title-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 12px;
}

.app-icon {
    width: 40px;
    height: 56px;
    flex-shrink: 0;
    filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.35));
}

.app-title {
    font-size: 44px;
    line-height: 1.15;
    font-weight: 700;
    color: #f7f3ea;
    letter-spacing: 2px;
    margin: 0;
}

.app-tagline {
    font-size: 19px;
    font-weight: 500;
    color: var(--app-amber);
    letter-spacing: 1.5px;
    margin: 0 0 18px;
}

.app-desc {
    font-size: 15.5px;
    line-height: 2;
    color: #b9bfcc;
    margin: 0 0 30px;
    max-width: 30em;
}

.app-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-bottom: 26px;
}

.app-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 26px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    letter-spacing: 0.5px;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

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

.app-btn--primary {
    background: var(--app-amber);
    color: #fff;
    box-shadow: 0 10px 26px -10px rgba(217, 119, 6, 0.9);
}

.app-btn--primary:hover {
    background: var(--app-amber-hover);
    color: #fff;
}

.app-btn--ghost {
    background: rgba(255, 255, 255, 0.07);
    color: #e6e2d9;
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.app-btn--ghost:hover {
    background: rgba(255, 255, 255, 0.13);
    color: #fff;
}

.app-btn[aria-disabled='true'] {
    opacity: 0.72;
    cursor: default;
}

.app-btn[aria-disabled='true']:hover {
    transform: none;
}

.app-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.app-chips li {
    font-size: 12px;
    color: #cfd5e0;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    padding: 4px 13px;
    letter-spacing: 0.4px;
}

/* 英雄区右侧截图 */
.app-hero-shot {
    position: relative;
}

.app-hero-shot::before {
    content: '';
    position: absolute;
    inset: -36px -28px -28px -28px;
    background: radial-gradient(60% 60% at 50% 45%, rgba(217, 119, 6, 0.22), transparent 70%);
    filter: blur(6px);
    z-index: -1;
}

/* ---------- 截图外框 ---------- */
.shot-frame {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 30px 70px -26px rgba(6, 12, 26, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.shot-frame img {
    display: block;
    width: 100%;
    height: auto;
    /* 预留高度，图片懒加载完成前外框不会塌陷 */
    aspect-ratio: 2000 / 1317;
}

.shot-bar {
    height: 32px;
    background: #efe9de;
    border-bottom: 1px solid #e2d9c9;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 14px;
}

.shot-bar i {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #d5c9b4;
    display: block;
}

.shot-frame--light {
    box-shadow: 0 14px 40px -18px rgba(26, 42, 74, 0.4), 0 0 0 1px rgba(180, 160, 140, 0.28);
}

.shot-frame--light .shot-bar {
    background: #f7f2e8;
}

/* ---------- 两栏图文 ---------- */
.app-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 52px;
    align-items: center;
}

.app-split--reverse .app-split-text {
    order: 2;
}

.app-split-text p {
    font-size: 15.5px;
    line-height: 2.05;
    color: #334155;
    margin: 0 0 16px;
}

.app-split-text p:last-child {
    margin-bottom: 0;
}

.app-split-media {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.app-split-text strong {
    color: var(--app-amber-hover);
    font-weight: 600;
}

/* ---------- 特色功能（六格按钮 + 单块详情） ---------- */
.app-features-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    max-width: 880px;
    margin: 34px auto 0;
}

.app-features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.app-feature-tile {
    position: relative;
    aspect-ratio: 1 / 1;
    border: none;
    border-radius: 14px;
    padding: 0;
    font-family: inherit;
    /* 不支持 color-mix 的浏览器退回一个比底色略深的暖色 */
    background: #eedcc4;
    background: color-mix(in srgb, var(--tile-color) 52%, var(--app-section-bg));
    cursor: pointer;
    transition: transform 0.28s ease, box-shadow 0.28s ease, background 0.28s ease;
}

.app-feature-tile:hover {
    transform: translateY(-3px);
    background: #e5cdb0;
    background: color-mix(in srgb, var(--tile-color) 70%, var(--app-section-bg));
}

.app-feature-tile.active {
    background: var(--tile-color);
    transform: scale(1.05);
    box-shadow: 0 14px 30px -14px rgba(26, 42, 74, 0.45);
}

/* 左上角的浅色序号 */
.app-feature-num {
    position: absolute;
    top: 10px;
    left: 12px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    color: rgba(15, 26, 46, 0.3);
}

.app-feature-tile:focus-visible {
    outline: 2px solid var(--app-amber);
    outline-offset: 3px;
}

.app-features-detail {
    min-height: 190px;
}

.app-features-detail.is-entering {
    animation: appDetailIn 0.4s ease;
}

@keyframes appDetailIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.app-feature-detail-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--app-ink);
    letter-spacing: 0.5px;
    margin: 0 0 14px;
}

.app-feature-detail-desc {
    font-size: 15px;
    line-height: 2;
    color: var(--app-body);
    margin: 0;
    max-width: 26em;
}

/* ---------- 页面巡览 ---------- */
.app-tour {
    display: flex;
    flex-direction: column;
    gap: 56px;
}

.app-tour-item {
    display: grid;
    grid-template-columns: 0.72fr 1.6fr;
    gap: 44px;
    align-items: center;
}

.app-tour-item:nth-child(even) .app-tour-copy {
    order: 2;
}

/* 偶数行左右对调时，列宽也要跟着换，否则截图会挤进窄列 */
.app-tour-item:nth-child(even) {
    grid-template-columns: 1.6fr 0.72fr;
}

.app-tour-index {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 2px;
    color: var(--app-amber);
    margin: 0 0 10px;
}

.app-tour-copy h3 {
    font-size: 22px;
    font-weight: 700;
    color: var(--app-ink);
    margin: 0 0 10px;
    letter-spacing: 0.5px;
}

.app-tour-copy p {
    font-size: 14.5px;
    line-height: 1.95;
    color: var(--app-body);
    margin: 0;
}

/* ---------- 手机展示 ---------- */
.app-phones {
    display: flex;
    justify-content: center;
    gap: 34px;
    flex-wrap: wrap;
}

.phone {
    width: 232px;
    padding: 9px;
    border-radius: 30px;
    background: linear-gradient(160deg, #2a3552, #10182b);
    box-shadow: 0 26px 50px -22px rgba(10, 18, 36, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.phone img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 416 / 900;
    border-radius: 22px;
}

.phone-caption {
    text-align: center;
    font-size: 12.5px;
    color: var(--app-body);
    margin-top: 14px;
    letter-spacing: 0.5px;
}

/* ---------- 结尾 CTA ---------- */
.app-cta {
    background: var(--app-navy);
    color: #e9e5dc;
    text-align: center;
    padding: 66px 24px 108px;
    position: relative;
    overflow: hidden;
}

.app-cta h2 {
    font-size: 25px;
    font-weight: 700;
    color: #f7f3ea;
    margin: 0 0 12px;
    letter-spacing: 1px;
}

.app-cta p {
    font-size: 15px;
    color: #aab2c2;
    margin: 0 auto 30px;
    max-width: 34em;
    line-height: 2.25;
}

.app-cta .app-actions {
    justify-content: center;
    margin-bottom: 0;
}

.app-note {
    font-size: 12.5px;
    color: #9aa5b8;
    margin-top: 36px;
    line-height: 2;
    letter-spacing: 0.4px;
}

/* 作品页：蓝色结尾直接连到页脚，让页脚的波浪压在蓝色上 */
body:has(.app-cta) .site-footer {
    margin-top: 0;
}

/* ============================================================
   作品列表页
   ============================================================ */
.app-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 22px;
}

.app-card {
    display: flex;
    flex-direction: column;
    background: var(--app-cream);
    background-image:
        linear-gradient(to right, rgba(180, 160, 140, 0.12) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(180, 160, 140, 0.12) 1px, transparent 1px);
    background-size: 24px 24px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    box-shadow: var(--app-card-shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.app-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 34px rgba(26, 42, 74, 0.1);
}

.app-card-thumb {
    height: 168px;
    overflow: hidden;
    border-bottom: 1px solid var(--app-line);
    background: var(--app-navy);
}

.app-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
}

.app-card-body {
    padding: 18px 22px 22px;
}

.app-card-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.app-card-head img {
    width: 18px;
    height: 25px;
}

.app-card-head h2 {
    font-size: 19px;
    font-weight: 600;
    color: var(--app-ink);
    margin: 0;
}

.app-card-badge {
    font-size: 11px;
    color: var(--app-amber-hover);
    background: rgba(217, 119, 6, 0.1);
    border: 1px solid rgba(217, 119, 6, 0.28);
    border-radius: 999px;
    padding: 1px 10px;
    margin-left: auto;
}

.app-card-body p {
    font-size: 14px;
    line-height: 1.85;
    color: var(--app-body);
    margin: 0 0 14px;
}

.app-card-more {
    font-size: 14px;
    font-weight: 500;
    color: var(--app-amber-hover);
}

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 900px) {
    .app-hero-inner {
        grid-template-columns: 1fr;
        gap: 40px;
        padding: 46px 24px 60px;
    }

    .app-hero-shot {
        order: 2;
    }

    .app-split {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .app-split--reverse .app-split-text {
        order: 0;
    }

    .app-tour-item,
    .app-tour-item:nth-child(even) {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .app-tour-item:nth-child(even) .app-tour-copy {
        order: 0;
    }

    /* 手机上统一「先文字后截图」，避免左右交替带来的顺序错乱 */
    .app-tour-copy,
    .app-tour-item:nth-child(even) .app-tour-copy {
        order: -1;
    }

    .app-features-body {
        grid-template-columns: 1fr;
        gap: 30px;
        max-width: 420px;
    }

    .app-features-detail {
        min-height: auto;
    }

}

@media (max-width: 640px) {
    .app-section {
        padding: 46px 16px;
    }

    .app-section-title {
        font-size: 21px;
    }

    .app-title {
        font-size: 31px;
        letter-spacing: 1px;
    }

    .app-icon {
        width: 30px;
        height: 42px;
    }

    .app-tagline {
        font-size: 16px;
    }

    .app-desc {
        font-size: 14.5px;
    }

    .app-btn {
        padding: 11px 20px;
        font-size: 14px;
    }

    .app-feature-tile {
        border-radius: 12px;
    }

    .app-feature-num {
        top: 8px;
        left: 10px;
        font-size: 11px;
    }

    .app-feature-detail-title {
        font-size: 20px;
    }

    .app-phones {
        gap: 22px;
    }

    .phone {
        width: 190px;
    }

    .app-tour-copy h3 {
        font-size: 19px;
    }

    .app-card-thumb {
        height: 140px;
    }
}
