/* work-page.css : portfolio.html only (lane 2026-10-07-work-case-files, issue #850).
   Nothing here is shared; site.css owns every other page. The Work page's own
   layout: a compact typographic garnet hero with numbered tabs, a full-width
   stamp line, then three alternating "case files" with a receipt strip under
   each. Colors come from the brand board tokens only. */

/* ---- Hero: type only, no art behind text, capped height ---- */
.work-hero {
  max-height: 70vh;
  padding: clamp(6.5rem, 11vh, 8.5rem) 0 clamp(3rem, 5vw, 4rem);
}
.work-hero .page-hero-grid {
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.work-hero h1 { max-width: 20ch; font-size: clamp(2.4rem, 4.2vw, 4rem); }
.work-hero .lede { max-width: 46rem; }

.work-tabs { display: grid; gap: .6rem; margin: 0; padding: 0; list-style: none; }
.work-tab {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: clamp(.8rem, 1.6vw, 1.4rem);
  align-items: baseline;
  padding: .7rem .2rem;
  color: var(--gold-soft);
  text-decoration: none;
  border-top: 1px solid oklch(90% .07 82 / .28);
  transition: color .18s ease, padding-left .18s ease;
}
.work-tab:last-child { border-bottom: 1px solid oklch(90% .07 82 / .28); }
.work-tab .work-tab-num {
  font-size: clamp(1.6rem, 2.6vw, 2.4rem);
  font-weight: 700;
  line-height: 1;
  color: var(--gold-bright);
  font-variant-numeric: tabular-nums;
}
.work-tab .work-tab-name {
  font-size: clamp(1.05rem, 1.5vw, 1.35rem);
  font-weight: 600;
  line-height: 1.2;
}
.work-tab:hover, .work-tab:focus-visible { padding-left: .7rem; color: var(--white); }
.work-tabs-label {
  margin: 0 0 .4rem;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold-soft);
}

/* ---- Full-width stamp line ---- */
.work-stamp {
  padding: clamp(1.6rem, 3vw, 2.4rem) 0;
  color: var(--ink);
  background: var(--gold-soft);
  border-top: 2px solid var(--garnet);
  border-bottom: 2px solid var(--garnet);
}
.work-stamp p {
  max-width: 68rem;
  margin: 0;
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  font-weight: 600;
  line-height: 1.45;
}

/* ---- Case files ---- */
.work-files { display: grid; gap: 0; }
.work-file {
  padding: clamp(3rem, 6vw, 5rem) 0;
  border-bottom: 1px solid var(--line);
}
.work-file:last-child { border-bottom: 0; }
.work-file-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(1.8rem, 4vw, 3.5rem);
  align-items: center;
}
.work-file-art { margin: 0; }
.work-file-art img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 18px;
  box-shadow: var(--shadow);
}
.work-file:nth-child(even) .work-file-art { order: 2; }
.work-file:nth-child(even) .work-file-body { order: 1; }

.work-file-stamp {
  display: inline-block;
  margin-bottom: .9rem;
  padding: .3rem .7rem;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--garnet);
  border: 2px solid var(--garnet);
  border-radius: 4px;
  transform: rotate(-1.2deg);
}
.work-file-num {
  display: block;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .18em;
  color: var(--gold-text);
}
.work-file-body h2 { margin: .2rem 0 .8rem; font-size: clamp(1.7rem, 2.8vw, 2.5rem); line-height: 1.05; }
.work-file-body ul { margin: .9rem 0 1.3rem; padding-left: 1.1rem; }
.work-file-body li { margin-bottom: .35rem; }

/* ---- Receipt strip ---- */
.work-receipt {
  display: grid;
  gap: clamp(1rem, 2.5vw, 2rem);
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  margin-top: clamp(1.6rem, 3vw, 2.4rem);
  padding-top: 1.2rem;
  border-top: 2px solid var(--garnet);
}
.work-receipt-col h3 {
  margin: 0 0 .4rem;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold-text);
}
.work-receipt-col p { margin: 0; font-size: .96rem; line-height: 1.45; }
.work-receipt-col .actions { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }

/* ---- Mobile: one column, image first, receipt stacked ---- */
@media (max-width: 760px) {
  .work-hero { max-height: none; }
  .work-hero .page-hero-grid { grid-template-columns: minmax(0, 1fr); }
  .work-file-grid { grid-template-columns: minmax(0, 1fr); }
  .work-file:nth-child(even) .work-file-art,
  .work-file .work-file-art { order: 1; }
  .work-file:nth-child(even) .work-file-body,
  .work-file .work-file-body { order: 2; }
  .work-receipt { grid-template-columns: minmax(0, 1fr); }
}

/* ---- Motion entry states: only once JS has gsap + ScrollTrigger. No-JS keeps
   everything visible. Motion is always on (Rico ruling 2026-08-29). ---- */
/* .work-receipt is excluded (#914): nothing animates the receipt wrapper
   itself, only its .work-receipt-col children, so an entry state here would
   never be cleared and the proof links inside it would stay invisible. */
.work-motion-ready .work-file .work-file-body > *:not(h2):not(.work-receipt) { opacity: 0; }
.work-motion-ready .work-file .work-receipt-col { opacity: 0; }
.work-motion-ready .work-tabs .work-tab { opacity: 0; }
/* Word mask reveal (JS wraps each word): the outer span clips, the inner one
   rises out of it. Both inline-block so the clip has a box to work with. */
.wm-word { display: inline-block; overflow: hidden; vertical-align: bottom; }
.wm-in { display: inline-block; will-change: transform; }

/* Image frame for the clip-path reveal and the scrubbed parallax. The img is
   112% tall inside the frame so +-6% of travel never shows an edge. */
.work-file-art {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  box-shadow: var(--shadow);
}
.work-art-mask {
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: inherit;
  aspect-ratio: 3 / 2;
  will-change: clip-path;
}
.work-art-mask img {
  position: absolute;
  inset: -6% 0;
  width: 100%;
  height: 112%;
  object-fit: cover;
  border-radius: 0;
  box-shadow: none;
  will-change: transform;
}
