:root {
  --harbin-blue-black: #030a12;
  --harbin-blue: #0a1827;
  --harbin-ice: #8fa7c1;
  --harbin-drift: 0px;
  --harbin-scale: 1.025;
}

.harbin-world {
  --world-bg: var(--harbin-blue-black);
  --world-bg-soft: #081522;
  --world-ink: #dce5ee;
  --world-muted: rgb(220 229 238 / 63%);
  --world-faint: rgb(220 229 238 / 58%);
  --world-accent: #9eb8d2;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 75% 24%, rgb(93 127 164 / 7%), transparent 28rem),
    var(--harbin-blue-black);
}

.harbin-header {
  position: absolute;
  inset: 0 0 auto;
  color: rgb(238 244 250 / 62%);
}

.harbin-header .site-mark,
.harbin-header .site-nav a:hover,
.harbin-header .site-nav a:focus-visible {
  color: #f3f6f8;
}

.harbin-opening {
  position: relative;
  height: 138svh;
  background: var(--harbin-blue-black);
}

.harbin-opening__sticky {
  position: sticky;
  top: 0;
  height: 100svh;
  min-height: 35rem;
  overflow: hidden;
  isolation: isolate;
}

.harbin-opening__picture,
.harbin-opening__picture picture,
.harbin-opening__picture img,
.harbin-opening__veil,
.harbin-snow {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.harbin-opening__picture {
  z-index: -4;
  overflow: hidden;
  background: #0c1a2a;
}

.harbin-opening__picture img {
  max-width: none;
  object-fit: cover;
  object-position: center 54%;
  transform: translate3d(0, var(--harbin-drift), 0) scale(var(--harbin-scale));
  will-change: transform;
}

.harbin-opening__picture picture,
.harbin-first-line__picture {
  display: block;
  width: 100%;
  height: 100%;
}

.harbin-opening__veil {
  z-index: -3;
  background:
    linear-gradient(90deg, rgb(2 7 13 / 80%) 0%, rgb(2 7 13 / 42%) 42%, rgb(2 7 13 / 12%) 73%),
    linear-gradient(180deg, rgb(2 7 13 / 48%) 0%, transparent 30%, rgb(2 7 13 / 9%) 56%, rgb(2 7 13 / 85%) 100%);
}

.harbin-opening__veil::after {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 48% 41%, transparent 18%, rgb(1 5 10 / 35%) 100%);
  content: "";
}

.harbin-snow {
  z-index: -2;
  background-image:
    radial-gradient(circle, rgb(239 246 252 / 45%) 0 1px, transparent 1.35px),
    radial-gradient(circle, rgb(239 246 252 / 24%) 0 0.8px, transparent 1.15px);
  background-position: 0 0, 4rem 6rem;
  background-size: 15rem 18rem, 11rem 14rem;
  -webkit-mask-image: linear-gradient(to bottom, black, transparent 74%);
  mask-image: linear-gradient(to bottom, black, transparent 74%);
  opacity: 0.38;
  animation: harbin-snow-drift 22s linear infinite;
}

@keyframes harbin-snow-drift {
  to {
    background-position: 3rem 18rem, 1rem 20rem;
  }
}

.harbin-opening__copy {
  display: grid;
  height: 100%;
  padding-top: clamp(8rem, 18vh, 12rem);
  padding-bottom: clamp(7rem, 17vh, 11rem);
  align-content: end;
}

.harbin-opening__copy .kicker {
  color: rgb(240 246 252 / 66%);
}

.harbin-title {
  max-width: 12ch;
  margin: 0;
  color: #f1f5f8;
  font-family: var(--font-display);
  font-size: clamp(4.3rem, 11vw, 10.5rem);
  font-weight: 400;
  font-optical-sizing: auto;
  line-height: 0.88;
  letter-spacing: -0.055em;
  text-shadow: 0 0.2rem 2.5rem rgb(2 8 14 / 35%);
}

.harbin-title span {
  display: inline-block;
  margin-left: 0.055em;
  color: rgb(235 243 250 / 76%);
  font-size: 0.6em;
  letter-spacing: -0.035em;
}

.harbin-opening__deck {
  margin: clamp(1.7rem, 4vw, 3rem) 0 0;
  color: rgb(239 245 250 / 67%);
  font-family: var(--font-serif);
  font-size: clamp(0.95rem, 1.5vw, 1.15rem);
  line-height: 1.9;
}

