/* =========================================================
   蘭城序 — custom.css
   Architectural Zen / Obsidian + Matte Brass
   ========================================================= */

:root {
    --obsidian:      #1A1A1C;
    --obsidian-deep: #0D0D0E;
    --obsidian-soft: #2A2A2D;
    --brass:         #B8945A;
    --brass-dark:    #8C6F3E;
    --brass-light:   #D4B483;
    --stone:         #E8E4DC;
    --stone-warm:    #D8D0C2;
    --teak:          #6B4F3A;

    --serif:   "Noto Serif TC", "Cormorant Garamond", serif;
    --sans:    "Noto Sans TC", "Inter", sans-serif;
    --display: "Cormorant Garamond", "Noto Serif TC", serif;

    --ease-zen: cubic-bezier(0.76, 0, 0.24, 1);
}

/* reset 細節 */
*, *::before, *::after { box-sizing: border-box; }
html, body {
    margin: 0;
    padding: 0;
    background: var(--obsidian);
    color: var(--stone);
    font-family: var(--sans);
    font-weight: 300;
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    letter-spacing: 0.02em;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

::selection { background: var(--brass); color: var(--obsidian-deep); }

/* 自訂滾動條（與 Lenis 相容） */
::-webkit-scrollbar { width: 0; height: 0; }

/* 字體階層 */
.font-display { font-family: var(--display); font-weight: 400; }
.font-serif   { font-family: var(--serif); }

.italic-display { font-family: var(--display); font-style: italic; font-weight: 400; }

/* 黃銅分隔線 */
.brass-rule {
    display: inline-block;
    width: 64px;
    height: 1px;
    background: var(--brass);
    vertical-align: middle;
}

/* 文字遮罩（進場動畫起點） */
.reveal-mask {
    display: inline-block;
    overflow: hidden;
    vertical-align: bottom;
}
.reveal-mask > .reveal-inner {
    display: inline-block;
    will-change: transform;
    transform: translateY(110%);
}

/* 段落文字由左至右揭露 */
.line-reveal {
    background-image: linear-gradient(90deg, var(--stone) 0%, var(--stone) 50%, rgba(232,228,220,0.15) 50%, rgba(232,228,220,0.15) 100%);
    background-size: 200% 100%;
    background-position: 100% 0;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    transition: background-position 1.6s var(--ease-zen);
}
.line-reveal.is-in { background-position: 0 0; }

/* Lenis */
html.lenis { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }

/* =========================================================
   客製游標：建築測繪十字星
   ========================================================= */
@media (hover: hover) and (pointer: fine) {
    html, body { cursor: none; }
    a, button, [data-cursor-hover], input, textarea, select { cursor: none; }
}

.lcx-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 40px;
    height: 40px;
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: difference;
    transform: translate3d(-50%, -50%, 0);
    opacity: 0;
    transition: opacity 0.4s var(--ease-zen);
}
.lcx-cursor.is-ready { opacity: 1; }

.lcx-cursor__crosshair {
    position: absolute;
    inset: 0;
    transition: transform 0.4s var(--ease-zen);
}
.lcx-cursor__crosshair::before,
.lcx-cursor__crosshair::after {
    content: "";
    position: absolute;
    background: #E8E4DC;
    transition: background 0.3s var(--ease-zen);
}
.lcx-cursor__crosshair::before { /* 水平線 */
    top: 50%; left: 0; right: 0;
    height: 1px;
    transform: translateY(-0.5px);
}
.lcx-cursor__crosshair::after { /* 垂直線 */
    left: 50%; top: 0; bottom: 0;
    width: 1px;
    transform: translateX(-0.5px);
}

.lcx-cursor__dot {
    position: absolute;
    top: 50%; left: 50%;
    width: 3px; height: 3px;
    margin: -1.5px 0 0 -1.5px;
    border-radius: 50%;
    background: #B8945A;
    transition: transform 0.3s var(--ease-zen), box-shadow 0.3s var(--ease-zen);
}

.lcx-cursor__ring {
    position: absolute;
    top: 50%; left: 50%;
    width: 14px; height: 14px;
    margin: -7px 0 0 -7px;
    border: 1px solid rgba(184, 148, 90, 0);
    border-radius: 50%;
    transition: width 0.45s var(--ease-zen), height 0.45s var(--ease-zen), margin 0.45s var(--ease-zen), border-color 0.45s var(--ease-zen);
}

