/* ============================================
   iBest Design — Design Study
   ============================================ */

:root {
  --cream: #ece3cf;
  --cream-dim: #d8ccb2;
  --ink: #14212e;
  --ink-soft: #22374a;
  --sky: #4c7397;
  --moss: #7c8f6d;
  --serif: "Cormorant Garamond", "Noto Serif TC", "Times New Roman", serif;
  --sans: "Oswald", "Noto Sans TC", "Microsoft JhengHei", "Arial Narrow", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--ink);
  color: var(--cream);
  font-family: var(--serif);
  overflow-x: hidden;
}

body.is-loading { overflow: hidden; }

::selection { background: var(--cream); color: var(--ink); }

img,
video { display: block; width: 100%; height: 100%; object-fit: cover; }

a { color: inherit; text-decoration: none; }

@media (pointer: fine) {
  body { cursor: none; }
  body a, body [data-hover] { cursor: none; }
}

.wrap {
  width: min(100% - 4rem, 1400px);
  margin-inline: auto;
}

/* ---------- Preloader ---------- */

.loaderArea {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: var(--ink);
  will-change: opacity;
}

.loaderInner { text-align: center; position: relative; z-index: 2; }

.loaderLabel {
  font-family: var(--sans);
  font-size: 0.875rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--cream-dim);
  opacity: 0.7;
}

.loaderTitle {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.4rem, 8vw, 7rem);
  line-height: 1;
  margin-top: 1rem;
  letter-spacing: 0.02em;
  overflow: hidden;
}

.loaderTitle span {
  display: inline-block;
  transform: translateY(110%);
}

.loaderCount {
  font-family: var(--sans);
  font-size: 0.8rem;
  letter-spacing: 0.3em;
  margin-top: 1.5rem;
  color: var(--cream-dim);
}

.loaderCurtain {
  position: absolute;
  inset: 0;
  background: var(--ink);
  transform-origin: top;
  z-index: 1;
}

/* ---------- Custom cursor ---------- */

.cursorDot,
.cursorRing {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 90;
  pointer-events: none;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  display: none;
}

@media (pointer: fine) {
  .cursorDot, .cursorRing { display: flex; }
}

.cursorDot {
  width: 6px;
  height: 6px;
  background: var(--cream);
  mix-blend-mode: difference;
}

.cursorRing {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(236, 227, 207, 0.55);
  align-items: center;
  justify-content: center;
  mix-blend-mode: difference;
  transition: width 0.35s ease, height 0.35s ease,
              background-color 0.35s ease, border-color 0.35s ease;
}

.cursorRing.is-hover {
  width: 72px;
  height: 72px;
  background: rgba(236, 227, 207, 0.12);
  border-color: rgba(236, 227, 207, 0.9);
}

.cursorRing.has-label {
  width: 96px;
  height: 96px;
  background: var(--cream);
  border-color: var(--cream);
}

.cursorLabel {
  font-family: var(--sans);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink);
  opacity: 0;
  transition: opacity 0.25s ease;
  text-align: center;
  padding: 0 6px;
}

.cursorRing.has-label .cursorLabel { opacity: 1; }

/* ---------- Grain ---------- */

.grainOverlay {
  position: fixed;
  inset: -100%;
  z-index: 80;
  pointer-events: none;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grainShift 0.9s steps(4) infinite;
}

@keyframes grainShift {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-2%, 3%); }
  50% { transform: translate(3%, -2%); }
  75% { transform: translate(-3%, -3%); }
  100% { transform: translate(2%, 2%); }
}

/* ---------- Header ---------- */

.headerArea {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  padding: 1.6rem 0;
  mix-blend-mode: difference;
}

.headerArea .wrap {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 2rem;
}

.logo {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.4rem;
  letter-spacing: 0.08em;
}

.logo sup { font-size: 0.6em; }

.navList {
  display: flex;
  gap: 2.2rem;
  list-style: none;
}

.navItem a {
  font-family: var(--sans);
  font-size: 0.875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  position: relative;
  padding-bottom: 4px;
}

.navItem a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s cubic-bezier(0.65, 0, 0.35, 1);
}

.navItem a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.headerIndex {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  opacity: 0.8;
}

