:root {
    --paper: #f7f4ed;
    --ink: #1c1b18;
    --muted: #6b6259;
    --line: rgba(28, 27, 24, 0.16);
    --amber: #c47a2c;
    --green: #406b58;
    --blue: #496f9d;
    --white: #ffffff;
    --shadow: 0 18px 46px rgba(35, 31, 25, 0.18);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--paper);
    font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", Arial, sans-serif;
    line-height: 1.7;
    overflow-x: hidden;
}

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

picture {
    display: block;
}

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

.hero {
    position: relative;
    min-height: 92svh;
    isolation: isolate;
    color: var(--white);
    display: flex;
    align-items: flex-end;
    padding: 24px clamp(18px, 4vw, 64px) clamp(58px, 10vh, 96px);
    overflow: hidden;
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(180deg, rgba(10, 10, 10, 0.34), rgba(10, 10, 10, 0.1) 42%, rgba(10, 10, 10, 0.76)),
        linear-gradient(90deg, rgba(20, 18, 14, 0.68), rgba(20, 18, 14, 0.1) 58%);
}

.hero-media {
    position: absolute;
    inset: 0;
    z-index: -2;
}

.hero-media picture,
.hero-media img {
    width: 100%;
    height: 100%;
}

.hero-media img {
    object-fit: cover;
    object-position: center 78%;
    filter: saturate(0.98) contrast(1.02);
    transform: scale(1.03);
}

.topbar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 72px;
    padding: 0 clamp(18px, 4vw, 64px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    color: rgba(255, 255, 255, 0.9);
}

.brand {
    font-weight: 700;
    letter-spacing: 0;
}

.nav-links {
    display: flex;
    gap: clamp(14px, 3vw, 34px);
    font-size: 0.95rem;
}

.nav-links a,
.page-footer a {
    transition: color 180ms ease, opacity 180ms ease;
}

.nav-links a:hover,
.page-footer a:hover {
    color: #f3c98b;
}

.hero-copy {
    width: min(780px, 100%);
}

.eyebrow,
.intro-kicker,
.letter-date {
    margin: 0 0 14px;
    color: var(--amber);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero .eyebrow {
    color: #f3c98b;
}

h1,
h2,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 18px;
    font-size: clamp(3.8rem, 11vw, 8.8rem);
    line-height: 0.94;
    font-weight: 800;
    letter-spacing: 0;
}

h1 span {
    display: block;
}

.lead {
    margin: 0;
    max-width: 680px;
    color: rgba(255, 255, 255, 0.88);
    font-size: clamp(1.05rem, 2vw, 1.35rem);
}

main {
    position: relative;
}

.intro {
    width: min(920px, calc(100% - 36px));
    margin: 0 auto;
    padding: clamp(58px, 10vw, 110px) 0 clamp(38px, 7vw, 84px);
}

.intro-text {
    margin: 0;
    color: #292721;
    font-size: clamp(1.42rem, 3.2vw, 2.45rem);
    line-height: 1.5;
    font-weight: 650;
}

.timeline-section {
    width: min(1120px, calc(100% - 36px));
    margin: 0 auto clamp(58px, 10vw, 110px);
    padding: clamp(20px, 4vw, 36px) 0 0;
}

.timeline {
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(18px, 3vw, 34px);
}

.timeline::before {
    content: "";
    position: absolute;
    top: 31px;
    left: 8%;
    right: 8%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(64, 107, 88, 0.48), transparent);
}

.timeline-item {
    position: relative;
    padding: 58px clamp(16px, 2vw, 24px) 0;
}

.timeline-dot {
    position: absolute;
    top: 24px;
    left: clamp(16px, 2vw, 24px);
    width: 15px;
    height: 15px;
    border: 2px solid var(--green);
    border-radius: 50%;
    background: var(--paper);
    box-shadow: 0 0 0 8px rgba(64, 107, 88, 0.08);
}

