/* ===========================================
   common/catalog_shell.css — Catalog / Information 共用壳层
   Hero · lp-container · lp-main 网格 · lp-content 外框
   依赖：base/tokens.css · common/lp_tokens.css
   面包屑样式见 common/breadcrumb.css
=========================================== */

/* ── 页面容器 ───────────────────────────────── */
.info-page.lp-container {
    min-height: 60vh;
    background: var(--lp-background);
    font-family: var(--lp-font);
    color: var(--lp-text-primary);
    line-height: 1.6;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

/* information_base 法律/FAQ 等带 TOC 的页面：局部约束横向溢出，勿改 html/body */
body.page-info .info-page.lp-container,
body.page-info-legal .info-page.lp-container {
    overflow-x: clip;
}

/* ── Hero ───────────────────────────────────── */
.lp-hero {
    background: linear-gradient(135deg, #1a237e 0%, #3949ab 50%, #5c6bc0 100%);
    padding: var(--lp-spacing-2xl) 0;
    text-align: center;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.lp-hero:not(.lp-hero--has-bg)::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
    pointer-events: none;
}

.lp-hero--has-bg {
    background: transparent;
    padding: 0;
    /* 默认遮罩；分套 .lp-hero--has-bg--{preset} 覆盖 --section-overlay */
    --section-overlay: var(--lp-hero-overlay, rgba(0, 0, 0, 0.48));
}

.lp-hero__bg {
    position: relative;
    z-index: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    overflow: hidden;
    text-align: center;
    color: #fff;
}

/* ── Hero 三端背景（全局 · 与 _lp_hero_bg_media.html 配套）──────────────
   变量由模板 inline：--lp-hero-bg-desktop | -tablet | -mobile
   断点必须与站点排版一致（CSS 像素），勿改成 <picture media>：
     · 默认 / ≤767 → 手机
     · ≥768 → 平板（覆盖）
     · ≥1024 → 桌面（覆盖）
   装配层见 utils.pack_hero_bg / pack_hero_bg_from_viewports；
   Information 页族装配见 InformationService.pack_information_hero_bg_base_viewports。
─────────────────────────────────────────────────────────────────────── */
.lp-hero__bg-media {
    position: absolute;
    inset: 0;
    z-index: 0;
    display: block;
    margin: 0;
    padding: 0;
    background-image: var(--lp-hero-bg-mobile);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform 0.6s ease;
}

@media (min-width: 768px) {
    .lp-hero__bg-media {
        background-image: var(--lp-hero-bg-tablet);
    }
}

@media (min-width: 1024px) {
    .lp-hero__bg-media {
        background-image: var(--lp-hero-bg-desktop);
    }
}

/* 遮罩壳：components/_section_overlay → .nd-section__overlay（读父级 --section-overlay） */

.lp-hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 var(--lp-spacing-lg);
}

.lp-hero-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin: 0 auto var(--lp-spacing-md);
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 14px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
    /* 不再用 drop-shadow，玻璃底更干净 */
}

.lp-hero-icon svg {
    width: 26px;
    height: 26px;
    display: block;
}

.lp-hero-title {
    font-family: var(--lp-font);
    font-size: var(--lp-font-size-hero-title, clamp(1.75rem, 3.5vw, 2.5rem));
    font-weight: var(--lp-font-weight-heading, 400);
    margin: 0 0 var(--lp-spacing-md);
    letter-spacing: -0.01em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
    color: #e0e0e0;
    line-height: 1.25;
}

/* 标题 ↔ 副标题分割线（全局组件 components/_lp_hero_title_divider.html）
   ─────────────────────────────────────────────────────────────
   【状态 · 2026-08-07】暂时未启用（方案 A）
     catalog_base：hero_show_title_divider=false
     原因：与 Read more 的 underline 视觉冲突；组件+本段 CSS 保留勿删
     再启用：父级设 true 即可，无需改本文件

   视觉（启用时 · 对齐基调温暖/清新/邻家餐桌）：
   · 否决：纯白 1px 硬杠 + box-shadow
   · 采用：暖米石色两端渐隐短线 + 中心细点
*/
.lp-hero-title-divider {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: min(7.5rem, 36vw);
    height: 0.75rem;
    margin: 0.75rem auto 1.05rem;
}

