/* page-specific styles */

/* ───────────── CASES PAGE ───────────── */
.cases-filter {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin: 40px 0 24px;
}
.cases-page {
  padding: 80px var(--pad-x) 40px;
}
.cases-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px;
}
.case-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 0;
  overflow: hidden;
  transition: border-color .2s, transform .2s, box-shadow .2s;
  display: flex; flex-direction: column;
}
.case-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 16px 36px -20px rgba(10,10,10,.12);
}
.case-cover {
  height: 200px; position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--accent-light) 0%, var(--bg-alt) 100%);
  border-bottom: 1px solid var(--border);
}
.case-cover-content {
  position: absolute; inset: 24px;
  display: flex; flex-direction: column; justify-content: space-between;
}
.case-cover-industry {
  display: inline-flex; align-self: flex-start;
  font-family: var(--mono); font-size: 12px; font-weight: 700;
  letter-spacing: .14em;
  padding: 5px 10px; border-radius: 4px;
  background: var(--ink); color: #fff;
}
.case-cover-mock {
  display: flex; align-items: flex-end; gap: 4px;
  height: 100px; padding: 0 8px;
}
.case-cover-mock .bar { flex: 1; background: rgba(10,10,10,.15); border-radius: 4px; }
.case-cover-mock .bar.is-accent { background: var(--ink); }
.case-cover-art {
  width: 100%; height: 130px; display: block;
  filter: drop-shadow(0 4px 14px rgba(10,10,10,.08));
}
.case-cover-icon {
  position: absolute; right: 24px; top: 24px;
  width: 56px; height: 56px; border-radius: 14px;
  background: var(--surface); color: var(--accent-dark);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; font-weight: 700;
  border: 1px solid var(--border);
}
.case-body { padding: 24px; flex: 1; display: flex; flex-direction: column; gap: 10px; }
.case-client {
  font-weight: 700;
  color: var(--accent-dark); letter-spacing: .01em;
}
.case-t {
  font-weight: 600; color: var(--ink);
  letter-spacing: -.015em;
}
.case-d {
  line-height: 1.7; color: var(--muted);
  flex: 1;
}
.case-d b { color: var(--ink); font-weight: 600; }
.case-feats {
  margin-top: 8px; display: flex; gap: 6px; flex-wrap: wrap;
}
.case-feats span {
  font-family: var(--mono); font-size: 12px;
  padding: 3px 8px; border-radius: 4px;
  background: var(--bg-alt); color: var(--muted);
  border: 1px solid var(--border);
}

/* ───── case card · logo + system + features layout ───── */
.case-logo {
  height: 144px;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: relative;
  padding: 24px;
}
.case-logo-img {
  max-height: 64px; max-width: 78%;
  object-fit: contain;
}
.case-logo-fallback {
  text-align: center;
  font-family: var(--font);
}
.case-logo-fallback strong {
  display: block;
  font-size: 17px; font-weight: 700;
  color: var(--ink-soft); letter-spacing: .02em;
  margin-bottom: 6px;
}
.case-logo-fallback small {
  display: block;
  font-family: var(--mono);
  font-size: 9.5px; font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--muted-light);
}
.case-logo[data-pending]::before {
  content: "LOGO";
  position: absolute; top: 12px; left: 14px;
  font-family: var(--mono);
  font-size: 8.5px; font-weight: 700;
  letter-spacing: .14em; color: var(--muted-light);
}
.case-industry-pill {
  font-family: var(--mono); font-size: 12px; font-weight: 700;
  color: var(--accent-dark); letter-spacing: .1em;
  text-transform: uppercase;
}
.case-feats-list {
  margin: 10px 0 0; padding: 0; list-style: none;
  display: flex; flex-direction: column; gap: 7px;
}
.case-feats-list li {
  color: var(--ink-soft); line-height: 1.55;
  padding-left: 18px; position: relative;
}
.case-feats-list li::before {
  content: "→"; position: absolute; left: 0; top: 0;
  color: var(--accent); font-weight: 700;
}