.timeline-step,
.memory-number {
    margin: 0 0 10px;
    color: var(--blue);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.14em;
}

.timeline-item h3,
.memory-copy h3 {
    margin: 0 0 12px;
    font-size: clamp(1.35rem, 2.7vw, 2.2rem);
    line-height: 1.16;
    letter-spacing: 0;
}

.timeline-item p:last-child {
    margin: 0;
    color: var(--muted);
    font-size: 1rem;
}

.person-entry {
    display: block;
    border-radius: 8px;
    transition: transform 220ms ease, background 220ms ease;
}

.person-entry:hover,
.person-entry:focus-visible {
    background: rgba(255, 255, 255, 0.42);
    transform: translateY(-4px);
}

.chapter {
    width: min(1180px, calc(100% - 36px));
    margin: clamp(44px, 8vw, 96px) auto;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.75fr);
    gap: clamp(24px, 5vw, 68px);
    align-items: center;
}

.chapter-right {
    grid-template-columns: minmax(280px, 0.75fr) minmax(0, 1.05fr);
}

.chapter-right .chapter-image {
    order: 2;
}

.chapter-image {
    overflow: hidden;
    border-radius: 8px;
    box-shadow: var(--shadow);
    background: #ddd6c7;
}

.chapter-image picture,
.chapter-image img {
    width: 100%;
    height: clamp(430px, 62vw, 700px);
}

.chapter-image img {
    object-fit: cover;
    transition: transform 700ms ease;
}

.chapter:hover .chapter-image img {
    transform: scale(1.025);
}

.chapter-copy {
    border-left: 1px solid var(--line);
    padding-left: clamp(20px, 3vw, 34px);
}

.chapter-mark {
    display: inline-block;
    margin-bottom: 18px;
    color: var(--blue);
    font-size: 0.9rem;
    font-weight: 800;
}

.chapter h2,
.section-heading h2,
.letter h2 {
    margin-bottom: 18px;
    font-size: clamp(2.1rem, 5vw, 4.8rem);
    line-height: 1.03;
    letter-spacing: 0;
}

.chapter p,
.letter p {
    margin: 0;
    color: var(--muted);
    font-size: clamp(1rem, 1.8vw, 1.18rem);
}

.film-strip {
    margin: clamp(68px, 12vw, 128px) 0;
    padding: 22px 0;
    overflow: hidden;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: #ebe5d8;
}

.strip-track {
    display: flex;
    width: max-content;
    gap: 18px;
    padding: 0 18px;
    animation: drift 44s linear infinite;
}

.strip-track img {
    width: clamp(220px, 25vw, 360px);
    height: clamp(160px, 18vw, 260px);
    object-fit: cover;
    border-radius: 6px;
    box-shadow: 0 12px 30px rgba(35, 31, 25, 0.13);
}

@keyframes drift {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(calc(-50% + 9px));
    }
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: clamp(26px, 5vw, 48px);
    border-bottom: 1px solid var(--line);
    padding-bottom: 20px;
}

.section-heading h2 {
    margin: 0;
}

