/* ==========================================================================
   WORK.CSS — Selected Work index
   --------------------------------------------------------------------------
   Loaded after styles.css, before partials.css, on work.html only.
   Namespaced `wk-` so it can't collide with the .work-* / .cs-* systems.

   Direction: stay dark. Contrast comes from elevation and scale, not from
   flipping the page white. Screenshots get real browser chrome so flat PNGs
   read as products instead of image files.
   ========================================================================== */

.work-page {
  --wk-bg:        #09090b;
  --wk-raise:     #101013;   /* one step up from base */
  --wk-raise-2:   #16161a;   /* cards */
  --wk-line:      rgba(255, 255, 255, 0.09);
  --wk-line-soft: rgba(255, 255, 255, 0.05);
  --wk-ink:       #fafafa;
  --wk-mute:      rgba(250, 250, 250, 0.56);
  --wk-dim:       rgba(250, 250, 250, 0.36);
  --wk-brand:     #ac4fc6;

  --wk-serif: 'quiche-sans', Georgia, serif;
  --wk-sans:  'avenir-next', 'Avenir Next', 'Avenir', system-ui, sans-serif;
  --wk-ease:  cubic-bezier(0.16, 1, 0.3, 1);
  --wk-pad:   clamp(20px, 5vw, 64px);
  --wk-max:   1320px;

  background: var(--wk-bg);
}

.wk-shell {
  max-width: var(--wk-max);
  margin: 0 auto;
  padding-inline: var(--wk-pad);
}

.wk-eyebrow {
  display: block;
  font-family: var(--wk-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--wk-dim);
}


/* ==========================================================================
   1. HERO
   Statement type + a counter strip that gives the page a factual spine.
   ========================================================================== */

.wk-hero {
  padding: clamp(140px, 17vh, 200px) 0 clamp(56px, 7vw, 88px);
  position: relative;
  overflow: hidden;
}

/* Brand bloom bleeding down from behind the nav */
.wk-hero::before {
  content: '';
  position: absolute;
  top: -30%;
  left: 50%;
  width: min(1100px, 120vw);
  aspect-ratio: 1;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(172, 79, 198, 0.16), transparent 62%);
  pointer-events: none;
}

.wk-hero-inner { position: relative; }

.wk-hero-title {
  font-family: var(--wk-serif);
  font-size: clamp(58px, 11vw, 168px);
  font-weight: 500;
  line-height: 0.9;
  letter-spacing: -0.035em;
  color: var(--wk-ink);
  margin: 22px 0 0;
}

.wk-hero-title em {
  font-style: italic;
  color: var(--wk-brand);
}

.wk-hero-lede {
  font-family: var(--wk-sans);
  font-size: clamp(17px, 1.5vw, 21px);
  line-height: 1.6;
  color: var(--wk-mute);
  max-width: 620px;
  margin: 30px 0 0;
  text-wrap: pretty;
}

/* --- Counter strip -------------------------------------------------------- */

.wk-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin-top: clamp(52px, 6vw, 84px);
  background: var(--wk-line-soft);
  border-block: 1px solid var(--wk-line-soft);
}

.wk-stat {
  background: var(--wk-bg);
  padding: clamp(22px, 2.6vw, 34px) clamp(14px, 2vw, 26px);
}

.wk-stat strong {
  display: flex;
  align-items: flex-end;
  min-height: clamp(38px, 4.6vw, 68px);
  font-family: var(--wk-serif);
  font-size: clamp(38px, 4.6vw, 68px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--wk-ink);
  font-variant-numeric: tabular-nums;
}

.wk-stat span {
  display: block;
  margin-top: 10px;
  font-family: var(--wk-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--wk-dim);
}

.wk-stat--accent strong { color: var(--wk-brand); }

/* Word-valued stats need to fit the same column a 2-digit number sits in. */
.wk-stat--word strong {
  font-size: clamp(30px, 2.9vw, 44px);
  letter-spacing: -0.02em;
}

@media (max-width: 760px) {
  .wk-stats { grid-template-columns: repeat(2, 1fr); }
}


/* ==========================================================================
   2. FEATURED PROJECT
   One project gets to be the largest thing on the page.
   ========================================================================== */

.wk-featured {
  padding: clamp(64px, 8vw, 120px) 0 clamp(48px, 6vw, 80px);
}

.wk-featured-link {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(32px, 5vw, 76px);
  text-decoration: none;
  color: inherit;
}

.wk-featured-media { perspective: 1800px; }

.wk-featured .wk-browser {
  transform: rotateY(-7deg) rotateX(2.5deg) translateZ(0);
  transform-origin: right center;
  transition: transform 900ms var(--wk-ease), box-shadow 900ms var(--wk-ease);
  box-shadow:
    0 60px 120px -40px rgba(0, 0, 0, 0.9),
    0 0 90px -30px rgba(172, 79, 198, 0.4);
}