/* ───── cases: TPI-style filter tabs + visual cards ───── */
.cases-filter {
  margin-bottom: 28px;
  display: flex; flex-wrap: wrap; gap: 8px;
  padding-bottom: 18px; border-bottom: 1px solid var(--border);
}
.cases-filter-tab {
  font: inherit;
  font-size: 13.5px; font-weight: 500;
  color: var(--ink-soft);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 9px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: border-color .2s, color .2s, background .2s, transform .15s;
  letter-spacing: .01em;
}
.cases-filter-tab .ft-count {
  font-family: var(--mono); font-size: 10.5px; font-weight: 700;
  color: var(--muted); margin-left: 6px;
}
.cases-filter-tab:hover {
  border-color: var(--ink);
  color: var(--ink);
}
.cases-filter-tab.is-active {
  background: var(--ink); color: #fff; border-color: var(--ink);
}
.cases-filter-tab.is-active .ft-count { color: rgba(255,255,255,.6); }

.case-card.is-hidden { display: none; }

/* Visual cover for TPI-style cards */
.case-cover-v2 {
  height: 168px; position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--c1, #f1f5f9) 0%, var(--c2, #e2e8f0) 100%);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
}
.case-cover-v2 .cv-pattern {
  position: absolute; inset: 0;
  background-image: radial-gradient(circle at 18% 24%, rgba(255,255,255,.45) 0 1.2px, transparent 1.3px), radial-gradient(circle at 78% 72%, rgba(10,10,10,.06) 0 1.2px, transparent 1.3px);
  background-size: 22px 22px, 28px 28px;
  opacity: .75;
}
.case-cover-v2 .cv-icon {
  position: relative; z-index: 2;
  width: 64px; height: 64px; border-radius: 16px;
  background: rgba(255,255,255,.92); color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(10,10,10,.06);
  box-shadow: 0 8px 24px -10px rgba(10,10,10,.18);
}
.case-cover-v2 .cv-icon svg { width: 28px; height: 28px; }
.case-cover-v2 .cv-logo {
  position: relative; z-index: 2;
  height: 64px; padding: 8px 18px;
  border-radius: 14px;
  background: rgba(255,255,255,.95);
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid rgba(10,10,10,.06);
  box-shadow: 0 8px 24px -10px rgba(10,10,10,.18);
}
.case-cover-v2 .cv-logo img {
  max-height: 40px; max-width: 180px;
  object-fit: contain;
  display: block;
}
.case-cover-v2 .cv-client {
  position: absolute; left: 18px; bottom: 14px; z-index: 2;
  font-family: var(--mono); font-size: 12px; font-weight: 700;
  color: var(--ink); letter-spacing: .12em;
  background: rgba(255,255,255,.85);
  padding: 5px 10px; border-radius: 4px;
  backdrop-filter: blur(4px);
  text-transform: uppercase;
}
.case-cover-v2 .cv-tag {
  position: absolute; right: 18px; top: 14px; z-index: 2;
  font-family: var(--mono); font-size: 12px; font-weight: 700;
  color: rgba(10,10,10,.55); letter-spacing: .15em;
}

.case-body-v2 { padding: 22px 24px 26px; display: flex; flex-direction: column; gap: 10px; }
.case-body-v2 .case-industry-pill { font-size: 10.5px; }
.case-body-v2 .case-t-v2 {
  font-weight: 600; color: var(--ink);
  letter-spacing: -.01em; line-height: 1.4;
}
.case-body-v2 .case-desc {
  line-height: 1.65; color: var(--muted);
}

.cases-disclaimer {
  margin-top: 32px;
  padding: 18px 22px;
  background: var(--bg-alt);
  border: 1px dashed var(--border);
  border-radius: 10px;
  line-height: 1.65;
  color: var(--muted);
}

