:root {
  --night: #07090b;
  --night-soft: #10151a;
  --ink: #11110f;
  --paper: #f2f0eb;
  --paper-deep: #d8d1c5;
  --warm: #eee8dc;
  --muted: #6f7566;
  --blue-gray: #5f7480;
  --orange: #f0643a;
  --gold: #b58a4a;
  --shadow: 0 30px 90px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  touch-action: manipulation; /* 禁止双击放大，保留双指缩放 */
}

body {
  margin: 0;
  background: var(--night);
  color: var(--warm);
  font-family: "Noto Sans SC", "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

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

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

button {
  font: inherit;
}

.grain {
  display: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem clamp(1rem, 4vw, 3rem);
  background: rgba(7, 9, 11, 0.82);
  border-bottom: 1px solid rgba(238, 232, 220, 0.12);
  backdrop-filter: blur(18px);
}

.brand,
.site-header nav {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.brand {
  color: var(--warm);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-kicker {
  color: var(--orange);
}

.site-header nav a {
  color: rgba(238, 232, 220, 0.72);
  font: 700 0.78rem/1.1 "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.1em;
  text-decoration: none;
  text-transform: uppercase;
}

.site-header nav a:hover {
  color: var(--warm);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(22rem, 1.18fr);
  gap: clamp(2rem, 5vw, 6rem);
  align-items: center;
  min-height: calc(100vh - 4.5rem);
  padding: clamp(2rem, 6vw, 6rem);
  background:
    radial-gradient(circle at 78% 18%, rgba(95, 116, 128, 0.24), transparent 28rem),
    radial-gradient(circle at 20% 86%, rgba(240, 100, 58, 0.16), transparent 26rem),
    linear-gradient(135deg, #050607, var(--night) 52%, #111712);
}

.hero-copy {
  max-width: 44rem;
}

.eyebrow,
.archive-count,
.hero-card-copy p,
.roll-card-copy p,
figcaption {
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow {
  margin: 0 0 1rem;
  color: var(--orange);
  font-size: 0.76rem;
  font-weight: 800;
}

h1,
h2,
h3 {
  margin: 0;
}

h1 {
  max-width: 8ch;
  font-family: Impact, "Archivo Black", "Noto Sans SC", sans-serif;
  font-size: clamp(4.5rem, 11vw, 10rem);
  font-weight: 900;
  line-height: 0.84;
  letter-spacing: -0.03em;
}

h2 {
  max-width: 11ch;
  font-size: clamp(2.4rem, 6vw, 5.5rem);
  font-weight: 800;
  line-height: 0.92;
  letter-spacing: -0.03em;
}

.lede {
  max-width: 34rem;
  margin: 1.5rem 0 0;
  color: rgba(238, 232, 220, 0.76);
  font-size: clamp(1rem, 1.8vw, 1.3rem);
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
}

.primary-link {
  display: inline-flex;
  align-items: center;
  min-height: 3rem;
  padding: 0 1.2rem;
  background: var(--orange);
  color: #170a05;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-decoration: none;
  text-transform: uppercase;
}

.archive-count {
  color: rgba(238, 232, 220, 0.58);
  font-size: 0.72rem;
}

.hero-roll {
  min-width: 0;
}

.roll-stage {
  display: grid;
  isolation: isolate;
  min-height: min(70vh, 46rem);
}

.hero-card {
  position: relative;
  grid-area: 1 / 1;
  overflow: hidden;
  min-height: min(70vh, 46rem);
  border: 1px solid rgba(238, 232, 220, 0.18);
  background: var(--night-soft);
  box-shadow: var(--shadow);
  transform-origin: center;
  will-change: opacity, transform, filter;
}

.hero-card.is-entering {
  z-index: 2;
  animation: heroCardIn 680ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero-card.is-leaving {
  z-index: 1;
  pointer-events: none;
  animation: heroCardOut 620ms cubic-bezier(0.4, 0, 0.2, 1) both;
}

.hero-card.from-next {
  --hero-enter-x: 1.6rem;
}

.hero-card.from-prev {
  --hero-enter-x: -1.6rem;
}

.hero-card.to-prev {
  --hero-exit-x: -1.1rem;
}

.hero-card.to-next {
  --hero-exit-x: 1.1rem;
}

.hero-card::before,
.hero-card::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  z-index: 2;
  height: 0.8rem;
  background: repeating-linear-gradient(
    90deg,
    rgba(238, 232, 220, 0.16) 0 0.7rem,
    transparent 0.7rem 1.5rem
  );
}

.hero-card::before {
  top: 0;
}

.hero-card::after {
  bottom: 0;
}

.hero-card img {
  width: 100%;
  height: min(70vh, 46rem);
  object-fit: cover;
  filter: contrast(1.04) saturate(0.9);
  transform-origin: center;
}

.hero-card.is-entering img {
  animation: heroImageIn 780ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero-card.is-entering .hero-card-copy {
  animation: heroCopyIn 560ms cubic-bezier(0.22, 1, 0.36, 1) 90ms both;
}

.hero-card-copy {
  position: absolute;
  inset: auto 1.2rem 1.2rem 1.2rem;
  z-index: 3;
  padding: 1rem;
  color: var(--warm);
  background: linear-gradient(90deg, rgba(7, 9, 11, 0.88), rgba(7, 9, 11, 0.35));
  border-left: 3px solid var(--orange);
}

.hero-card-copy p,
.hero-card-copy span {
  margin: 0;
  color: rgba(238, 232, 220, 0.72);
  font-size: 0.74rem;
}

.hero-card-copy h2 {
  max-width: none;
  margin: 0.25rem 0;
  color: var(--warm);
  font-size: clamp(2.5rem, 7vw, 6rem);
  text-transform: uppercase;
}

.roll-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
  width: 100%;
  min-width: 0;
}

.roll-controls button,
.place-filters button {
  border: 1px solid currentColor;
  background: transparent;
  cursor: pointer;
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.roll-controls button {
  padding: 0.7rem 0.9rem;
  color: rgba(238, 232, 220, 0.7);
  min-width: 0;
}

.roll-controls button:hover {
  color: var(--warm);
}

.roll-dots {
  display: flex;
  flex: 1;
  justify-content: center;
  gap: 0.5rem;
  min-width: 0;
}

.roll-dots span {
  width: 1.6rem;
  height: 0.35rem;
  background: rgba(238, 232, 220, 0.24);
  transition:
    background 220ms ease,
    transform 220ms ease,
    width 220ms ease;
}

.roll-dots span.active {
  width: 2.2rem;
  background: var(--orange);
  transform: translateY(-0.08rem);
}

@keyframes heroCardIn {
  from {
    opacity: 0;
    filter: blur(10px);
    transform: translateX(var(--hero-enter-x, 0)) translateY(0.6rem) scale(0.985);
  }

  62% {
    filter: blur(0);
  }

  to {
    opacity: 1;
    filter: blur(0);
    transform: translateX(0) translateY(0) scale(1);
  }
}

@keyframes heroCardOut {
  from {
    opacity: 1;
    filter: blur(0);
    transform: translateX(0) scale(1);
  }

  to {
    opacity: 0;
    filter: blur(8px);
    transform: translateX(var(--hero-exit-x, 0)) scale(0.99);
  }
}

@keyframes heroImageIn {
  from {
    opacity: 0.86;
    transform: scale(1.045);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes heroCopyIn {
  from {
    opacity: 0;
    transform: translateX(-0.75rem);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.places-section,
.contact-sheet,
.about {
  background: var(--paper);
  color: var(--ink);
  padding: clamp(4rem, 8vw, 8rem) clamp(1rem, 5vw, 5rem);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2rem;
}

.places-section .eyebrow,
.contact-sheet .eyebrow,
.about .eyebrow {
  color: var(--muted);
}

.place-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-bottom: clamp(2rem, 5vw, 4rem);
}

.place-filters button {
  padding: 0.75rem 0.95rem;
  color: var(--muted);
}

.place-filters button.active,
.place-filters button:hover {
  color: var(--ink);
  background: var(--paper-deep);
}

.roll-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(2rem, 5vw, 5rem);
}

.roll-card {
  min-width: 0;
}

.roll-cover {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  color: inherit;
  text-decoration: none;
}

.roll-cover img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  filter: saturate(0.94);
  transition:
    filter 220ms ease,
    transform 220ms ease;
}

.roll-cover:hover img {
  filter: saturate(1.04) contrast(1.03);
  transform: translateY(-0.25rem);
}

.roll-card-copy {
  padding-top: 1rem;
}

.roll-card-copy p {
  margin: 0 0 0.45rem;
  color: var(--muted);
  font-size: 0.72rem;
}

.roll-card-copy h3 {
  font-size: clamp(1.7rem, 3vw, 3rem);
  line-height: 1;
  letter-spacing: -0.03em;
}

.roll-card-copy span,
.roll-card-copy a {
  display: block;
  max-width: 34rem;
  margin-top: 0.7rem;
  color: rgba(17, 17, 15, 0.68);
  line-height: 1.75;
  text-decoration: none;
}

.roll-card-copy a:hover {
  color: var(--ink);
}

.roll-card-copy h3 a {
  display: inline;
  margin: 0;
  color: var(--ink);
  line-height: inherit;
}

.sheet-grid {
  columns: 3 18rem;
  column-gap: 1.2rem;
}

.sheet-frame {
  break-inside: avoid;
  margin: 0 0 1.2rem;
}

.sheet-frame button {
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.sheet-frame img {
  width: 100%;
  height: auto;
}

figcaption {
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.68rem;
}

.about {
  border-top: 1px solid var(--paper-deep);
}

.about h2 {
  max-width: 13ch;
}

.about p:not(.eyebrow) {
  max-width: 48rem;
  margin: 1.4rem 0 0;
  color: rgba(17, 17, 15, 0.68);
  font-size: 1.05rem;
  line-height: 1.9;
}

.roll-detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(22rem, 1.2fr);
  gap: clamp(2rem, 5vw, 5.5rem);
  align-items: end;
  position: relative;
  isolation: isolate;
  min-height: calc(100vh - 4.5rem);
  padding: clamp(2rem, 6vw, 6rem);
  background:
    radial-gradient(circle at 80% 10%, rgba(240, 100, 58, 0.2), transparent 24rem),
    linear-gradient(135deg, #050607, var(--night) 54%, #121713);
}

.roll-detail-copy {
  position: relative;
  z-index: 2;
  max-width: 46rem;
}

.roll-detail-copy h1 {
  max-width: 9ch;
}

.back-link {
  display: inline-flex;
  margin-bottom: 1.5rem;
  color: rgba(238, 232, 220, 0.7);
  font: 800 0.74rem/1.1 "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.12em;
  text-decoration: none;
  text-transform: uppercase;
}

.back-link:hover {
  color: var(--orange);
}

.keyword-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 2rem;
}

.keyword-strip span {
  padding: 0.65rem 0.8rem;
  border: 1px solid rgba(238, 232, 220, 0.28);
  color: rgba(238, 232, 220, 0.78);
  font: 800 0.75rem/1 "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.08em;
}

.roll-detail-cover {
  position: relative;
  z-index: 1;
  margin: 0;
}

.roll-detail-cover img {
  width: 100%;
  max-height: min(72vh, 48rem);
  object-fit: cover;
  border: 1px solid rgba(238, 232, 220, 0.18);
  box-shadow: var(--shadow);
  filter: contrast(1.04) saturate(0.92);
}

.roll-detail-cover figcaption {
  color: rgba(238, 232, 220, 0.58);
}

.roll-frame-section {
  padding-top: clamp(4rem, 8vw, 7rem);
}

.lightbox {
  width: min(92vw, 72rem);
  max-height: 92vh;
  border: 0;
  padding: 1rem;
  background: #050607;
  color: var(--warm);
  box-shadow: var(--shadow);
}

.lightbox::backdrop {
  background: rgba(0, 0, 0, 0.82);
}

.lightbox img {
  width: 100%;
  max-height: 76vh;
  object-fit: contain;
}

.lightbox p {
  margin: 0.8rem 3rem 0;
  color: rgba(238, 232, 220, 0.74);
  text-align: center;
}

.close-lightbox,
.lightbox-nav {
  position: absolute;
  z-index: 2;
  border: 1px solid rgba(238, 232, 220, 0.3);
  background: rgba(7, 9, 11, 0.78);
  color: var(--warm);
  cursor: pointer;
}

.close-lightbox {
  top: 0.8rem;
  right: 0.8rem;
  width: 2.4rem;
  height: 2.4rem;
  font-size: 1.5rem;
}

.lightbox-nav {
  top: 50%;
  width: 2.8rem;
  height: 3.8rem;
  transform: translateY(-50%);
  font-size: 2rem;
}

.lightbox-prev {
  left: 0.8rem;
}

.lightbox-next {
  right: 0.8rem;
}

@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .roll-detail-hero {
    grid-template-columns: 1fr;
  }

  .roll-stage,
  .hero-card,
  .hero-card img {
    min-height: auto;
    height: auto;
  }

  .hero-card img {
    aspect-ratio: 4 / 3;
  }

  .section-heading {
    display: block;
  }

}

@media (max-width: 820px) {
  .site-header {
    position: static;
    align-items: flex-start;
    flex-direction: column;
  }

  .site-header nav {
    flex-wrap: wrap;
  }

  .hero {
    padding: 2rem 1rem 3rem;
  }

  .roll-controls {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem;
  }

  .roll-controls button {
    width: 100%;
    padding: 0.75rem 0.7rem;
  }

  .roll-dots {
    grid-column: 1 / -1;
    order: -1;
    justify-content: stretch;
    gap: 0.35rem;
  }

  .roll-dots span {
    flex: 1 1 0;
    width: auto;
    min-width: 0.45rem;
  }

  .roll-dots span.active {
    width: auto;
    flex-grow: 1.65;
  }

  h1 {
    font-size: clamp(4rem, 18vw, 6rem);
  }

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

  .places-section,
  .contact-sheet,
  .about {
    padding: 4rem 1rem;
  }

  .roll-detail-hero {
    padding: 2rem 1rem 3rem;
  }

  .hero-card-copy {
    display: grid;
    grid-template-rows: auto minmax(2.05em, 1fr) auto;
    position: static;
    min-height: 12.5rem;
    border-left: 0;
    border-top: 3px solid var(--orange);
  }

  .hero-card-copy h2 {
    display: flex;
    align-items: flex-start;
    min-height: 2.05em;
    font-size: clamp(3.2rem, 13vw, 4.9rem);
    line-height: 0.94;
  }
}

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

  .hero-card.is-entering,
  .hero-card.is-leaving,
  .hero-card.is-entering img,
  .hero-card.is-entering .hero-card-copy {
    animation: none;
  }

  .roll-cover img,
  .roll-dots span {
    transition: none;
  }
}

.sheet-sentinel {
  height: 1px;
  width: 100%;
}