.wk-featured-link:hover .wk-browser {
  transform: rotateY(-3deg) rotateX(1deg) translateZ(30px);
  box-shadow:
    0 70px 140px -40px rgba(0, 0, 0, 0.95),
    0 0 120px -20px rgba(172, 79, 198, 0.55);
}

.wk-featured-tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--wk-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--wk-brand);
}

.wk-featured-tag::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--wk-brand);
  box-shadow: 0 0 12px var(--wk-brand);
}

.wk-featured-name {
  font-family: var(--wk-serif);
  font-size: clamp(40px, 5.2vw, 82px);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.03em;
  color: var(--wk-ink);
  margin: 18px 0 0;
}

.wk-featured-desc {
  font-family: var(--wk-sans);
  font-size: clamp(15px, 1.2vw, 18px);
  line-height: 1.65;
  color: var(--wk-mute);
  margin: 20px 0 0;
  max-width: 46ch;
}

.wk-featured-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.wk-chip {
  font-family: var(--wk-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--wk-mute);
  padding: 7px 14px;
  border: 1px solid var(--wk-line);
  border-radius: 999px;
}

@media (max-width: 940px) {
  .wk-featured-link { grid-template-columns: 1fr; }
  .wk-featured .wk-browser { transform: none; }
  .wk-featured-link:hover .wk-browser { transform: translateY(-6px); }
}


/* ==========================================================================
   3. BROWSER CHROME
   The polish lever: a flat PNG framed as a real product window.
   ========================================================================== */

.wk-browser {
  border-radius: 12px;
  overflow: hidden;
  background: #17171b;
  border: 1px solid var(--wk-line);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.85);
}

.wk-browser-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 14px;
  background: #202026;
  border-bottom: 1px solid rgba(0, 0, 0, 0.5);
}

.wk-browser-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  flex-shrink: 0;
}

.wk-browser-url {
  flex: 1;
  margin-left: 8px;
  padding: 5px 12px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.34);
  font-family: var(--wk-sans);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--wk-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wk-browser-shot {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top center;
  background: #0d0d10;
}


/* ==========================================================================
   4. GRID + FILTERS
   ========================================================================== */

.wk-grid-section {
  padding: clamp(56px, 7vw, 96px) 0 clamp(72px, 9vw, 130px);
  border-top: 1px solid var(--wk-line-soft);
}

.wk-grid-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 28px;
  margin-bottom: clamp(32px, 4vw, 52px);
}

.wk-grid-title {
  font-family: var(--wk-serif);
  font-size: clamp(30px, 3.6vw, 54px);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.025em;
  color: var(--wk-ink);
  margin: 14px 0 0;
}

.wk-grid-title em { font-style: italic; color: var(--wk-brand); }

.wk-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.wk-filter {
  font-family: var(--wk-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--wk-mute);
  background: transparent;
  border: 1px solid var(--wk-line);
  border-radius: 999px;
  padding: 9px 17px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color 260ms ease, border-color 260ms ease, background 260ms ease;
}

.wk-filter span {
  font-size: 10px;
  color: var(--wk-dim);
  transition: color 260ms ease;
}

.wk-filter:hover {
  color: var(--wk-ink);
  border-color: rgba(255, 255, 255, 0.24);
}

.wk-filter.is-active {
  background: var(--wk-brand);
  border-color: var(--wk-brand);
  color: #fff;
}

.wk-filter.is-active span { color: rgba(255, 255, 255, 0.7); }

.wk-filter:focus-visible {
  outline: 2px solid var(--wk-brand);
  outline-offset: 3px;
}

/* --- Cards ---------------------------------------------------------------- */

.wk-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(24px, 3vw, 44px);
}

.wk-card { min-width: 0; }

.wk-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  height: 100%;
}

.wk-card-media {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  transition: transform 700ms var(--wk-ease), box-shadow 700ms var(--wk-ease);
}

.wk-card-media .wk-browser {
  transition: box-shadow 700ms var(--wk-ease);
}

.wk-card-media .wk-browser-shot {
  transition: transform 1100ms var(--wk-ease);
}

.wk-card-link:hover .wk-card-media { transform: translateY(-8px); }
.wk-card-link:hover .wk-browser-shot { transform: scale(1.045); }

.wk-card-link:hover .wk-browser {
  box-shadow:
    0 40px 80px -34px rgba(0, 0, 0, 0.95),
    0 0 60px -24px rgba(172, 79, 198, 0.5);
}

.wk-card-body {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 2px 0;
}

.wk-card-name {
  font-family: var(--wk-serif);
  font-size: clamp(21px, 2vw, 30px);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--wk-ink);
  margin: 0;
  transition: color 300ms ease;
}

.wk-card-link:hover .wk-card-name { color: var(--wk-brand); }

