/* 善解人衣 首页
   视觉与 /upload/ 等功能页保持一致：浅灰页面 + 白色圆角卡片 + 粉色主色（#e91e63）+ 粉紫渐变按钮。
   字号一律用 px：主题 bootstrap 把 html 定为 10px，rem 会整体缩小。 */
.nhome,
.nhome * { box-sizing: border-box; }
.nhome {
    --nh-bg: #f5f6f7;
    --nh-surface: #fff;
    --nh-surface-2: #fdf2f6;
    --nh-text: #333;
    --nh-muted: #666;
    --nh-accent: #e91e63;
    --nh-accent-soft: #ffb3c6;
    --nh-grad: linear-gradient(135deg, #ff6b9d 0%, #c850c0 50%, #a855f7 100%);
    --nh-line: rgba(0, 0, 0, .07);
    --nh-shadow: 0 4px 18px rgba(255, 107, 157, .12);
    --nh-shadow-lg: 0 14px 40px rgba(60, 30, 60, .14);
    --nh-glow: rgba(255, 107, 157, .28);

    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", Helvetica, Arial, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: var(--nh-text);
    background: var(--nh-bg);
    overflow: hidden;
}
.nhome a { text-decoration: none; }
.nhome img,
.nhome video { max-width: 100%; display: block; }

body.home:has(.nhome) .header {
    position: sticky !important;
    top: 0;
    z-index: 999;
}
body.home.nav-fixed:has(.nhome) { padding-top: 0 !important; }

.nh-main {
    width: 100%;
    max-width: none;
    padding: 0;
    margin: 0;
}
.nh-wrap {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
}

/* ===== Buttons ===== */
.nh-btn,
.nh-btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 24px;
    border-radius: 100px;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, background .2s ease;
}
.nh-btn {
    background: var(--nh-grad);
    color: #fff !important;
    box-shadow: 0 3px 10px var(--nh-glow);
}
.nh-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px var(--nh-glow);
    color: #fff !important;
    text-decoration: none;
}
.nh-btn-ghost {
    border: 1.5px solid var(--nh-accent-soft);
    color: var(--nh-accent) !important;
    background: #fff;
}
.nh-btn-ghost:hover {
    border-color: var(--nh-accent);
    background: var(--nh-surface-2);
    color: var(--nh-accent) !important;
    text-decoration: none;
}

/* ===== Intro ===== */
.nh-intro {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    padding: 32px 0 20px;
}
.nh-kicker {
    display: inline-block;
    margin: 0 0 6px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .12em;
    color: var(--nh-accent);
}
.nh-intro h1 {
    margin: 0 0 8px;
    font-size: clamp(26px, 3.2vw, 34px);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -.01em;
    color: var(--nh-text);
}
.nh-intro h1 em {
    font-style: normal;
    background: var(--nh-grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.nh-lead {
    margin: 0;
    max-width: 40em;
    font-size: 15px;
    line-height: 1.7;
    color: var(--nh-muted);
}
.nh-intro__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
    flex-shrink: 0;
}

/* ===== Entry cards ===== */
.nh-entries {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    padding-bottom: 12px;
}
.nh-card {
    display: flex;
    align-items: stretch;
    gap: 16px;
    padding: 14px;
    border-radius: 16px;
    border: 1px solid var(--nh-line);
    background: var(--nh-surface);
    color: var(--nh-text) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .03);
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.nh-card:hover {
    transform: translateY(-2px);
    border-color: var(--nh-accent-soft);
    box-shadow: var(--nh-shadow);
    text-decoration: none;
    color: var(--nh-text) !important;
}
.nh-card__thumb {
    flex: 0 0 116px;
    height: 116px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2px;
    border-radius: 12px;
    overflow: hidden;
    background: var(--nh-surface-2);
}
.nh-card__thumb--pair { grid-template-columns: 1fr 1fr; }
.nh-card__thumb picture { display: block; width: 100%; height: 100%; }
.nh-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 18%;
    transition: transform .45s ease;
}
.nh-card:hover .nh-card__thumb img { transform: scale(1.05); }
.nh-card__body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    padding: 2px 0;
}
.nh-card__title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 17px;
    font-weight: 800;
    line-height: 1.3;
    color: var(--nh-text);
}
.nh-hot {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    font-style: normal;
    letter-spacing: .04em;
    color: var(--nh-accent);
    background: rgba(233, 30, 99, .09);
}
.nh-hot--new { color: #2c8a5f; background: rgba(44, 138, 95, .12); }
.nh-card__desc {
    margin-top: 6px;
    font-size: 13.5px;
    line-height: 1.6;
    color: var(--nh-muted);
}
.nh-card__go {
    display: inline-flex;
    align-items: center;
    align-self: flex-end;
    margin-top: auto;
    min-height: 32px;
    padding: 6px 16px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    color: #fff;
    background: var(--nh-grad);
    box-shadow: 0 3px 10px var(--nh-glow);
    transition: transform .2s ease, box-shadow .2s ease;
}
.nh-card__go::after { content: " ›"; margin-left: 2px; }
.nh-card:hover .nh-card__go {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px var(--nh-glow);
}

/* ===== Sections ===== */
.nh-section {
    padding: 56px 0;
    content-visibility: auto;
    contain-intrinsic-size: 1px 600px;
}
.nh-section--line { border-top: 1px solid var(--nh-line); }
.nh-section h2 {
    margin: 0 0 8px;
    font-size: clamp(22px, 2.8vw, 30px);
    font-weight: 800;
    letter-spacing: -.01em;
    color: var(--nh-text);
}
.nh-section .nh-sub {
    margin: 0 0 28px;
    font-size: 14.5px;
    color: var(--nh-muted);
}

/* ===== Steps + guarantee ===== */
.nh-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: nhstep;
}
.nh-steps li {
    counter-increment: nhstep;
    padding: 22px 22px 20px;
    border-radius: 16px;
    background: var(--nh-surface);
    border: 1px solid var(--nh-line);
}
.nh-steps li::before {
    content: counter(nhstep, decimal-leading-zero);
    display: block;
    margin-bottom: 12px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .14em;
    color: var(--nh-accent);
}
.nh-steps h3 {
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: 800;
    color: var(--nh-text);
}
.nh-steps p {
    margin: 0;
    font-size: 14.5px;
    color: var(--nh-muted);
}
.nh-guarantee {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 24px;
    margin: 26px 0 0;
    padding: 0;
    list-style: none;
    font-size: 14px;
    color: var(--nh-muted);
}
.nh-guarantee li::before {
    content: "✓ ";
    font-weight: 800;
    color: var(--nh-accent);
}

