:root {
    --navy: #3f506f;
    --brown: #8d634b;
    --ink: #4d4d4d;
    --cream: #fffdf8;
    --accent: #8d634b;
    --header-height: 65px;
    --layer-header: 40;
    --layer-menu: 50;
    --layer-modal: 80;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    overflow-x: hidden;
    background: var(--cream);
    color: var(--ink);
    font-family: "Noto Sans TC", sans-serif;
}

body.is-locked {
    overflow: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    color: inherit;
    font: inherit;
}

main {
    padding-top: var(--header-height);
}

.site-header {
    position: fixed;
    inset: 0 0 auto;
    z-index: 100;
    height: var(--header-height);
    color: var(--ink);
    background: rgba(255, 255, 255, .15);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(159, 160, 160, .2);
    font-family: Cormorant, sans-serif;
    font-weight: 700;
    transition: -webkit-backdrop-filter .25s ease, backdrop-filter .25s ease;
    will-change: height;
}

.site-header::before {
    position: absolute;
    z-index: -1;
    content: "";
    inset: 0;
    background: #fff;
    opacity: 0;
    transition: opacity .45s ease;
}

.site-header.is-active {
    height: 45vh;
    color: var(--ink);
}

.site-header.is-active::before {
    opacity: 1;
}

.desktop-header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: calc(100% - 110px);
    height: var(--header-height);
    margin: 0 auto;
}

.desktop-header::before {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: -1;
    height: 1px;
    content: "";
    background: rgba(159, 160, 160, .302);
    opacity: 0;
}

.site-header.is-active .desktop-header::before {
    opacity: 1;
}

.desktop-nav {
    display: flex;
    align-items: center;
    width: calc(50% - 110px);
    height: 100%;
}

.desktop-nav-left {
    justify-content: flex-start;
    gap: 58px;
}

.desktop-nav-right {
    justify-content: flex-end;
    gap: 58px;
}

.nav-item {
    position: relative;
    display: block;
    height: 24px;
}

.nav-link {
    position: relative;
    display: inline-block;
    white-space: nowrap;
    font-family: Cormorant, serif;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
}

.nav-zh {
    position: absolute;
    top: 50%;
    left: 50%;
    opacity: 0;
    font-family: "Noto Serif SC", "Noto Sans TC", serif;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: .08em;
    transform: translate(-50%, 60%);
    transition: opacity .32s ease, transform .32s cubic-bezier(.22, 1, .36, 1);
}

.nav-zh::after {
    position: absolute;
    right: 0;
    bottom: -10px;
    left: 0;
    z-index: -1;
    height: 1px;
    content: "";
    background: #727171;
    opacity: 0;
    transform: scaleX(.85);
    transform-origin: center;
    transition: opacity .3s ease, transform .3s ease;
}

.nav-en {
    display: block;
    transform: translateY(0);
    transition: opacity .32s ease, transform .32s cubic-bezier(.22, 1, .36, 1);
}

.nav-item:hover .nav-en,
.nav-item:focus-within .nav-en,
.nav-link.is-active .nav-en {
    opacity: 0;
    transform: translateY(-110%);
}

.nav-item:hover .nav-zh,
.nav-item:focus-within .nav-zh,
.nav-link.is-active .nav-zh {
    opacity: 1;
    transform: translate(-50%, -50%);
}

.nav-link.is-active .nav-zh::after {
    opacity: 1;
    transform: scaleX(1);
}

.header-logo {
    position: absolute;
    top: 50%;
    left: 50%;
    white-space: nowrap;
    font-family: Cormorant, serif;
    font-size: 26px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: .045em;
    transform: translate(-50%, -50%);
}

.desktop-dropdown {
    position: absolute;
    top: 72px;
    left: 50%;
    z-index: 3;
    width: max-content;
    color: var(--ink);
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -10px);
    transition: opacity .42s ease .1s, transform .5s cubic-bezier(.22, 1, .36, 1) .1s;
}

.desktop-dropdown::before {
    position: absolute;
    right: 0;
    bottom: 100%;
    left: 0;
    height: 56px;
    content: "";
}

.dropdown-inner {
    display: flex;
    gap: 48px;
    font-family: "Noto Serif SC", "Noto Sans TC", serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: .12em;
    text-align: center;
}

.dropdown-inner > div {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.dropdown-inner a {
    position: relative;
    width: max-content;
}

.dropdown-inner a::after {
    position: absolute;
    right: 0;
    bottom: -4px;
    left: 0;
    height: 1px;
    content: "";
    background: #727171;
    opacity: 0;
    transform: scaleX(0);
    transform-origin: left center;
    transition: opacity .3s ease, transform .3s ease;
}

.dropdown-inner a:hover::after,
.dropdown-inner a:focus-visible::after {
    opacity: 1;
    transform: scaleX(1);
}

.dropdown-title {
    margin-bottom: 2px;
    font-weight: 700;
}

.dropdown-wedding {
    left: 19px;
    transform: translateY(-10px);
}

.dropdown-wedding .dropdown-inner {
    gap: 58px;
    text-align: left;
}

.nav-item.is-active .desktop-dropdown,
.nav-item:hover .desktop-dropdown,
.nav-item:focus-within .desktop-dropdown {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, 0);
}