/* ---------- Hero ---------- */

.heroArea {
  position: relative;
  height: 170vh;
}

.heroSticky {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}

.heroMedia {
  position: absolute;
  inset: -3%;
  will-change: transform, clip-path;
}

.heroSlider {
  position: absolute;
  inset: 0;
  z-index: 0;
  transform: scale(1.05);
  will-change: transform;
}

.heroSlide {
  position: absolute;
  inset: 0;
  visibility: hidden;
}

.heroSlide.is-active {
  visibility: visible;
  z-index: 1;
}

.slideImg {
  position: absolute;
  inset: 0;
  will-change: transform;
}

.slideImg img,
.slideImg video {
  object-position: center 32%;
}

.heroCloud {
  position: absolute;
  width: 55vw;
  height: 34vh;
  border-radius: 50%;
  filter: blur(60px);
  background: radial-gradient(ellipse at center, rgba(240, 238, 230, 0.5), transparent 65%);
  mix-blend-mode: screen;
  will-change: transform;
}

.heroCloud--left { left: -18vw; bottom: 24vh; }
.heroCloud--right { right: -20vw; bottom: 30vh; opacity: 0.8; }

.heroVignette {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(20, 33, 46, 0.35), transparent 22%, transparent 72%, rgba(20, 33, 46, 0.55));
}

.heroUi {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}

.heroTag {
  position: absolute;
  font-family: var(--sans);
  font-size: 0.875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.9;
  text-shadow: 0 1px 12px rgba(20, 33, 46, 0.5);
}

.heroTag em { font-style: normal; opacity: 0.6; }

.heroTag--tl { top: 6.5rem; left: 2rem; }
.heroTag--tr { top: 6.5rem; right: 2rem; text-align: right; }

.heroTitleBox {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -54%);
  width: min(92vw, 1100px);
  text-align: center;
  pointer-events: none;
}

.heroKicker {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.1rem;
  font-family: var(--sans);
  font-size: 18px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cream-dim);
  margin-bottom: 2rem;
  text-shadow: 0 1px 12px rgba(20, 33, 46, 0.5);
}

.kickerStar {
  display: inline-block;
  font-size: 1em;
  color: var(--cream);
  animation: starSpin 9s linear infinite;
}

@keyframes starSpin {
  to { transform: rotate(360deg); }
}

.heroTitle {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(3.8rem, 10.8vw, 10.8rem);
  line-height: 0.96;
  letter-spacing: 0.002em;
  text-shadow: 0 2px 50px rgba(20, 33, 46, 0.5);
}

.heroTitle .lineWrap { padding-bottom: 0.1em; margin-bottom: -0.1em; }

.heroTitle .lineWrap:nth-child(2) { font-size: 1.1em; }

.char {
  display: inline-block;
  will-change: transform;
}

.char--hollow {
  font-style: italic;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--cream);
  text-shadow: none;
}

@supports not (-webkit-text-stroke: 1px black) {
  .char--hollow { color: var(--cream); }
}

.heroDesc {
  margin: 2rem auto 0;
  max-width: 54ch;
  font-family: var(--serif);
  font-size: clamp(0.98rem, 1.2vw, 1.16rem);
  line-height: 1.75;
  color: var(--cream-dim);
  text-shadow: 0 1px 14px rgba(20, 33, 46, 0.55);
}

/* Bottom-left field note */

.heroFootNote {
  position: absolute;
  left: 2rem;
  bottom: 3rem;
  max-width: 30ch;
  padding-top: 1rem;
  border-top: 1px solid rgba(236, 227, 207, 0.4);
  pointer-events: none;
}

.footNoteLabel {
  font-family: var(--sans);
  font-size: 0.875rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--cream-dim);
  margin-bottom: 0.6rem;
  text-shadow: 0 1px 12px rgba(20, 33, 46, 0.5);
}

.footNoteIndex { color: var(--cream); }

.footNoteText {
  font-family: var(--serif);
  font-size: 0.98rem;
  line-height: 1.7;
  color: var(--cream-dim);
  text-shadow: 0 1px 14px rgba(20, 33, 46, 0.55);
}

/* Decorative satellites around the headline */

