:root {
    color-scheme: light;
    --color-ink: #382c2c;
    --color-panel: #fffaf0;
    --color-panel-strong: #fff1d9;
    --color-paper: #fbf2df;
    --color-muted: #69504e;
    --color-dim: #9a7a76;
    --color-moon: #d9a74a;
    --color-shrine: #bd4b42;
    --color-teal: #4a8b87;
    --color-sky: #6fc7d8;
    --color-pink: #df8fa0;
    --color-line: rgba(110, 72, 65, 0.24);
    --shadow-panel: 0 12px 28px rgba(86, 61, 50, 0.12);
    --content-width: 1120px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    position: relative;
    isolation: isolate;
    margin: 0;
    background:
        linear-gradient(180deg, rgba(255, 250, 240, 0.96), rgba(248, 235, 211, 0.84)),
        repeating-linear-gradient(0deg, rgba(125, 88, 66, 0.035) 0 1px, transparent 1px 7px),
        repeating-linear-gradient(90deg, rgba(125, 88, 66, 0.025) 0 1px, transparent 1px 9px),
        var(--color-paper);
    color: var(--color-ink);
    font-family: "Iowan Old Style", "Yu Mincho", "Microsoft YaHei", "PingFang SC", serif;
    line-height: 1.65;
}

body::before {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image:
        linear-gradient(102deg, transparent 0 46%, rgba(189, 75, 66, 0.045) 46% 47%, transparent 47% 100%),
        linear-gradient(74deg, transparent 0 58%, rgba(74, 139, 135, 0.04) 58% 59%, transparent 59% 100%);
    background-position: 0 0, 18px 8px;
    background-size: 72px 64px;
    content: "";
    opacity: 0.5;
}

