/* Factory journal. Scoped under .nj-journal so snapshot CSS does not leak. */

html:has(.nj-journal) {
  scroll-behavior: smooth;
}

.nj-journal {
  --hc-navy: #123a5e;
  --hc-navy-deep: #0b1c2e;
  --hc-gold: #c2a06a;
  --hc-gold-soft: #d4b98a;
  --hc-cream: #f4efe6;
  --hc-paper: #fbf8f3;
  --hc-ink: #1c2430;
  --hc-mute: #5c6570;
  --hc-line: rgba(18, 58, 94, 0.12);
  --hc-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --hc-max: 1180px;
  color: var(--hc-ink);
  background: var(--hc-paper);
  overflow-x: clip;
}

.nj-journal *,
.nj-journal *::before,
.nj-journal *::after {
  box-sizing: border-box;
}

.nj-journal a {
  color: inherit;
  text-decoration: none;
}

.nj-wrap {
  width: min(var(--hc-max), calc(100% - 48px));
  margin-inline: auto;
}

.nj-wrap--article {
  width: min(680px, calc(100% - 48px));
}

.nj-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: var(--hc-gold);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-family: Montserrat-SemiBold, sans-serif;
  font-size: 0.72rem;
  /* kicker 现在也可能是 H1（news 列表页）；H1 自带加粗，这里压回正常以免变粗。 */
  font-weight: 400;
}

.nj-kicker::before {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
  transform-origin: left center;
}

.nj-journal.is-motion .nj-kicker::before {
  animation: nj-kicker-draw 1.1s var(--hc-ease) both;
}

@keyframes nj-kicker-draw {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

.nj-btn {
  --btn-bg: transparent;
  --btn-fg: #fff;
  --btn-bd: rgba(255, 255, 255, 0.4);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 22px;
  border: 1px solid var(--btn-bd);
  border-radius: 0;
  background: var(--btn-bg);
  color: var(--btn-fg);
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  font-family: Montserrat-SemiBold, sans-serif;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
  transition:
    transform 0.55s var(--hc-ease),
    box-shadow 0.55s var(--hc-ease),
    border-color 0.55s var(--hc-ease),
    color 0.55s var(--hc-ease),
    background-color 0.55s var(--hc-ease);
}

.nj-btn svg {
  width: 16px;
  height: 16px;
  transition: transform 0.45s var(--hc-ease);
}

.nj-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(11, 28, 46, 0.18);
}

.nj-btn:hover svg {
  transform: translateX(4px);
}

.nj-btn:active {
  transform: translateY(0) scale(0.98);
}

.nj-journal :focus-visible {
  outline: 2px solid var(--hc-gold);
  outline-offset: 2px;
}

.nj-btn--gold {
  --btn-bg: var(--hc-gold);
  --btn-fg: var(--hc-navy-deep);
  --btn-bd: var(--hc-gold);
}

.nj-btn--gold:hover {
  background: #d8b57c;
}

.nj-btn--light {
  --btn-bg: transparent;
  --btn-fg: #fff;
  --btn-bd: transparent;
  padding-inline: 4px;
  min-height: 44px;
  box-shadow: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
}

.nj-btn--light:hover {
  transform: none;
  box-shadow: none;
  border-bottom-color: var(--hc-gold);
}

.nj-btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--hc-navy);
  --btn-bd: rgba(18, 58, 94, 0.22);
}

.nj-btn--ghost:hover {
  background: rgba(18, 58, 94, 0.06);
  border-color: var(--hc-navy);
}

[data-reveal] {
  opacity: 1;
  transform: none;
  filter: none;
}

.nj-journal.is-motion [data-reveal] {
  opacity: 0;
  transform: translate3d(0, 24px, 0);
  filter: blur(6px);
  transition:
    opacity 0.9s var(--hc-ease),
    transform 0.9s var(--hc-ease),
    filter 0.9s var(--hc-ease);
}

.nj-journal.is-motion [data-reveal].is-in {
  opacity: 1;
  transform: none;
  filter: none;
}

[data-delay="1"] { transition-delay: 80ms; }
[data-delay="2"] { transition-delay: 140ms; }
[data-delay="3"] { transition-delay: 200ms; }

.nj-hero {
  position: relative;
  min-height: max(720px, calc(100svh - 88px));
  display: flex;
  color: #fff;
  background: var(--hc-navy-deep);
  overflow: hidden;
}

.nj-hero--empty {
  min-height: 560px;
}

.nj-hero--pending {
  min-height: max(560px, 70svh);
  background: var(--hc-navy-deep);
}

.nj-pending-line {
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.78);
}

