/* ---------- Case study layout ---------- */
.case-hero {
  max-width: 1100px;
  margin: 0 auto;
  padding: 180px var(--page-pad) 80px;
  text-align: center;
}
.case-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(36px, 5.5vw, 76px);
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.case-title .word {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.5em);
  animation: word-in 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: var(--d, 0s);
}
@keyframes word-in {
  to { opacity: 1; transform: none; }
}

.case {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--page-pad) 120px;
}

.case-kicker {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 28px;
}

.case-section { margin-top: clamp(80px, 10vw, 140px); }

.case-lead {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(28px, 3.6vw, 48px);
  line-height: 1.2;
  letter-spacing: -0.01em;
  max-width: 24ch;
}
.case-lead em { font-style: italic; }

.case-intro-body {
  margin-top: 32px;
  max-width: 62ch;
  font-size: 17px;
  line-height: 1.7;
  color: #3f3f46;
}
.case-intro-body p + p { margin-top: 16px; }
.case-intro-body q { font-style: italic; }
.case-note {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--faint);
}

/* Overview: magazine-style two columns — story left, metadata rail right */
.case-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 264px;
  gap: clamp(40px, 7vw, 110px);
  align-items: start;
}
.case-meta {
  margin: 6px 0 0;
  border-top: 1px solid rgba(212, 212, 216, 0.6);
}
.case-meta > div {
  padding: 16px 0;
  border-bottom: 1px solid rgba(212, 212, 216, 0.4);
}
.case-meta dt {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.case-meta dd { font-size: 15px; font-weight: 500; margin: 0; line-height: 1.5; }

/* Problems / Solution / Results */
.psr {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: clamp(64px, 8vw, 100px);
}
.psr-card {
  background: #f8f8f9;
  border-radius: 20px;
  padding: 32px 28px;
}
.psr-icon {
  display: block;
  width: 24px;
  height: 24px;
  color: var(--ink);
  margin-bottom: 16px;
}
.psr-card h2 {
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 18px;
}
.psr-card ul { list-style: none; }
.psr-card li {
  font-size: 15px;
  line-height: 1.5;
  color: #3f3f46;
  padding-left: 18px;
  position: relative;
}
.psr-card li + li { margin-top: 12px; }
.psr-card li::before {
  content: "•";
  position: absolute;
  left: 2px;
  color: var(--muted);
}
.psr-card strong { color: var(--ink); font-weight: 600; }
.psr-card p {
  font-size: 15.5px;
  line-height: 1.65;
  color: #3f3f46;
}

/* Final screens gallery */
.gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.gallery img,
.step-grid img,
.step figure img,
.case-section > figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 16px;
  background: var(--card-light);
}
.gallery-wide, .step-grid-wide { grid-column: 1 / -1; }

/* Final-screen video banner — same framed treatment as the Ordering Tablet
   figures: a gray #fafafa frame with a centered, shadowed video card. */
.case figure.final-video {
  display: block; /* override the sidenote grid on .case figure — no caption here */
  margin: 0;
  background: #fafafa;
  border: 1px solid #e4e4e1;
  border-radius: 16px;
  padding: clamp(22px, 5vw, 52px) 0; /* no horizontal padding — card is a true 80% of the frame */
}
.final-video-stage {
  width: 80%;
  margin: 0 auto;
  border-radius: 10px;
  overflow: hidden;
  background: #000;
  line-height: 0;
  box-shadow: 0 30px 70px rgba(18, 18, 18, 0.22), 0 6px 18px rgba(18, 18, 18, 0.1);
}
.final-video-stage video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
/* Full-width inline video — same treatment as a full-width figure image */
.case-section > figure video {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 16px;
  border: 1px solid #e4e4e1;
  background: var(--card-light);
}
/* Videos inside a stage card are clipped by the stage itself — never round or border
   the video element too, or the stage's black backdrop peeks through at the corners */
.case .final-video-stage video,
.case .fig-video-stage video {
  border-radius: 0;
  border: 0;
  background: none;
}