.heroOrnIndex {
  position: absolute;
  left: clamp(0.5rem, 5vw, 5rem);
  top: 52%;
  transform: translateY(-50%);
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1rem, 1.4vw, 1.4rem);
  color: var(--cream-dim);
  text-shadow: 0 1px 12px rgba(20, 33, 46, 0.5);
}

.heroOrnMask {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
}

.heroOrnMask > span { display: inline-block; }

.heroSpin {
  position: absolute;
  top: -4.6rem;
  right: clamp(0.5rem, 6vw, 6rem);
  width: clamp(90px, 9vw, 124px);
  aspect-ratio: 1;
  opacity: 0.9;
  animation: spinRotate 18s linear infinite;
}

.heroSpin svg { width: 100%; height: 100%; overflow: visible; }

.heroSpin text {
  font-family: var(--sans);
  font-size: 10.5px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  fill: var(--cream);
}

@keyframes spinRotate {
  to { transform: rotate(360deg); }
}

.heroScroll {
  position: absolute;
  bottom: 3rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
  pointer-events: auto;
}

.heroScrollLine {
  width: 1px;
  height: 56px;
  background: rgba(236, 227, 207, 0.6);
  overflow: hidden;
  position: relative;
}

.heroScrollLine::after {
  content: "";
  position: absolute;
  left: 0;
  top: -100%;
  width: 100%;
  height: 100%;
  background: var(--cream);
  animation: scrollDrip 1.8s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}

@keyframes scrollDrip {
  0% { top: -100%; }
  55% { top: 0; }
  100% { top: 100%; }
}

.heroScrollText {
  font-family: var(--sans);
  font-size: 0.875rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
}

/* ---------- Hero slider UI ---------- */

.sliderUi {
  position: absolute;
  right: 2rem;
  bottom: 3rem;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1rem;
  pointer-events: auto;
}

.slidePreview {
  display: block;
  width: 176px;
  padding: 0;
  border: none;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
}

.slidePreviewImg {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 1px solid rgba(236, 227, 207, 0.55);
  border-radius: 2px;
  box-shadow: 0 12px 40px rgba(20, 33, 46, 0.5);
}

.slidePreviewImg img {
  transform: scale(1.06);
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.slidePreview:hover .slidePreviewImg img { transform: scale(1.18); }

.slidePreviewLabel {
  display: block;
  margin-top: 0.7rem;
  font-family: var(--sans);
  font-size: 0.875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: right;
  text-shadow: 0 1px 12px rgba(20, 33, 46, 0.5);
}

.slideMeta {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.slideCount {
  font-family: var(--sans);
  font-size: 0.68rem;
  letter-spacing: 0.24em;
}

.slideIndexMask {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
}

.slideIndex { display: inline-block; }

.slideDots {
  display: flex;
  gap: 0.45rem;
}

.slideDot {
  width: 22px;
  height: 14px;
  padding: 6px 0;
  border: none;
  background: none;
  position: relative;
}

.slideDot::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 100%;
  height: 2px;
  background: rgba(236, 227, 207, 0.35);
  transition: background-color 0.4s ease, transform 0.4s ease;
}

.slideDot.is-active::before,
.slideDot:hover::before {
  background: var(--cream);
  transform: scaleY(1.4);
}

.slideProgress {
  width: 64px;
  height: 2px;
  background: rgba(236, 227, 207, 0.25);
  overflow: hidden;
}

.slideProgressBar {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--cream);
  transform: scaleX(0);
  transform-origin: left;
}

/* ---------- Marquee ---------- */

.marqueeArea {
  position: relative;
  z-index: 10;
  background: var(--cream);
  color: var(--ink);
  padding: 1.4rem 0;
  overflow: hidden;
  transform: rotate(-1.2deg) scale(1.02);
  margin-top: -3.5rem;
  box-shadow: 0 -20px 60px rgba(20, 33, 46, 0.45);
}

.marqueeTrack {
  display: flex;
  width: max-content;
  will-change: transform;
}

.marqueeText {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  font-weight: 500;
  font-style: italic;
  white-space: nowrap;
  padding-right: 1rem;
}

.marqueeText em {
  font-style: normal;
  color: var(--sky);
}

/* ---------- Concept ---------- */

