/* ============================================================
   /work — listing page
   Hero · service/industry filters · grid · CTA
   ============================================================ */

.work-hero {
  min-height: 78svh;
  padding: calc(var(--nav-h) + 40px) var(--pad-x) clamp(64px, 8vh, 120px);
  /* Single split row — body + pixel grid. The old `Work · Selected
     projects` mono strip above this row was redundant with the
     dot+em-dash eyebrow inside the body, so we dropped it and
     simplified the layout to a single grid row. */
  display: grid;
  text-align: left;
}

/* Two-column split — body + pixel grid side by side. The grid
   uses the mono variant so it reads as a neutral element next to
   the project thumbnails on the grid below. */
.work-hero__split {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: start;
}
.work-hero__pxl {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  /* Push the grid + keys down so the bottom of the keys hint sits
     closer to the bottom of the text block, giving the hero a more
     evenly-split feel rather than the grid hugging the eyebrow at
     the top. */
  padding-top: clamp(40px, 6vh, 88px);
}
@media (max-width: 768px) {
  /* Single column on mobile — pixel grid stacks ABOVE the copy and
     sits a little higher than the column-top so it hugs the nav.
     The grid is z-index-layered BEHIND the copy so where the
     rotating grid extends down into the headline area the text
     reads cleanly on top. Wider gap below the grid gives the
     subtitle/filter band clear breathing room. */
  .work-hero__split {
    grid-template-columns: 1fr;
    gap: clamp(28px, 6vw, 56px);
    position: relative;
  }
  .work-hero__pxl {
    order: -1;
    justify-content: flex-start;
    padding-top: 0;
    margin-top: clamp(-24px, -2vh, -8px);
    position: relative;
    z-index: 0;
  }
  .work-hero__body {
    position: relative;
    z-index: 1;
  }
}
/* Body content stays left-aligned, same as every other hero on the
   site. Title + eyebrow + sub stack naturally, vertically centred in
   the remaining space. */
.work-hero__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  text-align: left;
  gap: clamp(18px, 2.4vh, 28px);
}

/* Eyebrow — matches the dot+em-dash pattern used on every other hero
   (services .svc-hero__eye, about .about-hero__eye). The dot
   recolours per-theme: cream ink dot on the on-light variant, neutral
   on the dark variant. */
