/* ==========================================================================
   SHAFWAN CREATIVE — Work & Project Detail Styles (work.html, project.html)
   ========================================================================== */

/* ---------- 1. WORK HERO & TRANSPARENCY CARD ---------- */
.work-hero {
  padding: clamp(44px, 6vw, 88px) 0 clamp(36px, 5vw, 64px);
  border-bottom: var(--bw) solid var(--ink);
  position: relative;
}
.work-hero__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--gutter);
  align-items: end;
}
.work-hero__main {
  grid-column: 1 / span 7;
}
.work-hero__main h1 {
  font-size: var(--fs-display-l);
  line-height: 1.08;
  letter-spacing: -0.045em;
  margin: 22px 0 20px;
}
.work-hero__note {
  display: inline-block;
  margin-top: 8px;
  color: var(--ink);
  transform: rotate(-1.5deg);
}
.work-hero__aside {
  grid-column: 8 / span 5;
}
.transparency-card {
  position: relative;
  background: var(--white);
  border: var(--bw) solid var(--ink);
  box-shadow: var(--shadow-hard-lg);
  padding: clamp(20px, 2.4vw, 28px);
}
.transparency-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--line-strong);
}
.transparency-card p {
  font-size: .92rem;
  color: var(--text-muted);
  margin: 0 0 12px;
}
.transparency-card p:last-child {
  margin-bottom: 0;
}
.transparency-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  font: 700 .78rem var(--font-display);
  letter-spacing: .04em;
  text-transform: uppercase;
}
.transparency-card__meta span {
  background: var(--paper);
  border: 1px solid var(--ink);
  padding: 4px 10px;
  border-radius: var(--r-pill);
}

/* ---------- 2. FILTER BAR ---------- */
.work-filter-bar {
  position: relative;
  background: var(--white);
  border-bottom: var(--bw) solid var(--ink);
  padding: 18px 0;
}
.work-filter-bar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.work-filter-status {
  font-family: var(--font-display);
  font-size: .88rem;
  font-weight: 700;
  color: var(--text-muted);
  white-space: nowrap;
}
.work-filter-status b {
  color: var(--ink);
  background: var(--lime);
  padding: 2px 7px;
  border: 1px solid var(--ink);
}

/* ---------- 3. CLEAN STRUCTURED PORTFOLIO GRID ---------- */
.work-showcase {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(22px, 2.5vw, 30px);
  align-items: stretch;
}
.work-item {
  grid-column: auto !important;
  margin-top: 0 !important;
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: var(--bw) solid var(--ink);
  padding: 16px;
  transition: transform var(--dur-2) var(--ease-spring), box-shadow var(--dur-2) var(--ease-out);
}
.work-item:hover {
  transform: translate(-4px, -4px);
  box-shadow: var(--shadow-hard-lg);
}
.work-item .work-card {
  border: 0;
  box-shadow: none !important;
  transform: none !important;
}
.work-item .work-card__media {
  border: var(--bw) solid var(--ink);
  aspect-ratio: 4/3 !important;
}
@media (max-width: 1024px) {
  .work-showcase { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .work-showcase { grid-template-columns: 1fr; }
}

.work-item__index {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--font-display);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.work-item__index b {
  color: var(--ink);
}
.work-item .work-card__media {
  box-shadow: 0 0 0 var(--ink);
  transition: transform var(--dur-2) var(--ease-out), box-shadow var(--dur-2) var(--ease-out);
}
.work-item .work-card:hover .work-card__media,
.work-item .work-card:focus-visible .work-card__media {
  transform: translate(-4px, -4px);
  box-shadow: var(--shadow-hard-lg);
}
.work-item__sub {
  margin: 6px 0 12px;
  font-size: .95rem;
  color: var(--text-muted);
}
.work-item__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}
.work-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font: 600 .78rem/1 var(--font-display);
  padding: 6px 10px;
  border: 1px solid var(--ink);
  border-radius: var(--r-pill);
  background: var(--paper);
  text-decoration: none;
  transition: background var(--dur-1), transform var(--dur-1);
}
.work-tag:hover {
  background: var(--lime);
  transform: translateY(-1px);
}

/* ---------- 4. CONCEPT LAB VS CLIENT WORK EXPLAINER ---------- */
.lab-explainer {
  border: var(--bw) solid var(--ink);
  background: var(--white);
  box-shadow: var(--shadow-hard-lg);
  overflow: hidden;
}
.lab-explainer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: clamp(20px, 3vw, 32px);
  background: var(--paper);
  border-bottom: var(--bw) solid var(--ink);
}
.lab-explainer__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.lab-col {
  padding: clamp(24px, 3vw, 36px);
}
.lab-col + .lab-col {
  border-left: var(--bw) solid var(--ink);
  background: #FCFBF8;
}
.lab-col.is-highlighted {
  background: var(--lime-soft);
}
.lab-col h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.35rem;
  margin: 12px 0 10px;
}
.lab-list {
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
  display: grid;
  gap: 10px;
  font-size: .94rem;
}
.lab-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.lab-list li svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 3px;
}
.lab-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gutter);
  margin-top: clamp(28px, 4vw, 44px);
}
.lab-step {
  background: var(--white);
  border: var(--bw) solid var(--ink);
  padding: 20px;
  position: relative;
}
.lab-step__num {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--lime);
  border: var(--bw) solid var(--ink);
  font: 800 .82rem var(--font-display);
  margin-bottom: 12px;
}