.nav-item.is-active .dropdown-wedding,
.nav-item:hover .dropdown-wedding,
.nav-item:focus-within .dropdown-wedding {
    transform: translateY(0);
}

.site-header.is-active .header-logo,
.site-header.is-active a {
    color: var(--ink);
}

.mobile-header,
.mobile-menu {
    display: none;
}

.site-footer {
    color: #fff;
    background: var(--brown);
}

.footer-desktop {
    min-height: 651px;
    padding: 76px 40px 18px;
}

.footer-top {
    display: grid;
    grid-template-columns: .375fr .625fr;
    gap: 34px;
}

.footer-intro-panel,
.footer-info-panel {
    min-height: 167px;
    padding-top: 31px;
    border-top: 1px solid rgba(255, 255, 255, .85);
}

.footer-intro-panel img {
    display: block;
    width: min(100%, 477px);
    height: auto;
}

.footer-info-panel {
    display: grid;
    grid-template-columns: 1.08fr .96fr .95fr 1.12fr;
    gap: 22px;
    font-family: "Noto Serif SC", "Noto Sans TC", serif;
}

.footer-info-panel h2 {
    margin: 0 0 18px;
    font-family: Cormorant, "Noto Serif SC", serif;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.25;
    letter-spacing: .04em;
}

.footer-info-panel h2 strong {
    font-family: "Noto Serif SC", serif;
    font-weight: 700;
}

.footer-info-panel p {
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.65;
    letter-spacing: .03em;
}

.social-links {
    display: flex;
    gap: 14px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(255, 255, 255, .8);
    border-radius: 50%;
    font-family: Arial, sans-serif;
    font-size: 20px;
    line-height: 1;
    transition: color .3s ease, background-color .3s ease, transform .3s ease;
}

.social-links a:nth-child(2) {
    font-size: 9px;
    font-weight: 700;
}

.social-links a:hover,
.social-links a:focus-visible {
    color: var(--brown);
    background: #fff;
    transform: translateY(-2px);
}

.footer-company p {
    margin-top: 24px;
}

.footer-wordmark {
    display: block;
    width: 100%;
    height: auto;
    margin: 93px auto 27px;
}

.footer-bottom {
    display: grid;
    grid-template-columns: 1.3fr 1fr .7fr;
    align-items: end;
    gap: 25px;
    font-family: Cormorant, serif;
    font-size: 12px;
}

.footer-nav {
    display: flex;
    gap: 25px;
    white-space: nowrap;
}

.footer-policy {
    display: flex;
    justify-content: center;
    gap: 10px;
    white-space: nowrap;
}

.footer-policy button,
.footer-mobile-policy button,
.mobile-menu-legal button {
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.footer-credit {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
    text-align: right;
    white-space: nowrap;
}

.footer-credit span:last-child {
    color: rgba(255, 255, 255, .5);
    font-size: 10px;
}

.footer-nav a,
.footer-policy a,
.footer-policy button,
.footer-credit a {
    position: relative;
}

.footer-nav a::after,
.footer-policy a::after,
.footer-policy button::after,
.footer-credit a::after {
    position: absolute;
    right: 100%;
    bottom: -3px;
    left: 0;
    height: 1px;
    content: "";
    background: currentColor;
    transition: right .3s ease;
}

.footer-nav a:hover::after,
.footer-nav a:focus-visible::after,
.footer-policy a:hover::after,
.footer-policy a:focus-visible::after,
.footer-policy button:hover::after,
.footer-policy button:focus-visible::after,
.footer-credit a:hover::after,
.footer-credit a:focus-visible::after {
    right: 0;
}

.footer-mobile {
    display: none;
}

.privacy-modal {
    position: fixed;
    inset: 0;
    z-index: var(--layer-modal);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    visibility: hidden;
    opacity: 0;
    transition: opacity .35s ease, visibility 0s linear .35s;
}

.privacy-modal.is-open {
    visibility: visible;
    opacity: 1;
    transition-delay: 0s;
}

.privacy-backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgba(40, 31, 27, .72);
    cursor: pointer;
}

.privacy-dialog {
    position: relative;
    width: min(1200px, 88vw);
    max-height: 80vh;
    overflow: hidden;
    color: #4d4d4d;
    background: var(--cream);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity .35s ease, transform .5s cubic-bezier(.16, 1, .3, 1);
}