.conceptArea {
  position: relative;
  padding: clamp(7rem, 14vh, 12rem) 0 clamp(5rem, 10vh, 9rem);
  background: linear-gradient(to bottom, var(--ink), var(--ink-soft));
}

.conceptArea .wrap {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(3rem, 6vw, 6rem);
  align-items: start;
}

.titleBox .decotitle {
  font-family: var(--sans);
  font-size: 0.875rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--cream-dim);
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.titleBox .decotitle::before {
  content: "";
  width: 42px;
  height: 1px;
  background: var(--cream-dim);
}

.conceptArea .titleBox .title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2rem, 4.6vw, 3.9rem);
  line-height: 1.12;
  letter-spacing: 0.01em;
}

.titleBox .text {
  max-width: 34em;
  margin-top: 2.2rem;
  font-size: 1.15rem;
  line-height: 1.85;
  color: var(--cream-dim);
}

.btnBox { margin-top: 3rem; }

.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 1px solid rgba(236, 227, 207, 0.5);
  border-radius: 999px;
  padding: 1.1rem 2.6rem;
  position: relative;
  overflow: hidden;
  transition: color 0.4s ease, border-color 0.4s ease;
}

.btn span { position: relative; z-index: 1; }

.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--cream);
  border-radius: inherit;
  transform: translateY(101%);
  transition: transform 0.5s cubic-bezier(0.65, 0, 0.35, 1);
}

.btn:hover { color: var(--ink); border-color: var(--cream); }
.btn:hover::before { transform: translateY(0); }

.conceptFig { position: relative; }

.conceptFigInner {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 2px;
  will-change: clip-path;
}

.conceptFigInner img {
  height: 130%;
  object-position: 62% center;
  will-change: transform;
}

.conceptCaption {
  margin-top: 1rem;
  font-family: var(--sans);
  font-size: 0.875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cream-dim);
}

/* ---------- Chapters ---------- */

.chapterArea {
  padding: clamp(5rem, 10vh, 9rem) 0 clamp(6rem, 12vh, 10rem);
  background: var(--ink-soft);
}

.chapterArea .titleBox .title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.15;
}

.dataBox { margin-top: 4rem; }

.dataList { list-style: none; }

.chapterArea .dataList {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.5rem, 3vw, 3rem);
}

.chapterArea .dataItem:nth-child(2) { margin-top: 4rem; }
.chapterArea .dataItem:nth-child(3) { margin-top: 8rem; }

.dataItem .imgBox {
  overflow: hidden;
  aspect-ratio: 4 / 5;
  border-radius: 2px;
}

.imgShift {
  width: 100%;
  height: 100%;
  transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform, clip-path;
}

.imgShift img,
.imgShift video {
  object-position: var(--pos, center);
  transform: scale(1.4);
  transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.dataItem:hover .imgShift { transform: scale(0.96); }
.dataItem:hover .imgShift img,
.dataItem:hover .imgShift video { transform: scale(1.55); }

.dataItem .txtBox { padding: 1.6rem 0.2rem 0; }

.dataItem .txtBox .subtitle {
  font-family: var(--sans);
  font-size: 0.875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cream-dim);
}

.dataItem .txtBox .title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.9rem;
  margin-top: 0.5rem;
}

.dataItem .txtBox .text {
  margin-top: 0.7rem;
  font-size: 1.02rem;
  line-height: 1.7;
  color: var(--cream-dim);
}

/* ---------- Manifesto ---------- */

.manifestoArea {
  position: relative;
  padding: clamp(8rem, 18vh, 14rem) 0;
  background: var(--ink);
  overflow: hidden;
}

.manifestoArea .titleBox { position: relative; z-index: 1; }

.manifestoText {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.9rem, 4.2vw, 3.6rem);
  line-height: 1.35;
  max-width: 22em;
}

.manifestoText .word {
  display: inline-block;
  margin-right: 0.28em;
}

.manifestoMark {
  position: absolute;
  right: 4vw;
  bottom: 6vh;
  font-size: clamp(6rem, 14vw, 12rem);
  line-height: 1;
  color: var(--sky);
  opacity: 0.5;
  pointer-events: none;
  display: block;
}

/* ---------- Archive (floating field) ---------- */

