/*
 * premium.css — Global shared design system
 * 环贸智荟 · Images 2.0 · Paper / Silver / Gold palette
 * --------------------------------------------------------
 * Load order: config.css → premium.css → page-specific
 */

/* ============================================================
   1. FONTS
   ============================================================ */

:root {
    --font-display: "Noto Sans SC", "PingFang SC", "Heiti SC", sans-serif;
    --font-serif: "Source Serif 4", "Noto Serif SC", Georgia, serif;
    --font-sans: "Geist", "Noto Sans SC", system-ui, sans-serif;
    --font-mono: "Geist Mono", ui-monospace, monospace;
}

/* ============================================================
   2. COLOR & BASE VARIABLES
   ============================================================ */

:root {
    /* Surface */
    --pg-paper:         #F7F6F4;
    --pg-mist:          #E9E8E5;
    --pg-silver:        #D9D9D9;
    --pg-silver-deep:   #CFCEC9;
    --pg-face:          #FCFBFA;

    /* Ink */
    --pg-ink:           #333333;
    --pg-ink-strong:    #222222;
    --pg-ink-soft:      #6B6A66;
    --pg-ink-faint:     #9A9893;

    /* Hairlines */
    --pg-hair:          #E2E1DD;
    --pg-hair-silver:   #CDCCC7;

    /* Gold accent */
    --pg-gold:          #A68966;
    --pg-gold-deep:     #8F744F;

    /* Easing */
    --ease-lux: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ============================================================
   3. MINIMAL RESET
   ============================================================ */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

/* NOTE: body background / color intentionally NOT reset here
   to avoid overriding config.css baseline */

/* ============================================================
   4. LAYOUT UTILITIES
   ============================================================ */

.wrap {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 48px;
}

@media (max-width: 900px) {
    .wrap {
        padding: 0 32px;
    }
}

@media (max-width: 560px) {
    .wrap {
        padding: 0 22px;
    }
}

/* ============================================================
   5. TYPOGRAPHY UTILITIES
   ============================================================ */

/* Display / heading — black weight CJK sans */
.hei {
    font-family: var(--font-display);
    font-weight: 900;
    letter-spacing: -0.01em;
}

/* Serif body / quote */
.serif {
    font-family: var(--font-serif);
}

/* Eyebrow label above headings — small caps + gold rule */
.eyebrow {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--pg-ink-soft);
}

.eyebrow::before {
    content: "";
    display: block;
    width: 32px;
    height: 2px;
    background: var(--pg-gold);
    flex-shrink: 0;
}

/* Sub-label under an eyebrow */
.ksub {
    font-family: var(--font-sans);
    font-size: 13px;
    color: var(--pg-ink-soft);
    line-height: 1.6;
}

/* Enumeration label (e.g. "01 / BRAND") */
.enlabel {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.08em;
    color: var(--pg-gold-deep);
}

/* Tabular / mono numbers */
.tnum {
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
}

/* Decorative gold rule line */
.gold-rule {
    display: block;
    width: 40px;
    height: 2px;
    background: var(--pg-gold);
}

/* ============================================================
   6. BUTTONS & LINKS
   ============================================================ */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 13px 26px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s var(--ease-lux), color 0.2s, transform 0.15s var(--ease-lux);
}

.btn-primary {
    background: var(--pg-ink-strong);
    color: #ffffff;
}

.btn-primary:hover {
    background: #111111;
    transform: translateY(-1px);
}

/* Gold arrow icon inside primary button */
.btn .ar {
    color: var(--pg-gold);
    font-style: normal;
    transition: transform 0.2s var(--ease-lux);
}

.btn:hover .ar {
    transform: translateX(3px);
}

/* Inline text link with animated underline */
.tlink {
    font-family: var(--font-sans);
    font-size: 14px;
    color: var(--pg-ink);
    text-decoration: underline;
    text-decoration-color: var(--pg-hair-silver);
    text-underline-offset: 3px;
    transition: color 0.2s, text-decoration-color 0.2s;
}

.tlink:hover {
    color: var(--pg-gold-deep);
    text-decoration-color: var(--pg-gold-deep);
}

/* ============================================================
   7. REVEAL ANIMATIONS
   ============================================================ */