/* Process steps */
.step { margin-top: clamp(72px, 9vw, 120px); }
.step-num {
  font-family: var(--serif);
  font-size: clamp(72px, 9vw, 128px);
  line-height: 0.85;
  color: rgba(18, 18, 18, 0.07);
  user-select: none;
  margin-bottom: 10px;
}
.step-label {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}
.step-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(26px, 3.2vw, 42px);
  line-height: 1.2;
  letter-spacing: -0.01em;
  max-width: 26ch;
}
.step-title em { font-style: italic; }
.step-body {
  margin-top: 24px;
  max-width: 62ch;
  font-size: 17px;
  line-height: 1.7;
  color: #3f3f46;
}
.step-body p + p, .step-body ul { margin-top: 16px; }
.step-body ul { padding-left: 22px; }
.step-body li + li { margin-top: 8px; }
.step-body strong { color: var(--ink); font-weight: 600; }
.step-body q { font-style: italic; }

.callout {
  background: #eef7ff;
  border: 1px solid rgba(0, 153, 255, 0.25);
  border-radius: 14px;
  padding: 16px 20px;
  color: var(--ink);
}

.step figure { margin-top: 36px; }
.case figure {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 200px;
  gap: 24px;
  align-items: start;
}
.case figcaption {
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--faint);
  padding-top: 8px;
  border-top: 1px solid rgba(212, 212, 216, 0.6);
}
/* Full-width figure — dense diagrams span the whole content column, caption drops below */
.case figure.fig-full { display: block; }
.case figure.fig-full figcaption { margin-top: 12px; }
/* Breathing room for figures dropped directly into a section after stats cards or body text */
.case-section > .stats + figure,
.case-section > .step-body + figure { margin-top: 44px; }
/* …and for text or stats that follow a figure (repeated ¶→figure rhythm on archive pages) */
.case-section > figure + .step-body,
.case-section > figure + .stats { margin-top: 44px; }
/* Consecutive figures stacked in a section (image-led archive pages) breathe apart */
.case-section > figure + figure,
.case-section > .archive-links + figure { margin-top: 44px; }
/* Two side-by-side photos inside one figure — each gets its own uniform rounded corners */
.case figure .fig-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.case figure .fig-trio { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
/* Cut-out artwork (characters, logos) — no card frame, no rounded corners */
.case figure.fig-plain img { border-radius: 0; background: none; }
#vaultContent figure.fig-plain img { border-radius: 0; border: 0; background: none; }
.case figure.fig-plain .fig-trio { gap: 8px; }
@media (max-width: 720px) { .case figure .fig-trio { grid-template-columns: 1fr; } }

/* ---------- Brand color palette strip (coded swatches from the official guideline) ---------- */
.color-strip { border-radius: 16px; overflow: hidden; border: 1px solid #e4e4e1; }
.color-strip .swatch {
  display: flex; flex-direction: column; gap: 6px;
  padding: 18px 18px 14px;
}
.color-strip .swatch-primary { min-height: 150px; justify-content: flex-end; }
.swatch .swatch-name { font-size: 15px; font-weight: 600; }
.swatch .swatch-spec { font-family: var(--mono); font-size: 11px; line-height: 1.6; opacity: 0.85; }
.swatch-row { display: grid; grid-template-columns: repeat(4, 1fr); }
.swatch-row .swatch { min-height: 130px; justify-content: flex-end; }
@media (max-width: 720px) { .swatch-row { grid-template-columns: 1fr 1fr; } }

/* ---------- Award recognition block (template for award-winning projects) ---------- */
.award-badges {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-top: 44px;
  padding-top: 28px;
  border-top: 1px solid rgba(212, 212, 216, 0.6);
}
.award-badges img { height: 76px; width: auto; flex: none; }
.award-badges p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--muted, #555);
}
@media (max-width: 720px) {
  .award-badges { flex-wrap: wrap; gap: 18px; }
}

/* ---------- Scroll-synced walkthrough video: scrubbed entry + chapter advance ---------- */
.video-scrolly {
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-top: clamp(80px, 10vw, 140px);
  height: 400vh; /* 100vh reveal (scrubbed) + 300vh pinned chapter budget */
}
.video-scrolly-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}
.video-scrolly-sticky video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}