.archiveArea {
  position: relative;
  background: var(--cream);
  color: var(--ink);
  overflow: hidden;
}

.archiveField {
  position: relative;
  height: 100vh;
}

.archiveCenter {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  z-index: 1;
}

.archiveCenter .decotitle {
  font-family: var(--sans);
  font-size: 0.875rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(20, 33, 46, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.archiveCenter .decotitle::before,
.archiveCenter .decotitle::after {
  content: "";
  width: 36px;
  height: 1px;
  background: rgba(20, 33, 46, 0.4);
}

.archiveCenter .decotitle { overflow: hidden; }

.centerIndex {
  display: inline-block;
  color: var(--sky);
  will-change: transform;
}

.centerPhrase { min-height: 2.2em; }

.centerPhrase .lineIn { will-change: transform; }

.archiveCenter .title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.6rem, 6vw, 5.4rem);
  line-height: 1.05;
  margin-top: 1.4rem;
}

.archiveCenter .title em { font-style: italic; color: var(--sky); }

.archiveCount {
  margin-top: 1.6rem;
  font-family: var(--sans);
  font-size: 0.875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(20, 33, 46, 0.55);
}

.fieldSlot {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--w);
  z-index: 2;
  will-change: transform;
}

.fieldCard {
  display: block;
  background: #fdfaf2;
  padding: 10px 10px 14px;
  box-shadow: 0 18px 55px rgba(20, 33, 46, 0.22);
  border-radius: 1px;
  will-change: transform;
  transition: box-shadow 0.5s ease;
}

.fieldCard:hover { box-shadow: 0 28px 80px rgba(20, 33, 46, 0.32); }

.cardImg {
  display: block;
  aspect-ratio: var(--ar, 4 / 5);
  overflow: hidden;
}

.cardImg img {
  filter: saturate(0.85);
  transform: scale(1.04);
  transition: filter 0.6s ease, transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.fieldCard:hover .cardImg img {
  filter: saturate(1.08);
  transform: scale(1.12);
}

.fieldCard figcaption {
  margin-top: 10px;
  font-family: var(--sans);
  font-size: 0.875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(20, 33, 46, 0.6);
}

/* ---------- Specimen index (sticky viewer + blinds) ---------- */

.specimenArea {
  position: relative;
  padding: clamp(3rem, 7vh, 5.5rem) 0;
  background: var(--ink-soft);
  overflow: hidden;
}

.specimenArea .titleBox .title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.15;
}

.specimenGrid {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 5fr) minmax(0, 3fr);
  gap: clamp(2rem, 4vw, 4.5rem);
  align-items: center;
  margin-top: clamp(2rem, 4.5vh, 3.5rem);
}

.specimenListCol { grid-column: 1; grid-row: 1; }
.specimenViewer { grid-column: 2; grid-row: 1; }
.specimenInfo { grid-column: 3; grid-row: 1; }

.specimenViewer {
  position: relative;
  height: clamp(300px, 56vh, 560px);
  align-self: center;
}

.viewerCols {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 2px;
  background: #0e1822;
}

.viewerCol {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 20.6%;
  overflow: hidden;
}

.viewerCol img {
  position: absolute;
  top: 0;
  left: calc(var(--i) * -100%);
  width: 500%;
  height: 100%;
  object-fit: cover;
  will-change: transform, clip-path;
}

/* Right column — info panel that switches with the viewer */

.specimenInfo {
  align-self: center;
  padding-top: 0.4rem;
}

.infoNumMask {
  display: block;
  overflow: hidden;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(3.4rem, 5.5vw, 5.5rem);
  line-height: 1.05;
}

.infoNum { display: block; color: var(--sky); }

.infoTitleMask {
  display: block;
  overflow: hidden;
  margin-top: 0.9rem;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.6rem, 2.2vw, 2.3rem);
  line-height: 1.15;
}

.infoTitle { display: block; }

.infoMetaMask {
  display: block;
  overflow: hidden;
  margin-top: 0.8rem;
}

.infoMeta {
  display: block;
  font-family: var(--sans);
  font-size: 0.875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cream-dim);
}

.infoDescMask { margin-top: 1.4rem; }