.rv {
    /* Visible by default for no-JS environments */
    transition: opacity 0.7s var(--ease-lux), transform 0.7s var(--ease-lux);
}

html.has-js .rv {
    opacity: 0;
    transform: translateY(22px);
}

html.has-js .rv.in {
    opacity: 1;
    transform: translateY(0);
}

.rv-d1 { transition-delay: 0.08s; }
.rv-d2 { transition-delay: 0.16s; }
.rv-d3 { transition-delay: 0.24s; }

@media (prefers-reduced-motion: reduce) {
    html.has-js .rv {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ============================================================
   8. SECTION LAYOUT
   ============================================================ */

.psection {
    padding: 120px 0;
}

.psection--mist {
    background: var(--pg-mist);
    border-top: 1px solid var(--pg-hair-silver);
    border-bottom: 1px solid var(--pg-hair-silver);
}

.psection--silver {
    background: var(--pg-silver);
}

/* Section heading block (constrained width) */
.phead {
    max-width: 760px;
}

/* Thin horizontal rule between section parts */
.phair {
    width: 100%;
    height: 1px;
    background: var(--pg-hair);
    border: none;
    margin: 56px 0;
}

/* Decorative section divider */
.pdivider {
    width: 48px;
    height: 3px;
    background: var(--pg-gold);
    margin: 24px 0;
}

/* ============================================================
   9. CARD BASICS
   ============================================================ */

.pcard {
    background: var(--pg-face);
    border: 1px solid var(--pg-hair-silver);
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.03);
    transition: transform 0.25s var(--ease-lux), box-shadow 0.25s var(--ease-lux);
}

.pcard:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

/* Small label chip / tag */
.pchip {
    display: inline-flex;
    align-items: center;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--pg-ink-soft);
    border: 1px solid var(--pg-hair-silver);
    border-radius: 20px;
    padding: 3px 10px;
}

/* Icon container (48×48 rounded square) */
.picon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: var(--pg-mist);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Aluminum / paper textured plate background */
.pface {
    background: linear-gradient(145deg, var(--pg-face) 0%, #E4E3DF 100%);
    border: 1px solid var(--pg-hair-silver);
}

/* Inset gold inlay border (use as a wrapper with position: relative) */
.pface-inlay {
    position: relative;
}

.pface-inlay::after {
    content: "";
    position: absolute;
    inset: 20px;
    border: 1px solid rgba(166, 137, 102, 0.35);
    border-radius: 4px;
    pointer-events: none;
}

/* ============================================================
   10. NAVIGATION
   ============================================================ */

.nav {
    position: sticky;
    top: 0;
    z-index: 100;
    height: 70px;
    display: flex;
    align-items: center;
    background: rgba(247, 246, 244, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s, background 0.3s, box-shadow 0.3s;
}

.nav.scrolled {
    border-bottom-color: var(--pg-hair);
    background: rgba(247, 246, 244, 0.96);
    box-shadow: 0 10px 34px -30px rgba(41, 37, 34, 0.7);
}

.nav .wrap {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 40px;
}

/* Brand lockup */
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    flex-shrink: 0;
}

.brand img {
    height: 36px;
    width: auto;
}

.brand-copy,
.foot-stamp-copy {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.brand-zh {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 700;
    color: var(--pg-ink-strong);
    letter-spacing: 0.02em;
}

.brand-en {
    font-family: var(--font-sans);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--pg-ink-faint);
}

/* Nav links */
.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 1;
}

.nav-links a {
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 500;
    color: var(--pg-ink-soft);
    text-decoration: none;
    position: relative;
    padding-bottom: 2px;
    transition: color 0.2s;
}

.nav-links a::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--pg-gold);
    transition: width 0.25s var(--ease-lux);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--pg-ink-strong);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

/* Right cluster */
.nav-right {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-left: auto;
    flex-shrink: 0;
}

.nav-menu-toggle,
.mobile-nav {
    display: none;
}

.nav-menu-toggle {
    position: relative;
    width: 44px;
    height: 44px;
    padding: 0;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--pg-hair-silver);
    border-radius: 50%;
    color: var(--pg-ink-strong);
    background: rgba(255, 255, 255, 0.68);
}