/* 懸停互動元素時：鎖定放大 + 黃銅發光 */
.lcx-cursor.is-hover .lcx-cursor__crosshair::before,
.lcx-cursor.is-hover .lcx-cursor__crosshair::after {
    background: var(--brass);
}
.lcx-cursor.is-hover .lcx-cursor__dot {
    transform: scale(1.6);
    box-shadow: 0 0 14px 2px rgba(184, 148, 90, 0.7);
}
.lcx-cursor.is-hover .lcx-cursor__ring {
    width: 44px; height: 44px;
    margin: -22px 0 0 -22px;
    border-color: rgba(184, 148, 90, 0.9);
}

/* 行動裝置隱藏 */
@media (hover: none), (pointer: coarse) {
    .lcx-cursor { display: none !important; }
}

/* =========================================================
   導覽列
   ========================================================= */
.lcx-nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    padding: 28px 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    mix-blend-mode: difference;
    color: #E8E4DC;
    transition: padding 0.5s var(--ease-zen), background 0.4s var(--ease-zen);
}
.lcx-nav.is-scrolled { padding: 18px 48px; }

.lcx-nav__brand {
    font-family: var(--display);
    font-size: 22px;
    letter-spacing: 0.35em;
    text-transform: uppercase;
}
.lcx-nav__menu {
    display: flex;
    gap: 40px;
    list-style: none;
    margin: 0; padding: 0;
    font-size: 12px;
    letter-spacing: 0.32em;
    text-transform: uppercase;
}
.lcx-nav__menu a {
    position: relative;
    padding: 4px 0;
    opacity: 0.85;
    transition: opacity 0.3s var(--ease-zen);
}
.lcx-nav__menu a::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 1px;
    background: var(--brass);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.5s var(--ease-zen);
}
.lcx-nav__menu a:hover { opacity: 1; }
.lcx-nav__menu a:hover::after { transform: scaleX(1); transform-origin: left; }

.lcx-nav__cta {
    font-size: 11px;
    letter-spacing: 0.36em;
    text-transform: uppercase;
    padding: 10px 20px;
    border: 1px solid currentColor;
    transition: color 0.4s var(--ease-zen), background 0.4s var(--ease-zen);
}
.lcx-nav__cta:hover { background: var(--stone); color: var(--obsidian); }

/* 手機選單按鈕 */
.lcx-nav__burger {
    display: none;
    width: 40px; height: 40px;
    background: transparent; border: 0; padding: 0;
    cursor: pointer; position: relative;
    color: inherit;
    z-index: 120; /* 打開 drawer 後仍可點 */
}
.lcx-nav__burger span {
    position: absolute; left: 8px; right: 8px; height: 1.5px;
    background: currentColor;
    transition: transform 0.35s var(--ease-zen), opacity 0.25s var(--ease-zen);
}
.lcx-nav__burger span:nth-child(1) { top: 14px; }
.lcx-nav__burger span:nth-child(2) { top: 20px; }
.lcx-nav__burger span:nth-child(3) { top: 26px; }
.lcx-nav.is-open .lcx-nav__burger span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.lcx-nav.is-open .lcx-nav__burger span:nth-child(2) { opacity: 0; }
.lcx-nav.is-open .lcx-nav__burger span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* 手機抽屜 — 用 display:none 更保險（避免部分 mobile browser 忽略 opacity/visibility） */
.lcx-drawer {
    display: none;
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    width: 100%; height: 100%; z-index: 110;
    background: #1A1A1C;
    flex-direction: column; justify-content: center; align-items: center;
    padding: 100px 32px 48px;
    gap: 32px;
}
body.lcx-menu-open .lcx-drawer {
    display: flex;
    animation: lcx-drawer-in 0.4s var(--ease-zen) both;
}
@keyframes lcx-drawer-in {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: none; }
}
/* Drawer 關閉按鈕（X） */
.lcx-drawer__close {
    position: absolute; top: 20px; right: 20px;
    width: 44px; height: 44px;
    background: transparent; border: 1px solid rgba(232,228,220,0.3);
    cursor: pointer; padding: 0;
    display: flex; align-items: center; justify-content: center;
    transition: border-color 0.25s, background 0.25s;
}
.lcx-drawer__close:hover { background: rgba(232,228,220,0.08); border-color: var(--brass); }
.lcx-drawer__close span {
    position: absolute; width: 18px; height: 1.5px;
    background: var(--stone);
}
.lcx-drawer__close span:nth-child(1) { transform: rotate(45deg); }
.lcx-drawer__close span:nth-child(2) { transform: rotate(-45deg); }
.lcx-drawer__menu {
    list-style: none; padding: 0; margin: 0;
    display: flex; flex-direction: column; gap: 20px;
    text-align: center;
}
.lcx-drawer__menu li {
    opacity: 0; transform: translateY(16px);
    transition: opacity 0.5s var(--ease-zen), transform 0.5s var(--ease-zen);
    transition-delay: calc(0.05s * var(--i, 0));
}
body.lcx-menu-open .lcx-drawer__menu li { opacity: 1; transform: none; }
.lcx-drawer__menu a {
    font-family: var(--display);
    font-size: 28px; letter-spacing: 0.2em;
    color: var(--stone);
    text-decoration: none;
    padding: 12px 24px; display: inline-block;
}
.lcx-drawer__menu a:hover { color: var(--brass); }
.lcx-drawer__cta {
    margin-top: 24px;
    padding: 14px 36px;
    border: 1px solid var(--brass);
    color: var(--brass);
    font-size: 12px; letter-spacing: 0.4em;
    text-decoration: none; text-transform: uppercase;
    opacity: 0; transform: translateY(16px);
    transition: opacity 0.5s var(--ease-zen) 0.35s, transform 0.5s var(--ease-zen) 0.35s, background 0.3s, color 0.3s;
}
body.lcx-menu-open .lcx-drawer__cta { opacity: 1; transform: none; }
.lcx-drawer__cta:hover { background: var(--brass); color: var(--obsidian); }
body.lcx-menu-open { overflow: hidden; }

