/*
 * 檔案名稱：public/assets/css/site.css
 * 修改日期：2026/07/24 00:53（UTC+8）
 * 檔案用途：前台形象網站響應式樣式
 * 修改說明：修正標誌快取白塊、桌機導覽密度與主視覺孤字換行
 */

:root {
    --ink: #26221e;
    --ink-soft: #5f5952;
    --night: #1b1a18;
    --night-soft: #292622;
    --paper: #f4f0e8;
    --paper-light: #fbf9f4;
    --white: #ffffff;
    --red: #7f261f;
    --red-dark: #4e1815;
    --gold: #b38b4d;
    --gold-light: #d8bd88;
    --line: rgba(38, 34, 30, 0.16);
    --line-light: rgba(255, 255, 255, 0.22);
    --content: 1280px;
    --header-content: 1480px;
    --gutter: clamp(20px, 4vw, 64px);
    --shadow: 0 32px 80px rgba(34, 27, 21, 0.14);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--paper);
    font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
    line-height: 1.8;
    overflow-x: hidden;
}

body.drawer-open {
    overflow: hidden;
}

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

a {
    color: inherit;
}

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

button,
input,
textarea,
select {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 60;
    width: 100%;
    border-bottom: 1px solid transparent;
    color: var(--white);
    transition:
        color 0.3s ease,
        background 0.3s ease,
        border-color 0.3s ease,
        box-shadow 0.3s ease;
}

.is-inner .site-header,
.site-header.is-scrolled {
    color: var(--ink);
    border-bottom-color: var(--line);
    background: rgba(251, 249, 244, 0.95);
    box-shadow: 0 10px 34px rgba(38, 34, 30, 0.08);
    backdrop-filter: blur(18px);
}

.site-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(18px, 2vw, 28px);
    width: min(var(--header-content), calc(100% - clamp(40px, 5vw, 80px)));
    min-height: 96px;
    margin: 0 auto;
    transition: min-height 0.3s ease;
}

.site-header.is-scrolled .site-header-inner,
.is-inner .site-header-inner {
    min-height: 82px;
}

.site-logo {
    display: inline-flex;
    flex: 0 0 auto;
    width: clamp(220px, 19vw, 276px);
    color: currentColor;
    text-decoration: none;
}

.site-logo img {
    width: 100%;
    height: auto;
}

.is-home .site-header:not(.is-scrolled) .site-logo img,
.mobile-drawer-header img,
.footer-brand img {
    filter: brightness(0) invert(1);
}

.site-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: clamp(13px, 1.45vw, 24px);
    margin-left: auto;
}

.site-nav a {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: currentColor;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.055em;
    text-decoration: none;
    white-space: nowrap;
}

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

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

.header-tools {
    display: flex;
    align-items: center;
    gap: 14px;
}

.header-visit {
    display: grid;
    gap: 1px;
    min-width: 92px;
    padding-left: 16px;
    border-left: 1px solid currentColor;
    text-decoration: none;
}

.header-visit span {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 10px;
    letter-spacing: 0.2em;
}

.header-visit strong {
    font-size: 13px;
    letter-spacing: 0.08em;
    white-space: nowrap;
}

.mobile-nav-button {
    display: none;
    grid-template-columns: 24px 38px;
    grid-template-rows: repeat(3, 5px);
    align-items: center;
    width: 76px;
    height: 52px;
    padding: 0;
    border: 0;
    color: currentColor;
    background: transparent;
    cursor: pointer;
}

.mobile-nav-button span {
    grid-column: 1;
    width: 22px;
    height: 1px;
    background: currentColor;
}

.mobile-nav-button em {
    grid-column: 2;
    grid-row: 1 / 4;
    align-self: center;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 11px;
    font-style: normal;
    letter-spacing: 0.14em;
}

.mobile-overlay {
    position: fixed;
    inset: 0;
    z-index: 90;
    background: rgba(12, 11, 10, 0.66);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.mobile-overlay.is-open {
    opacity: 1;
    pointer-events: auto;
}

.mobile-drawer {
    position: fixed;
    inset: 0 0 0 auto;
    z-index: 100;
    width: min(480px, 92vw);
    padding: 30px clamp(24px, 6vw, 50px) 42px;
    overflow-y: auto;
    color: var(--paper-light);
    background:
        linear-gradient(rgba(27, 26, 24, 0.96), rgba(27, 26, 24, 0.96)),
        url("../images/showcase/guangfu-temple-02.jpg") center / cover;
    box-shadow: -32px 0 80px rgba(0, 0, 0, 0.35);
    transform: translateX(105%);
    transition: transform 0.34s cubic-bezier(0.22, 1, 0.36, 1);
}

.mobile-drawer.is-open {
    transform: translateX(0);
}

.mobile-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--line-light);
}

