/* Home page: scroll narrative (hero, pinned eight-station pipeline, photo strip, recent posts).
   Plain CSS on purpose. It uses clamp(), min(), color-mix() and custom properties, which the
   Sass version on GitHub Pages cannot parse, so it must not be moved into style.scss.
   Palette: Morandi, oat paper with grey-green. The values mirror _sass/_variables.scss. */

body.home-page {
  --paper: #E9E5DE;
  --ink: #3B3835;
  --muted: #5E5750;
  --rule: #D0C9BF;
  --accent: #4E6857;
  --on-accent: #fff;
  --wash: 22%;
  --line-mix: 55%;
  --hue: #94A596;
  --gutter: clamp(20px, 5vw, 72px);
}

[data-theme=dark] body.home-page {
  --paper: #2A2927;
  --ink: #E4DFD8;
  --muted: #B4ACA4;
  --rule: #403D39;
  --accent: #A9C0B0;
  --on-accent: #2A2927;
  --wash: 16%;
  --line-mix: 70%;
}

.home-page .text-link {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
  transition: color 0.2s;
}
.home-page .text-link:hover, .home-page .text-link:active {
  color: var(--accent);
}
.home-page h1, .home-page h2, .home-page h3 {
  color: var(--ink);
}
.home-page .hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 96px var(--gutter) 72px;
}
.home-page .hero-inner {
  max-width: 1180px;
  transform: translateY(calc(var(--h, 0) * -6vh));
  opacity: calc(1 - var(--h, 0) * 1.25);
}
.home-page .hero-name {
  margin: 0 0 clamp(16px, 3vh, 28px);
  color: var(--muted);
  font-size: 17px;
}
.home-page .hero h1 {
  margin: 0;
  padding: 0;
  font-family: "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", "STSong", Georgia, serif;
  font-weight: 700;
  font-size: clamp(38px, 7.2vw, 108px);
  line-height: 1.12;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.home-page .hero-lede {
  margin: clamp(22px, 4vh, 40px) 0 0;
  max-width: 34em;
  color: var(--muted);
  font-size: clamp(17px, 1.5vw, 20px);
  line-height: 1.7;
}
.home-page .hero-lede em {
  font-style: italic;
  color: var(--ink);
}
.home-page .hero-actions {
  margin-top: clamp(24px, 4vh, 40px);
  display: flex;
  flex-wrap: wrap;
  gap: 14px 28px;
  align-items: center;
}
.home-page .btn {
  display: inline-block;
  padding: 11px 24px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  font-size: 16px;
  line-height: 1.5;
  transition: background-color 0.2s, color 0.2s;
}
.home-page .btn:hover, .home-page .btn:active {
  background: var(--accent);
  color: var(--on-accent);
}
.home-page .line {
  padding: 0 var(--gutter);
}
.home-page .line-head {
  max-width: 1180px;
  padding: 72px 0 8px;
}
.home-page .line-head h2,
.home-page .road-head h2,
.home-page .recent h2 {
  margin: 0;
  padding: 0;
  font-family: "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", "STSong", Georgia, serif;
  font-weight: 700;
  font-size: clamp(26px, 3.4vw, 44px);
  line-height: 1.2;
  text-wrap: balance;
}
.home-page .line-head p,
.home-page .road-head p {
  margin: 10px 0 0;
  color: var(--muted);
  max-width: 36em;
}
.home-page .stage {
  --tone: color-mix(in srgb, var(--hue) 45%, var(--ink));
  display: grid;
  gap: 24px;
  align-items: center;
  margin-top: 16px;
  padding: 40px clamp(16px, 3vw, 36px);
  border-radius: 18px;
  background: color-mix(in srgb, var(--hue) var(--wash), var(--paper));
}
@media (min-width: 860px) {
  .home-page .stage {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 48px;
  }
}
.home-page .stage-num {
  margin: 0;
  font-family: "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", "STSong", Georgia, serif;
  font-weight: 700;
  font-size: clamp(56px, 9vw, 132px);
  line-height: 0.9;
  color: var(--tone);
  font-variant-numeric: lining-nums;
}
.home-page .stage-name {
  margin: 6px 0 0;
  padding: 0;
  font-family: "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", "STSong", Georgia, serif;
  font-weight: 700;
  font-size: clamp(26px, 3.2vw, 44px);
  line-height: 1.2;
}
.home-page .stage-q {
  margin: 12px 0 18px;
  max-width: 22em;
  color: var(--muted);
  font-size: clamp(17px, 1.45vw, 20px);
  line-height: 1.6;
}
.home-page .stage-fig {
  display: block;
  background: #FAF9F5;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--ink) 14%, transparent);
}
.home-page .stage-fig img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0;
}
.home-page .curve-band {
  display: none;
}
.home-page .line.is-pinned {
  height: 620vh;
  padding: 0;
}
.home-page .line.is-pinned .pin {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  padding: 68px var(--gutter) 18px;
  background: color-mix(in srgb, var(--hue) var(--wash), var(--paper));
  transition: background-color 0.5s ease;
}
.home-page .line.is-pinned .line-head {
  padding: 8px 0 0;
}
.home-page .line.is-pinned .line-head h2 {
  font-size: clamp(20px, 2vw, 26px);
}
.home-page .line.is-pinned .line-head p {
  display: none;
}
.home-page .line.is-pinned .stages {
  position: relative;
  min-height: 0;
}
.home-page .line.is-pinned .stage {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  margin: 0;
  padding: 0;
  border-radius: 0;
  background: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  transition: opacity 0.28s ease, transform 0.28s ease, visibility 0s linear 0.28s;
}
.home-page .line.is-pinned .stage.is-active {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition-delay: 0s;
}
.home-page .line.is-pinned .stage-fig {
  max-height: 100%;
  display: flex;
  align-items: center;
}
.home-page .line.is-pinned .stage-fig img {
  max-height: min(54vh, 520px);
  object-fit: contain;
}
.home-page .line.is-pinned .curve-band {
  --stroke: color-mix(in srgb, var(--hue) var(--line-mix), var(--ink));
  display: block;
  position: relative;
  padding-top: 6px;
}
.home-page .curve {
  position: relative;
  height: clamp(64px, 13vh, 120px);
}
.home-page .curve svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.home-page .curve path {
  fill: none;
  vector-effect: non-scaling-stroke;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.home-page .curve .track {
  stroke: color-mix(in srgb, var(--ink) 16%, transparent);
  stroke-width: 2;
}
.home-page .curve .drawn {
  stroke: var(--stroke);
  stroke-width: 3;
  stroke-dasharray: 1;
  stroke-dashoffset: calc(1 - var(--p, 0));
  transition: stroke 0.5s ease;
}
.home-page .curve .dot {
  position: absolute;
  left: calc(var(--dx, 0) * 100%);
  top: calc(var(--dy, 0) * 100%);
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border-radius: 50%;
  background: var(--stroke);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--stroke) 24%, transparent);
  transition: background-color 0.5s ease;
}
.home-page .curve-label {
  position: absolute;
  left: 0;
  top: -2px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--muted);
}
.home-page .ticks {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  margin-top: 4px;
}
.home-page .tick {
  display: flex;
  gap: 8px;
  align-items: baseline;
  padding: 8px 4px 0;
  font-family: inherit;
  line-height: 1.4;
  text-align: left;
  color: var(--muted);
  background: none;
  border: 0;
  border-top: 2px solid color-mix(in srgb, var(--ink) 16%, transparent);
  cursor: pointer;
}
.home-page .tick:hover {
  color: var(--ink);
}
.home-page .tick.is-done {
  border-top-color: var(--stroke);
}
.home-page .tick.is-active {
  color: var(--ink);
  border-top-color: var(--ink);
}
.home-page .tick-n {
  font-family: "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", "STSong", Georgia, serif;
  font-weight: 700;
  font-size: 15px;
}
.home-page .tick-name {
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (max-width: 1080px) {
  .home-page .tick-name {
    display: none;
  }
}
.home-page .road {
  padding: clamp(72px, 12vh, 140px) 0 0;
}
.home-page .road-head {
  max-width: calc(1180px + 2 * var(--gutter));
  padding: 0 var(--gutter);
}
.home-page .chips {
  display: flex;
  height: 10px;
  max-width: 420px;
  margin-top: 22px;
  border-radius: 999px;
  overflow: hidden;
}
.home-page .chips span {
  flex: 1;
  background: var(--c);
}
.home-page .strip {
  display: flex;
  gap: clamp(16px, 2vw, 28px);
  margin-top: 36px;
  padding: 4px var(--gutter) 28px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scroll-padding-left: var(--gutter);
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--rule) transparent;
  cursor: grab;
}
.home-page .strip.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
  scroll-behavior: auto;
  user-select: none;
}
.home-page .shot {
  flex: 0 0 auto;
  display: grid;
  width: min(78vw, 560px);
  scroll-snap-align: start;
  color: var(--ink);
}
.home-page .shot img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 14px;
  background: var(--rule);
}
.home-page .shot:hover .shot-place {
  color: var(--accent);
}
.home-page .shot-place {
  margin-top: 14px;
  font-family: "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", "STSong", Georgia, serif;
  font-weight: 700;
  font-size: clamp(22px, 2.2vw, 30px);
  line-height: 1.2;
  transition: color 0.2s;
}
.home-page .shot-meta {
  color: var(--muted);
  font-size: 15px;
}
.home-page .road-foot {
  margin: 0;
  padding: 4px var(--gutter) 0;
  font-size: 15px;
}
.home-page .recent {
  max-width: calc(1180px + 2 * var(--gutter));
  padding: clamp(72px, 12vh, 140px) var(--gutter) 96px;
}
.home-page .recent ul {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  border-top: 1px solid var(--rule);
}
.home-page .recent li {
  margin: 0;
}
.home-page .recent li:before {
  content: none;
}
.home-page .recent-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 24px;
}
.home-page .row {
  display: grid;
  grid-template-columns: 7.2em minmax(0, 1fr) auto;
  gap: 8px 24px;
  align-items: baseline;
  padding: 18px 0;
  border-bottom: 1px solid var(--rule);
  color: var(--ink);
}
.home-page .row time,
.home-page .row .row-tags {
  color: var(--muted);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}
.home-page .row:hover .row-title {
  color: var(--accent);
}
@media (max-width: 720px) {
  .home-page .row {
    grid-template-columns: 1fr;
    gap: 2px;
  }
  .home-page .row .row-tags {
    display: none;
  }
}
.home-page .row-title {
  font-size: clamp(18px, 1.6vw, 21px);
  font-weight: 600;
  line-height: 1.45;
  transition: color 0.2s;
}

@media (prefers-reduced-motion: reduce) {
  .home-page .hero-inner {
    transform: none;
    opacity: 1;
  }
  .home-page * {
    transition-duration: 0s !important;
  }
}
@supports not (background: color-mix(in srgb, red 50%, blue)) {
  .home-page .stage,
  .home-page .line.is-pinned .pin {
    background: #DFDAD1;
  }
  .home-page .line.is-pinned .stage {
    background: none;
  }
  .home-page .stage-num {
    color: #4E6857;
  }
  .home-page .curve .track,
  .home-page .tick {
    stroke: #D0C9BF;
    border-top-color: #D0C9BF;
  }
  .home-page .curve .drawn {
    stroke: #4E6857;
  }
  .home-page .curve .dot {
    background: #4E6857;
  }
}