@media (max-width: 900px) {
    /* 關閉 mix-blend-mode，手機常出 bug；改用實色底 + blur */
    .lcx-nav {
        padding: 16px 20px;
        mix-blend-mode: normal !important;
        background: rgba(26,26,28,0.82);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
        color: var(--stone);
        border-bottom: 1px solid rgba(232,228,220,0.08);
        z-index: 115; /* 高於 drawer 讓 burger 可點 */
    }
    .lcx-nav.is-scrolled { padding: 12px 20px; background: rgba(26,26,28,0.94); }
    .lcx-nav__brand { font-size: 17px; letter-spacing: 0.28em; }
    .lcx-nav__menu, .lcx-nav__cta { display: none; }
    .lcx-nav__burger { display: inline-block; color: var(--stone); }
    /* drawer 打開時 burger icon 用 brass 色 */
    .lcx-nav.is-open .lcx-nav__burger { color: var(--brass); }
}

/* =========================================================
   通用版型
   ========================================================= */
.lcx-container { max-width: 1440px; margin: 0 auto; padding: 0 48px; }
@media (max-width: 900px) { .lcx-container { padding: 0 24px; } }

.lcx-eyebrow {
    font-family: var(--display);
    font-size: 12px;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    color: var(--brass);
}

.lcx-h1 {
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(44px, 7vw, 110px);
    line-height: 1.05;
    letter-spacing: 0.02em;
}
.lcx-h2 {
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(32px, 4vw, 56px);
    line-height: 1.2;
    letter-spacing: 0.04em;
}
.lcx-h3 {
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(22px, 2vw, 30px);
    line-height: 1.3;
    letter-spacing: 0.04em;
}
.lcx-body {
    color: rgba(232, 228, 220, 0.72);
    font-size: 15px;
    line-height: 1.95;
}

/* 段落錨點上方黃銅長編號 */
.lcx-index {
    font-family: var(--display);
    font-style: italic;
    color: var(--brass);
    letter-spacing: 0.1em;
}

/* =========================================================
   Hero
   ========================================================= */