.nav-menu-toggle span:not(.sr-only) {
    position: absolute;
    width: 17px;
    height: 1px;
    background: currentColor;
    transition: transform 0.28s var(--ease-lux), top 0.28s var(--ease-lux);
}

.nav-menu-toggle span:nth-child(2) { top: 18px; }
.nav-menu-toggle span:nth-child(3) { top: 24px; }

.nav.is-open .nav-menu-toggle span:nth-child(2) {
    top: 21px;
    transform: rotate(45deg);
}

.nav.is-open .nav-menu-toggle span:nth-child(3) {
    top: 21px;
    transform: rotate(-45deg);
}

/* Language switcher pill */
.lang {
    display: flex;
    align-items: center;
    background: var(--pg-mist);
    border-radius: 20px;
    padding: 3px;
    gap: 2px;
}

.lang button {
    font-family: var(--font-sans);
    font-size: 12px;
    font-weight: 500;
    color: var(--pg-ink-soft);
    background: transparent;
    border: none;
    border-radius: 16px;
    padding: 4px 12px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.lang button.on {
    background: #ffffff;
    color: var(--pg-ink-strong);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

@media (max-width: 900px) {
    .nav-links {
        display: none;
    }

    .nav .wrap {
        gap: 18px;
    }

    .nav-menu-toggle {
        display: inline-flex;
    }

    .mobile-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        display: grid;
        gap: 24px;
        padding: 18px max(32px, calc((100vw - 1320px) / 2 + 48px)) 28px;
        background: rgba(247, 246, 244, 0.985);
        border-top: 1px solid var(--pg-hair);
        border-bottom: 1px solid var(--pg-hair-silver);
        box-shadow: 0 28px 52px -34px rgba(41, 37, 34, 0.45);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(-12px);
        transition: opacity 0.26s var(--ease-lux), transform 0.26s var(--ease-lux), visibility 0.26s;
    }

    .nav.is-open .mobile-nav {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: none;
    }

    .mobile-nav nav {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        border-top: 1px solid var(--pg-hair-silver);
    }

    .mobile-nav nav a {
        display: grid;
        grid-template-columns: 30px 1fr auto;
        align-items: center;
        min-height: 58px;
        gap: 10px;
        border-bottom: 1px solid var(--pg-hair-silver);
        color: var(--pg-ink);
        font-family: var(--font-display);
        font-size: 16px;
        font-weight: 700;
    }

    .mobile-nav nav a:nth-child(odd) {
        padding-right: 22px;
        border-right: 1px solid var(--pg-hair-silver);
    }

    .mobile-nav nav a:nth-child(even) {
        padding-left: 22px;
    }

    .mobile-nav nav a.active {
        color: var(--pg-gold-deep);
    }

    .mobile-nav__index {
        color: var(--pg-ink-faint);
        font-family: var(--font-mono);
        font-size: 10px;
        font-weight: 500;
    }

    .mobile-nav__cta {
        display: flex;
        align-items: center;
        justify-content: space-between;
        min-height: 52px;
        padding: 0 18px;
        border-radius: 6px;
        color: #fff;
        background: var(--pg-ink-strong);
        font-family: var(--font-sans);
        font-size: 14px;
        font-weight: 600;
    }
}

@media (max-width: 560px) {
    .nav-cta {
        display: none;
    }

    .nav {
        height: 68px;
    }

    .nav .wrap {
        padding-inline: 18px;
    }

    .brand {
        gap: 8px;
    }

    .brand img {
        height: 31px;
    }

    .brand-zh {
        font-size: 15px;
    }

    .brand-en {
        font-size: 8px;
    }

    .nav-right {
        gap: 8px;
    }

    .lang button {
        min-width: 34px;
        min-height: 34px;
        padding: 4px 8px;
    }

    .mobile-nav {
        padding: 12px 18px 22px;
    }

    .mobile-nav nav {
        grid-template-columns: 1fr;
    }

    .mobile-nav nav a:nth-child(odd),
    .mobile-nav nav a:nth-child(even) {
        padding: 0;
        border-right: 0;
    }
}

/* ============================================================
   11. FOOTER
   ============================================================ */

.foot {
    background: var(--pg-ink);
    color: #ffffff;
}

.foot .wrap {
    padding-top: 78px;
    padding-bottom: 34px;
}

.foot-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 48px;
    padding-bottom: 56px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Brand stamp column */
.foot-stamp {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
}

.foot-stamp img {
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    object-fit: contain;
}

.foot-zh {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
}

.foot-en {
    font-family: var(--font-sans);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--pg-gold);
}

