/* Family Decoration — shared styles */

:root {
    --fd-ink: #15171a;
    --fd-ink-soft: #24272b;
    --fd-paper: #f5f1ea;
    --fd-sand: #ebe3d6;
    --fd-stone: #d8cdbb;
    --fd-brass: #b4864c;
    --fd-brass-light: #d6ad76;
    --fd-brass-dark: #8c6232;
    --fd-muted: #6d675f;
    --fd-line: rgba(21, 23, 26, 0.12);
    --fd-line-light: rgba(255, 255, 255, 0.16);
    --fd-white: #ffffff;

    --fd-serif: "Cormorant Garamond", "Songti SC", "STSong", "Noto Serif SC", Georgia, serif;
    --fd-sans: "Manrope", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;

    --fd-container: 1240px;
    --fd-gutter: 40px;
    --fd-header-h: 84px;
    --fd-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--fd-header-h);
}

html,
body,
button,
input,
select,
textarea {
    font-family: var(--fd-sans);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body {
    margin: 0;
    background: var(--fd-paper);
    color: var(--fd-ink);
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
}

body.fd-nav-open {
    overflow: hidden;
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
}

::selection {
    background: var(--fd-brass);
    color: var(--fd-white);
}

.fd-container {
    width: min(var(--fd-container), calc(100% - var(--fd-gutter)));
    margin: 0 auto;
}

/* ---------- Typography helpers ---------- */

.fd-kicker {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 20px;
    color: var(--fd-brass-dark);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.fd-kicker::before {
    content: "";
    width: 34px;
    height: 1px;
    background: currentColor;
}

.fd-kicker--light {
    color: var(--fd-brass-light);
}

.fd-display {
    margin: 0;
    font-family: var(--fd-serif);
    font-weight: 500;
    font-size: clamp(38px, 5.2vw, 72px);
    line-height: 1.04;
    letter-spacing: -0.01em;
}

.fd-display em {
    font-style: italic;
    color: var(--fd-brass);
}

html[lang^="zh"] .fd-display {
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0.02em;
}

html[lang^="zh"] .fd-kicker {
    letter-spacing: 0.12em;
}

.fd-lead {
    margin: 0;
    color: var(--fd-muted);
    font-size: clamp(16px, 1.3vw, 19px);
    line-height: 1.75;
}

/* ---------- Buttons ---------- */

.fd-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 54px;
    padding: 0 28px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.01em;
    text-decoration: none;
    cursor: pointer;
    overflow: hidden;
    isolation: isolate;
    transition: color 0.45s var(--fd-ease), border-color 0.45s var(--fd-ease), transform 0.45s var(--fd-ease);
}

.fd-btn::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    transform: translateY(101%);
    transition: transform 0.5s var(--fd-ease);
}

.fd-btn:hover::before {
    transform: translateY(0);
}

.fd-btn svg {
    width: 18px;
    height: 18px;
    transition: transform 0.45s var(--fd-ease);
}

.fd-btn:hover svg {
    transform: translateX(4px);
}

.fd-btn--primary {
    background: var(--fd-brass);
    color: var(--fd-white);
}

.fd-btn--primary::before {
    background: var(--fd-ink);
}

.fd-btn--ghost {
    border-color: rgba(255, 255, 255, 0.45);
    color: var(--fd-white);
}

.fd-btn--ghost::before {
    background: var(--fd-white);
}

.fd-btn--ghost:hover {
    color: var(--fd-ink);
}

.fd-btn--dark {
    background: var(--fd-ink);
    color: var(--fd-white);
}

.fd-btn--dark::before {
    background: var(--fd-brass);
}

/* ---------- Scroll reveal ---------- */

[data-reveal] {
    opacity: 0;
    transform: translateY(42px);
    transition: opacity 1s var(--fd-ease), transform 1.1s var(--fd-ease);
    transition-delay: var(--fd-delay, 0s);
}

[data-reveal="left"] {
    transform: translateX(-56px);
}

[data-reveal="right"] {
    transform: translateX(56px);
}

[data-reveal="scale"] {
    transform: scale(0.94);
}

/* clip the child, not the observed element: a fully clipped target never intersects */
[data-reveal="mask"] {
    opacity: 1;
    transform: none;
}

[data-reveal="mask"] > * {
    clip-path: inset(0 0 100% 0);
    transition: clip-path 1.4s var(--fd-ease);
    transition-delay: var(--fd-delay, 0s);
}

[data-reveal].is-visible {
    opacity: 1;
    transform: none;
}

[data-reveal="mask"].is-visible > * {
    clip-path: inset(0 0 0 0);
}

/* line-by-line headline reveal */
.fd-split-line {
    display: block;
    overflow: hidden;
    padding-bottom: 0.08em;
}

.fd-split-line > span {
    display: inline-block;
    transform: translateY(110%);
    transition: transform 1.2s var(--fd-ease);
    transition-delay: var(--fd-delay, 0s);
}

.is-visible .fd-split-line > span,
.fd-split-line.is-visible > span {
    transform: translateY(0);
}

/* ---------- Header ---------- */

