/* Selected client systems: an evidence-board composition using the site's existing palette. */
.case-board {
  position: relative;
  max-width: 1560px;
  margin: 0 auto;
  overflow: hidden;
  padding: clamp(56px, 7vw, 92px) clamp(20px, 6.25vw, 80px) clamp(100px, 12vw, 180px);
  background:
    linear-gradient(rgba(133, 211, 222, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(133, 211, 222, 0.035) 1px, transparent 1px),
    #0d0c0b;
  background-size: 52px 52px;
  isolation: isolate;
}

.case-board::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 9% 28%, rgba(172, 108, 64, 0.18), transparent 25rem),
    radial-gradient(circle at 88% 71%, rgba(133, 211, 222, 0.1), transparent 30rem);
  content: "";
  pointer-events: none;
}

.case-board-heading { margin-bottom: clamp(36px, 5vw, 72px); }

.case-board-eyebrow,
.case-file-meta,
.case-file-proof,
.case-file-open,
.case-file-rail {
  font-family: "Geist", system-ui, sans-serif;
}

.case-board-eyebrow {
  margin: 0 0 20px;
  color: var(--tertiary);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.case-board-heading h1 {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: clamp(42px, 7vw, 104px);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 0.96;
}

html[lang^="zh"] .case-board-heading h1,
html[lang^="zh"] .case-file-copy strong {
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
}

html[lang^="zh"] :is(.case-board-eyebrow, .case-file-meta, .case-file-proof, .case-file-open, .case-file-rail) {
  letter-spacing: 0.04em;
}

.case-file .project-completion {
  font: 500 12px/1.45 "Geist", system-ui, sans-serif;
  color: var(--muted);
}

.case-board-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(18px, 2.5vw, 36px);
  align-items: start;
  perspective: 1200px;
}

.case-file {
  --case-rotate-x: 0deg;
  --case-rotate-y: 0deg;
  --case-glow-x: 50%;
  --case-glow-y: 50%;
  position: relative;
  display: grid;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(160, 141, 131, 0.44);
  border-radius: 3px;
  background: #171513;
  color: var(--text);
  text-decoration: none;
  transform: rotateX(var(--case-rotate-x)) rotateY(var(--case-rotate-y));
  transform-style: preserve-3d;
  transition: border-color 280ms ease, box-shadow 280ms ease, transform 180ms ease;
  will-change: transform;
}

.case-file::after {
  position: absolute;
  inset: 0;
  z-index: 6;
  background: radial-gradient(circle at var(--case-glow-x) var(--case-glow-y), rgba(255, 219, 199, 0.16), transparent 30%);
  content: "";
  opacity: 0;
  pointer-events: none;
  transition: opacity 250ms ease;
}

.case-file:hover,
.case-file:focus-visible {
  border-color: rgba(255, 182, 136, 0.78);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.38), 0 0 30px rgba(172, 108, 64, 0.1);
  outline: none;
}

.case-file:hover::after,
.case-file:focus-visible::after {
  opacity: 1;
}

.case-file-wide { grid-column: span 7; }

.case-file-tall {
  grid-column: span 5;
  margin-top: clamp(50px, 8vw, 130px);
}

.case-file-standard {
  grid-column: 2 / span 5;
  margin-top: -10px;
}

.case-file-offset {
  grid-column: 7 / span 6;
  margin-top: clamp(70px, 9vw, 140px);
}

.case-file-rail {
  position: absolute;
  inset: 0 auto 0 0;
  z-index: 5;
  display: flex;
  width: 32px;
  align-items: center;
  justify-content: space-between;
  border-right: 1px solid rgba(133, 211, 222, 0.24);
  background: rgba(9, 8, 7, 0.82);
  color: var(--tertiary);
  font-size: 8px;
  letter-spacing: 0.16em;
  padding: 18px 0;
  text-transform: uppercase;
  writing-mode: vertical-rl;
}

.case-file-image {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  margin-left: 32px;
  overflow: hidden;
  background: #090807;
}

.case-file-tall .case-file-image { aspect-ratio: 4 / 3.4; }

.case-file-image::after {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 52%, rgba(5, 4, 3, 0.76)),
    linear-gradient(90deg, rgba(13, 12, 11, 0.2), transparent 38%);
  content: "";
  pointer-events: none;
}

.case-file-image img {
  width: 100%;
  height: 100%;
  filter: saturate(0.78) contrast(1.08);
  object-fit: cover;
  transform: scale(1.012);
  transition: filter 500ms ease, transform 900ms cubic-bezier(0.16, 1, 0.3, 1);
}

.case-file:hover .case-file-image img,
.case-file:focus-visible .case-file-image img {
  filter: saturate(1) contrast(1.03);
  transform: scale(1.06);
}

.case-file-scan {
  position: absolute;
  inset: -30% 0 auto;
  z-index: 3;
  height: 22%;
  background: linear-gradient(180deg, transparent, rgba(158, 238, 255, 0.18), transparent);
  opacity: 0;
  pointer-events: none;
}

.case-file:hover .case-file-scan,
.case-file:focus-visible .case-file-scan {
  animation: case-scan 1.4s ease-in-out;
  opacity: 1;
}

.case-file-copy {
  position: relative;
  display: grid;
  gap: 14px;
  min-height: 218px;
  margin-left: 32px;
  padding: clamp(22px, 3vw, 38px);
}

.case-file-copy::before {
  position: absolute;
  top: 0;
  right: 38px;
  width: 58px;
  height: 1px;
  background: var(--primary-bright);
  content: "";
}

.case-file-meta {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  color: var(--tertiary);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.case-file-copy strong {
  max-width: 16ch;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: clamp(26px, 3.2vw, 48px);
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.02;
}

.case-file-proof {
  align-self: end;
  color: var(--secondary);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.case-file-open {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding-top: 14px;
  text-transform: uppercase;
}

.case-file-open b {
  color: var(--primary-bright);
  font-size: 17px;
  font-weight: 400;
  transition: transform 250ms ease;
}

.case-file:hover .case-file-open b,
.case-file:focus-visible .case-file-open b { transform: translate(3px, -3px); }

.case-board-animated [data-project-reveal]:not(.is-visible):not(:focus-visible) {
  opacity: 0;
  transform: translateY(34px);
}

.case-board-animated .case-file {
  transition: opacity 720ms ease, border-color 280ms ease, box-shadow 280ms ease, transform 900ms cubic-bezier(0.16, 1, 0.3, 1);
}

.case-file:nth-child(2) { transition-delay: 100ms; }
.case-file:nth-child(3) { transition-delay: 50ms; }
.case-file:nth-child(4) { transition-delay: 150ms; }

@keyframes case-scan {
  from { transform: translateY(0); }
  to { transform: translateY(620%); }
}
@media (max-width: 860px) {
  .case-board-grid { grid-template-columns: 1fr; }

  .case-file-wide,
  .case-file-tall,
  .case-file-standard,
  .case-file-offset {
    grid-column: 1;
    margin-top: 0;
  }

}
@media (max-width: 560px) {
  .case-board { padding-inline: 16px; }
  .case-board-heading h1 { font-size: clamp(40px, 15vw, 64px); }
  .case-file-rail { width: 26px; }

  .case-file-image,
  .case-file-copy { margin-left: 26px; }

  .case-file-copy {
    min-height: 200px;
    padding: 22px 18px;
  }

  .case-file-copy strong { font-size: clamp(28px, 9vw, 40px); }

}

.case-file:focus-visible { outline: 2px solid var(--tertiary); outline-offset: 4px; }

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