.mobile-drawer-header img {
    width: min(280px, 62vw);
    color: var(--white);
}

.mobile-drawer-close {
    min-height: 42px;
    padding: 0;
    border: 0;
    color: var(--white);
    background: transparent;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 11px;
    letter-spacing: 0.12em;
    cursor: pointer;
}

.mobile-drawer-nav {
    display: grid;
    margin-top: 34px;
}

.mobile-drawer-nav a {
    display: flex;
    align-items: center;
    gap: 18px;
    min-height: 64px;
    border-bottom: 1px solid var(--line-light);
    color: var(--white);
    font-family: "Noto Serif TC", "PMingLiU", serif;
    font-size: 21px;
    font-weight: 700;
    text-decoration: none;
}

.mobile-drawer-nav a span {
    color: var(--gold-light);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 12px;
    letter-spacing: 0.12em;
}

.mobile-drawer-nav a.is-active {
    color: var(--gold-light);
}

.mobile-drawer-info {
    display: grid;
    gap: 4px;
    margin-top: 36px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 14px;
}

.mobile-drawer-info p {
    margin: 0;
}

.mobile-drawer-info a {
    color: var(--white);
    text-decoration: none;
}

.hero {
    position: relative;
    min-height: 100svh;
    overflow: hidden;
    color: var(--white);
    background: var(--night);
}

.hero-media,
.hero-shade {
    position: absolute;
    inset: 0;
}

.hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 42%;
    transform: scale(1.025);
    animation: heroBreath 18s ease-in-out infinite alternate;
}

.hero-shade {
    background:
        linear-gradient(90deg, rgba(17, 15, 13, 0.78) 0%, rgba(20, 17, 14, 0.48) 42%, rgba(20, 17, 14, 0.12) 72%, rgba(20, 17, 14, 0.28) 100%),
        linear-gradient(0deg, rgba(18, 16, 14, 0.64) 0%, transparent 52%, rgba(18, 16, 14, 0.28) 100%);
}

.hero-inner {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    width: min(var(--content), calc(100% - (var(--gutter) * 2)));
    min-height: 100svh;
    margin: 0 auto;
    padding: 150px 0 110px;
}

.hero-copy {
    width: min(820px, 74vw);
}

.hero-eyebrow {
    margin: 0 0 20px;
    color: var(--gold-light);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 12px;
    letter-spacing: 0.3em;
}

.hero h1 {
    margin: 0;
    font-family: "Noto Serif TC", "PMingLiU", serif;
    font-size: clamp(56px, 7.6vw, 108px);
    font-weight: 600;
    letter-spacing: 0.08em;
    line-height: 1.04;
    text-shadow: 0 8px 36px rgba(0, 0, 0, 0.34);
}

.hero-lead {
    max-width: 780px;
    margin: 24px 0 0;
    color: rgba(255, 255, 255, 0.9);
    font-family: "Noto Serif TC", "PMingLiU", serif;
    font-size: clamp(18px, 1.65vw, 24px);
    letter-spacing: 0.035em;
    line-height: 1.75;
    text-wrap: balance;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 28px;
    margin-top: 42px;
}

.hero-seal {
    position: absolute;
    right: 5%;
    bottom: 18%;
    display: grid;
    place-items: center;
    width: 92px;
    height: 92px;
    border: 1px solid rgba(255, 255, 255, 0.52);
    color: rgba(255, 255, 255, 0.88);
    font-family: "Noto Serif TC", "PMingLiU", serif;
    font-size: 44px;
    transform: rotate(3deg);
}

.scroll-cue {
    position: absolute;
    right: 0;
    bottom: 36px;
    display: grid;
    justify-items: center;
    gap: 14px;
    color: var(--white);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 10px;
    letter-spacing: 0.22em;
    text-decoration: none;
    writing-mode: vertical-rl;
}

.scroll-cue i {
    display: block;
    width: 1px;
    height: 74px;
    background: rgba(255, 255, 255, 0.56);
    overflow: hidden;
}

.scroll-cue i::after {
    display: block;
    width: 1px;
    height: 28px;
    content: "";
    background: var(--white);
    animation: scrollLine 2s ease-in-out infinite;
}