.fd-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    color: var(--fd-white);
    transition: background 0.5s var(--fd-ease), color 0.5s var(--fd-ease), box-shadow 0.5s var(--fd-ease), transform 0.5s var(--fd-ease);
}

.fd-header.is-scrolled {
    background: rgba(245, 241, 234, 0.9);
    color: var(--fd-ink);
    box-shadow: 0 1px 0 var(--fd-line);
    backdrop-filter: saturate(1.4) blur(16px);
    -webkit-backdrop-filter: saturate(1.4) blur(16px);
}

.fd-header.is-hidden {
    transform: translateY(-100%);
}

.fd-header-inner {
    display: flex;
    align-items: center;
    gap: 32px;
    height: var(--fd-header-h);
    transition: height 0.4s var(--fd-ease);
}

.fd-header.is-scrolled .fd-header-inner {
    height: 72px;
}

.fd-brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
    text-decoration: none;
}

.fd-brand-logo {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--fd-white);
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

.fd-brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.fd-brand-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.fd-brand-name {
    font-family: var(--fd-serif);
    font-size: 24px;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.fd-brand-name small {
    font-size: 0.7em;
    font-weight: 500;
    opacity: 0.7;
}

.fd-brand-tagline {
    margin-top: 4px;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    opacity: 0.7;
}

.fd-nav {
    display: flex;
    align-items: center;
    gap: 34px;
    margin-left: auto;
}

.fd-nav a {
    position: relative;
    padding: 8px 0;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    opacity: 0.86;
    transition: opacity 0.3s ease;
}

.fd-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.5s var(--fd-ease);
}

.fd-nav a:hover,
.fd-nav a.is-active {
    opacity: 1;
}

.fd-nav a:hover::after,
.fd-nav a.is-active::after {
    transform: scaleX(1);
    transform-origin: left;
}

.fd-header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.fd-lang {
    display: inline-flex;
    padding: 3px;
    border: 1px solid currentColor;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    opacity: 0.9;
}

.fd-lang a {
    min-width: 40px;
    padding: 5px 10px;
    border-radius: 999px;
    text-align: center;
    text-decoration: none;
    transition: background 0.3s ease, color 0.3s ease;
}

.fd-lang a.is-current {
    background: currentColor;
}

.fd-lang a.is-current span {
    color: var(--fd-ink);
}

.fd-header.is-scrolled .fd-lang a.is-current span {
    color: var(--fd-paper);
}

.fd-header-cta {
    min-height: 44px;
    padding: 0 22px;
    font-size: 14px;
}

.fd-nav-toggle {
    display: none;
    position: relative;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid currentColor;
    border-radius: 50%;
    background: transparent;
    color: inherit;
    cursor: pointer;
}

.fd-nav-toggle span {
    position: absolute;
    left: 13px;
    right: 13px;
    height: 1.5px;
    background: currentColor;
    transition: transform 0.4s var(--fd-ease), opacity 0.3s ease;
}

.fd-nav-toggle span:nth-child(1) {
    top: 16px;
}

.fd-nav-toggle span:nth-child(2) {
    top: 21px;
}

.fd-nav-toggle span:nth-child(3) {
    top: 26px;
}

body.fd-nav-open .fd-nav-toggle span:nth-child(1) {
    transform: translateY(5px) rotate(45deg);
}

body.fd-nav-open .fd-nav-toggle span:nth-child(2) {
    opacity: 0;
}

body.fd-nav-open .fd-nav-toggle span:nth-child(3) {
    transform: translateY(-5px) rotate(-45deg);
}

/* ---------- Footer ---------- */

.fd-footer {
    position: relative;
    background: var(--fd-ink);
    color: rgba(255, 255, 255, 0.72);
    overflow: hidden;
}

.fd-footer-mark {
    padding: 70px 0 0;
    font-family: var(--fd-serif);
    font-size: clamp(36px, 12vw, 190px);
    font-weight: 500;
    line-height: 0.9;
    letter-spacing: -0.02em;
    color: transparent;
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.14);
    white-space: nowrap;
    user-select: none;
}

.fd-footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr 1.2fr;
    gap: 56px;
    padding: 64px 0 56px;
    border-bottom: 1px solid var(--fd-line-light);
}

.fd-footer-brand .fd-brand {
    color: var(--fd-white);
}

.fd-footer-about {
    max-width: 380px;
    margin: 22px 0 0;
    font-size: 14px;
    line-height: 1.8;
}

.fd-footer-title {
    margin: 0 0 20px;
    color: var(--fd-white);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.fd-footer-links {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 14px;
}

.fd-footer-links a {
    text-decoration: none;
    transition: color 0.3s ease;
}

.fd-footer-links a:hover {
    color: var(--fd-brass-light);
}

.fd-footer-contact li {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.fd-footer-contact svg {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin-top: 3px;
    color: var(--fd-brass-light);
}

.fd-footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 26px 0 34px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
}

.fd-footer-bottom a {
    color: rgba(255, 255, 255, 0.72);
}

/* ---------- Back to top ---------- */

.fd-to-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 900;
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border: 0;
    border-radius: 50%;
    background: var(--fd-ink);
    color: var(--fd-white);
    cursor: pointer;
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    transition: opacity 0.4s ease, transform 0.4s var(--fd-ease), background 0.3s ease;
}