.lp-hero-title-divider__rule {
    display: block;
    width: 100%;
    height: 1px;
    border: 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(232, 220, 200, 0.12) 12%,
        rgba(232, 220, 200, 0.72) 48%,
        rgba(232, 220, 200, 0.72) 52%,
        rgba(232, 220, 200, 0.12) 88%,
        transparent 100%
    );
}

.lp-hero-title-divider__mark {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(184, 168, 152, 0.92); /* ≈ --color-accent-light */
    box-shadow: 0 0 0 3px rgba(26, 47, 52, 0.22); /* 暗底 Hero 上略托一点 */
    transform: translate(-50%, -50%);
}

/* 有分割线时：标题下边距收紧，间距交给 divider 的 margin */
.lp-hero-content:has(.lp-hero-title-divider) .lp-hero-title {
    margin-bottom: 0.55rem;
}

.lp-hero-subtitle {
    font-family: var(--lp-font);
    font-size: var(--lp-font-size-hero-sub, clamp(1rem, 1.6vw, 1.125rem));
    font-weight: 400;
    max-width: min(42rem, 640px);
    margin: 0 auto;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    color: #f5f5f5;
    line-height: var(--lp-line-height-body, 1.5);
}

/* Catalog Hub / Leaf：导语意群 + Read more（定版 §2 · 全文居中） */
.lp-hero-subtitle-wrap {
    max-width: min(42rem, 640px);
    margin: 0 auto;
    text-align: center;
}

.lp-hero-subtitle-wrap .lp-hero-subtitle {
    margin: 0;
    max-width: none;
    text-align: center;
}

.lp-hero-subtitle--lead {
    font-size: var(--lp-font-size-hero-sub, clamp(1.05rem, 1.7vw, 1.2rem));
    font-weight: 500;
    color: #f8f8f8;
}

.lp-hero-subtitle--rest {
    margin-top: 0.55em;
    font-size: clamp(0.95rem, 1.4vw, 1.05rem);
    opacity: 0.78;
    font-weight: 400;
}

.lp-hero-intro-toggle {
    appearance: none;
    border: 0;
    background: none;
    padding: 0.45em 0 0;
    margin: 0;
    font: inherit;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
    color: rgba(255, 255, 255, 0.88);
    text-decoration: underline;
    text-underline-offset: 0.18em;
    cursor: pointer;
}

.lp-hero-intro-toggle:hover,
.lp-hero-intro-toggle:focus-visible {
    color: #fff;
}

@media (max-width: 767px) {
    .lp-hero-subtitle-wrap.is-collapsed [data-hero-intro-lead] {
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        overflow: hidden;
    }
}

/* ── Hero overlay 分套（preset = hero_bg.variant → 类名后缀）───────────
   壳：.nd-section__overlay；令牌：--lp-hero-overlay-*（lp_tokens.css）
   about | contact | trade | legal | catalog-hub | catalog-leaf | brand | stories
   兼容旧名：about_fullscreen→about · marketing→catalog-hub · philosophy/inspiration→brand
─────────────────────────────────────────────────────────────────────── */
.lp-hero--has-bg--about,
.lp-hero--has-bg--about_fullscreen {
    --section-overlay: var(--lp-hero-overlay-about);
}

.lp-hero--has-bg--contact {
    --section-overlay: var(--lp-hero-overlay-contact);
}

.lp-hero--has-bg--trade {
    --section-overlay: var(--lp-hero-overlay-trade);
}

.lp-hero--has-bg--legal {
    --section-overlay: var(--lp-hero-overlay-legal);
}

.lp-hero--has-bg--catalog-hub,
.lp-hero--has-bg--marketing {
    --section-overlay: var(--lp-hero-overlay-catalog-hub);
}

.lp-hero--has-bg--catalog-leaf {
    --section-overlay: var(--lp-hero-overlay-catalog-leaf);
}