.meteor-cat-layer {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

/* 流星猫是纯装饰背景，轨迹统一为右上到左下，随机性由 JS 写入 CSS 变量。 */
.meteor-cat {
    position: absolute;
    top: 0;
    left: 0;
    width: var(--meteor-size, 132px);
    height: auto;
    opacity: 0;
    transform:
        translate3d(var(--meteor-start-x), var(--meteor-start-y), 0)
        rotate(var(--meteor-rotation-start, 0deg))
        scale(var(--meteor-scale, 1));
    filter: drop-shadow(0 8px 8px rgba(86, 61, 50, 0.1));
    will-change: transform, opacity;
    animation: meteorCatFlight var(--meteor-duration, 7000ms) linear forwards;
}

.site-header,
main,
.site-footer {
    position: relative;
    z-index: 1;
}

body.is-menu-open {
    overflow: hidden;
}

a {
    color: inherit;
}

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

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

button {
    color: inherit;
}

:focus-visible {
    outline: 3px solid var(--color-shrine);
    outline-offset: 4px;
}

.skip-link {
    position: fixed;
    left: 16px;
    top: 16px;
    z-index: 20;
    transform: translateY(-140%);
    border-radius: 999px;
    background: var(--color-ink);
    color: #fffdf8;
    padding: 10px 14px;
    text-decoration: none;
}

.skip-link:focus {
    transform: translateY(0);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    clip-path: inset(50%);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom: 2px solid rgba(110, 72, 65, 0.18);
    background:
        linear-gradient(180deg, rgba(255, 250, 240, 0.94), rgba(255, 244, 224, 0.9)),
        repeating-linear-gradient(90deg, transparent 0 12px, rgba(110, 72, 65, 0.035) 12px 13px);
    backdrop-filter: blur(10px);
}

@keyframes meteorCatFlight {
    0% {
        opacity: 0;
        transform:
            translate3d(var(--meteor-start-x), var(--meteor-start-y), 0)
            rotate(var(--meteor-rotation-start, 0deg))
            scale(var(--meteor-scale, 1));
    }

    10%,
    82% {
        opacity: var(--meteor-opacity, 0.72);
    }

    100% {
        opacity: 0;
        transform:
            translate3d(var(--meteor-end-x), var(--meteor-end-y), 0)
            rotate(var(--meteor-rotation-end, 0deg))
            scale(var(--meteor-scale, 1));
    }
}

.header-inner,
.hero-section,
.content-section,
.site-footer,
.status-strip {
    width: min(100% - 32px, var(--content-width));
    margin-inline: auto;
}

.header-inner {
    display: flex;
    min-height: 72px;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.brand-mark {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 2px solid rgba(189, 75, 66, 0.3);
    border-radius: 50%;
    background:
        linear-gradient(135deg, rgba(255, 235, 178, 0.9), rgba(255, 221, 218, 0.9)),
        var(--color-panel);
    color: #9b463d;
    font-weight: 700;
    box-shadow: 2px 4px 0 rgba(86, 61, 50, 0.1);
}

.brand-name,
.brand-subtitle {
    display: block;
}

.brand-name {
    color: var(--color-ink);
    font-weight: 700;
    line-height: 1.2;
}

.brand-subtitle {
    color: var(--color-dim);
    font-size: 13px;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.site-nav a,
.footer-nav a {
    border: 1px solid transparent;
    border-radius: 8px;
    color: var(--color-muted);
    padding: 8px 12px;
    text-decoration: none;
}

.site-nav a:hover,
.footer-nav a:hover {
    color: var(--color-shrine);
    border-color: rgba(189, 75, 66, 0.2);
    background: rgba(255, 238, 219, 0.82);
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--color-line);
    border-radius: 8px;
    background: rgba(255, 250, 240, 0.9);
    color: var(--color-ink);
    cursor: pointer;
}

.menu-toggle-lines,
.menu-toggle-lines::before,
.menu-toggle-lines::after {
    display: block;
    width: 20px;
    height: 2px;
    border-radius: 1px;
    background: currentColor;
    content: "";
    transition: transform 160ms ease, opacity 160ms ease;
}

.menu-toggle-lines::before {
    transform: translateY(-7px);
}

.menu-toggle-lines::after {
    transform: translateY(5px);
}

.menu-toggle[aria-expanded="true"] .menu-toggle-lines {
    transform: rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-toggle-lines::before {
    opacity: 0;
}

.menu-toggle[aria-expanded="true"] .menu-toggle-lines::after {
    transform: translateY(-2px) rotate(90deg);
}

.hero-section {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
    gap: 44px;
    align-items: center;
    min-height: 620px;
    overflow: hidden;
    border: 2px solid rgba(110, 72, 65, 0.18);
    border-radius: 8px;
    background:
        linear-gradient(106deg, rgba(255, 252, 246, 0.96), rgba(255, 244, 224, 0.9) 58%, rgba(237, 251, 252, 0.78)),
        repeating-linear-gradient(0deg, rgba(110, 72, 65, 0.035) 0 1px, transparent 1px 10px);
    box-shadow: 6px 8px 0 rgba(86, 61, 50, 0.08), var(--shadow-panel);
    margin-top: 34px;
    padding: 64px;
}

.hero-section::before {
    position: absolute;
    inset: 14px;
    z-index: 0;
    pointer-events: none;
    border: 1px dashed rgba(189, 75, 66, 0.18);
    border-radius: 6px;
    content: "";
}

.hero-copy {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0;
    text-align: left;
}

.eyebrow {
    margin: 0 0 10px;
    color: #a9473f;
    font-size: 14px;
    font-weight: 700;
}

h1,
h2,
h3,
p {
    overflow-wrap: anywhere;
}

h1 {
    margin: 0;
    font-size: 52px;
    line-height: 1.12;
    letter-spacing: 0;
    color: var(--color-ink);
}

.site-title-glow {
    color: #f4feff;
    font-size: 58px;
    font-weight: 900;
    text-shadow:
        1px 1px 0 #4fb6c9,
        -1px 1px 0 #4fb6c9,
        1px -1px 0 #4fb6c9,
        -1px -1px 0 #4fb6c9,
        0 4px 0 rgba(111, 199, 216, 0.42),
        0 9px 16px rgba(74, 139, 135, 0.18);
    -webkit-text-stroke: 0;
}

h2 {
    margin: 0;
    font-size: 32px;
    line-height: 1.25;
    letter-spacing: 0;
    color: var(--color-ink);
    text-decoration: underline;
    text-decoration-color: rgba(217, 167, 74, 0.55);
    text-decoration-thickness: 8px;
    text-underline-offset: -4px;
    text-decoration-skip-ink: none;
}

h3 {
    margin: 0;
    font-size: 20px;
    line-height: 1.35;
    letter-spacing: 0;
    color: var(--color-ink);
}

.hero-lead {
    max-width: 680px;
    margin: 22px 0 0;
    color: var(--color-muted);
    font-size: 19px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 32px;
}

.button {
    position: relative;
    overflow: hidden;
    display: inline-flex;
    min-height: 46px;
    align-items: center;
    justify-content: flex-start;
    border: 2px solid rgba(110, 72, 65, 0.18);
    border-radius: 8px;
    padding: 10px 18px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 4px 5px 0 rgba(86, 61, 50, 0.08), var(--shadow-panel);
    transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.button::before {
    position: absolute;
    inset: 5px;
    z-index: 0;
    pointer-events: none;
    border: 1px dashed rgba(189, 75, 66, 0.14);
    border-radius: 5px;
    content: "";
}

.button::after {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.18)),
        repeating-linear-gradient(112deg, transparent 0 18px, rgba(189, 75, 66, 0.028) 18px 19px);
    content: "";
}

.button:hover {
    transform: translateY(-2px);
    border-color: rgba(189, 75, 66, 0.34);
    box-shadow: 6px 7px 0 rgba(86, 61, 50, 0.1), 0 14px 28px rgba(92, 68, 74, 0.11);
}

.button:focus-visible {
    outline-offset: 5px;
}

.button > * {
    position: relative;
    z-index: 1;
}

.hero-quick-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 8px;
    margin-top: 18px;
    color: var(--color-dim);
    font-size: 14px;
}

.hero-quick-links a {
    color: #236d94;
    text-underline-offset: 4px;
}

.primary-button {
    background:
        linear-gradient(106deg, rgba(255, 236, 176, 0.96), rgba(255, 218, 206, 0.9) 58%, rgba(237, 251, 252, 0.72)),
        repeating-linear-gradient(0deg, rgba(110, 72, 65, 0.035) 0 1px, transparent 1px 10px),
        var(--color-panel-strong);
    color: #3e2c28;
}

.secondary-button {
    background:
        linear-gradient(106deg, rgba(255, 252, 246, 0.96), rgba(255, 244, 224, 0.9) 58%, rgba(237, 251, 252, 0.78)),
        repeating-linear-gradient(0deg, rgba(110, 72, 65, 0.035) 0 1px, transparent 1px 10px),
        var(--color-panel);
    color: var(--color-ink);
}

.hero-visual {
    position: relative;
    z-index: 2;
    margin: 0;
}

/* 看板娘使用双面图片完成悬停翻转，避免动画中途改 DOM 导致闪烁。 */
.hero-standee {
    width: 100%;
    aspect-ratio: 1 / 1;
    perspective: 1200px;
}

.hero-standee-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 620ms cubic-bezier(0.2, 0.72, 0.22, 1);
}