.visit-ribbon {
    position: relative;
    z-index: 4;
    margin-top: -1px;
    color: var(--paper-light);
    background: var(--night);
}

.visit-ribbon-inner {
    display: grid;
    grid-template-columns: 0.72fr 0.72fr 1.4fr auto;
    width: min(var(--content), calc(100% - (var(--gutter) * 2)));
    margin: 0 auto;
}

.visit-ribbon-inner > div,
.visit-ribbon-map {
    display: grid;
    align-content: center;
    min-height: 122px;
    padding: 24px 30px;
    border-right: 1px solid var(--line-light);
}

.visit-ribbon-inner > div:first-child {
    border-left: 1px solid var(--line-light);
}

.visit-ribbon span {
    color: var(--gold-light);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 10px;
    letter-spacing: 0.2em;
}

.visit-ribbon strong,
.visit-ribbon a {
    color: var(--white);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
}

.visit-ribbon-map {
    grid-auto-flow: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-width: 130px;
    color: var(--white);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 12px;
    letter-spacing: 0.18em;
    transition: background 0.2s ease;
}

.visit-ribbon-map:hover,
.visit-ribbon-map:focus-visible {
    background: var(--red);
}

.chapter {
    position: relative;
    padding: clamp(92px, 11vw, 170px) 0;
}

.chapter-inner {
    width: min(var(--content), calc(100% - (var(--gutter) * 2)));
    margin: 0 auto;
}

.chapter-split {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(420px, 0.75fr);
    gap: clamp(58px, 8vw, 128px);
    align-items: center;
}

.chapter-copy {
    padding-left: clamp(0px, 3vw, 44px);
}

.chapter-index {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 42px;
}

.chapter-index span {
    color: var(--gold);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 44px;
    line-height: 1;
}

.chapter-index p {
    margin: 0;
    color: var(--ink-soft);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 11px;
    letter-spacing: 0.24em;
}

.chapter-kicker {
    margin: 0 0 14px;
    color: var(--red);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.14em;
}

.chapter h2 {
    margin: 0;
    font-family: "Noto Serif TC", "PMingLiU", serif;
    font-size: clamp(42px, 5.4vw, 78px);
    font-weight: 600;
    letter-spacing: 0.04em;
    line-height: 1.28;
}

.chapter-body {
    max-width: 640px;
    margin: 34px 0 36px;
    color: var(--ink-soft);
    font-size: 16px;
    line-height: 2.05;
}

.cms-inline h2 {
    display: none;
}

.cms-inline p:first-of-type {
    margin-top: 0;
}

.content-highlight,
.content-note {
    margin: 26px 0;
    padding: 18px 22px;
    border-left: 2px solid var(--gold);
    background: rgba(255, 255, 255, 0.48);
}

.text-link {
    display: inline-flex;
    align-items: center;
    gap: 18px;
    min-height: 42px;
    padding-bottom: 5px;
    border-bottom: 1px solid currentColor;
    color: var(--ink);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-decoration: none;
    white-space: nowrap;
}

.text-link span {
    transition: transform 0.2s ease;
}

.text-link:hover span,
.text-link:focus-visible span {
    transform: translateX(5px);
}

.text-link.light {
    color: var(--white);
}

.portrait-frame {
    position: relative;
    width: min(100%, 560px);
    margin: 0 0 0 auto;
}

.portrait-frame::before {
    position: absolute;
    top: -32px;
    right: -32px;
    bottom: 56px;
    left: 46px;
    z-index: -1;
    content: "";
    border: 1px solid rgba(179, 139, 77, 0.44);
}

.portrait-frame img {
    width: 100%;
    aspect-ratio: 0.68;
    object-fit: cover;
    object-position: center 50%;
    box-shadow: var(--shadow);
}

.portrait-frame figcaption {
    display: grid;
    gap: 4px;
    width: 76%;
    margin: -46px 0 0 -54px;
    padding: 24px 28px;
    color: var(--white);
    background: var(--red-dark);
}

.portrait-frame figcaption span {
    color: var(--gold-light);
    font-size: 11px;
    letter-spacing: 0.18em;
}

.portrait-frame figcaption strong {
    font-family: "Noto Serif TC", "PMingLiU", serif;
    font-size: 19px;
    line-height: 1.6;
}

.chapter-heritage {
    background: var(--paper-light);
}

.chapter-heading {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr) auto;
    align-items: end;
    gap: 34px;
    margin-bottom: 64px;
}

.chapter-heading .chapter-index {
    margin: 0;
}