/* ===== Feature explain ===== */
.nh-feature {
    display: grid;
    grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
    gap: clamp(24px, 4vw, 56px);
    align-items: center;
    margin: 0 0 24px;
    padding: 26px;
    border-radius: 18px;
    background: var(--nh-surface);
    border: 1px solid var(--nh-line);
}
.nh-feature:last-child { margin-bottom: 0; }
.nh-feature--rev { grid-template-columns: minmax(0, 1fr) minmax(0, 300px); }
.nh-feature--rev .nh-feature__media { order: 2; }
.nh-feature__media {
    width: 100%;
    max-width: 300px;
    border-radius: 14px;
    overflow: hidden;
    background: var(--nh-surface-2);
    box-shadow: var(--nh-shadow);
}
.nh-feature__media img,
.nh-feature__media video {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 5;
    object-fit: cover;
}
/* 单图介绍框（图生视频 / 换脸 / 文生图）：图片宽度缩至 80%，整框高度随之降低约 20%，图片更清晰 */
.nh-feature__media--single { max-width: 240px; margin: 0 auto; }
.nh-feature__media--video {
    position: relative;
    max-width: 176px;
    margin: 0 auto;
}
.nh-feature__media--video picture { display: block; width: 100%; }
.nh-feature__media--video img,
.nh-feature__media--video video { aspect-ratio: 9 / 16; }
.nh-feature__media--video video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity .6s ease;
}
.nh-feature__media--video video.is-ready { opacity: 1; }
.nh-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px;
}
.nh-pair figure { margin: 0; position: relative; }
.nh-pair img {
    width: 100%;
    height: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
}
.nh-pair figcaption {
    position: absolute;
    left: 8px;
    bottom: 8px;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    background: rgba(0,0,0,.55);
}
.nh-tag {
    display: inline-block;
    margin-bottom: 8px;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 700;
    color: var(--nh-accent);
    background: rgba(233, 30, 99, .08);
}
.nh-feature h2 { margin-bottom: 10px; font-size: clamp(21px, 2.4vw, 26px); }
.nh-feature p {
    margin: 0 0 18px;
    font-size: 15px;
    line-height: 1.75;
    color: var(--nh-muted);
}
.nh-links { display: flex; flex-wrap: wrap; gap: 10px; }
.nh-links .nh-btn,
.nh-links .nh-btn-ghost { min-height: 40px; padding: 8px 20px; font-size: 14px; }