.nj-pending-line--title {
  font-family: Montserrat-SemiBold, sans-serif;
  font-size: clamp(2rem, 4vw, 3.2rem);
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.nj-pending-line--dek {
  max-width: 22rem;
  color: rgba(255, 255, 255, 0.48);
}

.nj-hero__media,
.nj-hero__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nj-hero__media img {
  transform: scale(1.04);
}

.nj-journal.is-motion .nj-hero__media img {
  animation: nj-ken 22s linear infinite alternate;
}

@keyframes nj-ken {
  from { transform: scale(1); }
  to { transform: scale(1.12); }
}

.nj-hero__shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(11, 28, 46, 0.82) 0%, rgba(11, 28, 46, 0.58) 30%, rgba(11, 28, 46, 0.22) 54%, rgba(11, 28, 46, 0.08) 100%),
    linear-gradient(180deg, rgba(11, 28, 46, 0.14) 0%, rgba(11, 28, 46, 0.42) 100%);
}

.nj-hero__copy {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  width: 100%;
  min-height: max(720px, calc(100svh - 88px));
  padding: 140px 0 88px;
}

.nj-hero--empty .nj-hero__copy {
  min-height: 560px;
  justify-content: center;
}

/* 标题样式按类名而非 h1 标签：H1 已改为稳定的期刊名（kicker），featured 文章标题降为 h2，
   两者都要不受标签默认字号影响。 */
.nj-hero__headline {
  margin: 18px 0 0;
  max-width: min(22ch, 100%);
  font-family: Montserrat-SemiBold, sans-serif;
  font-size: clamp(2.2rem, 4.6vw, 4rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.nj-hero__headline a:hover {
  color: var(--hc-gold-soft);
}

.nj-hero__dek {
  margin: 16px 0 0;
  max-width: 38rem;
  color: #f6f1e8;
  font-family: Montserrat-Regular, sans-serif;
  font-size: 1.05rem;
  line-height: 1.65;
  text-shadow: 0 1px 2px rgba(11, 28, 46, 0.78);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.nj-hero__meta {
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}

.nj-hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  margin-top: 32px;
}

.nj-tools-sentinel {
  height: 1px;
}

.nj-tools {
  position: sticky;
  top: 76px;
  z-index: 20;
  height: 64px;
  background: var(--hc-cream);
  border-bottom: 1px solid transparent;
  transition: background 0.24s var(--hc-ease), border-color 0.24s var(--hc-ease), backdrop-filter 0.24s var(--hc-ease);
}

.nj-tools.is-stuck {
  background: rgba(244, 239, 230, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: var(--hc-line);
}

.nj-tools__inner {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nj-filters {
  display: flex;
  align-items: center;
  gap: 28px;
  min-width: 0;
}

.nj-filter {
  position: relative;
  padding: 8px 0;
  border: 0;
  background: none;
  color: var(--hc-navy);
  font-family: Montserrat-Medium, sans-serif;
  font-size: 14px;
  letter-spacing: 0.02em;
  cursor: pointer;
}

.nj-filter::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--hc-gold);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.28s var(--hc-ease);
}

.nj-filter.is-current::after,
.nj-filter:hover::after {
  transform: scaleX(1);
}

.nj-tools__meta {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--hc-mute);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.nj-search {
  position: relative;
  display: flex;
  align-items: center;
}

.nj-search-btn {
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  color: var(--hc-navy);
  cursor: pointer;
  display: grid;
  place-items: center;
}

.nj-search-btn svg {
  width: 18px;
  height: 18px;
}

.nj-search-input {
  width: 0;
  height: 40px;
  border: 0;
  border-bottom: 1px solid transparent;
  background: transparent;
  color: var(--hc-ink);
  font-family: Montserrat-Regular, sans-serif;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: width 0.22s var(--hc-ease), opacity 0.22s var(--hc-ease), border-color 0.22s var(--hc-ease);
}

.nj-search.is-open .nj-search-input {
  width: 220px;
  opacity: 1;
  pointer-events: auto;
  border-bottom-color: var(--hc-line);
}

.nj-search-input:focus {
  outline: none;
  border-bottom-color: var(--hc-gold);
}

.nj-board {
  padding: 72px 0 48px;
}

.nj-empty-grid {
  margin: 0 0 40px;
  color: var(--hc-mute);
  font-size: 1rem;
}

.nj-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px 32px;
}

.nj-card {
  display: block;
  color: inherit;
  min-width: 0;
}

/* 折叠态：卡片仍在 DOM 里（链接可被爬虫发现），只是不占版面。 */
.nj-card.is-collapsed {
  display: none;
}

.nj-card__media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--hc-navy-deep);
}

.nj-card__media::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 0;
  background: var(--hc-gold);
  transition: height 0.45s var(--hc-ease);
}

.nj-card:hover .nj-card__media::after {
  height: 3px;
}

.nj-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 1.2s var(--hc-ease);
}

.nj-card:hover .nj-card__media img {
  transform: scale(1.035);
}

