@font-face {
  font-family: "Portfolio Index CJK";
  src: url("fonts/portfolio-index-sc.woff") format("woff");
  font-weight: 500;
  font-display: swap;
}

.portfolio-intro.collection-entrance {
  --catalogue-ink: #232323;
  --catalogue-sans: "URW Gothic", "Portfolio Index CJK", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  position: relative;
  isolation: isolate;
  justify-content: center;
  min-height: max(560px, calc(100svh - 50px));
  padding: 0;
  background: #f4f4f4;
  color: var(--catalogue-ink);
  transition: background-color 850ms ease;
  overflow: hidden;
}

.collection-stage {
  position: relative;
  width: min(1280px, 100%);
  aspect-ratio: 1280 / 710;
  align-self: center;
}

.collection-heading,
.collection-meta {
  position: absolute;
  z-index: 3;
  width: min(1280px, 100%);
  padding-inline: max(4.35%, 22px);
  pointer-events: none;
  transition: opacity 560ms ease;
}

.collection-heading { top: clamp(22px, 9svh, 74px); }

.collection-heading h1 {
  font-family: var(--catalogue-sans);
  font-size: clamp(37px, 4.75vw, 70px);
  line-height: 1.12;
  font-weight: 500;
  letter-spacing: -.033em;
}

.collection-heading p {
  margin-top: 15px;
  color: #555;
  font: 400 clamp(14px, 1.15vw, 17px) / 1.5 "Nimbus Sans", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
  letter-spacing: .04em;
}

.collection-heading > span {
  display: block;
  margin-top: 10px;
  color: #585858;
  font-size: 13px;
  letter-spacing: .05em;
}

.collection-meta {
  bottom: max(28px, 6svh);
  color: #555;
  font: 400 14px / 1.5 "Nimbus Sans", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 18px;
}

.collection-meta p { max-width: 42rem; }

.collection-meta a {
  color: #282828;
  pointer-events: auto;
  text-decoration: underline;
  text-underline-offset: .32em;
}

.collection-film,
.collection-rail {
  position: absolute;
  inset: 0;
}

.collection-film {
  z-index: 2;
  display: grid;
  align-content: center;
  pointer-events: none;
  mask-image: linear-gradient(90deg, transparent, black 2%, black 98%, transparent);
}

.collection-film video { width: 100%; height: auto; }

.collection-rail {
  display: flex;
  align-items: center;
  overflow: auto hidden;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
}

.collection-plate {
  position: relative;
  width: 100%;
  flex: 0 0 auto;
  isolation: isolate;
}

.collection-plate img {
  display: block;
  width: 100%;
  height: auto;
  mask-image: radial-gradient(ellipse 79% 53%, black 67%, transparent 100%);
}

.collection-plate .collection-cover-logo {
  position: absolute;
  width: 0.57%;
  height: auto;
  mask-image: none;
  pointer-events: none;
}

/* Place the mark inside the SnapSort cover in the shared 2560 × 1420 still. */
.collection-cover-logo--snapsort {
  left: 25%;
  top: 43.69%;
  opacity: 0.88;
}

.collection-items {
  position: absolute;
  inset: 40.5% 3.6% auto;
  height: 20%;
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  padding: 0;
  list-style: none;
}

.collection-items li { position: relative; min-width: 0; margin-inline: 6.5%; }

.collection-items a {
  display: flex;
  align-items: end;
  height: 100%;
  border-bottom: 1px solid transparent;
  white-space: nowrap;
  font: 600 clamp(14px, 1.33vw, 19px) / 1.12 "Nimbus Sans", "Helvetica Neue", Arial, sans-serif;
  letter-spacing: -.02em;
  transition: border-color 200ms ease, color 200ms ease;
}

.collection-items a:hover { border-color: #8b8b8b; color: #4b4b4b; }
.collection-items a:focus-visible,
.collection-rail:focus-visible,
.collection-skip:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }

.collection-description {
  position: absolute;
  inset-block-start: calc(100% + 8px);
  inset-inline-start: 0;
  inline-size: max-content;
  max-inline-size: min(225px, 56vw);
  color: #6b6b6b;
  font: 400 clamp(12px, 1vw, 13px) / 1.45 "Nimbus Sans", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  opacity: 0;
  transform: translateY(3px);
  transition: opacity 180ms ease, transform 180ms ease;
  pointer-events: none;
}

.snap-directory-partner {
  display: block;
  white-space: nowrap;
}

.collection-items li:nth-last-child(-n+2) .collection-description {
  inset-inline: auto 0;
  text-align: end;
}