.privacy-modal.is-open .privacy-dialog {
    opacity: 1;
    transform: translateY(0);
}

.privacy-scroll {
    max-height: 80vh;
    padding: 54px 70px;
    overflow-y: auto;
    font-family: "Noto Serif SC", "Noto Sans TC", serif;
    scrollbar-color: var(--accent) transparent;
    scrollbar-width: thin;
}

.privacy-eyebrow {
    color: var(--accent);
    font-family: Cormorant, serif;
    font-size: 23px;
    font-weight: 700;
    letter-spacing: .08em;
}

.privacy-scroll h2 {
    margin: 3px 0 28px;
    color: var(--accent);
    font-size: 22px;
    letter-spacing: .12em;
}

.privacy-scroll h3 {
    margin: 32px 0 12px;
    color: var(--accent);
    font-size: 17px;
}

.privacy-scroll p {
    margin: 0 0 13px;
    font-size: 14px;
    line-height: 2;
}

.privacy-close {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 2;
    width: 34px;
    height: 34px;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.privacy-close span {
    position: absolute;
    top: 16px;
    left: 5px;
    width: 24px;
    height: 1px;
    background: var(--accent);
}

.privacy-close span:first-child {
    transform: rotate(45deg);
}

.privacy-close span:last-child {
    transform: rotate(-45deg);
}

:focus-visible {
    outline: 1px solid currentColor;
    outline-offset: 5px;
}

@media (max-width: 1200px) {
    .desktop-header {
        width: calc(100% - 58px);
    }

    .desktop-nav {
        width: calc(50% - 92px);
    }

    .desktop-nav-left,
    .desktop-nav-right {
        gap: 37px;
    }

    .footer-desktop {
        padding-right: 30px;
        padding-left: 30px;
    }

    .footer-info-panel {
        gap: 14px;
    }

    .footer-nav {
        gap: 15px;
    }
}

@media (max-width: 1199px) {
    main {
        padding-top: var(--header-height);
    }

    .site-header {
        height: var(--header-height);
    }

    .desktop-header {
        display: none;
    }

    .mobile-header {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        height: 100%;
    }

    .mobile-logo {
        font-family: Cormorant, serif;
        font-size: 26px;
        font-weight: 600;
        line-height: 1;
        letter-spacing: .04em;
    }

    .menu-toggle,
    .menu-close {
        position: absolute;
        top: 0;
        right: 15px;
        width: 36px;
        height: var(--header-height);
        padding: 0;
        border: 0;
        background: transparent;
        cursor: pointer;
    }

    .menu-toggle span {
        position: absolute;
        right: 0;
        width: 33px;
        height: 1px;
        background: currentColor;
        transition: transform .35s ease;
    }

    .menu-toggle span:first-child {
        top: 50%;
    }

    .menu-toggle span:last-child {
        top: calc(50% + 9px);
        width: 16px;
    }

    .mobile-menu {
        position: fixed;
        inset: 0;
        z-index: var(--layer-menu);
        display: flex;
        flex-direction: column;
        min-height: 100dvh;
        overflow-y: auto;
        color: var(--ink);
        background: #fff;
        visibility: hidden;
        opacity: 0;
        transform: translateY(-14px);
        transition: opacity .3s ease, transform .45s cubic-bezier(.16, 1, .3, 1), visibility 0s linear .45s;
    }

    .mobile-menu.is-open {
        visibility: visible;
        opacity: 1;
        transform: translateY(0);
        transition-delay: 0s;
    }

    .mobile-menu-top {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        height: 72px;
        flex: 0 0 72px;
    }

    .mobile-menu-logo {
        font-family: Cormorant, serif;
        font-size: 31px;
        font-weight: 600;
        letter-spacing: .05em;
    }

    .menu-close {
        top: 12px;
        color: var(--ink);
    }

    .menu-close span {
        position: absolute;
        top: 23px;
        right: 0;
        width: 28px;
        height: 1px;
        background: currentColor;
    }

    .menu-close span:first-child {
        transform: rotate(45deg);
    }

    .menu-close span:last-child {
        transform: rotate(-45deg);
    }

    .mobile-menu-nav {
        padding: 48px 22px 25px;
        font-family: "Noto Serif SC", "Noto Sans TC", serif;
        font-size: 16px;
        font-weight: 700;
        letter-spacing: .12em;
    }

    .mobile-accordion,
    .mobile-direct-link {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        min-height: 48px;
        padding: 0 12px;
        border: 0;
        border-bottom: 1px solid rgba(77, 77, 77, .22);
        text-align: left;
        background: transparent;
    }

    .mobile-accordion {
        cursor: pointer;
    }

    .plus {
        position: relative;
        width: 12px;
        height: 12px;
    }

    .plus::before,
    .plus::after {
        position: absolute;
        top: 50%;
        left: 50%;
        width: 10px;
        height: 1px;
        content: "";
        background: currentColor;
        transform: translate(-50%, -50%);
        transition: transform .3s ease;
    }

    .plus::after {
        transform: translate(-50%, -50%) rotate(90deg);
    }

    .mobile-accordion[aria-expanded="true"] .plus::after {
        transform: translate(-50%, -50%) rotate(0);
    }

    .mobile-submenu {
        display: grid;
        grid-template-rows: 0fr;
        border-bottom: 1px solid rgba(77, 77, 77, 0);
        opacity: 0;
        transition: grid-template-rows .45s cubic-bezier(.16, 1, .3, 1), opacity .3s ease, border-color .3s ease;
    }

    .mobile-submenu > div {
        min-height: 0;
        overflow: hidden;
    }

    .mobile-menu-group.is-expanded .mobile-submenu {
        grid-template-rows: 1fr;
        border-color: rgba(77, 77, 77, .22);
        opacity: 1;
    }

    .mobile-submenu-columns {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 22px;
        padding: 22px 30px 25px;
        font-size: 14px;
        font-weight: 400;
        letter-spacing: .08em;
    }

    .mobile-submenu-columns > div,
    .mobile-submenu-list {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }

    .mobile-sub-title {
        margin-bottom: 2px;
        font-size: 15px;
        font-weight: 700;
    }

    .mobile-submenu-list {
        padding: 22px 30px 25px;
        font-size: 14px;
        font-weight: 400;
    }

    .mobile-menu-legal {
        display: flex;
        flex-direction: column;
        gap: 8px;
        margin-top: auto;
        padding: 24px 40px 26px;
        color: #7a7a7a;
        text-align: center;
        font-family: Cormorant, serif;
        font-size: 10px;
        letter-spacing: .05em;
    }

    .mobile-menu-legal > div:first-child {
        display: flex;
        justify-content: center;
        gap: 9px;
        white-space: nowrap;
    }

    .mobile-menu-meta {
        display: flex;
        justify-content: center;
        gap: 18px;
        font-size: 8px;
        white-space: nowrap;
    }

    .footer-desktop {
        display: none;
    }

    .footer-mobile {
        display: block;
        min-height: 380px;
        padding: 55px 27px 18px;
    }

    .footer-mobile-rule {
        width: 100%;
        height: 1px;
        background: rgba(255, 255, 255, .85);
    }

    .footer-mobile-intro {
        margin: 12px 0 24px;
        font-family: Arial, sans-serif;
        font-size: 15px;
        font-weight: 600;
        line-height: 1.45;
        letter-spacing: .08em;
    }

    .footer-mobile-company-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        min-height: 68px;
        font-family: "Noto Serif SC", serif;
    }

    .footer-mobile-company-row p {
        margin: 0;
        font-size: 14px;
        font-weight: 700;
        line-height: 1.5;
    }

    .footer-mobile-company-row .social-links {
        gap: 9px;
    }

    .footer-mobile-company-row .social-links a {
        width: 28px;
        height: 28px;
        font-size: 16px;
    }

    .footer-mobile-company-row .social-links a:nth-child(2) {
        font-size: 7px;
    }

    .footer-mobile-rule-second {
        margin-top: 24px;
    }

    .footer-mobile-logo {
        margin: 12px 0 13px;
        white-space: nowrap;
        font-family: Cormorant, serif;
        font-size: clamp(43px, 12.3vw, 50px);
        font-weight: 500;
        line-height: 1;
        letter-spacing: -.015em;
    }

    .footer-mobile-policy {
        display: flex;
        justify-content: center;
        gap: 9px;
        font-family: Cormorant, serif;
        font-size: 10px;
        white-space: nowrap;
    }

    .footer-mobile-meta {
        display: flex;
        justify-content: center;
        gap: 12px;
        margin-top: 4px;
        color: rgba(255, 255, 255, .72);
        font-family: Cormorant, "Noto Serif SC", serif;
        font-size: 8px;
        white-space: nowrap;
    }

    .privacy-modal {
        padding: 18px;
    }

    .privacy-dialog {
        width: 100%;
        max-height: 86vh;
    }

    .privacy-scroll {
        max-height: 86vh;
        padding: 46px 28px 36px;
    }

    .privacy-eyebrow {
        padding-right: 36px;
        font-size: 18px;
    }

    .privacy-scroll h2 {
        font-size: 18px;
    }

    .privacy-scroll h3 {
        font-size: 15px;
    }

    .privacy-scroll p {
        font-size: 13px;
    }
}

@media (max-width: 800px) {
    :root {
        --header-height: 48px;
    }

    .mobile-logo {
        font-size: 20px;
    }
}

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

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
    }
}