.chapter-heading h2 {
    font-size: clamp(40px, 4.8vw, 70px);
}

.heritage-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.16fr) minmax(340px, 0.64fr);
    gap: clamp(40px, 7vw, 112px);
    align-items: center;
}

.heritage-main {
    position: relative;
    margin: 0;
}

.heritage-main::after {
    position: absolute;
    right: -22px;
    bottom: -22px;
    width: 42%;
    height: 44%;
    z-index: -1;
    content: "";
    background: var(--red-dark);
}

.heritage-main img {
    width: 100%;
    max-height: 820px;
    object-fit: cover;
    object-position: center 46%;
    box-shadow: var(--shadow);
}

.heritage-notes {
    display: grid;
}

.heritage-notes article {
    position: relative;
    padding: 28px 0 28px 54px;
    border-top: 1px solid var(--line);
}

.heritage-notes article span {
    position: absolute;
    top: 32px;
    left: 0;
    color: var(--gold);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 13px;
}

.heritage-notes article h3 {
    margin: 0 0 8px;
    font-family: "Noto Serif TC", "PMingLiU", serif;
    font-size: 26px;
    font-weight: 600;
}

.heritage-notes article p {
    margin: 0;
    color: var(--ink-soft);
}

.heritage-notes .text-link {
    justify-self: start;
    margin-top: 28px;
}

.chapter-tradition {
    color: var(--white);
    background:
        linear-gradient(rgba(25, 22, 19, 0.92), rgba(25, 22, 19, 0.94)),
        url("../images/showcase/guangfu-temple-02.jpg") center / cover fixed;
}

.chapter-heading.light .chapter-index p,
.chapter-heading.light .chapter-kicker {
    color: var(--gold-light);
}

.tradition-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 10px 0 56px;
    border-top: 1px solid var(--line-light);
    border-bottom: 1px solid var(--line-light);
}

.tradition-grid article {
    min-height: 330px;
    padding: 48px clamp(28px, 4vw, 52px);
    border-right: 1px solid var(--line-light);
}

.tradition-grid article:last-child {
    border-right: 0;
}

.tradition-grid article > span {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border: 1px solid var(--gold-light);
    color: var(--gold-light);
    font-family: "Noto Serif TC", "PMingLiU", serif;
    font-size: 28px;
}

.tradition-grid h3 {
    margin: 34px 0 12px;
    font-family: "Noto Serif TC", "PMingLiU", serif;
    font-size: 30px;
    font-weight: 600;
}

.tradition-grid p {
    margin: 0;
    color: rgba(255, 255, 255, 0.7);
}

.chapter-news {
    background: var(--paper);
}

.news-list {
    border-top: 1px solid var(--line);
}

.news-row {
    display: grid;
    grid-template-columns: 150px 150px minmax(0, 1fr) 56px;
    gap: 28px;
    align-items: center;
    min-height: 176px;
    padding: 24px 0;
    border-bottom: 1px solid var(--line);
}

.news-row-image {
    display: block;
    overflow: hidden;
    background: #ded7cc;
}

.news-row-image img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.news-row:hover .news-row-image img {
    transform: scale(1.045);
}

.news-row-meta {
    display: grid;
    gap: 5px;
    color: var(--ink-soft);
    font-size: 12px;
    letter-spacing: 0.08em;
}

.news-row-meta span {
    color: var(--red);
    font-weight: 800;
}

.news-row h3 {
    margin: 0 0 7px;
    font-family: "Noto Serif TC", "PMingLiU", serif;
    font-size: 24px;
    font-weight: 600;
    line-height: 1.5;
}

.news-row h3 a {
    text-decoration: none;
}

.news-row-copy p {
    margin: 0;
    color: var(--ink-soft);
}

.news-row-arrow {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border: 1px solid var(--line);
    border-radius: 50%;
    text-decoration: none;
    transition:
        color 0.2s ease,
        background 0.2s ease,
        transform 0.2s ease;
}

.news-row-arrow:hover,
.news-row-arrow:focus-visible {
    color: var(--white);
    background: var(--red);
    transform: translateX(4px);
}

.chapter-gallery {
    color: var(--white);
    background: var(--red-dark);
}

.gallery-mosaic {
    display: grid;
    grid-template-columns: 1.15fr 0.72fr 0.72fr;
    grid-template-rows: 250px 250px;
    gap: 18px;
}

.gallery-mosaic-item {
    position: relative;
    margin: 0;
    overflow: hidden;
    background: var(--night-soft);
}