.section-note {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.moments-section {
    position: relative;
    padding: clamp(66px, 10vw, 118px) 0 clamp(48px, 9vw, 96px);
    background:
        linear-gradient(180deg, rgba(235, 229, 216, 0.58), rgba(247, 244, 237, 0) 18%),
        linear-gradient(90deg, rgba(73, 111, 157, 0.08), transparent 34%, rgba(64, 107, 88, 0.08));
}

.moments-section-top {
    padding-top: clamp(58px, 9vw, 104px);
    border-top: 1px solid rgba(28, 27, 24, 0.08);
}

.moments-heading {
    width: min(980px, calc(100% - 36px));
    margin: 0 auto clamp(46px, 8vw, 86px);
    display: grid;
    grid-template-columns: minmax(220px, 0.9fr) minmax(0, 1.1fr);
    gap: clamp(18px, 5vw, 64px);
    align-items: end;
    border-bottom: 1px solid var(--line);
    padding-bottom: clamp(24px, 4vw, 38px);
}

.moments-heading h2,
.afterglow h2 {
    margin: 0;
    font-size: clamp(2rem, 4.8vw, 4.6rem);
    line-height: 1.05;
    letter-spacing: 0;
}

.moments-heading > p:last-child {
    margin: 0;
    color: var(--muted);
    font-size: clamp(1rem, 1.8vw, 1.16rem);
}

.memory-list {
    width: min(1180px, calc(100% - 36px));
    margin: 0 auto;
}

.memory-card {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(280px, 0.72fr);
    gap: clamp(22px, 5vw, 70px);
    align-items: center;
    margin: 0 0 clamp(52px, 9vw, 110px);
    content-visibility: auto;
    contain-intrinsic-size: 760px;
}

.memory-card:last-child {
    margin-bottom: 0;
}

.memory-right {
    grid-template-columns: minmax(280px, 0.72fr) minmax(0, 0.9fr);
}

.memory-right .memory-image {
    order: 2;
}

.memory-image {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    border-radius: 8px;
    overflow: hidden;
    background: #ddd6c7;
    box-shadow: var(--shadow);
    cursor: pointer;
}

.memory-image::after {
    content: "查看";
    position: absolute;
    right: 14px;
    bottom: 14px;
    padding: 6px 10px;
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.48);
    border-radius: 999px;
    background: rgba(18, 17, 15, 0.42);
    font-size: 0.78rem;
    font-weight: 700;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 200ms ease, transform 200ms ease;
}

.memory-image:hover::after,
.memory-image:focus-visible::after {
    opacity: 1;
    transform: translateY(0);
}

.memory-image picture,
.memory-image img {
    width: 100%;
}

.memory-image img {
    height: clamp(380px, 58vw, 720px);
    object-fit: cover;
    transition: transform 760ms ease, filter 760ms ease;
}

.memory-photo {
    filter: blur(8px) saturate(0.92);
    transform: scale(1.01);
}

.memory-photo.is-loaded {
    filter: none;
    transform: scale(1);
}

.memory-image:hover img,
.memory-image:focus-visible img {
    transform: scale(1.025);
    filter: saturate(1.05) contrast(1.02);
}

.memory-copy {
    position: relative;
    padding: clamp(20px, 3vw, 34px) 0 clamp(20px, 3vw, 34px) clamp(20px, 3vw, 36px);
    border-left: 1px solid var(--line);
}

.memory-copy p {
    margin: 0;
    color: var(--muted);
    font-size: clamp(1rem, 1.8vw, 1.16rem);
}

.memory-tag {
    display: inline-block;
    margin-top: 22px;
    padding: 5px 10px;
    color: var(--green);
    border: 1px solid rgba(64, 107, 88, 0.28);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.42);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.afterglow {
    width: min(1060px, calc(100% - 36px));
    margin: clamp(34px, 8vw, 92px) auto clamp(64px, 10vw, 118px);
    display: grid;
    grid-template-columns: minmax(240px, 0.8fr) minmax(0, 1fr);
    gap: clamp(20px, 5vw, 68px);
    align-items: end;
    padding-top: clamp(28px, 5vw, 48px);
    border-top: 1px solid var(--line);
}

.afterglow p:last-child {
    margin: 0;
    color: var(--muted);
    font-size: clamp(1rem, 1.8vw, 1.18rem);
}

.letter {
    width: min(900px, calc(100% - 36px));
    margin: 0 auto clamp(72px, 12vw, 132px);
    padding: clamp(34px, 6vw, 62px) 0 0;
    border-top: 1px solid var(--line);
}

.letter h2 {
    max-width: 820px;
    color: var(--green);
}

.letter p:last-child {
    max-width: 740px;
}

.page-footer {
    padding: 34px 18px 42px;
    color: var(--muted);
    text-align: center;
    border-top: 1px solid var(--line);
    background: #efe9dd;
}