/* ---------- 5. PROJECT DETAIL (project.html) ---------- */
.project-switcher-bar {
  background: var(--paper);
  border-bottom: var(--bw) solid var(--ink);
  padding: 12px 0;
}
.project-switcher-bar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.project-pills {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  max-width: 100%;
  padding-bottom: 2px;
}
.project-pills::-webkit-scrollbar { display: none; }
.project-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: var(--bw) solid var(--ink);
  border-radius: var(--r-pill);
  background: var(--white);
  font: 700 .8rem/1 var(--font-display);
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--dur-1), transform var(--dur-1);
}
.project-pill:hover {
  background: var(--lime-soft);
}
.project-pill[aria-current="page"] {
  background: var(--ink);
  color: var(--white);
}
.project-pill[aria-current="page"] small {
  color: var(--lime);
}
.project-pill small {
  opacity: .65;
  font-size: .72rem;
}

.project-hero {
  padding: clamp(40px, 6vw, 76px) 0 clamp(32px, 5vw, 56px);
  border-bottom: var(--bw) solid var(--ink);
}
.project-hero__top {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 16px;
}
.project-hero h1 {
  font-size: var(--fs-display-l);
  line-height: 1.1;
  letter-spacing: -0.045em;
  margin: 10px 0 14px;
}
.project-meta-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: var(--bw) solid var(--ink);
  background: var(--white);
  box-shadow: var(--shadow-hard);
  margin-top: clamp(28px, 4vw, 44px);
}
.project-meta-cell {
  padding: 18px 20px;
  border-right: var(--bw) solid var(--ink);
}
.project-meta-cell:last-child {
  border-right: 0;
}
.project-meta-cell__label {
  display: block;
  font: 700 .72rem var(--font-display);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.project-meta-cell__val {
  font: 700 .98rem/1.35 var(--font-display);
}
.project-service-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.project-service-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  font: 700 .78rem var(--font-display);
  background: var(--lime);
  border: 1px solid var(--ink);
  border-radius: var(--r-pill);
  text-decoration: none;
}
.project-service-pill:hover {
  background: var(--ink);
  color: var(--lime);
}

.project-cover-frame {
  position: relative;
  margin-top: clamp(32px, 5vw, 52px);
  border: var(--bw) solid var(--ink);
  background: var(--paper);
  box-shadow: var(--shadow-hard-lg);
  overflow: hidden;
}
.project-cover-frame img {
  width: 100%;
  max-height: 640px;
  object-fit: cover;
}
.project-cover-frame__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  background: var(--white);
  border-top: var(--bw) solid var(--ink);
  font-size: .86rem;
}

/* Case Study Narrative Grid */
.cs-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--gutter);
  align-items: start;
}
.cs-sidebar {
  grid-column: 1 / span 4;
  position: sticky;
  top: calc(var(--header-h) + 24px);
}
.cs-main {
  grid-column: 5 / span 8;
  display: grid;
  gap: clamp(32px, 4.5vw, 56px);
}
.cs-block {
  background: var(--white);
  border: var(--bw) solid var(--ink);
  padding: clamp(24px, 3.2vw, 40px);
  position: relative;
}
.cs-block--paper {
  background: var(--paper);
}
.cs-block__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.cs-block__no {
  font: 800 .8rem var(--font-display);
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 4px 10px;
  background: var(--lime);
  border: 1px solid var(--ink);
  border-radius: var(--r-pill);
}
.cs-block h2 {
  font-size: clamp(1.45rem, 2.4vw, 2rem);
  margin: 0;
}
.cs-block p {
  font-size: 1.05rem;
  line-height: 1.65;
  margin-bottom: 0;
}

/* Swatches for Creative Direction */
.cs-swatches {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  margin-top: 22px;
}
.cs-swatch {
  border: var(--bw) solid var(--ink);
  background: var(--white);
  padding: 8px;
}
.cs-swatch__color {
  height: 48px;
  border: 1px solid var(--ink);
  margin-bottom: 8px;
}
.cs-swatch b {
  display: block;
  font: 700 .82rem var(--font-display);
}
.cs-swatch span {
  font-size: .75rem;
  color: var(--text-muted);
  font-family: monospace;
}

