/* ============================================================
   CASES — Charcoal gallery: filter chips, masonry, before/after
   ============================================================ */

body[data-theme="charcoal"] {
  background: #141416;
  color: #cfd6dd;
}

/* ---------- Hero ---------- */
.cs-hero {
  padding: 10.5rem 0 4.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(18,18,20,.82) 0%, rgba(18,18,20,.9) 100%),
    url("../img/gem-macro.jpg") center / cover no-repeat;
}
.cs-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(800px 340px at 50% 0%, rgba(201,162,39,.12), transparent 65%);
  pointer-events: none;
}
.cs-hero .eyebrow { color: var(--gold-light); }
.cs-hero h1 { font-size: clamp(2.3rem, 5vw, 3.8rem); color: #fff; margin: .8rem 0 1rem; }
.cs-hero p { color: #8d9aa6; max-width: 36rem; margin: 0 auto; }
.cs-hero .count-line {
  margin-top: 1.6rem;
  display: flex;
  gap: 2.4rem;
  justify-content: center;
  flex-wrap: wrap;
}
.cs-hero .count-line span { color: #8d9aa6; font-size: .88rem; }
.cs-hero .count-line b { color: var(--gold-light); font-family: var(--font-head); font-size: 1.25rem; margin-right: .3rem; }

/* ---------- Featured before/after ---------- */
.cs-featured { padding: 4rem 0 2rem; }
.ba-wrap { max-width: 780px; margin: 2.4rem auto 0; }
.ba-frame {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(255,255,255,.12);
  cursor: ew-resize;
  user-select: none;
  touch-action: none;
}
.ba-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}
.ba-layer svg { width: 100%; height: 100%; object-fit: cover; }
.ba-layer.after { clip-path: inset(0 0 0 50%); }
.ba-divider {
  position: absolute;
  top: 0; bottom: 0;
  left: 50%;
  width: 3px;
  background: var(--gold);
  box-shadow: 0 0 18px rgba(201,162,39,.7);
  z-index: 3;
}
.ba-handle {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--gold);
  color: #141416;
  display: grid;
  place-items: center;
  font-weight: 700;
  z-index: 4;
  box-shadow: 0 4px 18px rgba(0,0,0,.45);
}
.ba-tag {
  position: absolute;
  top: 14px;
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 700;
  padding: .35rem .8rem;
  border-radius: 999px;
  z-index: 2;
  background: rgba(10,14,18,.65);
  color: #fff;
  backdrop-filter: blur(4px);
}
.ba-tag.before { left: 14px; }
.ba-tag.after { right: 14px; }
.ba-caption { text-align: center; color: #8d9aa6; font-size: .86rem; margin-top: 1rem; }

/* ---------- Filters ---------- */
.cs-filters {
  display: flex;
  gap: .7rem;
  justify-content: center;
  flex-wrap: wrap;
  margin: 3.5rem 0 2.6rem;
}
.cs-filters button {
  padding: .55rem 1.4rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.18);
  background: transparent;
  color: #b8c2cc;
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .3s;
}
.cs-filters button:hover { border-color: var(--gold); color: var(--gold-light); }
.cs-filters button.active {
  background: linear-gradient(120deg, var(--gold), #a5831b);
  border-color: transparent;
  color: #141416;
}

/* ---------- Masonry gallery ---------- */
.cs-gallery { columns: 3 300px; column-gap: 1.4rem; }
.case-card {
  break-inside: avoid;
  margin-bottom: 1.4rem;
  background: #1d1d20;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 18px;
  overflow: hidden;
  transition: transform .35s, border-color .35s, box-shadow .35s;
}
.case-card:hover {
  transform: translateY(-8px);
  border-color: rgba(201,162,39,.45);
  box-shadow: 0 24px 50px rgba(0,0,0,.45);
}
.case-visual {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #101418;
}
.case-visual img,
.case-visual svg {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .8s cubic-bezier(.22,.61,.36,1);
}
.case-card:hover .case-visual img,
.case-card:hover .case-visual svg { transform: scale(1.08) rotate(1deg); }
.case-tag {
  position: absolute;
  top: 12px; left: 12px;
  font-size: .7rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  font-weight: 700;
  padding: .3rem .75rem;
  border-radius: 999px;
  background: rgba(10,14,18,.72);
  color: var(--gold-light);
  backdrop-filter: blur(4px);
}
.case-body { padding: 1.5rem 1.5rem 1.7rem; }
.case-body h3 { color: #fff; font-size: 1.15rem; margin-bottom: .55rem; }
.case-body p { color: #97a4b0; font-size: .9rem; }
.case-meta {
  display: flex;
  gap: 1.4rem;
  margin-top: 1.1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,.07);
}
.case-meta div b { display: block; color: var(--gold-light); font-family: var(--font-head); font-size: 1rem; }
.case-meta div span { font-size: .74rem; color: #74828e; text-transform: uppercase; letter-spacing: .06em; }
.case-card.hidden { display: none; }

/* result band */
.cs-band {
  margin: 5rem 0 0;
  padding: 4.5rem 0;
  position: relative;
  border-block: 1px solid rgba(201,162,39,.22);
  text-align: center;
  background:
    linear-gradient(120deg, rgba(201,162,39,.2), rgba(18,18,20,.85)),
    url("../img/hero-gems.jpg") center / cover no-repeat;
}
.cs-band h2 { color: #fff; font-size: clamp(1.6rem, 3vw, 2.3rem); }
.cs-band p { color: #8d9aa6; margin: .6rem 0 2rem; }

/* ---------- Footer (enhanced 4-column) ---------- */
.footer-grid.wide { grid-template-columns: 1.7fr 0.9fr 1.1fr 1.2fr; }
.footer-brand .footer-blurb { max-width: 20rem; color: #97a4b0; margin: 1.1rem 0 1.4rem; }
.site-footer a.footer-cta { display: inline-block; margin-bottom: 0; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2.6rem;
  padding-top: 1.6rem;
  border-top: 1px solid rgba(255,255,255,.08);
  color: #74828e;
  font-size: .82rem;
}
.footer-bottom p { margin: 0; }

@media (max-width: 960px) {
  .footer-grid.wide { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .cs-hero { padding-top: 8rem; }
  .ba-handle { width: 38px; height: 38px; }
  .footer-grid.wide { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}