.nj-card__blank {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: var(--hc-navy-deep);
}

.nj-card__blank::after {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--hc-gold);
}

.nj-card__body {
  padding: 20px 2px 0;
}

.nj-card__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 10px;
  color: var(--hc-mute);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}

.nj-card__index {
  color: var(--hc-gold);
  letter-spacing: 0.18em;
  font-family: Montserrat-SemiBold, sans-serif;
}

.nj-card:hover .nj-card__meta {
  color: var(--hc-navy);
}

.nj-card__title {
  margin: 0;
  font-family: Montserrat-SemiBold, sans-serif;
  font-size: 1.35rem;
  line-height: 1.28;
  letter-spacing: -0.025em;
  color: var(--hc-navy);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.nj-card__title span {
  background-image: linear-gradient(var(--hc-gold), var(--hc-gold));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0 1px;
  transition: background-size 0.45s var(--hc-ease);
}

.nj-card:hover .nj-card__title span {
  background-size: 100% 1px;
}

.nj-card__excerpt {
  margin: 12px 0 0;
  color: var(--hc-mute);
  font-size: 15px;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.nj-more {
  display: flex;
  justify-content: center;
  padding: 8px 0 72px;
}

.nj-cta {
  padding: 88px 0;
  background: var(--hc-navy-deep);
  color: #fff;
}

.nj-cta .nj-kicker {
  margin-bottom: 14px;
}

.nj-cta h2 {
  margin: 0 0 14px;
  max-width: 18ch;
  font-family: Montserrat-SemiBold, sans-serif;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.nj-cta p {
  margin: 0 0 28px;
  max-width: 36rem;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.7;
}

.nj-cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.nj-progress {
  position: sticky;
  top: 76px;
  z-index: 21;
  height: 2px;
  background: transparent;
}

.nj-progress span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--hc-gold);
}

.nj-head {
  background: var(--hc-cream);
  padding: 128px 0 48px;
}

.nj-crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 28px;
  color: var(--hc-mute);
  font-size: 13px;
}

.nj-crumbs a:hover {
  color: var(--hc-navy);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.nj-head .nj-kicker {
  color: var(--hc-gold);
}

.nj-article-h1 {
  margin: 12px 0 0;
  max-width: min(22ch, 100%);
  font-family: Montserrat-SemiBold, sans-serif;
  font-size: clamp(36px, 4vw, 56px);
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: var(--hc-navy);
}

.news-dek {
  margin: 20px 0 0;
  max-width: 42rem;
  color: var(--hc-mute);
  font-size: 20px;
  line-height: 1.6;
}

.news-brief {
  margin: 28px 0 0;
  padding-inline-start: 16px;
  border-inline-start: 2px solid var(--hc-gold);
}

.news-brief h2 {
  margin: 0 0 10px;
  font-family: Montserrat-SemiBold, sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--hc-navy);
}

.news-brief ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.news-brief li {
  position: relative;
  margin: 0 0 8px;
  padding-inline-start: 14px;
  font-size: 16px;
  line-height: 1.55;
}

.news-brief li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 5px;
  height: 5px;
  background: var(--hc-gold);
}

.nj-byline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-top: 24px;
  color: var(--hc-mute);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.nj-copy {
  border: 0;
  background: none;
  color: var(--hc-mute);
  cursor: pointer;
  font-family: Montserrat-Medium, sans-serif;
  font-size: 14px;
  padding: 0;
  transition: color 0.28s var(--hc-ease), transform 0.15s var(--hc-ease);
}

.nj-copy:hover,
.nj-copy.is-copied {
  color: var(--hc-gold);
}

.nj-copy.is-copied {
  transform: scale(1.04);
}

.nj-cover {
  position: relative;
  width: 100%;
  height: min(64vh, 760px);
  overflow: hidden;
  background: var(--hc-navy-deep);
}

.nj-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nj-journal.is-motion .nj-cover img {
  animation: nj-ken-soft 22s ease-in-out infinite alternate;
}

@keyframes nj-ken-soft {
  from { transform: scale(1); }
  to { transform: scale(1.08); }
}

.nj-cover figcaption {
  width: min(680px, calc(100% - 48px));
  margin: 12px auto 0;
  color: var(--hc-mute);
  font-size: 14px;
}

.nj-body {
  width: min(680px, calc(100% - 48px));
  margin: 56px auto 0;
  font-family: Montserrat-Regular, sans-serif;
  font-size: 18px;
  line-height: 1.8;
  color: var(--hc-ink);
}

.nj-body p {
  margin: 0 0 1.15em;
}

.nj-body a {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: color 0.28s var(--hc-ease);
}

.nj-body a:hover {
  color: var(--hc-gold);
}

.nj-body strong {
  color: var(--hc-navy);
  font-family: Montserrat-SemiBold, sans-serif;
}