.harbin-image-note {
  position: absolute;
  right: var(--page-gutter);
  bottom: max(1.25rem, env(safe-area-inset-bottom));
  margin: 0;
  color: rgb(235 242 248 / 62%);
  font-family: var(--font-mono);
  font-size: 0.5rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.harbin-scroll-cue {
  position: absolute;
  right: var(--page-gutter);
  bottom: 48%;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0;
  color: rgb(239 245 250 / 64%);
  font-family: var(--font-mono);
  font-size: 0.52rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transform: rotate(90deg) translateX(50%);
  transform-origin: right center;
}

.harbin-scroll-cue i {
  width: 3.5rem;
  height: 1px;
  background: rgb(239 245 250 / 33%);
}

.harbin-progress {
  position: absolute;
  z-index: 4;
  right: 0;
  bottom: 0;
  width: 1px;
  height: 100%;
  background: rgb(219 235 248 / 52%);
  transform: scaleY(0);
  transform-origin: bottom;
}

.harbin-first-line {
  position: relative;
  height: 130svh;
}

.harbin-first-line__sticky {
  position: sticky;
  top: 0;
  display: grid;
  height: 100svh;
  min-height: 35rem;
  overflow: hidden;
  place-items: center;
  isolation: isolate;
}

.harbin-first-line__picture {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.harbin-first-line__bg {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 50%;
  filter: brightness(0.62) contrast(0.96) saturate(0.78);
  transform: translate3d(0, var(--harbin-drift), 0) scale(var(--harbin-scale));
  will-change: transform;
}

.harbin-first-line__overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgb(3 10 18 / 60%) 0%, rgb(3 10 18 / 45%) 35%, rgb(3 10 18 / 50%) 65%, rgb(3 10 18 / 70%) 100%),
    radial-gradient(ellipse at center, transparent 20%, rgb(3 10 18 / 40%) 100%);
}

.harbin-first-line blockquote,
.harbin-sequence__copy blockquote {
  position: relative;
  z-index: 1;
  color: rgb(240 246 252 / 88%);
  font-optical-sizing: auto;
  line-height: 1.58;
  letter-spacing: -0.018em;
  text-shadow: 0 0.15rem 2.2rem rgb(0 5 10 / 42%);
}

.harbin-remains {
  padding-bottom: clamp(8rem, 15vw, 14rem);
}

.harbin-markers {
  padding: 0;
  margin: 0;
  list-style: none;
}

.harbin-markers li {
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  padding: clamp(1.7rem, 3.5vw, 2.6rem) 0;
  border-top: 1px solid var(--hairline);
  transition: border-color var(--motion-normal) ease;
}

.harbin-markers li:hover {
  border-top-color: var(--world-accent);
}

.harbin-markers li:hover .harbin-marker__number {
  color: var(--world-accent);
}

.harbin-marker__number {
  padding-top: 0.28rem;
  color: var(--world-faint);
  font-family: var(--font-mono);
  font-size: 0.59rem;
  letter-spacing: 0.12em;
  transition: color var(--motion-normal) ease;
}

.harbin-markers li:last-child {
  border-bottom: 1px solid var(--hairline);
}

/* Number transitions handled above */

.harbin-markers h3 {
  margin: 0;
  color: var(--world-ink);
  font-family: var(--font-serif);
  font-size: clamp(1.2rem, 2.2vw, 1.75rem);
  font-weight: 400;
  font-optical-sizing: auto;
  letter-spacing: 0.01em;
}

.harbin-markers p {
  margin: 0.65rem 0 0;
  color: var(--world-muted);
  font-family: var(--font-serif);
  font-size: 0.9rem;
  line-height: 1.7;
}

.harbin-river-sequence {
  --freeze-opacity: 1;
  --sunset-opacity: 0;
  --freeze-copy-opacity: 1;
  --sunset-copy-opacity: 0;
  --freeze-shift: 0px;
  --sunset-shift: 10px;
  --freeze-scale: 1.035;
  --sunset-scale: 1.055;
  position: relative;
  height: 285svh;
  background: #07111c;
}

.harbin-river-sequence__sticky {
  position: sticky;
  top: 0;
  height: 100svh;
  min-height: 35rem;
  overflow: hidden;
  color: #dbe7f1;
  isolation: isolate;
}

.harbin-sequence__chapter {
  position: absolute;
  inset: 0;
  z-index: -2;
  margin: 0;
  overflow: hidden;
}