.lp-hero--has-bg--brand,
.lp-hero--has-bg--philosophy,
.lp-hero--has-bg--inspiration {
    --section-overlay: var(--lp-hero-overlay-brand);
}

.lp-hero--has-bg--stories {
    --section-overlay: var(--lp-hero-overlay-stories);
}

@media (hover: hover) and (pointer: fine) {
    .lp-hero--has-bg:hover .lp-hero__bg-media {
        transform: scale(1.12);
    }

    /* hover 略减暗：改父级变量，壳层自动跟随（勿清到全透明） */
    .lp-hero--has-bg:hover {
        --section-overlay: rgba(0, 0, 0, 0.32);
    }
}

/* Information 母版统一 Hero 高度（FAQ / Privacy / Terms / Contact 等）
   About / Trade 各自母版 + 专用 CSS，不受此规则影响 */
body.page-info .lp-hero--has-bg .lp-hero__bg,
body.page-info-legal .lp-hero--has-bg .lp-hero__bg {
    min-height: clamp(200px, 28vw, 300px);
    padding: clamp(48px, 6vw, 72px) 0;
    box-sizing: border-box;
}

body.page-info .lp-hero--has-bg .lp-hero-content,
body.page-info-legal .lp-hero--has-bg .lp-hero-content {
    width: 100%;
}

/* Legal Hero：对照 Google Privacy 文档标题 — 更克制，不抢正文 */
body.page-info-legal .lp-hero-title {
    font-size: var(--lp-font-size-hero-title, clamp(1.5rem, 2.8vw, 2rem));
    font-weight: 400;
    letter-spacing: 0;
    line-height: 1.3;
}

body.page-info-legal .lp-hero-subtitle {
    font-size: var(--lp-font-size-hero-sub, 1rem);
    line-height: 1.5;
    max-width: min(36rem, 92%);
    letter-spacing: 0;
}

/* ── 两栏主区域：左 280px 目录 + 右内容 ─────── */
.lp-main {
    max-width: var(--lp-content-max);
    margin: 0 auto;
    padding: var(--lp-spacing-2xl) var(--lp-spacing-lg);
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: var(--lp-spacing-2xl);
    align-items: start;
    width: 100%;
    min-width: 0;
}

.lp-main--full {
    max-width: var(--lp-content-max);
    grid-template-columns: 1fr;
}

.lp-content--full {
    background: transparent;
    border: none !important;
    box-shadow: none !important;
    padding: 0;
    min-width: 0;
}

/* ── 右侧内容区（整体边框 + 阴影）────────────── */
.lp-content {
    background: #fff;
    border-radius: var(--lp-radius);
    padding: var(--lp-spacing-2xl);
    box-shadow: var(--lp-shadow-sm);
    border: 1px solid var(--lp-border-light);
    min-width: 0;
}

.lp-content.lp-content--full {
    padding: 0;
    margin: 0;
    border: none;
    box-shadow: none;
    background: transparent;
    border-radius: 0;
}

@media (max-width: 768px) {
    .lp-main {
        grid-template-columns: 1fr;
        gap: var(--lp-spacing-md);
        padding: var(--lp-spacing-lg);
    }

    .lp-content {
        order: 2;
        padding: var(--lp-spacing-lg);
    }

    .lp-content.lp-content--full {
        padding: 0;
    }

    .lp-hero:not(.lp-hero--has-bg):not(.lp-hero--fullscreen) {
        padding: var(--lp-spacing-xl) 0;
    }

    .lp-hero--has-bg,
    .lp-hero--fullscreen {
        padding: 0;
        margin: 0;
    }

    .lp-hero-icon {
        width: 48px;
        height: 48px;
        border-radius: 12px;
        margin-bottom: var(--lp-spacing-sm);
    }

    .lp-hero-icon svg {
        width: 22px;
        height: 22px;
    }
}

@media (max-width: 480px) {
    .lp-main {
        padding: var(--lp-spacing-md);
    }

    .lp-content {
        padding: var(--lp-spacing-md);
    }

    .lp-content.lp-content--full {
        padding: 0;
    }
}