.collection-items li[data-described] .collection-description {
  opacity: 1;
  transform: translateY(0);
}

.collection-skip {
  position: absolute;
  z-index: 4;
  top: 24px;
  right: max(4.35%, 22px);
  padding: 7px 12px;
  border: 1px solid #787878;
  background: #131313;
  color: #f6f6f6;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}

.collection-entrance:is([data-phase="landing"], [data-phase="handoff"]) .collection-skip {
  background: #f4f4f4;
  color: var(--catalogue-ink);
}

html[data-portfolio-start] .collection-entrance,
.collection-entrance[data-phase="opening"] { background: #101010; }

html[data-portfolio-start] .collection-rail,
.collection-entrance[data-phase="opening"] .collection-rail,
.collection-entrance[data-phase="handoff"] .collection-rail,
.collection-entrance[data-phase="landing"] .collection-rail { visibility: hidden; }

html[data-portfolio-start] .collection-heading,
html[data-portfolio-start] .collection-meta,
.collection-entrance[data-phase="opening"] .collection-heading,
.collection-entrance[data-phase="landing"] .collection-heading,
.collection-entrance[data-phase="opening"] .collection-meta,
.collection-entrance[data-phase="landing"] .collection-meta {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

html[data-portfolio-start] .site-header,
main:has(.collection-entrance[data-phase="opening"]) .site-header {
  background: #101010;
  border-color: #333;
  color: #eee;
}

html[data-portfolio-start] .site-header .active,
main:has(.collection-entrance[data-phase="opening"]) .site-header .active { color: #eee; }

@media (max-width: 840px) {
  .collection-stage { aspect-ratio: auto; height: clamp(238px, 51vw, 398px); }
  .collection-plate { min-width: 820px; }
  .collection-rail { scrollbar-color: #828282 #ededed; }
  .collection-film {
    transition: opacity 540ms ease;
    mask-image: radial-gradient(ellipse 73% 49%, black 68%, transparent 100%);
  }
  .collection-entrance[data-phase="handoff"] .collection-film { opacity: 0; }
  .collection-entrance[data-phase="handoff"] .collection-rail {
    visibility: visible;
    animation: appear-collection 540ms ease both;
  }
  .collection-heading { top: clamp(35px, 8svh, 57px); }
  .collection-heading h1 { font-size: clamp(35px, 8vw, 57px); }
  .collection-heading p { font-size: 14px; margin-top: 12px; }
}

@keyframes appear-collection { from { opacity: 0; } to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  .collection-entrance *, .collection-entrance { animation: none !important; transition: none !important; }
}


.collection-entrance { display: flex; align-items: center; scroll-margin-top: 58px; }
.collection-entrance [hidden] { display: none; }
.collection-items { margin: 0; }
.collection-rail { scroll-margin-top: 115px; }

.ai-workflow {
  padding: clamp(45px, 7vw, 95px) 0;
  background: rgb(var(--workflow-paper-rgb, 243 246 250));
  color: #222a35;
  scroll-margin-top: 65px;
}
.ai-workflow-inner {
  width: min(1110px, calc(100% - 48px));
  margin-inline: auto;
}
.ai-workflow-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.1rem 2.5rem;
  margin-bottom: 1.85rem;
}
.ai-workflow-header h2 {
  margin: 0 0 .7rem;
  font: 500 clamp(32px, 4vw, 56px)/1.18 "Portfolio Index CJK", "Noto Sans CJK SC", sans-serif;
  letter-spacing: -.03em;
}
.ai-workflow-header p {
  max-width: 47rem;
  font-size: 16px;
  line-height: 1.85;
}
.ai-workflow-header a,
.ai-workflow-links a {
  width: fit-content;
  color: #263e5d;
  font-size: 15px;
  line-height: 1.55;
  white-space: nowrap;
  text-decoration: underline;
  text-underline-offset: .28em;
}
.ai-workflow-figure {
  margin: 0;
  border: 1px solid #d5e0ed;
  background: #e9f1fc;
}
.ai-workflow-figure a {
  display: block;
}
.ai-workflow-figure img {
  display: block;
  width: 100%;
  height: auto;
}
.ai-workflow-links {
  display: flex;
  flex-wrap: wrap;
  gap: .72rem 1.65rem;
  margin-top: 1.3rem;
}
@media (max-width: 650px) {
  .ai-workflow-inner {
    width: calc(100% - 30px);
  }
  .ai-workflow-header {
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 1.2rem;
  }
}

.collection-document-links {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 16px;
}

.pico-directory-parent {
  display: block;
  margin-block-start: .15em;
}
