@import url("https://fonts.googleapis.com/css2?family=Source+Sans+3:wght@400;500;600&family=Cormorant+Garamond:ital,wght@0,400;0,500;1,400&family=Lora:wght@400;500&family=Noto+Sans+SC:wght@400;500;600&display=swap");
@import url("https://cdn.jsdelivr.net/npm/lxgw-wenkai-screen-webfont@1.1.0/style.css");

:root {
    --maroon: #8a100b;
    --gold: #dbbb5b;
    --paper: #f7f4ef;
    --paper-dark: #ede8df;
    --ink: #1c1917;
    --ink-muted: #57534e;
    --line: #ddd6c8;
    --white: #fffcf7;
    --darkBg: #1a1614;
    --nav-bg: #741612;
    --nav-text: #f3ece4;
    --nav-text-dim: rgba(243, 236, 228, 0.72);
    --nav-line: rgba(243, 236, 228, 0.22);
    --font-display: "STXingkai", "华文行楷", "LXGW WenKai Screen", "Cormorant Garamond", serif;
    --font-heading: "STXingkai", "华文行楷", "LXGW WenKai Screen", "Lora", "Kaiti SC", "STKaiti", Georgia, serif;
    --font-body: "Source Sans 3", "Noto Sans SC", sans-serif;
    --font-xing: var(--font-display);
    --font-kai: var(--font-heading);
}

* {
    box-sizing: border-box;
}

body {
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 1.0625rem;
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* 行书 — 页面主标题 */
.page-title,
.hero-title,
h1 {
    font-family: var(--font-xing);
    font-weight: 400;
    letter-spacing: 0.05em;
}

/* 楷体 — 章节与小标题 */
.section-title,
.subsection-title,
.join-banner h2,
.login-modal-box h2,
.event-card h3,
h2,
h3,
h4 {
    font-family: var(--font-kai);
    font-weight: 400;
    letter-spacing: 0.02em;
}

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

.font-kai {
    font-family: var(--font-kai);
    font-weight: 400;
}

/* ── Page layout ── */

.page-header {
    max-width: 64rem;
    margin: 0 auto 3.5rem;
    padding: 0 1rem;
    border-left: 3px solid var(--maroon);
    padding-left: 1.25rem;
}

.page-eyebrow {
    font-family: "Source Sans 3", "Noto Sans SC", sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-muted);
    margin-bottom: 0.5rem;
}

.page-title {
    font-size: clamp(1.875rem, 4.5vw, 3.25rem);
    line-height: 1.15;
    color: var(--maroon);
    margin-bottom: 0.5rem;
}

.page-lead {
    font-size: 1.125rem;
    color: var(--ink-muted);
    max-width: 36rem;
}

.page-intro {
    margin-top: 1.5rem;
    color: var(--ink);
    max-width: 48rem;
    text-align: left;
}

/* ── Sections ── */

.section-title {
    font-size: 1.75rem;
    color: var(--ink);
    margin-bottom: 1.25rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--line);
    position: relative;
}

.section-title::before {
    content: "";
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 2.5rem;
    height: 2px;
    background: var(--gold);
}

.section-title.plain {
    border-bottom: none;
    padding-bottom: 0;
}

.section-title.plain::before {
    display: none;
}


.subsection-title {
    font-size: 1.2rem;
    color: var(--maroon);
    margin-bottom: 0.75rem;
}

/* ── Panels & cards ── */

.panel {
    background: var(--white);
    border: 1px solid var(--line);
    padding: 1.75rem 2rem;
}

.panel-muted {
    background: var(--paper-dark);
    border: 1px solid var(--line);
    padding: 1rem 1.25rem;
}

.member-pool-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem 1.75rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.member-pool-list li {
    font-size: 1.05rem;
    color: var(--ink);
    white-space: nowrap;
}

/* ── Hero ── */

.hero {
    position: relative;
    min-height: 85vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 6rem 1rem 4rem;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(26, 22, 20, 0.72) 0%,
        rgba(138, 16, 11, 0.55) 100%
    );
}

.hero-content {
    position: relative;
    max-width: 60rem;
}

.hero-title {
    font-size: clamp(2.0rem, 5.5vw, 3.75rem);
    line-height: 1.12;
    color: #fff;
    margin-bottom: 1.5rem;
}

.hero-text {
    color: rgba(255, 252, 247, 0.88);
    font-size: 1.1rem;
    line-height: 1.75;
}