/* Cases — assets section */
.cases-asset {
  padding: 100px var(--pad-x);
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
}
.asset-grid {
  margin-top: 56px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
}
.asset-item {
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: border-color .2s;
}
.asset-item:hover { border-color: var(--accent); }
.asset-n {
  font-weight: 600; color: var(--ink);
  margin-bottom: 6px;
}
.asset-d {
  font-family: var(--mono); font-size: 12px;
  color: var(--muted); letter-spacing: .03em;
}

/* ───────────── CASES · PARTNER / TRUSTED-BY LOGO WALL ───────────── */
.cases-partners {
  padding: 100px var(--pad-x);
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.cases-partners .container { max-width: 1200px; }
.logo-wall {
  margin-top: 48px;
  display: grid; grid-template-columns: repeat(5, 1fr);
  border: 1px solid var(--border); border-radius: 18px; overflow: hidden;
}
.logo-cell {
  display: flex; align-items: center; justify-content: center;
  min-height: 120px; padding: 24px 16px; text-align: center;
  border-right: 1px solid var(--border); border-bottom: 1px solid var(--border);
  font-weight: 600; letter-spacing: .02em;
  color: var(--muted);
  transition: color .2s, background .2s;
}
.logo-cell .lc-sub {
  display: block; margin-top: 6px;
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  letter-spacing: .12em; color: var(--muted-light);
}
.logo-cell:hover { color: var(--ink); background: var(--bg-alt); }
.logo-wall .logo-cell:nth-child(5n) { border-right: 0; }
.logo-wall .logo-cell:nth-last-child(-n+5) { border-bottom: 0; }
.logo-note {
  margin-top: 24px; font-family: var(--mono); font-size: 12px;
  color: var(--muted-light); letter-spacing: .04em;
}

/* ───────────── RESPONSIVE ───────────── */
@media (max-width: 1024px) {
  .cases-grid { grid-template-columns: 1fr; }
  .asset-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .logo-wall { grid-template-columns: repeat(3, 1fr); }
  .logo-wall .logo-cell:nth-child(5n) { border-right: 1px solid var(--border); }
  .logo-wall .logo-cell:nth-child(3n) { border-right: 0; }
  .logo-wall .logo-cell:nth-last-child(-n+5) { border-bottom: 1px solid var(--border); }
}

@media (max-width: 768px) {
  .cases-filter { gap: 6px; padding-bottom: 14px; margin-bottom: 22px; }
  .cases-filter-tab { font-size: 12.5px; padding: 7px 12px; }
  .case-cover-v2 { height: 140px; align-items: flex-start; padding-top: 18px; }
  .case-cover-v2 .cv-icon { width: 56px; height: 56px; border-radius: 14px; }
  .case-cover-v2 .cv-logo { height: 52px; padding: 6px 14px; }
  .case-cover-v2 .cv-logo img { max-height: 32px; max-width: 150px; }
  .case-cover-v2 .cv-client {
    left: 50%; transform: translateX(-50%);
    width: max-content; max-width: calc(100% - 36px);
  }
  .case-body-v2 { padding: 18px 18px 22px; }
}

@media (max-width: 720px) {
  .cases-page, .cases-asset { padding: 56px var(--pad-x); }
  .asset-grid { grid-template-columns: repeat(2, 1fr); }
  .case-cover { height: 160px; }
  .case-cover-icon { width: 44px; height: 44px; font-size: 20px; }
  .case-body { padding: 20px 16px; }

  /* 16px minimum */
  .cases-filter-tab, .case-industry-pill, .asset-d, .logo-note { font-size: 16px; }
}

@media (max-width: 560px) {
  .cases-partners { padding: 56px var(--pad-x); }
  .logo-wall { grid-template-columns: repeat(2, 1fr); }
  .logo-wall .logo-cell:nth-child(3n) { border-right: 1px solid var(--border); }
  .logo-wall .logo-cell:nth-child(2n) { border-right: 0; }
  .logo-cell { min-height: 96px; }
}

@media (max-width: 375px) {
  .cases-grid { gap: 12px; }
  .cases-page, .cases-asset { padding: 44px var(--pad-x); }
}