.nj-h2 {
  margin: 2.2em 0 0.6em;
  padding-inline-start: 16px;
  border-inline-start: 1px solid var(--hc-gold);
  font-family: Montserrat-SemiBold, sans-serif;
  font-size: 28px;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--hc-navy);
}

.nj-h3 {
  margin: 1.6em 0 0.5em;
  font-family: Montserrat-SemiBold, sans-serif;
  font-size: 20px;
  color: var(--hc-navy);
}

.nj-body ul,
.nj-body ol {
  margin: 0 0 1.15em;
  padding: 0;
  list-style: none;
}

.nj-body li {
  position: relative;
  margin: 0 0 0.45em;
  padding-inline-start: 18px;
}

.nj-body ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 6px;
  height: 6px;
  background: var(--hc-gold);
}

.nj-quote {
  margin: 2em 0;
  padding-inline-start: 20px;
  border-inline-start: 2px solid var(--hc-gold);
  font-size: 22px;
  line-height: 1.5;
  color: var(--hc-navy);
}

.nj-figure {
  width: min(960px, calc(100vw - 48px));
  margin: 40px auto;
  margin-inline: calc(50% - min(480px, 50vw - 24px));
}

.nj-figure img {
  width: 100%;
  display: block;
}

.nj-figure figcaption {
  margin-top: 10px;
  color: var(--hc-mute);
  font-size: 14px;
}

.nj-end {
  width: min(var(--hc-max), calc(100% - 48px));
  margin: 72px auto 0;
}

.nj-looks {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-bottom: 48px;
}

.nj-look {
  display: block;
}

.nj-look img {
  width: 100%;
  aspect-ratio: 1024 / 412;
  object-fit: cover;
  display: block;
  transition: transform 1.1s var(--hc-ease);
}

.nj-look:hover img {
  transform: scale(1.03);
}

.nj-look span {
  display: block;
  margin-top: 10px;
  font-family: Montserrat-SemiBold, sans-serif;
  font-size: 14px;
  color: var(--hc-navy);
}

.nj-ask {
  padding: 36px 0;
  border-block: 1px solid var(--hc-line);
}

.nj-ask p {
  margin: 0 0 18px;
  max-width: 36rem;
  color: var(--hc-mute);
}

.nj-ask .nj-btn--gold {
  color: var(--hc-navy-deep);
}

.nj-pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  padding: 36px 0 96px;
}

.nj-pager a {
  display: block;
}

.nj-pager small {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--hc-gold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.7rem;
}

.nj-pager strong {
  display: block;
  margin-top: 8px;
  font-family: Montserrat-SemiBold, sans-serif;
  font-size: 18px;
  line-height: 1.35;
  color: var(--hc-navy);
}

.nj-pager a:hover small svg {
  transform: translateX(-6px);
}

.nj-pager a:last-child:hover small svg {
  transform: translateX(6px);
}

.nj-pager small svg {
  width: 14px;
  height: 14px;
  transition: transform 0.45s var(--hc-ease);
}

.nj-pager a:last-child {
  text-align: end;
}

.nj-pager a:last-child small {
  justify-content: flex-end;
}

@media (max-width: 1199px) {
  .nj-tools {
    position: static;
  }

  .nj-hero,
  .nj-hero__copy {
    min-height: 640px;
  }

  .nj-hero__copy {
    padding: 120px 0 64px;
  }
}

@media (max-width: 767px) {
  .nj-wrap,
  .nj-wrap--article,
  .nj-body,
  .nj-end,
  .nj-cover figcaption {
    width: min(var(--hc-max), calc(100% - 32px));
  }

  .nj-hero,
  .nj-hero__copy {
    min-height: 100svh;
  }

  .nj-hero__copy {
    padding: 108px 0 48px;
    justify-content: flex-end;
  }

  .nj-hero__headline,
  .nj-article-h1 {
    max-width: none;
  }

  .nj-hero__dek {
    -webkit-line-clamp: 3;
    font-size: 0.95rem;
  }

  .nj-filters {
    gap: 20px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .nj-filters::-webkit-scrollbar {
    display: none;
  }

  .nj-search.is-open .nj-search-input {
    width: min(42vw, 180px);
  }

  .nj-grid,
  .nj-looks,
  .nj-pager {
    grid-template-columns: 1fr;
  }

  .nj-board {
    padding: 48px 0 32px;
  }

  .nj-cta {
    padding: 64px 0;
  }

  .nj-figure {
    margin-inline: 0;
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nj-hero__media img,
  .nj-cover img,
  .nj-journal.is-motion [data-reveal],
  .nj-card:hover .nj-card__media img,
  .nj-look:hover img,
  .nj-btn:hover,
  .nj-btn:hover svg {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }
}