.gallery-mosaic-item.item-1 {
    grid-row: 1 / 3;
}

.gallery-mosaic-item.item-2 {
    grid-column: 2 / 4;
}

.gallery-mosaic-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-mosaic-item.item-1 img {
    object-position: center 36%;
}

.gallery-mosaic-item:hover img {
    transform: scale(1.035);
}

.gallery-mosaic-item figcaption {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    padding: 52px 22px 18px;
    color: var(--white);
    background: linear-gradient(transparent, rgba(14, 12, 10, 0.76));
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.visit-cta {
    position: relative;
    min-height: 660px;
    color: var(--white);
    background: var(--night);
}

.visit-cta-media,
.visit-cta-shade {
    position: absolute;
    inset: 0;
}

.visit-cta-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 48%;
}

.visit-cta-shade {
    background: linear-gradient(90deg, rgba(22, 19, 16, 0.88), rgba(22, 19, 16, 0.36));
}

.visit-cta-inner {
    position: relative;
    z-index: 2;
    display: grid;
    align-content: center;
    width: min(var(--content), calc(100% - (var(--gutter) * 2)));
    min-height: 660px;
    margin: 0 auto;
}

.visit-cta-inner p {
    margin: 0 0 18px;
    color: var(--gold-light);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 12px;
    letter-spacing: 0.25em;
}

.visit-cta-inner h2 {
    max-width: 760px;
    margin: 0;
    font-family: "Noto Serif TC", "PMingLiU", serif;
    font-size: clamp(44px, 6vw, 84px);
    font-weight: 600;
    line-height: 1.35;
}

.visit-cta-inner > div {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 38px;
}

.button-outline,
.button-solid {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 0 24px;
    border: 1px solid currentColor;
    color: var(--white);
    background: transparent;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition:
        color 0.2s ease,
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}

.button-outline:hover,
.button-outline:focus-visible {
    color: var(--ink);
    background: var(--white);
    transform: translateY(-2px);
}

.button-solid {
    border-color: var(--red);
    color: var(--white);
    background: var(--red);
}

.button-solid:hover,
.button-solid:focus-visible {
    border-color: var(--red-dark);
    background: var(--red-dark);
    transform: translateY(-2px);
}

.page-hero {
    position: relative;
    min-height: 520px;
    overflow: hidden;
    color: var(--white);
    background: var(--night);
}

.page-hero-media,
.page-hero-shade {
    position: absolute;
    inset: 0;
}

.page-hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 44%;
}

.page-hero-shade {
    background:
        linear-gradient(90deg, rgba(23, 20, 17, 0.86), rgba(23, 20, 17, 0.32)),
        linear-gradient(0deg, rgba(23, 20, 17, 0.42), transparent 70%);
}

.page-hero-inner {
    position: relative;
    z-index: 2;
    display: grid;
    align-content: end;
    width: min(var(--content), calc(100% - (var(--gutter) * 2)));
    min-height: 520px;
    margin: 0 auto;
    padding: 150px 0 64px;
}

.page-hero-inner p {
    margin: 0 0 12px;
    color: var(--gold-light);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.18em;
}

.page-hero-inner h1 {
    margin: 0;
    font-family: "Noto Serif TC", "PMingLiU", serif;
    font-size: clamp(48px, 7vw, 90px);
    font-weight: 600;
    letter-spacing: 0.05em;
    line-height: 1.18;
}

.page-hero-inner > span {
    max-width: 700px;
    margin-top: 18px;
    color: rgba(255, 255, 255, 0.76);
    font-size: 16px;
}

.inner-section {
    padding: clamp(72px, 9vw, 130px) 0;
}

.inner-wrap {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: clamp(44px, 7vw, 100px);
    align-items: start;
    width: min(1120px, calc(100% - (var(--gutter) * 2)));
    margin: 0 auto;
}

.cms-content {
    min-width: 0;
    color: var(--ink-soft);
    font-size: 16px;
    line-height: 2;
    overflow-wrap: anywhere;
}

.cms-content > h2:first-child {
    margin-top: 0;
}

.cms-content h2,
.cms-content h3,
.cms-content h4 {
    color: var(--ink);
    font-family: "Noto Serif TC", "PMingLiU", serif;
    font-weight: 600;
    line-height: 1.55;
}

.cms-content h2 {
    margin: 2.1em 0 0.9em;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line);
    font-size: clamp(30px, 4vw, 44px);
}