.hero-standee:hover .hero-standee-inner,
.hero-standee:focus-visible .hero-standee-inner {
    transform: rotateY(180deg);
}

.standee-face {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 2px solid rgba(110, 72, 65, 0.18);
    border-radius: 8px;
    background: #fffaf0;
    box-shadow: 5px 7px 0 rgba(86, 61, 50, 0.1), 0 16px 32px rgba(92, 68, 74, 0.12);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    object-fit: contain;
}

.standee-face-back {
    transform: rotateY(180deg);
}

.hero-visual figcaption {
    margin-top: 12px;
    color: var(--color-muted);
    font-size: 14px;
    text-align: center;
}

.hero-section::after {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22)),
        repeating-linear-gradient(112deg, transparent 0 24px, rgba(189, 75, 66, 0.035) 24px 25px);
    content: "";
}

.status-strip {
    display: flex;
    align-items: center;
    gap: 16px;
    border: 1px dashed rgba(110, 72, 65, 0.24);
    border-radius: 8px;
    background: rgba(255, 250, 240, 0.58);
    margin-top: 18px;
    padding: 14px 18px;
}

.status-strip span {
    flex: 0 0 auto;
    border: 1px solid rgba(201, 80, 84, 0.2);
    border-radius: 8px;
    background: #fff0e6;
    color: #a9473f;
    padding: 4px 10px;
    font-size: 13px;
    font-weight: 700;
}