.work-hero__eye {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.work-hero__eye .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--cream);
  box-shadow: 0 0 0 3px rgba(245, 240, 220, .12);
}
.work-hero.on-light .work-hero__eye { color: #7a7360; }
.work-hero.on-light .work-hero__eye .dot {
  background: var(--ink);
  box-shadow: 0 0 0 3px rgba(15, 15, 15, .08);
}

/* Light hero variant — cream bg with ink type. Nav auto-inverts via
   the `.work-hero.on-light` entry in the light-sections list. */
.work-hero.on-light {
  background: #fafaf7;
  color: var(--ink);
  --border: #e6e0cb;
}
.work-hero.on-light .work-hero__top { color: #7a7360; }
.work-hero.on-light .work-hero__top .tline { background: #d9d3bc; }
.work-hero.on-light .eyebrow { color: #7a7360; }
.work-hero.on-light .work-hero__title { color: var(--ink); }
.work-hero.on-light .work-hero__title em { color: #747062; }
.work-hero.on-light .work-hero__sub { color: #3f3a2b; }
.work-hero.on-light .work-hero__sub strong { color: var(--ink); }

.work-hero__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: .16em;
  text-transform: uppercase;
}
.work-hero__top .tline { flex: 0 0 80px; height: 1px; background: var(--border); }

.work-hero__body { display: flex; flex-direction: column; gap: 24px; align-self: center; }

.work-hero__title {
  font-family: var(--font-display);
  font-weight: var(--heading-weight);
  /* Smaller than the previous clamp(48, 7.5vw, 140) so the title
     fits two lines comfortably alongside the pixel grid in the
     two-column hero. The original size was set when the title had
     the full row to itself. */
  font-size: clamp(44px, 5.4vw, 96px);
  letter-spacing: -.035em;
  line-height: 1.02;
  max-width: 14ch;
}
.work-hero__title em { color: var(--cream); font-style: italic; font-weight: 500; }

.work-hero__sub {
  font-size: 17px;
  line-height: 1.55;
  color: #cfcfcf;
  max-width: 52ch;
  letter-spacing: var(--body-letter-spacing);
}

/* Filter bar — its own section beneath the hero. Dark control
   strip that separates the (light) hero from the project grid. */
.work-filters {
  padding: clamp(28px, 3.5vw, 44px) var(--pad-x);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  color: var(--white);
}
.work-filters__inner {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(14px, 2vw, 28px);
  align-items: center;
}
.work-filters__row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.work-filters__label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
  flex: 0 0 auto;
}

.work-filters__tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 999px;
  flex-wrap: wrap;
  background: var(--surface);
}
.work-filters__tabs button {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: 9px 14px;
  border-radius: 999px;
  color: #cfcfcf;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background .2s, color .2s;
  white-space: nowrap;
}
.work-filters__tabs button:hover:not(.active) { background: #1f1f1f; color: #fff; }
.work-filters__tabs button.active { background: #fff; color: #111; }
.work-filters__tabs button.active[data-service="websites"]  { background: var(--blue);  color: #fff; }
.work-filters__tabs button.active[data-service="ui-ux"]     { background: var(--red);   color: #fff; }
/* AI / Product Build uses ink so it reads as a deliberate "third
   state" alongside the brand-accent service pills above. Cream
   washed out on the dark filter band; red duplicated UI/UX. */
.work-filters__tabs button.active[data-service="ai-product"]{ background: var(--ink);   color: #fff; }

/* Industry dropdown --------------------------------------- */
.industry-dropdown { position: relative; }
.industry-dropdown__trigger {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--white);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  line-height: 1;
  transition: border-color .2s, background .2s;
  cursor: none;
  min-width: 200px;
  justify-content: space-between;
}
.industry-dropdown__trigger:hover { background: #242424; border-color: #3a3a3a; }
.industry-dropdown__chev {
  width: 8px; height: 8px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform .2s;
  opacity: .7;
}
.industry-dropdown.is-open .industry-dropdown__chev { transform: rotate(225deg) translateY(-2px); }
.industry-dropdown__value { font-weight: 500; }

.industry-dropdown__panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 280px;
  max-height: 360px;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity .2s, transform .2s;
  box-shadow: 0 20px 40px rgba(0,0,0,.45);
  z-index: 10;
}
.industry-dropdown.is-open .industry-dropdown__panel {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.industry-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: 14px;
  color: var(--white);
  transition: background .15s, color .15s;
  text-align: left;
}
.industry-option:hover { background: var(--bg); }
.industry-option.active { background: #fff; color: #111; }
.industry-option .count {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .14em;
  color: var(--muted);
  font-weight: 400;
}
.industry-option.active .count { color: #6a6a6a; }

@media (max-width: 768px) {
  .work-filters__inner { flex-direction: column; align-items: stretch; gap: 16px; }
  .work-filters__row {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  /* Service tabs — vertical stack so each filter has a full-row tap
     target instead of being squashed into a horizontal pill row that
     wraps awkwardly at 375px. The active-pill colour rules from the
     desktop styles still apply because we keep the same data-service
     attribute selectors active on mobile (just stacked vertically). */
  .work-filters__tabs {
    flex-direction: column;
    border-radius: 12px;
    padding: 6px;
    gap: 2px;
  }
  .work-filters__tabs button {
    width: 100%;
    justify-content: flex-start;
    padding: 14px 16px;
    border-radius: 8px;
    font-size: 12px;
  }
  .industry-dropdown,
  .industry-dropdown__trigger { width: 100%; }
  .industry-dropdown__trigger { padding: 14px 16px; min-width: 0; font-size: 12px; }
  .industry-dropdown__panel { left: 0; right: 0; min-width: 0; }
}

/* Project grid ------------------------------------------- */
.work-section {
  padding: clamp(56px, 8vw, 120px) var(--pad-x);
}

.work-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: clamp(24px, 3vw, 40px);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}
.work-meta__count strong { color: #fff; font-weight: 500; }

.work-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(14px, 1.2vw, 20px);
}

/* Project cards ------------------------------------------ */
.pcard {
  grid-column: span 4;
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  background: #0f0f0f;
  text-decoration: none;
  color: inherit;
  transition: transform .35s cubic-bezier(.2,.8,.2,1), border-color .25s;
  isolation: isolate;
}
.pcard.is-big { grid-column: span 8; }
.pcard:hover { transform: translateY(-4px); }
.pcard[data-service="websites"]:hover  { border-color: var(--blue); }
.pcard[data-service="ui-ux"]:hover     { border-color: var(--red); }
.pcard[data-service="ai-product"]:hover{ border-color: var(--cream); }

.pcard__media {
  aspect-ratio: 4/3;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 20% 0%, rgba(255,255,255,.04), transparent 55%),
    #151515;
  background-image: repeating-linear-gradient(135deg, rgba(255, 255, 255, .03) 0 1px, transparent 1px 12px);
}
.pcard.is-big .pcard__media { aspect-ratio: 16/9; }
.pcard__media img,
.pcard__media video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s cubic-bezier(.2,.8,.2,1);
}
.pcard:hover .pcard__media img,
.pcard:hover .pcard__media video { transform: scale(1.03); }
.pcard__media::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .35s;
  pointer-events: none;
}
.pcard[data-service="websites"]:hover .pcard__media::after  { opacity: 1; background: radial-gradient(600px 280px at 30% 40%, rgba(91,90,255,.18), transparent 60%); }
.pcard[data-service="ui-ux"]:hover .pcard__media::after     { opacity: 1; background: radial-gradient(600px 280px at 30% 40%, rgba(232,69,60,.2), transparent 60%); }
.pcard[data-service="ai-product"]:hover .pcard__media::after{ opacity: 1; background: radial-gradient(600px 280px at 30% 40%, rgba(245,240,220,.14), transparent 60%); }

/* Chip system lives in base.css (shared across homepage + work). */
.pcard__placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
  text-align: center;
}
.pcard__placeholder .ini {
  font-family: var(--font-display);
  font-weight: 600;
  font-style: italic;
  font-size: clamp(40px, 6vw, 72px);
  letter-spacing: -.03em;
  color: var(--muted);
  opacity: .7;
}
.pcard__placeholder .soon {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
}

.pcard__body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pcard__row1 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}
.pcard__row1 .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: 0 0 8px; }
.pcard[data-service="websites"]   .pcard__row1 .dot { background: var(--blue); }
.pcard[data-service="ui-ux"]      .pcard__row1 .dot { background: var(--red); }
.pcard[data-service="ai-product"] .pcard__row1 .dot { background: var(--cream); }
.pcard__row1 .sep { color: var(--border); }
.pcard__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(22px, 1.4vw + 1rem, 30px);
  letter-spacing: -.02em;
  line-height: 1.1;
}
.pcard__desc {
  font-size: 14px;
  line-height: 1.55;
  color: #b8b8b8;
  max-width: 46ch;
}

/* When a card is hidden by a filter, it collapses smoothly */
.pcard[hidden] { display: none; }

/* Empty state ------------------------------------------- */
.work-empty {
  grid-column: 1 / -1;
  padding: 80px 24px;
  border: 1px dashed var(--border);
  border-radius: 12px;
  text-align: center;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
}

/* Responsive ------------------------------------------- */
@media (max-width: 1024px) {
  .pcard            { grid-column: span 6; }
  .pcard.is-big     { grid-column: span 12; }
}
@media (max-width: 640px) {
  .pcard            { grid-column: span 12; }
  .pcard.is-big     { grid-column: span 12; }
}

/* Shared CTA block (also reused on /work/[slug]) -------- */
.cta-band {
  padding: clamp(80px, 10vw, 160px) var(--pad-x);
  text-align: center;
  position: relative;
  overflow: hidden;
  border-top: 1px solid var(--border);
}
.cta-band::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(900px 500px at 70% 20%, rgba(91,90,255,.12), transparent 60%),
    radial-gradient(700px 400px at 20% 100%, rgba(232,69,60,.06), transparent 60%);
}
.cta-band h2 {
  font-family: var(--font-display);
  font-weight: var(--heading-weight);
  font-size: clamp(36px, 4vw + .5rem, 72px);
  letter-spacing: var(--heading-letter-spacing);
  line-height: var(--heading-line-height);
  max-width: 18ch;
  margin: 0 auto;
  position: relative;
}
.cta-band h2 em { color: var(--cream); font-style: italic; font-weight: 500; }
.cta-band p {
  margin: 18px auto 0;
  max-width: 46ch;
  font-size: 17px;
  line-height: 1.55;
  color: #cfcfcf;
  position: relative;
}
.cta-band__actions {
  margin-top: 32px;
  display: inline-flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  position: relative;
}