/* ===== Prices (金币) ===== */
.nh-prices {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}
.nh-price {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 20px 22px;
    border-radius: 16px;
    background: var(--nh-surface);
    border: 1px solid var(--nh-line);
    color: var(--nh-text) !important;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.nh-price:hover {
    text-decoration: none;
    color: var(--nh-text) !important;
    border-color: var(--nh-accent-soft);
    box-shadow: var(--nh-shadow);
}
.nh-price strong { font-size: 15px; font-weight: 700; }
.nh-price b {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -.02em;
    background: var(--nh-grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.nh-price span { font-size: 13.5px; color: var(--nh-muted); }
.nh-price-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 22px;
    font-size: 14px;
    color: var(--nh-muted);
}
.nh-price-foot p { margin: 0; }

/* ===== Gallery ===== */
.nh-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}
.nh-shot {
    position: relative;
    overflow: hidden;
    border-radius: 14px;
    background: var(--nh-surface);
    box-shadow: 0 2px 10px rgba(0, 0, 0, .04);
}
.nh-shot img {
    width: 100%;
    height: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    transition: transform .5s ease;
}
.nh-shot:hover img { transform: scale(1.04); }
.nh-shot--video video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity .5s ease;
}
.nh-shot--video video.is-ready { opacity: 1; }
.nh-shot span {
    position: absolute;
    left: 10px;
    bottom: 10px;
    z-index: 1;
    padding: 4px 11px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    background: rgba(0,0,0,.5);
}
.nh-shot--video span::before { content: "▶ "; font-size: 10px; }

/* ===== Final ===== */
.nh-final {
    position: relative;
    margin: 0 auto;
    width: min(1180px, calc(100% - 40px));
    padding: 56px 24px 60px;
    border-radius: 20px;
    background: var(--nh-surface);
    border: 1px solid var(--nh-line);
    text-align: center;
    overflow: hidden;
}
.nh-final::before {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -40%;
    width: 560px;
    height: 400px;
    transform: translateX(-50%);
    background: radial-gradient(ellipse, var(--nh-glow), transparent 70%);
    opacity: .5;
    pointer-events: none;
}
.nh-final h2 { margin-bottom: 10px; position: relative; }
.nh-final p {
    position: relative;
    margin: 0 auto 24px;
    max-width: 32em;
    color: var(--nh-muted);
}
.nh-final .nh-btn { position: relative; }
.nh-more {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 22px;
    margin: 24px 0 0;
    padding: 0;
    list-style: none;
    font-size: 14px;
}
.nh-more a { color: var(--nh-muted); text-decoration: underline; }
.nh-more a:hover { color: var(--nh-accent); }
.nh-note {
    margin: 0 auto;
    padding: 0 20px 36px;
    max-width: 720px;
    text-align: center;
    font-size: 13px;
    line-height: 1.7;
    color: var(--nh-muted);
}
.nh-note a { color: var(--nh-accent); text-decoration: underline; }
.nhome > .nh-final { margin-bottom: 56px; }

/* ===== Motion ===== */
@media (prefers-reduced-motion: no-preference) {
    .nh-reveal {
        opacity: 0;
        transform: translateY(18px);
        transition: opacity .55s ease, transform .55s ease;
    }
    .nh-reveal.is-in { opacity: 1; transform: none; }
}

@media (max-width: 960px) {
    .nh-feature,
    .nh-feature--rev { grid-template-columns: 1fr; }
    .nh-feature--rev .nh-feature__media { order: 0; }
    .nh-feature__media { max-width: 300px; margin: 0 auto; }
    .nh-feature__media--single { max-width: 240px; }
    .nh-feature__media--video { max-width: 160px; }
    .nh-gallery { grid-template-columns: repeat(3, 1fr); }
    .nh-prices { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
    .nh-intro { flex-direction: column; align-items: stretch; padding: 20px 0 14px; }
    .nh-intro h1 { font-size: 25px; }
    .nh-intro__actions { justify-content: stretch; }
    .nh-intro__actions .nh-btn,
    .nh-intro__actions .nh-btn-ghost { flex: 1 1 140px; padding-left: 14px; padding-right: 14px; }
    .nh-entries { grid-template-columns: 1fr; gap: 10px; }
    .nh-card { padding: 12px; gap: 12px; }
    .nh-card__thumb { flex-basis: 96px; height: 96px; }
    .nh-card__title { font-size: 16px; }
    .nh-steps { grid-template-columns: 1fr; gap: 12px; }
    .nh-section { padding: 40px 0; }
    .nh-feature { padding: 18px; margin-bottom: 16px; }
    .nh-feature__media { max-width: 260px; }
    .nh-feature__media--single { max-width: 208px; }
    .nh-feature__media--video { max-width: 150px; }
    .nh-gallery { grid-template-columns: 1fr 1fr; gap: 10px; }
    .nh-prices { grid-template-columns: 1fr; }
    .nh-final { padding: 40px 18px 44px; }
    .nh-final .nh-btn { width: 100%; }
}