.status-strip strong {
    color: var(--color-ink);
    font-size: 15px;
}

.content-section {
    padding: 76px 0 0;
}

.section-heading {
    display: grid;
    max-width: 760px;
    gap: 10px;
    margin-bottom: 28px;
}

.section-heading p:not(.eyebrow) {
    margin: 0;
    color: var(--color-muted);
}

.link-grid,
.join-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.link-card,
.join-card,
.project-card,
.announcement-card {
    position: relative;
    overflow: hidden;
    border: 2px solid rgba(110, 72, 65, 0.18);
    border-radius: 8px;
    background:
        linear-gradient(106deg, rgba(255, 252, 246, 0.96), rgba(255, 244, 224, 0.9) 58%, rgba(237, 251, 252, 0.78)),
        repeating-linear-gradient(0deg, rgba(110, 72, 65, 0.035) 0 1px, transparent 1px 10px);
    box-shadow: 5px 7px 0 rgba(86, 61, 50, 0.08), var(--shadow-panel);
    transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.link-card::before,
.join-card::before,
.project-card::before,
.announcement-card::before {
    position: absolute;
    inset: 10px;
    z-index: 0;
    pointer-events: none;
    border: 1px dashed rgba(189, 75, 66, 0.16);
    border-radius: 6px;
    content: "";
}

.link-card::after,
.join-card::after,
.project-card::after,
.announcement-card::after {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.18)),
        repeating-linear-gradient(112deg, transparent 0 24px, rgba(189, 75, 66, 0.03) 24px 25px);
    content: "";
}

.link-card:hover,
.join-card:hover,
.project-card:hover,
.announcement-card:hover {
    transform: translateY(-2px);
    border-color: rgba(189, 75, 66, 0.34);
    box-shadow: 7px 9px 0 rgba(86, 61, 50, 0.1), 0 16px 32px rgba(92, 68, 74, 0.12);
}

.link-card,
.join-card {
    display: grid;
    gap: 10px;
    padding: 24px;
}

.link-card > *,
.join-card > *,
.project-card > *,
.announcement-card > * {
    position: relative;
    z-index: 1;
}

.link-card h3,
.join-card h3 {
    color: var(--color-ink);
}

.link-card p,
.join-card p,
.project-card p,
.announcement-card p {
    margin: 0;
    color: var(--color-muted);
}

.text-link {
    color: #28736f;
    font-weight: 700;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
}

.text-button {
    justify-self: start;
    border: 0;
    background: transparent;
    color: #28736f;
    padding: 0;
    font-weight: 700;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
    cursor: pointer;
}

.contact-line {
    display: flex;
    width: 100%;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
    border-top: 1px solid rgba(110, 72, 65, 0.16);
    padding-top: 10px;
}

.contact-line span {
    color: #a9473f;
    font-size: 14px;
    font-weight: 700;
}

.contact-line strong {
    color: var(--color-ink);
    font-family: "Iowan Old Style", "Yu Mincho", "Microsoft YaHei", "PingFang SC", serif;
    font-size: 17px;
    letter-spacing: 0;
    line-height: 1.3;
}

.announcement-list,
.project-list {
    display: grid;
    gap: 12px;
}

.announcement-card {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr) auto;
    gap: 18px;
    align-items: start;
    padding: 18px 20px;
}

.announcement-date {
    color: #a9473f;
    font-size: 14px;
    font-weight: 700;
}

.announcement-action {
    white-space: nowrap;
}

.project-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 24px;
    padding: 24px;
}

.project-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0 14px;
}

.project-tag {
    border: 1px solid rgba(78, 156, 146, 0.24);
    border-radius: 8px;
    background: rgba(232, 247, 241, 0.82);
    color: #28736f;
    padding: 3px 9px;
    font-size: 13px;
}