.fd-to-top.is-visible {
    opacity: 1;
    transform: none;
    pointer-events: auto;
}

.fd-to-top:hover {
    background: var(--fd-brass);
}

.fd-to-top svg {
    position: relative;
    width: 18px;
    height: 18px;
}

.fd-to-top .fd-to-top-ring {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    transform: rotate(-90deg);
}

.fd-to-top-ring circle {
    fill: none;
    stroke: var(--fd-brass-light);
    stroke-width: 2;
    stroke-dasharray: 150.8;
    stroke-dashoffset: 150.8;
}

/* ---------- Pop message (shared) ---------- */

.pop_wrapper {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(21, 23, 26, 0.55);
}

.pop_msg_container {
    width: min(420px, 100%);
    border-radius: 16px;
    background: var(--fd-paper);
    overflow: hidden;
}

.pop_container_top,
.pop_container_middle,
.pop_container_bottom {
    padding: 18px 24px;
}

.pop_title {
    font-weight: 700;
}

.pop_container_bottom {
    text-align: right;
}

.pop_button {
    min-height: 40px;
    padding: 0 22px;
    border: 0;
    border-radius: 999px;
    background: var(--fd-ink);
    color: var(--fd-white);
    font-weight: 700;
    cursor: pointer;
}

/* ---------- Responsive ---------- */

@media (max-width: 1080px) {
    .fd-nav {
        gap: 24px;
    }

    .fd-header-cta {
        display: none;
    }
}

@media (max-width: 900px) {
    :root {
        --fd-gutter: 32px;
        --fd-header-h: 72px;
    }

    .fd-nav-toggle {
        display: block;
    }

    .fd-header-actions {
        margin-left: auto;
    }

    .fd-nav {
        position: fixed;
        inset: 0;
        z-index: -1;
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        gap: 6px;
        margin: 0;
        padding: 100px 32px 40px;
        background: var(--fd-ink);
        color: var(--fd-white);
        clip-path: circle(0 at calc(100% - 44px) 36px);
        transition: clip-path 0.8s var(--fd-ease);
    }

    body.fd-nav-open .fd-nav {
        clip-path: circle(150% at calc(100% - 44px) 36px);
    }

    body.fd-nav-open .fd-header {
        color: var(--fd-white);
        background: transparent;
        box-shadow: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    body.fd-nav-open .fd-header .fd-lang a.is-current span {
        color: var(--fd-ink);
    }

    .fd-nav a {
        font-family: var(--fd-serif);
        font-size: 40px;
        font-weight: 500;
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.5s ease, transform 0.6s var(--fd-ease);
    }

    body.fd-nav-open .fd-nav a {
        opacity: 1;
        transform: none;
    }

    body.fd-nav-open .fd-nav a:nth-child(2) { transition-delay: 0.06s; }
    body.fd-nav-open .fd-nav a:nth-child(3) { transition-delay: 0.12s; }
    body.fd-nav-open .fd-nav a:nth-child(4) { transition-delay: 0.18s; }
    body.fd-nav-open .fd-nav a:nth-child(5) { transition-delay: 0.24s; }
    body.fd-nav-open .fd-nav a:nth-child(6) { transition-delay: 0.3s; }

    .fd-footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .fd-footer-brand {
        grid-column: 1 / -1;
    }
}

@media (max-width: 600px) {
    :root {
        --fd-gutter: 32px;
    }

    .fd-brand-logo {
        width: 40px;
        height: 40px;
        border-radius: 10px;
    }

    .fd-header-inner {
        gap: 12px;
    }

    .fd-brand {
        gap: 10px;
        min-width: 0;
        flex-shrink: 1;
    }

    .fd-brand-name {
        font-size: 19px;
        white-space: nowrap;
    }

    .fd-header .fd-brand-name small,
    .fd-brand-tagline {
        display: none;
    }

    .fd-header-actions {
        gap: 10px;
    }

    .fd-lang a {
        min-width: 0;
        padding: 4px 9px;
        white-space: nowrap;
    }

    .fd-nav-toggle {
        flex-shrink: 0;
        width: 40px;
        height: 40px;
    }

    .fd-nav-toggle span {
        left: 12px;
        right: 12px;
    }

    .fd-nav-toggle span:nth-child(1) {
        top: 14px;
    }

    .fd-nav-toggle span:nth-child(2) {
        top: 19px;
    }

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

    .fd-footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .fd-footer-bottom {
        flex-direction: column;
        gap: 8px;
    }

    .fd-to-top {
        right: 16px;
        bottom: 16px;
        width: 46px;
        height: 46px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    [data-reveal],
    [data-reveal="mask"] > *,
    .fd-split-line > span {
        opacity: 1 !important;
        transform: none !important;
        clip-path: none !important;
        transition: none !important;
    }
}
