/* Sidebar visual layer, November 2026.
   Same words, more shape: facts become a spec card, challenge → solution
   becomes a connected pair, lists become chips, steps become a timeline.
   Every rule styles existing markup; no copy lives in CSS except ornaments. */

body.case-gallery-layout .sidebar {
  --sv-accent: var(--case-accent, #f3c74b);
  --sv-tint: var(--case-tint, #241f12);
  --sv-panel: #171717;
  --sv-rule: #2b2b2b;
  --sv-soft: color-mix(in oklab, var(--sv-accent) 14%, #171717);
  --sv-edge: color-mix(in oklab, var(--sv-accent) 38%, #2b2b2b);
  --sv-on-accent: #121212;
  --sv-radius: 16px;
}

/* ---------- Spec card: Scope / Client / Tools ---------- */
body.case-gallery-layout .sidebar .case-facts {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  margin: 28px 0 0;
  padding: 2px 16px;
  border: 1px solid var(--sv-rule);
  border-radius: var(--sv-radius);
  background: var(--sv-panel);
}
body.case-gallery-layout .sidebar .case-facts > div {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 12px 0;
}
body.case-gallery-layout .sidebar .case-facts > div + div { border-top: 1px dashed var(--sv-rule); }
body.case-gallery-layout .sidebar .case-facts dt::after { content: none; }
body.case-gallery-layout .sidebar .case-facts dt { margin: 0; font-size: 12px; line-height: 1.4; color: #8f8f8f; }
body.case-gallery-layout .sidebar .case-facts dd { margin: 0; font-size: 14px; line-height: 1.45; letter-spacing: -.01em; color: var(--ink); }
body.case-gallery-layout .sidebar .case-tool-brands { display: flex; flex-wrap: wrap; gap: 6px; }
body.case-gallery-layout .sidebar .case-tool-brand {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 4px 10px 4px 6px;
  border-radius: 999px;
  background: #222;
  font-size: 13px;
}
body.case-gallery-layout .sidebar .case-tool-brand:has(.case-tool-wordmark) { padding: 4px 10px; }

/* ---------- Challenge → Solution → Outcome ---------- */
body.case-gallery-layout .sidebar :is(.case-copy-challenge, .case-copy-solution, .case-copy-outcome) {
  position: relative;
  margin-top: var(--section-gap);
  padding: 16px 18px 18px;
  border-radius: var(--sv-radius);
}
body.case-gallery-layout .sidebar :is(.case-copy-challenge, .case-copy-solution, .case-copy-outcome) > h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
  font-size: 15px;
}
body.case-gallery-layout .sidebar :is(.case-copy-challenge, .case-copy-solution, .case-copy-outcome) > h2::before {
  content: '';
  display: grid;
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: currentColor no-repeat center / 14px;
  -webkit-mask: var(--sv-glyph) center / 14px no-repeat, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask: var(--sv-glyph) center / 14px no-repeat exclude, linear-gradient(#000 0 0);
}
body.case-gallery-layout .sidebar :is(.case-copy-challenge, .case-copy-solution, .case-copy-outcome) p { max-width: none; margin: 0; }

body.case-gallery-layout .sidebar .case-copy-challenge {
  border: 1px dashed #3a3a3a;
  --sv-glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M9.2 9a3 3 0 1 1 4.3 2.7c-.9.5-1.5 1.2-1.5 2.3'/%3E%3Cpath d='M12 18h.01'/%3E%3C/svg%3E");
}
body.case-gallery-layout .sidebar .case-copy-challenge > h2 { color: #d6d6d6; }
body.case-gallery-layout .sidebar .case-copy-challenge > h2::before { color: #5c5c5c; }

body.case-gallery-layout .sidebar .case-copy-solution {
  border: 1px solid var(--sv-edge);
  background: var(--sv-soft);
  --sv-glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E");
}
body.case-gallery-layout .sidebar .case-copy-solution > h2 { color: var(--ink); }
body.case-gallery-layout .sidebar .case-copy-solution > h2::before { color: var(--sv-accent); }
body.case-gallery-layout .sidebar .case-copy-solution p { color: #cfcfcf; }

/* The connector: a short arrow from the question to the answer. */
body.case-gallery-layout .sidebar .case-copy-challenge + .case-copy-solution { margin-top: 30px; }
body.case-gallery-layout .sidebar .case-copy-challenge + .case-copy-solution::before {
  content: '';
  position: absolute;
  left: 30px;
  top: -30px;
  width: 2px;
  height: 30px;
  background: repeating-linear-gradient(to bottom, var(--sv-accent) 0 4px, transparent 4px 8px);
}
body.case-gallery-layout .sidebar .case-copy-challenge + .case-copy-solution::after {
  content: '';
  position: absolute;
  left: 26px;
  top: -8px;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--sv-accent);
  border-bottom: 2px solid var(--sv-accent);
  transform: rotate(45deg);
}

body.case-gallery-layout .sidebar .case-copy-outcome {
  background:
    radial-gradient(120% 90% at 100% 0%, color-mix(in oklab, var(--sv-accent) 22%, transparent), transparent 60%),
    var(--sv-panel);
  border: 1px solid var(--sv-rule);
  --sv-glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23000'%3E%3Cpath d='M12 2.5c.6 4.7 2.8 6.9 7.5 7.5-4.7.6-6.9 2.8-7.5 7.5-.6-4.7-2.8-6.9-7.5-7.5 4.7-.6 6.9-2.8 7.5-7.5Z'/%3E%3C/svg%3E");
}
body.case-gallery-layout .sidebar .case-copy-outcome > h2 { color: var(--ink); }
body.case-gallery-layout .sidebar .case-copy-outcome > h2::before { color: var(--sv-accent); }
body.case-gallery-layout .sidebar .case-copy-outcome p { color: #d0d0d0; }

/* ---------- Lists become chips ---------- */
body.case-gallery-layout .sidebar :is(.case-feature-list, .service-scope-list) {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: none;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
}
body.case-gallery-layout .sidebar :is(.case-feature-list, .service-scope-list) > li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 7px 12px 7px 10px;
  border: 1px solid var(--sv-rule);
  border-radius: 999px;
  background: var(--sv-panel);
  font-size: 13px;
  line-height: 1.3;
  color: #dedede;
}
body.case-gallery-layout .sidebar :is(.case-feature-list, .service-scope-list) > li + li { margin-top: 0; }
body.case-gallery-layout .sidebar :is(.case-feature-list, .service-scope-list) > li::before {
  content: '';
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--sv-accent);
  position: static;
  transform: none;
  margin: 0;
}
body.case-gallery-layout .sidebar :is(.case-feature-list, .service-scope-list) > li::marker { content: none; }

/* ---------- Experience flow: connected stops ---------- */
body.case-gallery-layout .sidebar .case-journey {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 6px;
  margin-top: 14px;
}
body.case-gallery-layout .sidebar .case-journey > li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 4px;
  border-radius: 999px;
  background: #1f1f1f;
  font-size: 13px;
}
body.case-gallery-layout .sidebar .case-journey > li > span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--sv-accent);
  color: var(--sv-on-accent);
  font-size: 11px;
  font-weight: 600;
}
body.case-gallery-layout .sidebar .case-journey > li strong { color: #e4e4e4; font-weight: 500; }

/* ---------- Process: a vertical timeline ---------- */
body.case-gallery-layout .sidebar .case-process-list { gap: 0; margin-top: 16px; }
body.case-gallery-layout .sidebar .case-process-list > li {
  position: relative;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding-bottom: 20px;
}
body.case-gallery-layout .sidebar .case-process-list > li:last-child { padding-bottom: 0; }
body.case-gallery-layout .sidebar .case-process-list > li:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 14.5px;
  top: 32px;
  bottom: 2px;
  width: 1px;
  background: repeating-linear-gradient(to bottom, #4a4a4a 0 3px, transparent 3px 7px);
}
body.case-gallery-layout .sidebar .case-process-index {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1.5px solid var(--sv-accent);
  border-radius: 50%;
  background: var(--sv-panel);
  color: var(--sv-accent);
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
body.case-gallery-layout .sidebar .case-process-list > li > :is(p, div) { padding-top: 4px; }
body.case-gallery-layout .sidebar .case-process-list :is(h3, h4) { margin: 0 0 6px; font-size: 15px; font-weight: 500; color: var(--ink); }
body.case-gallery-layout .sidebar .case-process-list p { color: #b9b9b9; }

/* ---------- Delivered: a tile grid with checks ---------- */
body.case-gallery-layout .sidebar .case-delivery-checklist {
  grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
  gap: 8px;
  margin-top: 14px;
}
body.case-gallery-layout .sidebar .case-delivery-checklist > li {
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--sv-rule);
  border-radius: 12px;
  background: var(--sv-panel);
  font-size: 13px;
  line-height: 1.4;
  color: #e0e0e0;
}
body.case-gallery-layout .sidebar .case-delivery-checklist svg {
  width: 22px;
  height: 22px;
  margin: 0;
  padding: 4px;
  border-radius: 50%;
  background: var(--sv-accent);
  stroke: var(--sv-on-accent);
  stroke-width: 2.4;
}

/* ---------- The brief, as a quote ---------- */
body.case-gallery-layout .sidebar .case-scope-overview > div:first-child dd {
  position: relative;
  padding: 18px 18px 18px 50px;
  border-radius: var(--sv-radius);
  background: var(--sv-panel);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
}
body.case-gallery-layout .sidebar .case-scope-overview > div:first-child dd::before {
  content: '\201C';
  position: absolute;
  left: 14px;
  top: 8px;
  font-size: 48px;
  line-height: 1;
  font-weight: 600;
  color: var(--sv-accent);
}

/* ---------- Small labels and the media guide ---------- */
body.case-gallery-layout .sidebar .case-note-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px 3px 8px;
  border-radius: 999px;
  background: #1f1f1f;
  color: #c9c9c9;
}
body.case-gallery-layout .sidebar .case-note-label::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--sv-accent);
}
body.case-gallery-layout .sidebar .case-visual-index > li > span {
  display: grid;
  place-items: center;
  min-width: 28px;
  height: 22px;
  border-radius: 6px;
  background: #1f1f1f;
  color: #bdbdbd;
}

/* ---------- Reach out: a warm, personal card ---------- */
body.case-gallery-layout .sidebar .case-reachout {
  position: relative;
  padding: 20px 20px 20px;
  border: 1px solid var(--sv-edge);
  border-radius: 20px;
  background: var(--sv-soft);
}
body.case-gallery-layout .sidebar .case-reachout::before {
  content: '';
  display: block;
  width: 44px;
  height: 44px;
  margin-bottom: 12px;
  border-radius: 50%;
  background: url('/assets/portrait.webp') center / cover;
  box-shadow: 0 0 0 2px var(--sv-soft), 0 0 0 4px var(--sv-accent);
}
body.case-gallery-layout .sidebar .case-reachout h2 { font-size: 20px; }
body.case-gallery-layout .sidebar .case-reachout p { color: #d2d2d2; }

/* ---------- About: fact and toolkit tiles ---------- */
body.case-gallery-layout .sidebar :is(.about-working-facts, .about-toolkit) {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
body.case-gallery-layout .sidebar :is(.about-working-facts, .about-toolkit) > div {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--sv-rule);
  border-radius: 14px;
  background: var(--sv-panel);
}
body.case-gallery-layout .sidebar .about-working-facts > div:last-child { grid-column: 1 / -1; }
body.case-gallery-layout .sidebar :is(.about-working-facts, .about-toolkit) dt {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: #9a9a9a;
}
body.case-gallery-layout .sidebar :is(.about-working-facts, .about-toolkit) dd { color: var(--ink); }
body.case-gallery-layout .sidebar .about-working-facts dt::before {
  content: '';
  flex: none;
  width: 16px;
  height: 16px;
  background: var(--sv-accent);
  -webkit-mask: var(--sv-icon) center / contain no-repeat;
          mask: var(--sv-icon) center / contain no-repeat;
}
body.case-gallery-layout .sidebar .about-working-facts > div:nth-child(1) { --sv-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a7 7 0 0 0-7 7c0 5.2 7 13 7 13s7-7.8 7-13a7 7 0 0 0-7-7Zm0 9.5A2.5 2.5 0 1 1 12 6.5a2.5 2.5 0 0 1 0 5Z'/%3E%3C/svg%3E"); }
body.case-gallery-layout .sidebar .about-working-facts > div:nth-child(2) { --sv-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 4h16a1 1 0 0 1 1 1v11a1 1 0 0 1-1 1H9l-5 4v-4H4a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1Z'/%3E%3C/svg%3E"); }
body.case-gallery-layout .sidebar .about-working-facts > div:nth-child(3) { --sv-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2 14.9 8.6 22 9.3l-5.4 4.7 1.6 7L12 17.3 5.8 21l1.6-7L2 9.3l7.1-.7L12 2Z'/%3E%3C/svg%3E"); }
body.case-gallery-layout .sidebar .about-working-facts .about-proof-link { margin-top: 10px; }

/* ---------- Project links with a thumbnail ---------- */
body .site-shell .secondary-action-button.project-preview-link:has(> .proof-thumb),
body .site-shell .secondary-action-button.about-proof-link:has(> .proof-thumb) {
  width: auto;
  height: 44px;
  min-height: 44px;
  justify-content: flex-start;
  gap: 10px;
  padding: 0 14px 0 4px;
  border-radius: 12px;
}
body .site-shell .proof-thumb {
  flex: none;
  width: 48px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
  background: #222;
  transition: transform var(--motion-ui, 220ms) var(--ease-out);
}
body .site-shell .secondary-action-button:has(> .proof-thumb):hover .proof-thumb { transform: scale(1.06) rotate(-2deg); }
body .site-shell :is(.about-proof-links, .information-proof-links):has(.proof-thumb) {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

@media (prefers-reduced-motion: reduce) {
  body .site-shell .proof-thumb { transition: none; }
  body .site-shell .secondary-action-button:has(> .proof-thumb):hover .proof-thumb { transform: none; }
}