/* ---------- The Atmosphere — lighting switcher overlay on the walkthrough ---------- */
.atmo {
  position: absolute; inset: 0;
  opacity: 0; pointer-events: none;
  transition: opacity 0.8s ease;
  z-index: 2;
}
.atmo.on { opacity: 1; pointer-events: auto; }
.atmo-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.7s ease;
}
.atmo-img.on { opacity: 1; }
.atmo-ui {
  position: absolute; left: 0; right: 0;
  bottom: clamp(28px, 7vh, 72px);
  display: flex; flex-direction: column; align-items: center; gap: clamp(20px, 3.5vh, 34px);
  z-index: 3;
}
.atmo-title {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(42px, 6vw, 76px);
  line-height: 1.1;
  color: #fff;
  text-shadow: 0 2px 28px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.atmo.on .atmo-title { opacity: 1; transform: translateY(0); }
.atmo-btns {
  display: flex; gap: clamp(16px, 3vw, 30px); flex-wrap: wrap; justify-content: center;
  opacity: 0; transform: translateY(18px);
  transition: opacity 0.7s ease 0.4s, transform 0.7s ease 0.4s;
}
.atmo.on .atmo-btns { opacity: 1; transform: translateY(0); }
.atmo-btns button {
  font: inherit;
  display: flex; flex-direction: column; align-items: center; gap: 9px;
  padding: 0; border: 0; background: none; color: #fff;
  cursor: pointer; position: relative;
}
.atmo-ic {
  width: clamp(48px, 5.6vw, 58px); height: clamp(48px, 5.6vw, 58px);
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.55);
  background: rgba(18, 18, 18, 0.35);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}