/* Process steps */
.cs-process-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 8px;
}
.cs-process-step {
  border: var(--bw) solid var(--ink);
  background: var(--paper);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform var(--dur-2) var(--ease-out), box-shadow var(--dur-2) var(--ease-out);
}
.cs-process-step:hover {
  transform: translate(-3px, -3px);
  box-shadow: var(--shadow-hard);
  background: var(--white);
}
.cs-process-step__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--lime);
  font: 800 .86rem var(--font-display);
}
.cs-process-step h3 {
  font-size: 1.08rem;
  margin: 0;
}
.cs-process-step p {
  font-size: .88rem;
  color: var(--text-muted);
  margin: 0;
}

/* Deliverables Checklist */
.cs-deliverables {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.cs-deliverables li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: var(--bw) solid var(--ink);
  background: var(--white);
  font: 700 .95rem var(--font-display);
}
.cs-deliverables__check {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--lime);
  border: 1px solid var(--ink);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.cs-deliverables__check svg {
  width: 15px;
  height: 15px;
}

/* Visual Results Gallery */
.cs-gallery {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 18px;
  margin-top: 12px;
}
.cs-gallery-item {
  grid-column: span 6;
  position: relative;
  border: var(--bw) solid var(--ink);
  background: var(--paper);
  overflow: hidden;
  cursor: pointer;
  padding: 0;
  text-align: left;
  transition: transform var(--dur-2) var(--ease-out), box-shadow var(--dur-2) var(--ease-out);
}
.cs-gallery-item:first-child {
  grid-column: 1 / -1;
}
.cs-gallery-item:hover {
  transform: translate(-3px, -3px);
  box-shadow: var(--shadow-hard);
}
.cs-gallery-item img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  transition: transform .8s var(--ease-out);
}
.cs-gallery-item:hover img {
  transform: scale(1.03);
}
.cs-gallery-item__caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  background: var(--white);
  border-top: var(--bw) solid var(--ink);
  font: 700 .86rem var(--font-display);
}
.cs-gallery-item__zoom {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .78rem;
  background: var(--paper);
  padding: 4px 10px;
  border: 1px solid var(--ink);
  border-radius: var(--r-pill);
}

/* Next / Prev Project Nav */
.project-nav-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gutter);
}
.project-nav-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: clamp(20px, 2.5vw, 28px);
  border: var(--bw) solid var(--ink);
  background: var(--white);
  text-decoration: none;
  transition: transform var(--dur-2) var(--ease-out), box-shadow var(--dur-2) var(--ease-out), background var(--dur-1);
}
.project-nav-card:hover {
  transform: translate(-3px, -3px);
  box-shadow: var(--shadow-hard-lg);
  background: var(--lime-soft);
}
.project-nav-card__thumb {
  width: 84px;
  height: 84px;
  object-fit: cover;
  border: var(--bw) solid var(--ink);
  flex-shrink: 0;
}
.project-nav-card h3 {
  font-size: 1.25rem;
  margin: 4px 0;
}

/* ---------- 6. RESPONSIVE ---------- */
.my-4 { margin-block: var(--s-4); }

@media (max-width: 1024px) {
  .work-hero__main,
  .work-hero__aside {
    grid-column: 1 / -1;
  }
  .grid-12 > [style*="grid-column"] {
    grid-column: 1 / -1 !important;
  }
  .work-showcase--editorial .work-item:nth-child(n) {
    grid-column: span 6;
    margin-top: 0;
  }
  .project-meta-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .project-meta-cell:nth-child(2) {
    border-right: 0;
  }
  .project-meta-cell:nth-child(1),
  .project-meta-cell:nth-child(2) {
    border-bottom: var(--bw) solid var(--ink);
  }
  .cs-sidebar {
    grid-column: 1 / -1;
    position: static;
  }
  .cs-main {
    grid-column: 1 / -1;
  }
  .rel-prod-col {
    grid-column: span 6 !important;
  }
}

@media (max-width: 720px) {
  .rel-prod-col {
    grid-column: 1 / -1 !important;
  }
  .work-item,
  .work-showcase--editorial .work-item:nth-child(n) {
    grid-column: 1 / -1;
  }
  .lab-explainer__grid,
  .lab-steps,
  .cs-process-grid,
  .cs-deliverables,
  .project-nav-grid {
    grid-template-columns: 1fr;
  }
  .lab-col + .lab-col {
    border-left: 0;
    border-top: var(--bw) solid var(--ink);
  }
  .project-meta-strip {
    grid-template-columns: 1fr;
  }
  .project-meta-cell {
    border-right: 0 !important;
    border-bottom: var(--bw) solid var(--ink);
  }
  .project-meta-cell:last-child {
    border-bottom: 0;
  }
  .cs-gallery-item {
    grid-column: 1 / -1;
  }
  .work-filter-bar {
    position: static;
  }
}