.infoDesc {
  font-family: var(--serif);
  font-size: 0.98rem;
  line-height: 1.75;
  color: var(--cream-dim);
  max-width: 30ch;
}

.specimenItem {
  display: block;
  padding: clamp(1.7rem, 3.8vh, 2.6rem) 0.3rem;
  border-top: 1px solid rgba(236, 227, 207, 0.18);
}

.specimenItem:last-child { border-bottom: 1px solid rgba(236, 227, 207, 0.18); }

.specimenRow {
  display: flex;
  align-items: baseline;
  gap: 1.3rem;
}

.specimenRow::before {
  content: "";
  align-self: center;
  flex: none;
  width: 0;
  height: 1px;
  background: var(--cream);
  transition: width 0.5s cubic-bezier(0.65, 0, 0.35, 1);
}

.specimenItem.is-active .specimenRow::before { width: 2rem; }

/* Dots rail — a glider ring travels between stops */

.specimenDots {
  position: absolute;
  top: 50%;
  right: clamp(0.9rem, 2vw, 2rem);
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.15rem;
  z-index: 3;
}

.specimenDots::before {
  content: "";
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 50%;
  width: 1px;
  background: rgba(236, 227, 207, 0.2);
}

.specimenDot {
  position: relative;
  z-index: 1;
  width: 9px;
  height: 9px;
  padding: 0;
  border: 1px solid rgba(236, 227, 207, 0.55);
  border-radius: 50%;
  background: var(--ink-soft);
  transition: background-color 0.4s ease, border-color 0.4s ease, transform 0.4s ease;
}

.specimenDot:hover { border-color: var(--cream); transform: scale(1.3); }

.specimenDot.is-active {
  background: var(--cream);
  border-color: var(--cream);
  transform: scale(1.25);
}

.dotGlider {
  position: absolute;
  left: 50%;
  top: 0;
  width: 25px;
  height: 25px;
  margin-left: -12.5px;
  pointer-events: none;
}

.dotGlider::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px dashed rgba(236, 227, 207, 0.85);
  border-radius: 50%;
  animation: spinRotate 14s linear infinite;
}

.specimenNum {
  font-family: var(--sans);
  font-size: 0.66rem;
  letter-spacing: 0.24em;
  color: rgba(236, 227, 207, 0.4);
  transition: color 0.5s ease;
}

.specimenItem .title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.25rem, 1.7vw, 1.7rem);
  line-height: 1.15;
  color: rgba(236, 227, 207, 0.32);
  transition: color 0.5s ease;
}

.specimenMeta {
  margin-left: auto;
  font-family: var(--sans);
  font-size: 0.875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(236, 227, 207, 0.35);
  transition: color 0.5s ease;
}

.specimenItem.is-active .specimenNum { color: var(--sky); }
.specimenItem.is-active .title { color: var(--cream); }
.specimenItem.is-active .specimenMeta { color: var(--cream-dim); }

/* ---------- Field journal (horizontal scroll) ---------- */

.journalArea {
  position: relative;
  background: var(--ink);
  overflow: hidden;
}

.journalPin {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(2.2rem, 5vh, 3.5rem);
  padding: clamp(4.5rem, 9vh, 7rem) 0 clamp(3rem, 6vh, 4.5rem);
}

.journalGhost {
  position: absolute;
  left: 50%;
  top: 44%;
  display: none;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(8rem, 24vw, 22rem);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(236, 227, 207, 0.1);
  white-space: nowrap;
  pointer-events: none;
  will-change: transform;
}

@supports not (-webkit-text-stroke: 1px black) {
  .journalGhost { color: rgba(236, 227, 207, 0.05); }
}

.journalHead {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
}

.journalArea .titleBox .title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.15;
}

.journalHint {
  display: none;
  font-family: var(--sans);
  font-size: 0.875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cream-dim);
  padding-bottom: 0.5rem;
}

.journalTrack {
  position: relative;
  z-index: 1;
  margin-top: 0;
}

.journalTrack .dataList {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  padding: 0 1.25rem;
  will-change: transform;
}

.journalTrack .dataItem {
  position: relative;
  width: min(100%, 440px);
}

.journalTrack .dataItem:nth-child(even) { align-self: flex-end; }

.journalTrack .imgBox { aspect-ratio: 4 / 3; }