.cms-content h3 {
    margin-top: 1.8em;
    font-size: 25px;
}

.cms-content a {
    color: var(--red);
}

.cms-content img {
    max-width: 100%;
    height: auto;
    margin: 30px 0;
}

.cms-content table {
    width: 100%;
    border-collapse: collapse;
}

.cms-content th,
.cms-content td {
    padding: 12px 14px;
    border: 1px solid var(--line);
    text-align: left;
}

.cms-content blockquote {
    margin: 28px 0;
    padding: 20px 24px;
    border-left: 3px solid var(--gold);
    color: var(--ink);
    background: var(--paper-light);
}

.article-meta {
    margin: 0 0 14px;
    color: var(--red);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.1em;
}

.inner-news-list {
    display: grid;
    border-top: 1px solid var(--line);
}

.inner-news-list article {
    padding: 34px 0;
    border-bottom: 1px solid var(--line);
}

.inner-news-list h3 {
    margin: 8px 0 10px;
}

.inner-news-list h3 a {
    color: var(--ink);
    text-decoration: none;
}

.inner-news-list p {
    margin: 0 0 18px;
}

.inner-gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    margin-top: 36px;
}

.inner-gallery-grid figure {
    margin: 0;
    background: var(--paper-light);
}

.inner-gallery-grid img {
    width: 100%;
    aspect-ratio: 4 / 5;
    margin: 0;
    object-fit: cover;
}

.inner-gallery-grid figcaption {
    padding: 16px 18px;
    color: var(--ink);
    font-size: 14px;
    font-weight: 700;
}

.page-sidebar {
    position: sticky;
    top: 112px;
    display: grid;
    gap: 20px;
}

.page-sidebar section {
    padding: 26px 0;
    border-top: 1px solid var(--line);
}

.page-sidebar section > span {
    color: var(--gold);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 10px;
    letter-spacing: 0.2em;
}

.page-sidebar h3 {
    margin: 8px 0 18px;
    font-family: "Noto Serif TC", "PMingLiU", serif;
    font-size: 22px;
}

.page-sidebar p {
    margin: 10px 0;
    color: var(--ink-soft);
}

.page-sidebar a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 46px;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
    text-decoration: none;
}

.page-sidebar p a {
    display: inline;
    border: 0;
    color: var(--red);
}

.page-sidebar i {
    font-style: normal;
}

.download-list {
    display: grid;
    gap: 14px;
    margin-top: 30px;
}

.download-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    padding: 26px;
    border: 1px solid var(--line);
    background: var(--paper-light);
}

.download-item strong {
    display: block;
    color: var(--ink);
    font-size: 18px;
}

.download-item span {
    color: var(--ink-soft);
    font-size: 13px;
}

.download-item p {
    margin: 8px 0 0;
}

.contact-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-top: 36px;
}

.form-field {
    display: grid;
    gap: 7px;
}

.form-field.full {
    grid-column: 1 / -1;
}

.form-field label {
    color: var(--ink);
    font-weight: 800;
}

.form-field input,
.form-field textarea,
.form-field select {
    width: 100%;
    min-height: 52px;
    padding: 12px 14px;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    color: var(--ink);
    background: transparent;
}

.form-field textarea {
    min-height: 180px;
    resize: vertical;
}

.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
    outline: 0;
    border-bottom-color: var(--red);
    box-shadow: 0 1px 0 var(--red);
}

.form-actions {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
}

.honeypot {
    position: absolute;
    left: -9999px;
}

.alert-box {
    padding: 16px 18px;
    margin: 24px 0;
    border: 1px solid var(--line);
    font-weight: 700;
}

.alert-success {
    color: #296646;
    background: #edf7f0;
}

.alert-error {
    color: #8a2722;
    background: #fff1ef;
}

.empty-state {
    padding: 30px 0;
    color: var(--ink-soft);
}

.site-footer {
    color: rgba(255, 255, 255, 0.75);
    background: var(--night);
}

.site-footer-inner {
    display: grid;
    grid-template-columns: 1.35fr 0.9fr 0.75fr 0.8fr;
    gap: clamp(30px, 5vw, 72px);
    width: min(var(--content), calc(100% - (var(--gutter) * 2)));
    padding: 84px 0 68px;
    margin: 0 auto;
}

.site-footer section > span {
    display: block;
    margin-bottom: 18px;
    color: var(--gold-light);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 10px;
    letter-spacing: 0.2em;
}

.footer-brand img {
    width: min(360px, 100%);
    color: var(--white);
}

