/* Fonts: Inter + Playfair Display. Palette: Onyx/Ink, Champagne, Gold accents. */
:root {
    --bg: #0c0c0e; /* near-black */
    --ink: #e9e9ee; /* soft-white */
    --muted: #b6b6c4; /* muted */
    --accent: #d7b27b; /* gold */
    --accent-2: #7a5c2e; /* deep gold */
    --surface: #141418; /* card bg */
    --line: rgba(255, 255, 255, 0.08);
    --radius: 18px;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

* {
    box-sizing: border-box;
}
html,
body {
    height: 100%;
}
body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font: 400 16px/1.65 Inter, system-ui, -apple-system, Segoe UI, Roboto,
        Helvetica, Arial;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: saturate(130%) blur(10px);
    background: linear-gradient(
        180deg,
        rgba(12, 12, 14, 0.8),
        rgba(12, 12, 14, 0.35) 80%,
        rgba(12, 12, 14, 0)
    );
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 22px;
    min-height: 60px;
}
.site-header .logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.4px;
}
.site-header .logo span {
    font-family: "Playfair Display", serif;
    font-size: 20px;
}
.site-header .site-nav {
    display: flex;
    align-items: center;
}
.site-header ul {
    display: flex;
    gap: 8px;
    margin: 0;
    list-style: none;
    align-items: center;
}
.site-header a {
    padding: 10px 14px;
    border-radius: 12px;
}
.site-header a:hover {
    background: rgba(255, 255, 255, 0.06);
}

.nav-toggle {
    display: none;
    margin-left: auto;
    margin-right: 10px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 12px 18px;
    border-radius: 14px;
    border: 1px solid var(--line);
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease,
        border-color 0.2s ease;
}
.btn-primary {
    background: var(--accent);
    color: #1a1a1d;
    border-color: transparent;
}
.btn-primary:hover {
    transform: translateY(-1px);
}
.btn-outline {
    background: transparent;
    color: var(--ink);
    border-color: rgba(255, 255, 255, 0.18);
}
.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
}
.btn-ghost {
    background: transparent;
    color: var(--muted);
}
.btn-ghost:hover {
    color: var(--ink);
}

.hero {
    position: relative;
    min-height: 72vh;
    display: grid;
    place-items: center;
    overflow: hidden;
}
.hero-media {
    position: absolute;
    inset: 0;
    background: radial-gradient(
            1200px 600px at 70% 20%,
            rgba(215, 178, 123, 0.15),
            transparent 60%
        ),
        radial-gradient(
            1000px 500px at 20% 80%,
            rgba(122, 92, 46, 0.1),
            transparent 60%
        ),
        url("images/bg.webp")
            center/cover no-repeat;
    filter: grayscale(0.1) brightness(0.6) contrast(1.05);
}
.hero::after {
    content: "";
    /* position: absolute; */
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(12, 12, 14, 0.4),
        rgba(12, 12, 14, 0.8)
    );
}
.hero-inner {
    position: relative;
    padding: 60px 22px;
    text-align: center;
    max-width: 980px;
}
.hero h1 {
    font-family: "Playfair Display", serif;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.53;
    letter-spacing: 0.5px;
    margin: 0 0 14px;
}
.hero .accent {
    color: var(--accent);
}
.hero p {
    margin: 0 0 26px;
    color: var(--muted);
    font-size: clamp(16px, 2.2vw, 20px);
}
.hero-ctas {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.section {
    padding: 64px 22px;
}
.section-head {
    max-width: 980px;
    margin: 0 auto 22px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
}
.section h2 {
    font: 700 28px/1.2 "Playfair Display", serif;
    margin: 0 0 8px;
}
.section p {
    color: var(--muted);
    margin: 0;
}

.grid {
    display: grid;
    gap: 18px;
}
.section-grid .grid {
    grid-template-columns: repeat(12, 1fr);
}
.cards {
    max-width: 1200px;
    margin: 20px auto 0;
}
.card {
    grid-column: span 4;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.04),
        rgba(255, 255, 255, 0.02)
    );
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transform: translateY(0);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}
.card-media {
    position: relative;
    padding-top: 100%;
    background: var(--surface);
    background-image: var(--bg);
    background-size: 100%;
    background-position: center;
    filter: saturate(1.05);
}
.card-body {
    padding: 16px 16px 18px;
}
.card-title {
    margin: 0 0 6px;
    font-weight: 700;
    letter-spacing: 0.2px;
    text-align: center;
}
.card-desc {
    margin: 0;
    color: var(--muted);
}
.card a.stretched {
    position: absolute;
    inset: 0;
    z-index: 1;
}
.card:focus-within {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

@media (max-width: 1024px) {
    .card {
        grid-column: span 6;
    }
}
@media (max-width: 640px) {
    .card {
        grid-column: span 12;
    }
}

.section-audio .audio-feature {
    max-width: 1100px;
    margin: 24px auto 0;
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 22px;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.04),
        rgba(255, 255, 255, 0.02)
    );
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}
.audio-cover {
    background: radial-gradient(
            400px 200px at 80% 20%,
            rgba(215, 178, 123, 0.15),
            transparent 60%
        ),
        url("https://images.unsplash.com/photo-1511379938547-c1f69419868d?q=80&w=1600&auto=format&fit=crop")
            center/cover no-repeat;
    min-height: 260px;
}
.audio-meta {
    padding: 18px;
}
.audio-meta h3 {
    margin: 6px 0 8px;
}
.audio-meta p {
    margin: 0 0 12px;
    color: var(--muted);
}
.audio-player {
    width: 100%;
    height: 40px;
    filter: drop-shadow(0 6px 20px rgba(0, 0, 0, 0.35));
}
.audio-ctas {
    margin-top: 14px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
@media (max-width: 840px) {
    .section-audio .audio-feature {
        grid-template-columns: 1fr;
    }
}

/* 留言列表样式 */
.message-list {
    max-width: 980px;
    margin: 22px auto 0;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.04),
        rgba(255, 255, 255, 0.02)
    );
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}
.message-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.02);
}
.message-list-header h3 {
    margin: 0;
    font: 600 18px/1.2 "Playfair Display", serif;
    color: var(--ink);
}
.message-stats {
    color: var(--muted);
    font-size: 14px;
}
.message-items {
    max-height: 600px;
    overflow-y: auto;
    padding: 0;
}
.message-item {
    display: flex;
    gap: 14px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--line);
    transition: background 0.2s ease;
}
.message-item:last-child {
    border-bottom: none;
}
.message-item:hover {
    background: rgba(255, 255, 255, 0.02);
}
.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1a1a1d;
    font-weight: 600;
    font-size: 16px;
    flex-shrink: 0;
}
.message-content {
    flex: 1;
    min-width: 0;
}
.message-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}
.message-author {
    font-weight: 600;
    color: var(--ink);
}
.message-time {
    color: var(--muted);
    font-size: 13px;
}
.message-text {
    color: var(--ink);
    line-height: 1.5;
    margin: 0;
    word-wrap: break-word;
}
.message-replies {
    margin-top: 10px;
    padding-left: 54px; /* align with text after avatar */
    display: grid;
    gap: 10px;
}
.message-reply {
    display: flex;
    gap: 10px;
    padding: 12px;
    border-left: 3px solid var(--accent);
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
}
.message-avatar.admin {
    background: linear-gradient(135deg, #d94f4f, #7a2020);
    color: #fff;
}
.message-author.admin {
    color: #ffd5d5;
}
.message-item-admin {
    background: rgba(255, 255, 255, 0.015);
}
.message-reply-body {
    flex: 1;
    min-width: 0;
}
.message-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--muted);
}
.message-empty p {
    margin: 0;
    font-style: italic;
}