.harbin-sequence__chapter picture,
.harbin-sequence__chapter img,
.harbin-sequence__overlay {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.harbin-sequence__chapter img {
  max-width: none;
  object-fit: cover;
  will-change: transform;
}

.harbin-sequence__chapter--freeze {
  opacity: var(--freeze-opacity);
}

.harbin-sequence__chapter--freeze img {
  object-position: 54% 70%;
  filter: brightness(0.82) contrast(0.95) saturate(0.72);
  transform: translate3d(0, var(--freeze-shift), 0) scale(var(--freeze-scale));
}

.harbin-sequence__chapter--sunset {
  opacity: var(--sunset-opacity);
}

.harbin-sequence__chapter--sunset img {
  object-position: center 50%;
  filter: brightness(0.98) contrast(0.92) saturate(0.88);
  transform: translate3d(0, var(--sunset-shift), 0) scale(var(--sunset-scale));
}

.harbin-sequence__overlay {
  z-index: 1;
  pointer-events: none;
}

.harbin-sequence__overlay--freeze {
  background:
    linear-gradient(180deg, rgb(7 17 28 / 35%) 0%, rgb(7 17 28 / 8%) 45%, rgb(7 17 28 / 58%) 100%),
    linear-gradient(90deg, rgb(7 17 28 / 42%) 0%, transparent 52%);
}

.harbin-sequence__overlay--sunset {
  background:
    linear-gradient(180deg, rgb(8 11 15 / 14%) 0%, transparent 42%, rgb(8 11 15 / 32%) 100%),
    radial-gradient(ellipse at 50% 56%, transparent 30%, rgb(8 11 15 / 14%) 100%);
}

.harbin-sequence__caption {
  position: absolute;
  z-index: 2;
  right: var(--page-gutter);
  bottom: max(1.25rem, env(safe-area-inset-bottom));
  color: rgb(239 245 250 / 58%);
  font-family: var(--font-mono);
  font-size: 0.53rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.harbin-sequence__copy {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  align-content: center;
  pointer-events: none;
}

.harbin-sequence__copy--freeze {
  opacity: var(--freeze-copy-opacity);
}

.harbin-sequence__copy--freeze p {
  display: grid;
  gap: 0.9rem;
  max-width: 14ch;
  margin: 0;
  color: rgb(239 245 250 / 84%);
  font-family: var(--font-serif);
  font-size: clamp(2.1rem, 6.6vw, 6.4rem);
  font-optical-sizing: auto;
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -0.045em;
  text-wrap: balance;
  text-shadow: 0 0.2rem 3rem rgb(0 5 10 / 48%);
}

.harbin-sequence__copy--freeze span {
  color: rgb(239 245 250 / 60%);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.harbin-sequence__copy--sunset {
  opacity: var(--sunset-copy-opacity);
}

.harbin-sequence__copy--sunset blockquote {
  max-width: 31ch;
  margin: 0;
  color: rgb(248 241 230 / 89%);
  font-family: var(--font-serif);
  font-size: clamp(1.7rem, 4.1vw, 3.8rem);
  text-shadow: 0 0.15rem 2.4rem rgb(16 9 4 / 54%);
}

.harbin-sequence__chapter,
.harbin-sequence__copy {
  will-change: opacity;
}

.harbin-unfinished {
  min-height: 72svh;
}

.harbin-unfinished .section-heading {
  max-width: 15ch;
}

@media (max-width: 48rem) {
  .harbin-opening {
    height: 120svh;
  }

  .harbin-opening__picture img {
    object-position: 62% 52%;
  }

  .harbin-opening__veil {
    background:
      linear-gradient(180deg, rgb(2 7 13 / 54%) 0%, transparent 27%, rgb(2 7 13 / 18%) 49%, rgb(2 7 13 / 91%) 100%),
      linear-gradient(90deg, rgb(2 7 13 / 32%), transparent);
  }

  .harbin-opening__copy {
    padding-bottom: 7.5rem;
  }

  .harbin-title {
    font-size: clamp(3.8rem, 19vw, 6.2rem);
  }

  .harbin-opening__deck {
    font-size: 0.93rem;
  }

  .harbin-scroll-cue,
  .harbin-image-note {
    display: none;
  }

  .harbin-first-line blockquote,
  .harbin-sequence__copy--sunset blockquote {
    font-size: clamp(1.6rem, 7vw, 2.4rem);
  }

  .harbin-river-sequence {
    height: 250svh;
  }

  .harbin-sequence__chapter--freeze img {
    object-position: 52% 68%;
  }

  .harbin-sequence__copy--freeze p {
    font-size: clamp(2.2rem, 12vw, 4.2rem);
  }

  .harbin-sequence__caption {
    left: var(--page-gutter);
    right: auto;
    font-size: 0.48rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .harbin-opening {
    height: 100svh;
  }

  .harbin-opening__picture img {
    transform: none;
  }

  .harbin-first-line__bg,
  .harbin-sequence__chapter img {
    transform: none;
  }

  .harbin-snow {
    animation: none;
  }

  .harbin-progress,
  .harbin-scroll-cue {
    display: none;
  }
}

.low-power .harbin-opening__picture img,
.low-power .harbin-first-line__bg,
.low-power .harbin-sequence__chapter img,
.low-power .harbin-sequence__chapter,
.low-power .harbin-sequence__copy {
  will-change: auto;
}