.footer-brand p {
    margin: 24px 0 0;
}

.site-footer p {
    margin: 7px 0;
}

.site-footer a {
    display: block;
    margin: 8px 0;
    color: var(--white);
    text-decoration: none;
}

.site-footer h3 {
    margin: 0 0 18px;
    color: var(--white);
    font-family: "Noto Serif TC", "PMingLiU", serif;
    font-size: 24px;
    font-weight: 600;
}

.footer-action > a {
    display: inline-flex;
    padding-bottom: 5px;
    border-bottom: 1px solid var(--white);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 12px;
    letter-spacing: 0.12em;
}

.site-footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    width: min(var(--content), calc(100% - (var(--gutter) * 2)));
    padding: 22px 0;
    margin: 0 auto;
    border-top: 1px solid var(--line-light);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 11px;
    letter-spacing: 0.08em;
}

.site-footer-bottom a {
    margin: 0;
    white-space: nowrap;
}

[data-reveal] {
    opacity: 0;
    transform: translateY(26px);
    transition:
        opacity 0.85s ease,
        transform 0.85s cubic-bezier(0.22, 1, 0.36, 1);
}

[data-reveal].is-visible {
    opacity: 1;
    transform: translateY(0);
}

@keyframes heroBreath {
    from {
        transform: scale(1.025);
    }

    to {
        transform: scale(1.075);
    }
}

@keyframes scrollLine {
    0% {
        transform: translateY(-34px);
    }

    100% {
        transform: translateY(80px);
    }
}

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

    .mobile-nav-button {
        display: grid;
    }

    .site-logo {
        width: min(286px, 48vw);
    }

    .chapter-split {
        grid-template-columns: minmax(0, 1fr) minmax(360px, 0.74fr);
        gap: 64px;
    }

    .chapter-heading {
        grid-template-columns: 150px minmax(0, 1fr) auto;
    }

    .news-row {
        grid-template-columns: 130px 120px minmax(0, 1fr) 48px;
        gap: 20px;
    }
}