.journalArea .imgShift { transition: none; }

.journalIndex {
  position: absolute;
  top: -0.5em;
  right: 0.1em;
  z-index: 2;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(3.2rem, 6vw, 5.4rem);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(236, 227, 207, 0.55);
  pointer-events: none;
}

@supports not (-webkit-text-stroke: 1px black) {
  .journalIndex { color: rgba(236, 227, 207, 0.4); }
}

.journalProgress {
  display: none;
  position: relative;
  z-index: 1;
  width: min(100% - 4rem, 1400px);
  margin-inline: auto;
  height: 1px;
  background: rgba(236, 227, 207, 0.18);
}

.journalProgressBar {
  display: block;
  height: 100%;
  background: var(--cream);
  transform: scaleX(0);
  transform-origin: left;
}

@media (min-width: 901px) {
  .journalArea:not(.is-static) .journalPin {
    height: 100vh;
    justify-content: center;
  }

  .journalArea:not(.is-static) .journalGhost { display: block; }
  .journalArea:not(.is-static) .journalHint { display: block; }
  .journalArea:not(.is-static) .journalProgress { display: block; }

  .journalArea:not(.is-static) .journalTrack { overflow: hidden; }

  .journalArea:not(.is-static) .journalTrack .dataList {
    flex-direction: row;
    align-items: flex-start;
    width: max-content;
    gap: clamp(1.6rem, 3vw, 3rem);
    padding: 0 max(2rem, calc((100vw - 1400px) / 2));
  }

  .journalArea:not(.is-static) .journalTrack .dataItem {
    flex: none;
    width: clamp(300px, 30vw, 430px);
  }

  .journalArea:not(.is-static) .journalTrack .dataItem:nth-child(even) {
    align-self: auto;
    margin-top: clamp(2.5rem, 7vh, 5rem);
  }
}

/* ---------- Next volume teaser ---------- */

.nextArea {
  position: relative;
  height: 260vh;
  background: var(--ink);
}

.nextArea.is-static { height: auto; }

.nextSticky {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  display: grid;
  place-items: center;
}

.nextArea.is-static .nextSticky { position: relative; }

.nextMedia {
  position: absolute;
  inset: 0;
  clip-path: circle(14% at 50% 50%);
  will-change: clip-path;
}

.nextArea.is-static .nextMedia { clip-path: none; }

.nextMedia video {
  object-position: center;
  will-change: transform;
}

.nextShade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom,
    rgba(20, 33, 46, 0.5), rgba(20, 33, 46, 0.15) 40%, rgba(20, 33, 46, 0.6));
}

.nextUi {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 2rem;
}

.nextUi .decotitle { justify-content: center; }

.nextUi .decotitle::after {
  content: "";
  width: 42px;
  height: 1px;
  background: var(--cream-dim);
}

.nextTitle {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(3rem, 9vw, 8.5rem);
  line-height: 1.02;
  text-shadow: 0 2px 50px rgba(20, 33, 46, 0.5);
}

.nextTitle em {
  font-style: italic;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--cream);
  text-shadow: none;
}

@supports not (-webkit-text-stroke: 1px black) {
  .nextTitle em { color: var(--cream); }
}

.nextUi .btnBox { margin-top: 2.6rem; }

/* ---------- Footer ---------- */

.footerArea {
  background: var(--cream);
  color: var(--ink);
  padding: clamp(6rem, 12vh, 10rem) 0 2.5rem;
}

.footerArea .titleBox .decotitle { color: rgba(20, 33, 46, 0.55); }
.footerArea .titleBox .decotitle::before { background: rgba(20, 33, 46, 0.4); }

.footerArea .titleBox .title {
  font-family: var(--serif);
  font-weight: 500;
  font-style: italic;
  font-size: clamp(2.4rem, 7vw, 6.5rem);
  line-height: 1.05;
  display: inline-block;
}

.footerArea .titleBox .title a {
  background-image: linear-gradient(var(--ink), var(--ink));
  background-repeat: no-repeat;
  background-size: 0% 2px;
  background-position: left 96%;
  transition: background-size 0.6s cubic-bezier(0.65, 0, 0.35, 1);
}

.footerArea .titleBox .title a:hover { background-size: 100% 2px; }