.project-notice {
    margin-top: 14px;
    color: #965047;
    font-size: 14px;
}

.project-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 140px;
}

.about-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
    gap: 28px;
    align-items: start;
}

.about-layout p {
    max-width: 760px;
    margin: 0 0 16px;
    color: var(--color-muted);
}

.about-facts {
    position: relative;
    overflow: hidden;
    display: grid;
    gap: 0;
    margin: 0;
    border: 2px solid rgba(110, 72, 65, 0.18);
    border-radius: 8px;
    background:
        linear-gradient(106deg, rgba(255, 252, 246, 0.96), rgba(255, 244, 224, 0.9) 58%, rgba(237, 251, 252, 0.78)),
        repeating-linear-gradient(0deg, rgba(110, 72, 65, 0.035) 0 1px, transparent 1px 10px);
    box-shadow: 5px 7px 0 rgba(86, 61, 50, 0.08), var(--shadow-panel);
}

.about-facts div {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 12px;
    padding: 16px 18px;
}

.about-facts div + div {
    border-top: 1px solid var(--color-line);
}

.about-facts dt {
    color: #a9473f;
    font-weight: 700;
}

.about-facts dd {
    margin: 0;
    color: var(--color-muted);
}

.site-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-top: 96px;
    border-top: 1px solid var(--color-line);
    padding: 28px 0 36px;
}

.site-footer p {
    margin: 4px 0 0;
    color: var(--color-muted);
    font-size: 14px;
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 2px;
}

@media (max-width: 860px) {
    body.is-menu-open {
        position: fixed;
        width: 100%;
    }

    .menu-toggle {
        display: inline-flex;
    }

    .site-nav {
        position: fixed;
        inset: 72px 0 auto 0;
        display: none;
        grid-template-columns: 1fr;
        border-bottom: 1px solid var(--color-line);
        background:
            linear-gradient(180deg, rgba(255, 250, 240, 0.98), rgba(255, 244, 224, 0.98)),
            repeating-linear-gradient(0deg, rgba(110, 72, 65, 0.028) 0 1px, transparent 1px 8px);
        padding: 16px;
    }

    .site-nav.is-open {
        display: grid;
    }

    .site-nav a {
        padding: 13px 14px;
    }

    .hero-section {
        grid-template-columns: 1fr;
        gap: 28px;
        min-height: auto;
        border-radius: 8px;
        margin-top: 22px;
        padding: 36px 24px 24px;
    }

    .hero-copy {
        min-height: auto;
    }

    .hero-lead {
        margin-inline: 0;
    }

    .hero-actions,
    .hero-quick-links {
        justify-content: flex-start;
    }

    .hero-visual {
        width: min(100%, 320px);
        justify-self: center;
    }

    .hero-standee {
        aspect-ratio: 1 / 1;
    }

    .hero-visual figcaption {
        padding: 0;
    }

    .hero-section::after {
        background:
            repeating-linear-gradient(112deg, transparent 0 24px, rgba(189, 75, 66, 0.035) 24px 25px);
    }

    .link-grid,
    .join-grid {
        grid-template-columns: 1fr;
    }

    .announcement-card,
    .project-card,
    .about-layout,
    .site-footer {
        grid-template-columns: 1fr;
    }

    .announcement-card {
        gap: 10px;
    }

    .project-actions {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .site-footer {
        display: grid;
    }

    .footer-nav {
        justify-content: flex-start;
    }
}

@media (max-width: 560px) {
    .header-inner,
    .hero-section,
    .content-section,
    .site-footer,
    .status-strip {
        width: min(100% - 24px, var(--content-width));
    }

    .brand-subtitle {
        display: none;
    }

    h1 {
        font-size: 38px;
    }

    .site-title-glow {
        font-size: 44px;
    }

    h2 {
        font-size: 27px;
    }

    .hero-lead {
        font-size: 17px;
    }

    .hero-actions,
    .status-strip {
        align-items: stretch;
        flex-direction: column;
    }

    .status-strip span {
        align-self: flex-start;
    }

    .button,
    .project-actions .text-link {
        width: 100%;
    }

    .content-section {
        padding-top: 64px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