.lcx-hero {
    position: relative;
    height: 100vh;
    min-height: 720px;
    overflow: hidden;
    background: var(--obsidian-deep);
}
.lcx-hero__bg {
    position: absolute; inset: 0;
    background-size: cover;
    background-position: center;
    transform: scale(1.08);
    will-change: transform;
}
.lcx-hero__bg::after {
    content: "";
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(13,13,14,0.25) 0%, rgba(13,13,14,0.55) 60%, rgba(13,13,14,0.85) 100%);
}
.lcx-hero__inner {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 0 48px 96px;
}
.lcx-hero__en {
    font-family: var(--display);
    font-weight: 300;
    font-style: italic;
    font-size: clamp(24px, 2vw, 34px);
    letter-spacing: 0.5em;
    color: var(--brass);
    margin: 0 0 32px;
    opacity: 0.92;
}
.lcx-hero__title {
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(64px, 11vw, 180px);
    line-height: 0.95;
    letter-spacing: 0.04em;
    margin: 0 0 28px;
    color: var(--stone);
}
.lcx-hero__sub {
    font-size: 16px;
    color: rgba(232,228,220,0.7);
    max-width: 520px;
    letter-spacing: 0.08em;
}
.lcx-hero__scroll {
    position: absolute;
    right: 48px; bottom: 48px;
    font-family: var(--display);
    font-size: 11px;
    letter-spacing: 0.45em;
    color: var(--brass);
    text-transform: uppercase;
    writing-mode: vertical-rl;
}
.lcx-hero__scroll::after {
    content: "";
    display: block;
    margin: 18px auto 0;
    width: 1px; height: 64px;
    background: linear-gradient(180deg, var(--brass), transparent);
    animation: lcxScroll 2.4s var(--ease-zen) infinite;
}
@keyframes lcxScroll {
    0%, 100% { transform: scaleY(0.3); transform-origin: top; }
    50%      { transform: scaleY(1);   transform-origin: top; }
}

@media (max-width: 900px) {
    .lcx-hero__inner { padding: 0 24px 72px; }
    .lcx-hero__scroll { right: 24px; bottom: 24px; }
}

/* =========================================================
   區塊通用
   ========================================================= */
.lcx-section { padding: 160px 0; position: relative; }
.lcx-section--deep { background: var(--obsidian-deep); }
.lcx-section--soft { background: var(--obsidian-soft); }

.lcx-section__header {
    display: flex;
    gap: 32px;
    align-items: baseline;
    margin-bottom: 72px;
}

/* 建築精神：圖文錯位 */
.lcx-arch-row {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 96px;
    align-items: center;
    margin-bottom: 160px;
}
.lcx-arch-row:last-child { margin-bottom: 0; }
.lcx-arch-row--right {
    grid-template-columns: 1fr 1.15fr;
}
.lcx-arch-row--right .lcx-arch-row__image { order: 2; }
.lcx-arch-row--right .lcx-arch-row__text  { order: 1; padding-right: 48px; }

.lcx-arch-row__image {
    position: relative;
    aspect-ratio: 4/5;
    overflow: hidden;
}
.lcx-arch-row__image img {
    width: 100%; height: 100%;
    object-fit: cover;
    transform: scale(1.1);
    will-change: transform;
}

.lcx-arch-row__text { padding-left: 48px; }
.lcx-arch-row__label {
    font-family: var(--display);
    font-style: italic;
    color: var(--brass);
    letter-spacing: 0.3em;
    font-size: 13px;
    margin-bottom: 16px;
}

@media (max-width: 900px) {
    .lcx-arch-row,
    .lcx-arch-row--right {
        grid-template-columns: 1fr;
        gap: 32px;
        margin-bottom: 96px;
    }
    .lcx-arch-row__text,
    .lcx-arch-row--right .lcx-arch-row__text { padding: 0; order: 2; }
    .lcx-arch-row--right .lcx-arch-row__image { order: 1; }
    .lcx-section { padding: 96px 0; }
}

/* =========================================================
   公設 — 橫向滾動
   ========================================================= */
.lcx-amenities { padding: 160px 0 200px; overflow: hidden; }
.lcx-amenities__track {
    display: flex;
    gap: 48px;
    padding: 0 48px;
    will-change: transform;
}
.lcx-amenities__card {
    flex: 0 0 420px;
    aspect-ratio: 3/4;
    position: relative;
    overflow: hidden;
    background: var(--obsidian-deep);
}
.lcx-amenities__card img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 1.2s var(--ease-zen);
}
.lcx-amenities__card:hover img { transform: scale(1.05); }
.lcx-amenities__card figcaption {
    position: absolute;
    left: 24px; right: 24px; bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}
.lcx-amenities__name { font-family: var(--serif); font-size: 20px; color: var(--stone); }
.lcx-amenities__caption { font-family: var(--display); font-style: italic; color: var(--brass); font-size: 12px; letter-spacing: 0.2em; }