/* 留言表单样式 */
.section-message .message-form {
    max-width: 780px;
    margin: 22px auto 0;
    display: grid;
    gap: 14px;
}
.form-row {
    display: grid;
    gap: 6px;
}
.form-row label {
    color: var(--muted);
}
.form-row input,
.form-row textarea {
    background: var(--surface);
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px 14px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form-row input:focus,
.form-row textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(215, 178, 123, 0.15);
}
.form-tip {
    margin: 2px 0 0;
    color: var(--muted);
    font-size: 14px;
}

/* 按钮加载状态 */
.btn-loading {
    display: none;
}
.btn.loading .btn-text {
    display: none;
}
.btn.loading .btn-loading {
    display: inline;
}

.section-contact .contact-cards {
    max-width: 980px;
    margin: 22px auto 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}
.contact-card {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.03),
        rgba(255, 255, 255, 0.02)
    );
    transition: transform 0.2s ease;
}
.contact-card:hover {
    transform: translateY(-2px);
}
.contact-icon {
    font-size: 22px;
}
@media (max-width: 640px) {
    .section-contact .contact-cards {
        grid-template-columns: 1fr;
    }
}

.site-footer {
    padding: 40px 22px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    text-align: center;
}

/* Mobile nav */
@media (max-width: 820px) {
    .site-header {
        flex-direction: column;
        align-items: stretch;
        padding: 0;
    }
    .site-header .logo {
        padding: 14px 22px;
    }
    .site-header .site-nav {
        padding: 0 22px 10px;
    }
    .site-header ul {
        display: none;
    }
    .nav-toggle {
        display: inline-flex;
        background: transparent;
        color: var(--ink);
        border: 1px solid var(--line);
        padding: 8px 12px;
        border-radius: 12px;
        margin-left: auto;
    }
    .site-header[aria-expanded="true"] #nav-menu {
        display: flex;
        flex-direction: column;
        gap: 6px;
        padding: 10px 0;
    }
}

/* Scroll reveal */
[data-reveal] {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
[data-reveal].revealed {
    opacity: 1;
    transform: none;
}

/* 加载状态样式 */
.load-status {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    margin: 20px 0;
    color: var(--muted);
    font-size: 14px;
    gap: 8px;
}

.load-status.loading {
    color: var(--accent);
}

.load-status.no-more {
    color: var(--muted);
    opacity: 0.8;
}

.loading-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid var(--line);
    border-top: 2px solid var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.no-more-icon {
    font-size: 16px;
    opacity: 0.6;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}


@media (max-width: 640px) {
    audio,
    .audio-player {
        height: 38px;
        padding: 6px;
        border-radius: 10px;
    }
}