.atmo-ic svg { width: 44%; height: 44%; }
.atmo-time {
  font-size: 12px; letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.85);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.5);
}
.atmo-btns button:hover .atmo-ic { transform: translateY(-4px); border-color: #fff; background: rgba(255, 255, 255, 0.22); }
.atmo-btns button.on .atmo-ic { background: #fff; color: #121212; border-color: #fff; }
.atmo-tip {
  position: absolute; bottom: calc(100% + 10px); left: 50%;
  transform: translate(-50%, 5px);
  background: rgba(18, 18, 18, 0.85);
  color: #fff; font-size: 12px; letter-spacing: 0.04em;
  padding: 5px 11px; border-radius: 6px;
  white-space: nowrap;
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.atmo-btns button:hover .atmo-tip { opacity: 1; transform: translate(-50%, 0); }
.specnotes {
  position: absolute;
  left: clamp(20px, 5vw, 64px);
  top: clamp(64px, 9vh, 104px);
  z-index: 1;
  pointer-events: none;
}
.specnote {
  position: absolute;
  left: 0;
  top: 0;
  width: min(340px, 62vw);
  color: #fff;
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.specnote.on { opacity: 1; transform: none; }
.specnote-num {
  display: block;
  font-family: var(--mono);
  font-size: clamp(30px, 3.4vw, 44px);
  line-height: 1;
  opacity: 0.85;
  font-variant-numeric: tabular-nums;
}
.specnote-label {
  display: block;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.55);
  margin: 8px 0;
}
.specnote-data {
  display: block;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.92);
}
.specnote-line { display: block; padding: 3px 0; white-space: nowrap; }

/* Interactive California store map */
.castores-stage {
  display: grid;
  grid-template-columns: minmax(340px, 1fr) 300px;
  gap: clamp(36px, 6vw, 80px);
  align-items: start;
  margin: 44px 0;
}
.castores-stage .camap { width: 100%; height: auto; display: block; }
.castores-stage .ca-fill { fill: #ecebe8; stroke: none; }
.castores-stage .store-dot { fill: var(--ink); cursor: pointer; transition: r 0.18s ease; }
.castores-browser { margin-top: 22px; }
.cs-shot { position: relative; border-radius: 12px; overflow: hidden; background: #f4f4f2; cursor: zoom-in; }
.cs-shot img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block; }
.cs-navrow { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.cs-count { font-family: var(--mono); font-size: 12px; color: var(--muted); letter-spacing: 0.06em; }
.cs-arrows { display: flex; gap: 8px; }
.cs-arrows button {
  all: unset; cursor: pointer; width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid rgba(18, 18, 18, 0.25);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; color: var(--ink); transition: background 0.2s ease;
}
.cs-arrows button:hover { background: #f1f1ee; }
.castores-viewer {
  position: fixed; inset: 0; z-index: 1000; background: rgba(16, 16, 15, 0.94);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.25s ease; padding: 4vh 4vw;
}
.castores-viewer.on { opacity: 1; pointer-events: auto; }
.castores-viewer img { max-width: 92vw; max-height: 82vh; border-radius: 6px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5); cursor: zoom-out; }
.castores-viewer figcaption { color: rgba(255, 255, 255, 0.85); font-family: var(--mono); font-size: 13px; margin-top: 14px; letter-spacing: 0.04em; }
.castores-viewer .cs-arrows { position: absolute; inset: 0; pointer-events: none; display: flex; align-items: center; justify-content: space-between; padding: 0 3vw; }
.castores-viewer .cs-arrows button { pointer-events: auto; width: 46px; height: 46px; border-color: rgba(255, 255, 255, 0.4); color: #fff; font-size: 19px; background: rgba(0, 0, 0, 0.25); }
.castores-viewer .cs-arrows button:hover { background: rgba(255, 255, 255, 0.18); }
@media (max-width: 760px) { .castores-stage { grid-template-columns: 1fr; } }
.specnote-data .sw {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  margin: 0 4px -1px 2px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.4);
}

/* ---------- Password-protected vault (agency page) ---------- */
.vault-gate { display: flex; gap: 12px; margin-top: 28px; align-items: center; flex-wrap: wrap; }
.vault-gate input {
  font: inherit; padding: 12px 16px;
  border: 1px solid #d4d4d8; border-radius: 12px;
  width: min(260px, 60%); background: #fff;
}
.vault-gate button {
  font: inherit; font-weight: 600; padding: 12px 22px;
  border: 0; border-radius: 12px; background: #121212; color: #fff; cursor: pointer;
}
.vault-gate button:hover { opacity: 0.85; }
.vault-gate button:disabled { opacity: 0.5; cursor: wait; }
.vault-msg { color: #b91c1c; font-size: 13.5px; margin-top: 10px; width: 100%; }
.vault-h { font-family: var(--serif); font-size: clamp(26px, 3vw, 34px); margin-top: 72px; }
#vaultContent .step-body { margin-top: 18px; }
#vaultContent figure { margin-top: 44px; }
#vaultContent figure img {
  display: block; width: 100%;
  border-radius: 16px; border: 1px solid #e4e4e1;
  background: var(--card-light);
}

/* ---------- Click-to-zoom lightbox ---------- */
.case figure img.zoomable { cursor: zoom-in; }
.lightbox {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 4vmin;
  background: rgba(22, 22, 21, 0.93);
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease;
}
.lightbox.open { opacity: 1; pointer-events: auto; }
.lightbox img {
  max-width: 100%; max-height: 100%;
  width: auto; height: auto;
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
  cursor: zoom-out;
}
.lightbox-close {
  position: absolute; top: 18px; right: 22px;
  width: 44px; height: 44px;
  border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff; font-size: 26px; line-height: 1;
  cursor: pointer;
}
.lightbox-close:hover { background: rgba(255, 255, 255, 0.26); }
@media (prefers-reduced-motion: reduce) { .lightbox { transition: none; } }
/* Stacked variant — UI shots one per row at full column width instead of side by side */
.step-grid.stacked { grid-template-columns: 1fr; }
.step-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 36px;
}

/* Results stats */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 48px;
}
.stat {
  background: #f8f8f9;
  color: var(--ink);
  border-radius: 20px;
  padding: 32px 28px;
}
.stat-value {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 56px;
  line-height: 1;
}
.stat-title { margin-top: 18px; font-size: 16px; font-weight: 600; line-height: 1.4; }
.stat-sub { margin-top: 10px; font-family: var(--mono); font-size: 12.5px; color: var(--muted); line-height: 1.6; }

/* Next project */
.next-project {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
  margin-top: clamp(80px, 10vw, 140px);
  background: #f8f8f9;
  border-radius: 24px;
  padding: 40px 48px;
  text-decoration: none;
  transition: background 0.25s ease;
}
.next-project:hover { background: #eeeef0; }
.next-label {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.next-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(32px, 4vw, 52px);
  letter-spacing: -0.01em;
  margin-top: 10px;
}
.next-project img {
  width: 140px;
  height: auto;
  border-radius: 14px;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.next-project:hover img { transform: rotate(3deg) scale(1.05); }

/* Responsive */
@media (max-width: 820px) {
  .case-hero { padding-top: 150px; }
  .case-intro { grid-template-columns: 1fr; gap: 40px; }
  .case figure { grid-template-columns: 1fr; gap: 10px; }
  .psr { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr; }
  .step-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; }
  .next-project { padding: 28px; }
  .next-project img { width: 96px; }
}

@media (prefers-reduced-motion: reduce) {
  .case-title .word { opacity: 1; transform: none; animation: none; }
}

/* ---------- Placeholder figures until real screenshots arrive ---------- */
.fig-ph {
  aspect-ratio: var(--ar, 16/9);
  width: 100%;
  border-radius: 16px;
  background: var(--ph, var(--card-light));
  display: flex;
  align-items: center;
  justify-content: center;
}
.fig-ph span {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(18, 18, 18, 0.35);
  white-space: nowrap;
  transform: rotate(-4deg);
}
.case figure .fig-ph { margin: 0; }

/* ---------- Solution feature list ---------- */
.sol-item { margin-top: 32px; max-width: 62ch; }
.sol-item h3 {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-family: var(--sans);
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
}
.sol-item .sol-num {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
}
.sol-item p {
  margin-top: 8px;
  font-size: 17px;
  line-height: 1.7;
  color: #3f3f46;
}
.case-section .step-title + .sol-item { margin-top: 36px; }
#solution figure { margin-top: 36px; margin-bottom: 4px; }

/* ---------- Next-project gradient thumb (no image yet) ---------- */
.next-thumb {
  display: block;
  flex: none;
  width: 140px;
  height: 100px;
  border-radius: 14px;
  background: var(--lg, var(--card-light));
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.next-project:hover .next-thumb { transform: rotate(3deg) scale(1.05); }
@media (max-width: 820px) {
  .next-thumb { width: 96px; height: 72px; }
}

/* ---------- Traditional Chinese case typography ---------- */
html[lang="zh-Hant"] .case-title,
html[lang="zh-Hant"] .case-lead,
html[lang="zh-Hant"] .step-title { letter-spacing: 0.02em; }
html[lang="zh-Hant"] .case-intro-body,
html[lang="zh-Hant"] .step-body,
html[lang="zh-Hant"] .sol-item p { line-height: 1.95; font-size: 16.5px; }

/* ---------- About: experience entries — year indicator on its own line ---------- */
#experience .sol-item h3 { display: block; }
#experience .sol-item .sol-num {
  display: block;
  margin-bottom: 6px;
}

/* ---------- Work index — book table of contents ---------- */
.toc-era {
  position: relative;
  margin-top: clamp(64px, 9vw, 110px);
}
.toc-era-num {
  position: absolute;
  top: -14px;
  right: 0;
  font-family: var(--serif);
  font-size: clamp(72px, 9vw, 128px);
  line-height: 1;
  color: rgba(18, 18, 18, 0.06);
  pointer-events: none;
  user-select: none;
}
.toc-era-head .case-kicker { margin-bottom: 14px; }
.toc-era-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.toc-era-note {
  margin-top: 10px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--muted);
  max-width: 560px;
}

.toc-list { margin-top: 30px; }
.toc-row {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 17px 0;
  text-decoration: none;
  color: inherit;
}
.toc-row + .toc-row { border-top: 1px solid rgba(18, 18, 18, 0.06); }
.toc-num {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--faint);
  min-width: 26px;
}
.toc-title {
  font-family: var(--serif);
  font-size: clamp(22px, 2.8vw, 32px);
  line-height: 1.2;
  transition: transform 0.25s ease;
}
.toc-row:hover .toc-title { font-style: italic; transform: translateX(6px); }
.is-ext .toc-title::after {
  content: "\2197";
  font-size: 0.55em;
  vertical-align: 0.6em;
  margin-left: 7px;
  color: var(--faint);
}
.toc-leader {
  flex: 1;
  min-width: 40px;
  border-bottom: 2px dotted rgba(18, 18, 18, 0.18);
  transform: translateY(-5px);
  transition: border-color 0.25s ease;
}
.toc-row:hover .toc-leader { border-color: rgba(18, 18, 18, 0.45); }
.toc-tags {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.toc-year {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink);
  min-width: 58px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.toc-row.is-soon { cursor: default; }
.is-soon .toc-title,
.is-soon .toc-year { color: var(--faint); }
.is-soon:hover .toc-title { font-style: normal; transform: none; }
.is-soon:hover .toc-leader { border-color: rgba(18, 18, 18, 0.18); }

/* floating hover preview card */
.toc-peek {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 60;
  width: 300px;
  border-radius: 18px;
  overflow: hidden;
  background: var(--bg);
  border: 1px solid rgba(18, 18, 18, 0.08);
  box-shadow: 0 24px 64px rgba(18, 18, 18, 0.16);
  pointer-events: none;
}
.toc-peek:not([hidden]) { animation: peek-in 0.22s ease both; }
@keyframes peek-in {
  from { opacity: 0; scale: 0.96; }
  to { opacity: 1; scale: 1; }
}
.toc-peek-img {
  height: 175px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--lg, var(--card-light));
}
.toc-peek-img.has-photo span { display: none; }
.toc-peek-img span {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(18, 18, 18, 0.4);
  transform: rotate(-4deg);
}
.toc-peek-body { padding: 14px 16px 16px; }
.toc-peek-note { font-size: 13.5px; line-height: 1.55; color: var(--ink); }
.toc-peek-tags {
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}

/* CJK has no italics: hover shifts color instead */
html[lang="zh-Hant"] .toc-row:hover .toc-title { font-style: normal; color: var(--muted); }

@media (hover: none) {
  .toc-peek { display: none; }
}
@media (max-width: 719px) {
  .toc-peek { display: none; }
  .toc-tags { display: none; }
  .toc-era-num { display: none; }
}

/* ---------- Work index — subject-index filter ---------- */
.toc-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  margin-top: clamp(40px, 6vw, 60px);
  padding-top: 18px;
  border-top: 1px solid rgba(18, 18, 18, 0.08);
}
.toc-filter-btn {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  background: none;
  border: none;
  padding: 0 0 2px;
  cursor: pointer;
  transition: color 0.2s ease;
  border-bottom: 1px solid transparent;
}
.toc-filter-btn span {
  font-size: 10.5px;
  color: var(--faint);
  margin-left: 4px;
}
.toc-filter-btn:hover { color: var(--ink); }
.toc-filter-btn.on {
  color: var(--ink);
  border-bottom-color: var(--ink);
}
/* rows/chapters excluded by the active filter */
.toc-row.f-hide,
.toc-era.f-hide { display: none; }