/* =========================================================
   Environment
   ========================================================= */
.lcx-env {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 96px;
    align-items: center;
}
.lcx-env__map {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
}
.lcx-env__map img { width: 100%; height: 100%; object-fit: cover; }
.lcx-env__list {
    list-style: none; padding: 0; margin: 0;
}
.lcx-env__list li {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 24px;
    padding: 22px 0;
    border-bottom: 1px solid rgba(232,228,220,0.08);
    font-size: 15px;
    align-items: baseline;
}
.lcx-env__list li .num {
    font-family: var(--display);
    font-style: italic;
    color: var(--brass);
    font-size: 13px;
    letter-spacing: 0.2em;
}
.lcx-env__list li .dist {
    font-family: var(--display);
    color: var(--stone);
    letter-spacing: 0.15em;
}

@media (max-width: 900px) {
    .lcx-env { grid-template-columns: 1fr; gap: 48px; }
}

/* =========================================================
   CTA
   ========================================================= */
.lcx-cta {
    padding: 180px 48px;
    text-align: center;
    background: var(--obsidian-deep);
    position: relative;
}
.lcx-cta::before, .lcx-cta::after {
    content: "";
    position: absolute;
    left: 50%; transform: translateX(-50%);
    width: 1px;
    background: linear-gradient(180deg, transparent, var(--brass), transparent);
}
.lcx-cta::before { top: 0;    height: 80px; }
.lcx-cta::after  { bottom: 0; height: 80px; }
.lcx-cta__title {
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(36px, 5vw, 72px);
    color: var(--stone);
    letter-spacing: 0.04em;
    line-height: 1.25;
    margin: 0 auto 32px;
    max-width: 820px;
}
.lcx-cta__sub {
    font-size: 15px;
    color: rgba(232,228,220,0.7);
    letter-spacing: 0.12em;
    margin-bottom: 56px;
}
.lcx-cta__btn {
    display: inline-block;
    padding: 20px 48px;
    font-family: var(--display);
    font-size: 14px;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    color: var(--stone);
    border: 1px solid var(--brass);
    transition: background 0.5s var(--ease-zen), color 0.5s var(--ease-zen);
}
.lcx-cta__btn:hover { background: var(--brass); color: var(--obsidian-deep); }

/* =========================================================
   Footer
   ========================================================= */
.lcx-footer {
    padding: 72px 48px 40px;
    background: var(--obsidian-deep);
    color: rgba(232,228,220,0.55);
    font-size: 13px;
    letter-spacing: 0.12em;
}
.lcx-footer__row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 32px;
    flex-wrap: wrap;
    max-width: 1440px;
    margin: 0 auto;
}
.lcx-footer__brand {
    font-family: var(--display);
    font-size: 22px;
    letter-spacing: 0.35em;
    color: var(--stone);
    text-transform: uppercase;
}
.lcx-footer__nav { display: flex; gap: 28px; font-size: 12px; letter-spacing: 0.28em; text-transform: uppercase; }
.lcx-footer__copy { margin-top: 40px; font-size: 11px; letter-spacing: 0.2em; opacity: 0.6; }

@media (max-width: 900px) {
    .lcx-footer { padding: 56px 24px 32px; }
    .lcx-footer__row { flex-direction: column; align-items: flex-start; }
}

/* =========================================================
   動畫初始隱藏（GSAP 啟動後會清除）
   ========================================================= */
.gsap-fade    { opacity: 0; }
.gsap-rise    { opacity: 0; transform: translateY(40px); }
.gsap-mask    { clip-path: inset(0 0 100% 0); }

/* 預載遮罩：避免 CDN 樣式未載入前閃爍 */
.lcx-loading {
    position: fixed;
    inset: 0;
    z-index: 9998;
    background: var(--obsidian-deep);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    transition: opacity 0.8s var(--ease-zen) 0.2s;
}
.lcx-loading.is-done { opacity: 0; }
.lcx-loading__dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--brass);
    box-shadow: 0 0 12px 1px var(--brass);
    animation: lcxPulse 1.6s var(--ease-zen) infinite;
}
@keyframes lcxPulse {
    0%, 100% { transform: scale(1);   opacity: 0.5; }
    50%      { transform: scale(1.6); opacity: 1; }
}