.page-footer p {
    margin: 0;
    font-size: 0.95rem;
}

.page-footer a {
    color: var(--ink);
    font-weight: 700;
}

.reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 700ms ease, transform 700ms ease;
}

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

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 20;
    display: grid;
    place-items: center;
    padding: 64px clamp(16px, 4vw, 60px);
    background: rgba(18, 17, 15, 0.88);
    opacity: 0;
    pointer-events: none;
    transition: opacity 220ms ease;
}

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

.lightbox-image {
    max-width: min(1100px, 100%);
    max-height: calc(100svh - 150px);
    border-radius: 8px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}

.lightbox-close,
.lightbox-nav {
    position: absolute;
    border: 0;
    color: var(--white);
    background: rgba(255, 255, 255, 0.12);
    cursor: pointer;
    transition: background 160ms ease, transform 160ms ease;
}

.lightbox-close {
    top: 18px;
    right: 18px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 2rem;
    line-height: 1;
}

.lightbox-nav {
    top: 50%;
    width: 48px;
    height: 64px;
    border-radius: 6px;
    font-size: 3rem;
    transform: translateY(-50%);
}

.lightbox-prev {
    left: 18px;
}

.lightbox-next {
    right: 18px;
}

.lightbox-close:hover,
.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-caption {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 20px;
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    text-align: center;
    font-size: 0.95rem;
}

@media (max-width: 920px) {
    .hero {
        min-height: 88svh;
    }

    .topbar {
        height: 64px;
    }

    .chapter,
    .chapter-right {
        grid-template-columns: 1fr;
    }

    .chapter-right .chapter-image {
        order: 0;
    }

    .chapter-image picture,
    .chapter-image img {
        height: min(680px, 86svh);
    }

    .timeline {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .timeline::before {
        top: 0;
        bottom: 0;
        left: 23px;
        right: auto;
        width: 1px;
        height: auto;
        background: linear-gradient(180deg, transparent, rgba(64, 107, 88, 0.48), transparent);
    }

    .timeline-item {
        padding: 14px 0 26px 58px;
    }

    .timeline-dot {
        top: 20px;
        left: 16px;
    }

    .moments-heading,
    .memory-card,
    .memory-right,
    .afterglow {
        grid-template-columns: 1fr;
    }

    .memory-right .memory-image {
        order: 0;
    }

    .memory-image img {
        height: min(700px, 84svh);
    }
}

@media (max-width: 680px) {
    .hero {
        min-height: 86svh;
        padding: 18px 18px 56px;
    }

    .hero-media img {
        object-position: center bottom;
    }

    .topbar {
        padding: 0 18px;
    }

    .brand {
        font-size: 0.92rem;
    }

    .nav-links {
        gap: 12px;
        font-size: 0.8rem;
    }

    h1 {
        font-size: clamp(2.85rem, 15vw, 4.4rem);
    }

    .lead {
        max-width: 21em;
        font-size: 1rem;
    }

    .intro,
    .chapter,
    .letter {
        width: calc(100% - 28px);
    }

    .chapter-copy {
        padding-left: 18px;
    }

    .section-heading {
        display: block;
    }

    .moments-heading,
    .memory-list,
    .afterglow {
        width: calc(100% - 28px);
    }

    .memory-copy {
        padding-left: 18px;
    }

    .lightbox {
        padding: 58px 10px 70px;
    }

    .lightbox-image {
        max-height: calc(100svh - 150px);
    }

    .lightbox-nav {
        width: 40px;
        height: 54px;
        font-size: 2.4rem;
    }

    .lightbox-prev {
        left: 8px;
    }

    .lightbox-next {
        right: 8px;
    }
}

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

@media (max-width: 430px) {

    .chapter-image picture,
    .chapter-image img,
    .memory-image img {
        height: auto;
        max-height: none;
    }

    .strip-track img {
        width: 210px;
        height: 154px;
    }
}

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