@media (max-width: 900px) {
    .site-header-inner {
        min-height: 82px;
    }

    .header-visit {
        display: none;
    }

    .hero-copy {
        width: min(760px, 88vw);
    }

    .hero-seal {
        right: 4%;
        bottom: 14%;
        width: 72px;
        height: 72px;
        font-size: 34px;
    }

    .visit-ribbon-inner {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .visit-ribbon-map {
        grid-column: 1 / -1;
        min-height: 64px;
        border-top: 1px solid var(--line-light);
        border-left: 1px solid var(--line-light);
    }

    .chapter-split,
    .heritage-layout,
    .inner-wrap {
        grid-template-columns: 1fr;
    }

    .chapter-copy {
        padding-left: 0;
    }

    .portrait-frame {
        width: min(84%, 560px);
        margin: 26px auto 0;
    }

    .chapter-heading {
        grid-template-columns: 130px minmax(0, 1fr);
    }

    .chapter-heading > .text-link {
        grid-column: 2;
        justify-self: start;
    }

    .heritage-main {
        width: min(86%, 680px);
    }

    .heritage-notes {
        width: min(100%, 720px);
        margin-left: auto;
    }

    .tradition-grid {
        grid-template-columns: 1fr;
    }

    .tradition-grid article {
        min-height: 0;
        border-right: 0;
        border-bottom: 1px solid var(--line-light);
    }

    .tradition-grid article:last-child {
        border-bottom: 0;
    }

    .news-row {
        grid-template-columns: 124px minmax(0, 1fr) 48px;
    }

    .news-row-meta {
        grid-column: 2;
        grid-row: 1;
        align-self: end;
        grid-auto-flow: column;
        justify-content: start;
        gap: 14px;
    }

    .news-row-copy {
        grid-column: 2;
        grid-row: 1;
        align-self: center;
        padding-top: 40px;
    }

    .news-row-arrow {
        grid-column: 3;
        grid-row: 1;
    }

    .gallery-mosaic {
        grid-template-columns: 1.1fr 0.9fr;
        grid-template-rows: 360px 260px;
    }

    .gallery-mosaic-item.item-1 {
        grid-row: 1 / 3;
    }

    .gallery-mosaic-item.item-2 {
        grid-column: 2;
    }

    .page-sidebar {
        position: static;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .site-footer-inner {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    :root {
        --gutter: 20px;
    }

    .site-header-inner {
        gap: 12px;
        min-height: 74px;
    }

    .site-logo {
        width: min(286px, calc(100vw - 112px));
    }

    .mobile-nav-button {
        grid-template-columns: 24px;
        width: 44px;
    }

    .mobile-nav-button em {
        display: none;
    }

    .hero-inner {
        align-items: end;
        padding: 140px 0 112px;
    }

    .hero-copy {
        width: 100%;
    }

    .hero h1 {
        font-size: clamp(48px, 15vw, 72px);
        letter-spacing: 0.04em;
    }

    .hero-lead {
        font-size: 18px;
        line-height: 1.75;
    }

    .hero-actions {
        gap: 18px;
        margin-top: 30px;
    }

    .hero-seal {
        display: none;
    }

    .scroll-cue {
        right: 4px;
        bottom: 24px;
    }

    .visit-ribbon-inner {
        grid-template-columns: 1fr;
    }

    .visit-ribbon-inner > div,
    .visit-ribbon-map {
        min-height: 82px;
        padding: 18px 20px;
        border-right: 1px solid var(--line-light);
        border-bottom: 1px solid var(--line-light);
        border-left: 1px solid var(--line-light);
    }

    .visit-ribbon-map {
        grid-column: auto;
        border-top: 0;
    }

    .chapter {
        padding: 82px 0;
    }

    .chapter-index {
        margin-bottom: 28px;
    }

    .chapter-index span {
        font-size: 36px;
    }

    .chapter h2,
    .chapter-heading h2 {
        font-size: clamp(36px, 12vw, 54px);
    }

    .chapter-body {
        margin-top: 26px;
    }

    .portrait-frame {
        width: calc(100% - 20px);
        margin-left: 20px;
    }

    .portrait-frame::before {
        top: -18px;
        right: -12px;
        bottom: 36px;
        left: 28px;
    }

    .portrait-frame figcaption {
        width: calc(100% - 28px);
        margin: -32px 0 0 -20px;
        padding: 20px;
    }

    .chapter-heading {
        display: grid;
        grid-template-columns: 1fr;
        gap: 24px;
        margin-bottom: 42px;
    }

    .chapter-heading > .text-link {
        grid-column: auto;
    }

    .heritage-main {
        width: calc(100% - 20px);
    }

    .heritage-main::after {
        right: -14px;
        bottom: -14px;
    }

    .heritage-notes article {
        padding-left: 44px;
    }

    .tradition-grid article {
        padding: 38px 24px;
    }

    .news-row {
        grid-template-columns: 96px minmax(0, 1fr);
        gap: 16px;
        min-height: 142px;
    }

    .news-row-meta {
        grid-column: 2;
        grid-row: 1;
        align-self: start;
        padding-top: 2px;
    }

    .news-row-copy {
        grid-column: 2;
        grid-row: 1;
        padding-top: 36px;
    }

    .news-row h3 {
        font-size: 19px;
    }

    .news-row-copy p {
        display: none;
    }

    .news-row-arrow {
        display: none;
    }

    .gallery-mosaic {
        display: grid;
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }

    .gallery-mosaic-item,
    .gallery-mosaic-item.item-1,
    .gallery-mosaic-item.item-2 {
        grid-column: auto;
        grid-row: auto;
        aspect-ratio: 4 / 3;
    }

    .gallery-mosaic-item.item-1 {
        aspect-ratio: 4 / 5;
    }

    .visit-cta,
    .visit-cta-inner {
        min-height: 560px;
    }

    .visit-cta-inner h2 {
        font-size: clamp(38px, 11vw, 56px);
    }

    .visit-cta-inner > div {
        display: grid;
        width: 100%;
    }

    .button-outline,
    .button-solid {
        width: 100%;
    }

    .page-hero,
    .page-hero-inner {
        min-height: 430px;
    }

    .page-hero-inner {
        padding-bottom: 44px;
    }

    .page-hero-inner h1 {
        font-size: clamp(42px, 13vw, 64px);
    }

    .inner-wrap {
        width: min(100%, calc(100% - 40px));
    }

    .inner-gallery-grid,
    .page-sidebar,
    .site-footer-inner {
        grid-template-columns: 1fr;
    }

    .download-item {
        align-items: stretch;
        flex-direction: column;
    }

    .contact-form {
        grid-template-columns: 1fr;
    }

    .form-field.full,
    .form-actions {
        grid-column: auto;
    }

    .site-footer-inner {
        padding: 64px 0 50px;
    }

    .site-footer-bottom {
        align-items: flex-start;
        flex-direction: column;
    }
}

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

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

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