.footerMeta {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: clamp(4rem, 8vh, 7rem);
  padding-top: 1.6rem;
  border-top: 1px solid rgba(20, 33, 46, 0.25);
  font-family: var(--sans);
  font-size: 0.875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.backTop { position: relative; }

/* ---------- Reveal helpers ---------- */

.reveal { opacity: 0; transform: translateY(40px); }

.lineWrap {
  display: block;
  overflow: hidden;
}

.lineIn {
  display: block;
  transform: translateY(110%);
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .navList { display: none; }
  .heroTag--tr { display: none; }
  .conceptArea .wrap { grid-template-columns: 1fr; }
  .chapterArea .dataList { grid-template-columns: 1fr; }
  .chapterArea .dataItem:nth-child(2), .chapterArea .dataItem:nth-child(3) { margin-top: 0; }

  /* Archive falls back to a rotated collage in normal flow */
  .archiveField {
    height: auto;
    display: flex;
    flex-direction: column;
    gap: 3rem;
    padding: 4rem 2rem 5rem;
  }
  .archiveCenter {
    position: static;
    transform: none;
    order: -1;
  }
  .fieldSlot {
    position: static;
    width: min(100%, 420px);
  }
  .fieldSlot:nth-child(even) { align-self: flex-end; transform: rotate(2.5deg); }
  .fieldSlot:nth-child(odd) { transform: rotate(-2.5deg); }

  /* Specimen: viewer docks on top, info then list scroll beneath */
  .specimenGrid { grid-template-columns: 1fr; gap: 2.2rem; }
  .specimenViewer {
    grid-column: 1;
    grid-row: 1;
    position: sticky;
    top: 4.6rem;
    z-index: 5;
    height: 40vh;
  }
  .specimenInfo {
    grid-column: 1;
    grid-row: 2;
    position: static;
    padding-top: 0;
  }
  .specimenListCol { grid-column: 1; grid-row: 3; }
  .infoNumMask { display: none; }
  .infoTitleMask { margin-top: 0; }
  .specimenItem { padding: 1.5rem 0.2rem; }
  .specimenDots { display: none; }

  .wrap { width: min(100% - 2.5rem, 1400px); }
  .heroTag--tl { left: 1.25rem; }
  .sliderUi { right: 1.25rem; bottom: 2rem; }
  .slidePreview { width: 128px; }
  .heroScroll { display: none; }

  .heroTitleBox { width: 94vw; transform: translate(-50%, -58%); }
  .heroDesc { max-width: 34ch; font-size: 0.95rem; }
  .heroOrnIndex { display: none; }
  .heroSpin { top: -3.6rem; right: 0; width: 76px; }
  .heroSpin text { font-size: 12px; letter-spacing: 0.24em; }
  .heroFootNote {
    left: 1.25rem;
    bottom: 2rem;
    max-width: 46vw;
  }
  .footNoteText { font-size: 0.875rem; }
}

/* Pinned specimen must fit one viewport on shorter desktop screens */
@media (min-width: 901px) and (max-height: 800px) {
  .specimenArea { padding: 2rem 0; }
  .specimenArea .titleBox .title { font-size: clamp(1.6rem, 2.6vw, 2.2rem); }
  .specimenGrid { margin-top: 1.5rem; }
  .specimenItem { padding: 1rem 0.3rem; }
  .specimenViewer { height: clamp(260px, 48vh, 420px); }
  .infoNumMask { font-size: 2.8rem; }
  .infoTitleMask { font-size: 1.5rem; }
}

@media (max-height: 560px) {
  .heroTitle { font-size: clamp(2.2rem, 6.5vw, 4.2rem); }
  .heroDesc { display: none; }
  .heroSpin { display: none; }
  .heroFootNote { display: none; }
  .heroKicker { margin-bottom: 1.1rem; }
}

@media (max-width: 900px) {
  .journalHead { flex-direction: column; align-items: flex-start; gap: 1.2rem; }
  .nextArea { height: 200vh; }
}

@media (prefers-reduced-motion: reduce) {
  .grainOverlay, .heroScrollLine::after, .heroSpin, .kickerStar { animation: none; }
  html { scroll-behavior: auto; }
}