/* ============================================================
   Brand case study — interactive concept-formula figure (#2)
   Machine + Interaction + People = the Peblla mark. Hover (or
   keyboard-focus) an element: it lifts a little and its grey
   caption turns black. Pure CSS, no JS.
   ============================================================ */
.bcf-figure { margin-top: clamp(28px, 4vw, 48px); }
.bcf {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: clamp(4px, 1.2vw, 16px);
  padding: clamp(30px, 5vw, 60px) clamp(10px, 3vw, 28px);
  border: 1px solid #e4e4e1;
  border-radius: 16px;
  background: #fafafa;
  overflow-x: auto;
}
.bcf-item {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  width: clamp(58px, 9vw, 104px);
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  border-radius: 12px;
  outline: none;
}
.bcf-item:hover,
.bcf-item:focus-visible { transform: scale(1.07); }
.bcf-glyph {
  height: clamp(46px, 7vw, 68px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #121212;
}
.bcf-glyph svg { height: 100%; width: auto; display: block; }
.bcf-glyph-stroke svg { height: 84%; }
/* beat .step figure img (0,1,2): reset the gallery img sizing/background */
.bcf-figure .bcf-glyph img {
  height: 100%;
  width: auto;
  max-width: none;
  display: block;
  background: none;
  border-radius: 0;
}
/* the "Peblla" glyph is the wordmark CSS-cropped to just the leading "p" */
.bcf-glyph-p {
  justify-content: flex-start;
  overflow: hidden;
  aspect-ratio: 100 / 160;
}
.bcf-cap {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  font-family: var(--sans);
  font-size: 12.5px;
  line-height: 1.5;
  color: #adadad;
  transition: color 0.3s ease;
}
.bcf-cap b { font-weight: 600; color: #7a7a7a; transition: color 0.3s ease; }
.bcf-item:hover .bcf-cap,
.bcf-item:focus-visible .bcf-cap,
.bcf-item:hover .bcf-cap b,
.bcf-item:focus-visible .bcf-cap b { color: #121212; }
.bcf-op {
  flex: 0 0 auto;
  height: clamp(46px, 7vw, 68px);
  display: flex;
  align-items: center;
  font-family: var(--sans);
  font-size: clamp(22px, 3.6vw, 38px);
  font-weight: 300;
  color: #121212;
  user-select: none;
}
.bcf-hint {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #b8b8b8;
}

/* the whole Brand case study reacts to hover — every image lifts a little */
.case-brand .gallery img,
.case-brand figure:not(.bcf-figure) > img {
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.case-brand .gallery img:hover,
.case-brand figure:not(.bcf-figure) > img:hover { transform: scale(1.02); }

@media (prefers-reduced-motion: reduce) {
  .bcf-item,
  .bcf-cap, .bcf-cap b,
  .case-brand .gallery img,
  .case-brand figure:not(.bcf-figure) > img { transition: none; }
  .bcf-item:hover, .bcf-item:focus-visible,
  .case-brand .gallery img:hover,
  .case-brand figure:not(.bcf-figure) > img:hover { transform: none; }
}

/* ---------- Archive pages (Squarespace migration) ---------- */
.archive-badge {
  display: inline-block; font-family: var(--mono); font-size: 12px;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted);
  border: 1px solid #e4e4e7; border-radius: 999px; padding: 6px 14px; margin-bottom: 24px;
}
.gallery-2col { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 40px; }
.gallery-3col { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 40px; }
.gallery-2col img, .gallery-3col img { width: 100%; height: auto; border-radius: 12px; display: block; }
@media (max-width: 720px) { .gallery-2col, .gallery-3col { grid-template-columns: 1fr; } }
.archive-links { display: flex; flex-wrap: wrap; gap: 12px 28px; margin-top: 28px; }
.video-embed { position: relative; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; background: #000; margin: 36px 0 0; }
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- Recognition record: awards / exhibitions / publications ---------- */
.rec-list { margin-top: 36px; border-top: 1px solid rgba(212, 212, 216, 0.7); }
.rec-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) auto;
  gap: 20px;
  align-items: baseline;
  padding: 20px 0;
  border-bottom: 1px solid rgba(212, 212, 216, 0.5);
}
.rec-row-award { align-items: center; }
.rec-badge { display: block; }
.rec-badge img { display: block; width: 104px; height: auto; }
.rec-row-stack { grid-template-columns: 1fr; gap: 0; }
.rec-row-stack .rec-date { display: block; margin-bottom: 7px; }
.rec-level, .rec-date {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  white-space: nowrap;
}
.rec-main { display: block; }
.rec-main b { display: block; font-size: 17px; font-weight: 500; line-height: 1.4; }
.rec-main i {
  display: block;
  font-style: normal;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--muted);
  margin-top: 5px;
}
.rec-tag {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--faint);
  white-space: nowrap;
}
.rec-links { display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }
.rec-links a {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid rgba(113, 113, 122, 0.35);
  white-space: nowrap;
}
.rec-links a:hover { color: var(--ink); border-bottom-color: var(--ink); }
@media (max-width: 760px) {
  .rec-row { grid-template-columns: 1fr; gap: 8px; }
  .rec-badge img { width: 84px; }
  .rec-links { align-items: flex-start; }
  .rec-tag { white-space: normal; }
}