.foot p {
    font-family: var(--font-sans);
    font-size: 13px;
    color: rgba(255, 255, 255, 0.45);
    line-height: 1.7;
    margin: 20px 0 0;
    max-width: 280px;
}

/* Navigation columns */
.foot-col {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.foot-col .h {
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--pg-gold);
    margin-bottom: 4px;
}

.foot-col a {
    font-family: var(--font-sans);
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: color 0.2s;
}

.foot-col a:hover {
    color: #ffffff;
}

/* Copyright bar */
.foot-base {
    padding-top: 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    font-family: var(--font-sans);
    font-size: 12px;
    color: rgba(255, 255, 255, 0.3);
}

@media (max-width: 820px) {
    .foot-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .foot-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   12. BRAND GRAPHIC LAYER (de-poster kit)
   Applies the Images 2.0 refinement: serif-EN second voice,
   engineering grid patch, crowned-mark watermark, gold ticks.
   ============================================================ */

/* Serif-italic English sub-line under a display heading */
.en-sub {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 14px;
    letter-spacing: 0.01em;
    color: var(--pg-ink-faint);
    margin-top: 10px;
}

/* CJK phrase that must never break mid-word */
.nw {
    white-space: nowrap;
}

/* Section carrying the brand layer: grid patch top-right +
   watermark bottom-left. Content stays above via > .wrap. */
.brand-layer {
    position: relative;
    overflow: hidden;
}

.brand-layer > .wrap,
.brand-layer > .pg-wrap {
    position: relative;
    z-index: 1;
}

.brand-layer::before {
    /* engineering grid patch */
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 520px;
    height: 340px;
    background-image:
        linear-gradient(to right, rgba(205, 204, 199, 0.55) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(205, 204, 199, 0.55) 1px, transparent 1px);
    background-size: 52px 52px;
    -webkit-mask-image: linear-gradient(215deg, #000, transparent 74%);
    mask-image: linear-gradient(215deg, #000, transparent 74%);
    pointer-events: none;
}

.brand-layer::after {
    /* crowned-mark watermark, bleed-cropped */
    content: "";
    position: absolute;
    left: -70px;
    bottom: -90px;
    width: 360px;
    height: 360px;
    background: url("../img/logo-mark-charcoal.dc3e2ae3beba.png") center / contain no-repeat;
    opacity: 0.05;
    pointer-events: none;
}

@media (max-width: 600px) {
    .brand-layer::before {
        width: 300px;
        height: 220px;
        background-size: 44px 44px;
    }

    .brand-layer::after {
        width: 200px;
        height: 200px;
        left: auto;
        right: -46px;
        bottom: -60px;
    }
}

/* Gold corner ticks on a card (top-left + bottom-right) */
.gold-ticks {
    position: relative;
}

.gold-ticks::before,
.gold-ticks::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    opacity: 0.7;
    pointer-events: none;
}

.gold-ticks::before {
    top: -1px;
    left: -1px;
    border-top: 1px solid var(--pg-gold);
    border-left: 1px solid var(--pg-gold);
    border-top-left-radius: 6px;
}

.gold-ticks::after {
    bottom: -1px;
    right: -1px;
    border-bottom: 1px solid var(--pg-gold);
    border-right: 1px solid var(--pg-gold);
    border-bottom-right-radius: 6px;
}

/* ============================================================
   13. MOTION ADDITIONS
   hover/focus 200ms, transform/opacity only, ease-lux.
   ============================================================ */

.tlink .ar {
    display: inline-block;
    color: var(--pg-gold);
    text-decoration: none;
    transition: transform 0.2s var(--ease-lux);
}

.tlink:hover .ar {
    transform: translateX(4px);
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===================== LENIS SMOOTH-SCROLL HELPERS ===================== */
/* Native smooth-behavior must yield while Lenis drives the scroll,
   otherwise the two easings fight and scrolling stutters. */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