.hero-link {
    display: inline-block;
    margin-top: 2.5rem;
    font-family: "Source Sans 3", "Noto Sans SC", sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--gold);
    border-bottom: 1px solid var(--gold);
    padding-bottom: 2px;
    transition: opacity 0.2s;
}

.hero-link:hover {
    opacity: 0.75;
}

/* ── Navigation ── */

.site-nav {
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 50;
    background: var(--nav-bg);
    border-bottom: 1px solid #5c100d;
}

.site-nav-inner {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0.7rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    box-sizing: border-box;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
    color: inherit;
    flex-shrink: 0;
}

.nav-brand-mark {
    width: 2.25rem;
    height: 2.25rem;
    object-fit: contain;
}

.nav-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.nav-brand-title {
    font-family: var(--font-xing);
    font-size: 1.55rem;
    color: var(--nav-text);
    letter-spacing: 0.08em;
}

.nav-brand-sub {
    font-family: var(--font-kai);
    font-size: 0.78rem;
    color: var(--nav-text-dim);
    letter-spacing: 0.04em;
    max-width: 13rem;
    margin-top: 0.1rem;
}

.nav-links {
    display: none;
    align-items: center;
    gap: 0.15rem 1.1rem;
    flex-wrap: nowrap;
    justify-content: flex-end;
}

@media (min-width: 768px) {
    .nav-links {
        display: flex;
    }
}

.nav-link {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 1.05rem;
    color: var(--nav-text-dim);
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.35rem 0;
    border-bottom: 1px solid transparent;
    transition: color 0.15s, border-color 0.15s;
    white-space: nowrap;
}

.nav-link:hover,
.nav-item:hover > .nav-link {
    color: var(--nav-text);
    border-bottom-color: rgba(219, 187, 91, 0.65);
}

.nav-link-auth {
    color: var(--nav-text);
    font-family: var(--font-body);
    font-size: 0.95rem;
    letter-spacing: 0.04em;
}

.nav-divider {
    display: inline-block;
    width: 1px;
    height: 1rem;
    background: var(--nav-line);
    margin: 0 0.15rem;
}

.nav-item {
    position: relative;
}

.nav-menu {
    position: absolute;
    top: calc(100% + 0.35rem);
    left: 0;
    min-width: 9.5rem;
    background: var(--paper);
    border: 1px solid #c9bdb0;
    padding: 0.35rem 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity 0.15s, transform 0.15s, visibility 0.15s;
    z-index: 60;
}

.nav-menu-wide {
    min-width: 11rem;
}

.nav-menu-right {
    left: auto;
    right: 0;
}

.nav-item:hover .nav-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-menu a {
    display: block;
    padding: 0.45rem 1rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--ink-muted);
    text-decoration: none;
    transition: color 0.12s, background 0.12s;
}

.nav-menu a:hover {
    color: var(--maroon);
    background: var(--paper);
}

.nav-menu-highlight {
    color: var(--maroon) !important;
    border-top: 1px solid var(--line);
    margin-top: 0.25rem;
    padding-top: 0.65rem !important;
}

/* ── Buttons ── */

.btn {
    display: inline-block;
    font-family: "Source Sans 3", "Noto Sans SC", sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.75rem 1.75rem;
    border: 1px solid transparent;
    transition: background 0.2s, color 0.2s;
    border-radius: 0;
}

.btn-gold {
    background: var(--gold);
    color: var(--maroon);
    border-color: var(--gold);
}

.btn-gold:hover {
    background: #c9a84e;
}

.btn-outline-light {
    background: transparent;
    color: var(--gold);
    border-color: var(--gold);
}

.btn-outline-light:hover {
    background: var(--gold);
    color: var(--maroon);
}

/* ── Join banner ── */

.join-banner {
    background: var(--maroon);
    color: #fff;
    padding: 2.5rem 2rem;
    text-align: center;
    border: 1px solid #6e0c08;
}

.join-banner h2 {
    color: #fff;
    font-size: 2rem;
    margin-bottom: 1rem;
}

.join-banner-photo {
    background-size: cover;
    background-position: center;
    border: 1px solid #6e0c08;
}

/* ── Footer ── */

.site-footer {
    background: var(--darkBg, #1a1614);
    color: #a8a29e;
    padding: 2rem 1rem;
    text-align: center;
    font-size: 0.85rem;
    letter-spacing: 0.04em;
    border-top: 2px solid var(--maroon);
}

/* ── Forms & modal ── */

.form-panel {
    background: var(--white);
    border: 1px solid var(--line);
    padding: 2rem 2.5rem;
}

.form-input {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--line);
    border-radius: 0;
    background: var(--white);
    font-family: "Source Sans 3", "Noto Sans SC", sans-serif;
    font-size: 0.95rem;
}