.wk-card-year {
  font-family: var(--wk-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--wk-dim);
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.wk-card-desc {
  font-family: var(--wk-sans);
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--wk-mute);
  margin: 9px 2px 0;
  text-wrap: pretty;
}

.wk-card-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 2px 0;
}

.wk-card-cat {
  font-family: var(--wk-sans);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--wk-dim);
}

.wk-card-go {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--wk-sans);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--wk-brand);
}

.wk-card-go svg { transition: transform 400ms var(--wk-ease); }
.wk-card-link:hover .wk-card-go svg { transform: translateX(6px); }

/* Archived project — present, but visibly retired */
.wk-card--archived .wk-browser-shot { filter: grayscale(0.65); opacity: 0.72; }
.wk-card--archived .wk-card-go { color: var(--wk-dim); }

/* Filtering: hidden cards collapse out of the grid */
.wk-card[hidden] { display: none; }

.wk-card.is-filtering {
  opacity: 0;
  transform: scale(0.96);
  transition: opacity 260ms ease, transform 260ms ease;
}

@media (max-width: 820px) {
  .wk-grid { grid-template-columns: 1fr; }
  .wk-grid-head { align-items: flex-start; }
}


/* ==========================================================================
   5. CAPABILITIES — what ships with every build
   ========================================================================== */

.wk-caps {
  background: var(--wk-raise);
  border-block: 1px solid var(--wk-line-soft);
  padding: clamp(60px, 7vw, 100px) 0;
}

.wk-caps-title {
  font-family: var(--wk-serif);
  font-size: clamp(28px, 3.4vw, 50px);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.06;
  color: var(--wk-ink);
  margin: 14px 0 clamp(36px, 4vw, 58px);
  max-width: 18ch;
}

.wk-caps-title em { font-style: italic; color: var(--wk-brand); }

.wk-caps-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--wk-line-soft);
  border: 1px solid var(--wk-line-soft);
}

.wk-cap {
  background: var(--wk-raise);
  padding: clamp(24px, 2.8vw, 38px);
}

.wk-cap-num {
  font-family: var(--wk-sans);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--wk-brand);
}

.wk-cap h3 {
  font-family: var(--wk-sans);
  font-size: clamp(15px, 1.3vw, 18px);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--wk-ink);
  margin: 18px 0 0;
}

.wk-cap p {
  font-family: var(--wk-sans);
  font-size: 14px;
  line-height: 1.6;
  color: var(--wk-mute);
  margin: 9px 0 0;
}

@media (max-width: 900px) { .wk-caps-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .wk-caps-grid { grid-template-columns: 1fr; } }


/* ==========================================================================
   6. CLOSING CTA
   ========================================================================== */

.wk-cta {
  padding: clamp(80px, 11vw, 160px) 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.wk-cta::before {
  content: '';
  position: absolute;
  bottom: -50%;
  left: 50%;
  width: min(900px, 110vw);
  aspect-ratio: 1;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(172, 79, 198, 0.14), transparent 62%);
  pointer-events: none;
}

.wk-cta-inner { position: relative; }

.wk-cta-title {
  font-family: var(--wk-serif);
  font-size: clamp(34px, 5.4vw, 82px);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.03em;
  color: var(--wk-ink);
  margin: 18px auto 0;
  max-width: 15ch;
}

.wk-cta-title em { font-style: italic; color: var(--wk-brand); }

.wk-cta-lede {
  font-family: var(--wk-sans);
  font-size: clamp(15px, 1.2vw, 18px);
  line-height: 1.6;
  color: var(--wk-mute);
  margin: 22px auto 0;
  max-width: 48ch;
}

.wk-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 38px;
  padding: 17px 34px;
  border-radius: 999px;
  background: var(--wk-brand);
  color: #fff;
  text-decoration: none;
  font-family: var(--wk-sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition: background 300ms ease, transform 400ms var(--wk-ease), box-shadow 400ms ease;
  box-shadow: 0 18px 40px -18px rgba(172, 79, 198, 0.8);
}

.wk-cta-btn:hover {
  background: #bd63d6;
  transform: translateY(-3px);
  box-shadow: 0 26px 50px -18px rgba(172, 79, 198, 0.95);
}

.wk-cta-btn svg { transition: transform 400ms var(--wk-ease); }
.wk-cta-btn:hover svg { transform: translateX(6px); }

.wk-cta-fine {
  display: block;
  margin-top: 22px;
  font-family: var(--wk-sans);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--wk-dim);
}


/* ==========================================================================
   7. REVEALS
   ========================================================================== */

.work-page [data-wk-reveal] {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 900ms var(--wk-ease), transform 900ms var(--wk-ease);
}

.work-page [data-wk-reveal].is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .work-page [data-wk-reveal],
  .work-page [data-wk-reveal].is-in {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .wk-featured .wk-browser,
  .wk-card-media,
  .wk-browser-shot { transition: none; }
}
