/* ==========================================================
   CASES HUB · matrix + industry + status views
   ========================================================== */

/* Top ribbon styles live in home.css (single source of truth across pages). */

/* ============ HERO ============ */
.hub-hero {
  background: linear-gradient(180deg, #FAFAF8 0%, #F4F1ED 100%);
  padding: 88px 56px 72px;
  border-bottom: 1px solid var(--hairline);
}
.hub-hero-inner { max-width: 1320px; margin: 0 auto; }
.hub-hero .chip {
  display: inline-block; font-family: var(--font-display);
  font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  font-weight: 600; color: var(--ink-3);
  padding: 6px 12px; border-radius: 999px;
  background: #fff; border: 1px solid var(--hairline);
}
.hub-hero h1 {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(56px, 7vw, 104px); line-height: 0.95; letter-spacing: -0.035em;
  color: var(--ink-1); margin: 0 0 22px;
}
.hub-hero h1 .grad {
  background: linear-gradient(90deg, #FB993F, #F83C72, #A78BFA);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hub-hero .lede {
  font-size: 19px; line-height: 1.55; color: var(--ink-3);
  max-width: 760px; margin: 0 0 44px;
}
.hub-counters { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; background: var(--hairline); border: 1px solid var(--hairline); border-radius: 12px; overflow: hidden; max-width: 820px; }
.hub-counters .c { background: #fff; padding: 22px 22px; }
.hub-counters .n { font-family: var(--font-display); font-weight: 600; font-size: 38px; line-height: 1; color: var(--ink-1); letter-spacing: -0.02em; }
.hub-counters .n .g { background: linear-gradient(90deg, #FB993F, #F83C72, #A78BFA); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hub-counters .l { font-family: var(--font-display); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-4); margin-top: 8px; font-weight: 500; }

/* ============ SECTION HEAD ============ */
.pmatrix-section { padding: 100px 56px; background: #fff; }
.pmatrix-wrap { max-width: 1320px; margin: 0 auto; }
.pmatrix-head { display: grid; grid-template-columns: 1.3fr 0.7fr; gap: 48px; align-items: end; margin-bottom: 28px; }
.pmatrix-head .section-h { font-family: var(--font-display); font-weight: 600; font-size: clamp(36px, 4vw, 52px); line-height: 1.05; letter-spacing: -0.02em; color: var(--ink-1); margin: 10px 0 0; }
.pmatrix-head .lede-sub { font-size: 16px; line-height: 1.55; color: var(--ink-3); margin-top: 16px; max-width: 640px; }

/* ============ VIEW SWITCHER ============ */
.view-switcher {
  display: flex; align-items: center; gap: 4px;
  background: var(--canvas-alt); border: 1px solid var(--hairline);
  border-radius: 10px; padding: 4px;
  align-self: end; justify-self: end;
}
.view-switcher .vs-label {
  font-family: var(--font-display); font-size: 11px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ink-4); font-weight: 600;
  padding: 0 12px 0 8px;
}
.view-switcher button {
  font-family: var(--font-display); font-size: 13px; font-weight: 600;
  color: var(--ink-3); background: transparent; border: 0;
  padding: 8px 14px; border-radius: 7px; cursor: pointer;
  display: flex; align-items: center; gap: 6px;
}
.view-switcher button:hover { color: var(--ink-1); }
.view-switcher button.active { background: #fff; color: var(--ink-1); box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
.view-switcher .vs-icon { font-size: 14px; }

/* ============ LEGEND ============ */
.pmatrix-legend { display: flex; gap: 20px; font-family: var(--font-display); font-size: 12px; color: var(--ink-3); font-weight: 500; }
.pmatrix-legend > div { display: flex; align-items: center; gap: 8px; }
.pmatrix-legend .dot { width: 8px; height: 8px; border-radius: 50%; }
.pmatrix-legend .dot.live { background: #10B981; }
.pmatrix-legend .dot.building { background: #F59E0B; }
.pmatrix-legend .dot.concept { background: #A78BFA; }

/* ============ PATTERN PILL (shared) ============ */
.pt-pill {
  display: flex; flex-direction: column; gap: 6px;
  background: #fff; border: 1px solid var(--hairline); border-radius: 10px;
  padding: 14px 14px 12px;
  text-decoration: none; color: inherit;
  transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
  position: relative;
}
.pt-pill:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.06);
  border-color: var(--ind-color);
}
.pt-pill.featured {
  background: linear-gradient(180deg, #fff 0%, #FFF7EF 100%);
  border-color: var(--brand-orange);
}
.pt-pill-stage { font-family: var(--font-display); font-weight: 600; font-size: 9px; letter-spacing: 0.08em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; align-self: flex-start; }
.pt-pill-title { font-family: var(--font-display); font-weight: 600; font-size: 14px; line-height: 1.25; color: var(--ink-1); letter-spacing: -0.01em; }
.pt-pill-one { font-size: 12px; line-height: 1.45; color: var(--ink-3); }
.pt-pill-arr { font-family: var(--font-display); font-weight: 600; font-size: 11px; color: var(--brand-purple); margin-top: 4px; }
.pt-pill-flag { position: absolute; top: 10px; right: 12px; font-family: var(--font-display); font-weight: 600; font-size: 9px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--brand-orange); }

/* ============ MATRIX VIEW ============ */
.pmatrix {
  display: grid;
  grid-template-columns: 180px repeat(4, 1fr);
  gap: 1px;
  background: var(--hairline);
  border: 1px solid var(--hairline);
  border-radius: 16px;
  overflow: hidden;
}
.pm-corner { background: #FAFAF8; }
.pm-col-head {
  background: #FAFAF8;
  padding: 16px 18px;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 4px;
}
.pm-col-label { font-family: var(--font-display); font-weight: 600; font-size: 14px; color: var(--ink-1); letter-spacing: -0.01em; }
.pm-col-count { font-family: var(--font-display); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-4); font-weight: 500; }

.pm-row-head {
  background: #FAFAF8;
  padding: 18px;
  display: flex; flex-direction: column; justify-content: center; gap: 6px;
  position: relative;
}
.pm-row-bar { width: 3px; height: 28px; background: var(--ind-color); border-radius: 2px; margin-bottom: 4px; }
.pm-row-label { font-family: var(--font-display); font-weight: 600; font-size: 15px; color: var(--ink-1); letter-spacing: -0.01em; line-height: 1.2; }
.pm-row-count { font-family: var(--font-display); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-4); font-weight: 500; }

.pm-cell-multi {
  background: #fff;
  padding: 12px;
  display: flex; flex-direction: column; gap: 8px;
}
.pm-cell.empty {
  background: #FAFAF8;
  color: var(--ink-4); display: flex; align-items: center; justify-content: center;
  font-size: 18px; min-height: 120px;
}

/* ============ INDUSTRY VIEW ============ */
.iv-wrap { display: flex; flex-direction: column; gap: 40px; }
.iv-section {
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: 16px;
  padding: 32px;
  position: relative; overflow: hidden;
}
.iv-section::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: var(--ind-color);
}
.iv-head { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; padding-top: 8px; }
.iv-bar { width: 6px; height: 40px; background: var(--ind-color); border-radius: 3px; }
.iv-label { font-family: var(--font-display); font-weight: 600; font-size: 26px; letter-spacing: -0.02em; color: var(--ink-1); line-height: 1; }
.iv-meta { font-family: var(--font-display); font-size: 12px; color: var(--ink-4); margin-top: 6px; font-weight: 500; letter-spacing: 0.02em; }

.iv-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
}
.iv-col { display: flex; flex-direction: column; gap: 10px; }
.iv-col-head {
  font-family: var(--font-display); font-weight: 600; font-size: 11px;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3);
  padding-bottom: 10px; border-bottom: 1px solid var(--hairline); margin-bottom: 4px;
}
.iv-empty { color: var(--ink-4); font-size: 13px; padding: 12px 0; text-align: center; }

/* ============ STATUS VIEW ============ */
.sv-wrap { display: flex; flex-direction: column; gap: 48px; }
.sv-section { }
.sv-head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 20px; }
.sv-stage {
  font-family: var(--font-display); font-weight: 600; font-size: 12px;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 7px 14px; border-radius: 999px;
}
.sv-sub { font-size: 14px; color: var(--ink-3); font-family: var(--font-display); font-weight: 500; }
.sv-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.sv-card {
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  padding: 20px;
  text-decoration: none; color: inherit;
  display: flex; flex-direction: column; gap: 10px;
  min-height: 170px;
  transition: transform 0.18s, box-shadow 0.18s;
}
.sv-card:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(0,0,0,0.06); }
.sv-card.featured { background: linear-gradient(180deg, #fff 0%, #FFF7EF 100%); border-color: var(--brand-orange); }
.sv-path {
  font-family: var(--font-display); font-weight: 600; font-size: 10px;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--ind-color);
  display: flex; align-items: center; gap: 8px;
}
.sv-bar { width: 3px; height: 12px; background: var(--ind-color); border-radius: 2px; }
.sv-title { font-family: var(--font-display); font-weight: 600; font-size: 16px; line-height: 1.25; color: var(--ink-1); letter-spacing: -0.01em; }
.sv-one { font-size: 13px; line-height: 1.45; color: var(--ink-3); flex: 1; }
.sv-arr { font-family: var(--font-display); font-weight: 600; font-size: 12px; color: var(--brand-purple); margin-top: 4px; }

/* ============ LEGEND FOOT ============ */
.pmatrix-legend-foot {
  margin-top: 28px; display: flex; gap: 12px; justify-content: center;
  font-family: var(--font-display); font-size: 13px; color: var(--ink-3);
  flex-wrap: wrap;
}
.pmatrix-legend-foot strong { color: var(--ink-1); font-weight: 600; }
.pmatrix-legend-foot a { color: var(--brand-purple); text-decoration: none; font-weight: 600; }

/* ============ CLIENTS STRIP ============ */
.clients-strip { padding: 100px 56px; background: var(--canvas-alt); border-top: 1px solid var(--hairline); }
.clients-wrap { max-width: 1320px; margin: 0 auto; }
.clients-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
  margin-top: 40px;
}
.client-card {
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  padding: 20px;
  text-decoration: none; color: inherit;
  display: flex; flex-direction: column; gap: 10px;
  position: relative;
  transition: transform 0.18s, box-shadow 0.18s;
  min-height: 220px;
}
.client-card:hover:not(.disabled) { transform: translateY(-2px); box-shadow: 0 14px 40px rgba(0,0,0,0.06); }
.client-card.disabled { opacity: 0.8; cursor: default; }
.client-card .cc-bar { position: absolute; top: 0; left: 20px; right: 20px; height: 3px; background: var(--ind-color); border-radius: 0 0 3px 3px; }
.cc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-top: 6px; }
.cc-name { font-family: var(--font-display); font-weight: 600; font-size: 20px; letter-spacing: -0.01em; color: var(--ink-1); }
.cc-stage { font-family: var(--font-display); font-weight: 600; font-size: 9px; letter-spacing: 0.08em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; flex-shrink: 0; }
.cc-stage.live { background: #E8FBF3; color: #10B981; }
.cc-stage.building { background: #FFF3E4; color: #F59E0B; }
.cc-agent { font-family: var(--font-mono); font-size: 11px; color: var(--ink-4); letter-spacing: 0.02em; }
.cc-tag { font-size: 14px; line-height: 1.45; color: var(--ink-2); flex: 1; }
.cc-foot { display: flex; justify-content: space-between; align-items: center; padding-top: 12px; border-top: 1px solid var(--hairline); font-size: 12px; }
.cc-pattern { color: var(--ink-4); font-family: var(--font-display); font-weight: 500; }
.cc-arr { font-family: var(--font-display); font-weight: 600; color: var(--ind-color); }

/* ============ CTA · light theme ============ */
.hub-cta {
  padding: 100px 56px;
  background: linear-gradient(135deg, #FFF7EF 0%, #FFE4EE 50%, #F3E4FF 100%);
  border-top: 1px solid var(--hairline);
}
.hub-cta-inner {
  max-width: 1320px; margin: 0 auto;
  display: grid; grid-template-columns: 1.3fr 1fr;
  gap: 60px; align-items: center;
}
.hub-cta h2 {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(32px, 4vw, 48px); line-height: 1.1; letter-spacing: -0.02em;
  margin: 14px 0 16px; max-width: 720px; color: var(--ink-1);
}
.hub-cta h2 .grad {
  background: linear-gradient(90deg, #F83C72, #A78BFA);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hub-cta p { font-size: 16px; line-height: 1.55; color: var(--ink-3); margin: 0; max-width: 560px; }
.hub-cta-right { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.hub-cta .primary {
  background: var(--ink-1); color: #fff;
  font-family: var(--font-display); font-weight: 600; font-size: 15px;
  padding: 14px 26px; border-radius: 10px; text-decoration: none;
  transition: background 0.18s;
}
.hub-cta .primary:hover { background: var(--brand-purple); }
.hub-cta .ghost { color: var(--ink-2); font-family: var(--font-display); font-size: 14px; text-decoration: none; font-weight: 600; }
.hub-cta .ghost:hover { color: var(--brand-purple); }

/* Responsive */
@media (max-width: 1100px) {
  .pmatrix { grid-template-columns: 140px repeat(4, 1fr); }
  .iv-grid { grid-template-columns: repeat(2, 1fr); }
  .sv-grid { grid-template-columns: repeat(2, 1fr); }
  .clients-grid { grid-template-columns: repeat(2, 1fr); }
  .pmatrix-head { grid-template-columns: 1fr; }
  .view-switcher { align-self: start; justify-self: start; }
}
@media (max-width: 768px) {
  .hub-hero, .pmatrix-section, .clients-strip, .hub-cta { padding-left: 20px; padding-right: 20px; }
  .hub-hero { padding-top: 56px; padding-bottom: 48px; }
  .hub-hero h1, .hub-hero .lede { font-size: clamp(32px, 8vw, 40px); line-height: 1.05; }
  .hub-hero .lede-sub { font-size: 16px; }
  .hub-counters { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .pmatrix { display: block; }
  .pm-col-head, .pm-corner { display: none; }
  .pm-row-head { padding: 14px 18px 8px; }
  .pm-cell-multi { border-top: 1px solid var(--hairline); }
  .iv-grid { grid-template-columns: 1fr; }
  .sv-grid { grid-template-columns: 1fr; }
  .clients-grid { grid-template-columns: 1fr; }
  .hub-cta-inner { grid-template-columns: 1fr; gap: 20px; padding: 32px 24px; }
  .hub-cta-inner h2 { font-size: 28px; }
  .pfoot-row { flex-direction: column; gap: 8px; text-align: center; padding: 20px; }
}

/* ============ Light foot CTA (shared with pattern page) ============ */
.hub-pfoot {
  padding: 100px 56px 100px;
  background: var(--canvas-alt); color: var(--ink-1);
  border-top: 1px solid var(--hairline);
  text-align: center;
}
.hub-pfoot h2 {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(40px, 5vw, 64px); line-height: 1.05;
  letter-spacing: -0.025em; margin: 0 auto 22px;
  max-width: 900px; text-wrap: balance;
  color: var(--ink-1);
}
.hub-pfoot h2 .grad {
  background: var(--grad-full);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.hub-pfoot p {
  font-size: 17px; line-height: 1.55; color: var(--ink-3);
  max-width: 640px; margin: 0 auto 36px;
}
.pfoot-row { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.pfoot-row .btn-primary {
  background: var(--ink-1); color: #fff;
  font-family: var(--font-display); font-weight: 600; font-size: 15px;
  padding: 14px 26px; border-radius: 10px; text-decoration: none;
  transition: transform 0.2s, background 0.2s;
}
.pfoot-row .btn-primary:hover { transform: translateY(-1px); background: var(--brand-purple); }
.pfoot-row .btn-ghost {
  color: var(--ink-2);
  font-family: var(--font-display); font-weight: 600; font-size: 14px;
  padding: 14px 20px; text-decoration: none;
  border: 1px solid var(--hairline); border-radius: 10px;
  background: #fff;
  transition: border-color 0.18s, color 0.18s;
}
.pfoot-row .btn-ghost:hover { border-color: var(--ink-1); color: var(--ink-1); }
@media (max-width: 768px) {
  .hub-pfoot { padding: 72px 24px; }
}