.form-input:focus {
    outline: none;
    border-color: var(--maroon);
}

.form-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--ink-muted);
    margin-bottom: 0.35rem;
}

.login-modal-box {
    background: var(--white);
    border: 1px solid var(--line);
    box-shadow: 8px 8px 0 rgba(28, 25, 23, 0.1);
    border-radius: 0;
}

.login-modal-box h2 {
    font-size: 2rem;
    color: var(--maroon);
}

.btn-primary {
    width: 100%;
    background: var(--maroon);
    color: #fff;
    font-weight: 600;
    padding: 0.75rem;
    border: 1px solid var(--maroon);
    border-radius: 0;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-size: 0.8rem;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: #6e0c08;
}

.btn-secondary {
    width: 100%;
    background: var(--white);
    color: var(--ink);
    font-weight: 600;
    padding: 0.75rem;
    border: 1px solid var(--line);
    border-radius: 0;
    transition: border-color 0.2s;
}

.btn-secondary:hover {
    border-color: var(--maroon);
}

.btn-outline-maroon {
    width: 100%;
    background: var(--white);
    color: var(--maroon);
    font-weight: 600;
    padding: 0.75rem;
    border: 2px solid var(--maroon);
    border-radius: 0;
    transition: background 0.2s, color 0.2s;
}

.btn-outline-maroon:hover {
    background: var(--maroon);
    color: #fff;
}

/* ── Misc ── */

.placeholder-box {
    background: var(--paper-dark);
    border: 1px dashed var(--line);
    padding: 2.5rem;
    text-align: center;
    color: var(--ink-muted);
}

.avatar-placeholder {
    width: 5.5rem;
    height: 5.5rem;
    background: var(--paper-dark);
    border: 1px solid var(--line);
    margin: 0 auto 1rem;
}

.sponsor-tile {
    aspect-ratio: 1;
    background: var(--white);
    border: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    color: var(--ink-muted);
    font-size: 0.9rem;
}

/* ── Content images ── */

.page-banner {
    max-width: 64rem;
    margin: 0 auto 2.5rem;
    padding: 0 1rem;
}

.page-banner img {
    width: 100%;
    max-height: 20rem;
    object-fit: cover;
    display: block;
    border: 1px solid var(--line);
}

.page-banner figcaption,
.content-figure figcaption {
    font-size: 0.75rem;
    color: var(--ink-muted);
    margin-top: 0.45rem;
    letter-spacing: 0.02em;
}

.content-split {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 1.5rem;
    align-items: start;
}

.content-split.reverse {
    grid-template-columns: 0.95fr 1.05fr;
}

.content-figure img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
    border: 1px solid var(--line);
}

.image-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.image-strip img {
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    border: 1px solid var(--line);
}

.image-strip figcaption {
    grid-column: 1 / -1;
    font-size: 0.75rem;
    color: var(--ink-muted);
    margin-top: 0.25rem;
}

.inline-figure {
    margin: 1.25rem 0;
}

.inline-figure img {
    width: 100%;
    max-height: 16rem;
    object-fit: cover;
    border: 1px solid var(--line);
}

.inline-figure figcaption {
    font-size: 0.75rem;
    color: var(--ink-muted);
    margin-top: 0.45rem;
}

.event-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.event-card img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
    border: 1px solid var(--line);
}

.event-card figcaption {
    padding: 0.85rem 0 0;
}

.event-card h3 {
    font-size: 1.25rem;
    color: var(--maroon);
    margin-bottom: 0.25rem;
}

.event-card p {
    font-size: 0.9rem;
    color: var(--ink-muted);
    font-family: "Source Sans 3", "Noto Sans SC", sans-serif;
}

@media (max-width: 768px) {
    .content-split,
    .content-split.reverse {
        grid-template-columns: 1fr;
    }

    .image-strip {
        grid-template-columns: 1fr;
    }

    .page-banner img {
        max-height: 14rem;
    }

    .event-gallery {
        grid-template-columns: 1fr;
    }
}

/* ── i18n Toggling ── */
html[lang="zh"] .lang-en {
    display: none !important;
}
html[lang="en"] .lang-zh {
    display: none !important;
}
