/* ============================================================================
   Work: the /work landing sheet and the case study sheets.
   Builds on components.css (page-header, titleblock, trace-figure, prose,
   pull-quote, sheet-nav, cta-band). Only work-specific pieces live here.
   ========================================================================== */

/* --------------------------------------------------------- /work index */

.work-index {
  max-width: var(--content-max);
  margin-inline: auto;
  padding: 0 var(--gutter) var(--section-pad);
}

.work-sheets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
  gap: clamp(1.5rem, 4vw, 2.5rem);
  margin-top: clamp(1.5rem, 4vw, 2.5rem);
}

.work-sheet {
  border: 1px solid var(--hairline);
  background: rgba(255, 255, 255, 0.25);
}

.work-sheet__link {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

.work-sheet__media {
  position: relative;
  display: block;
  border-bottom: 1px solid var(--hairline);
}

.work-sheet__media img {
  display: block;
  width: 100%;
  height: auto;
}

.work-sheet__number {
  position: absolute;
  top: 0.6rem;
  left: 0.6rem;
  padding: 0.15rem 0.5rem;
  background: var(--paper);
  border: 1px solid var(--hairline);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}

.work-sheet__body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.25rem 1.35rem 1.5rem;
}

.work-sheet__title {
  font-family: var(--font-display);
  font-size: var(--text-h3);
  line-height: 1.1;
}

.work-sheet__descriptor {
  font-size: var(--text-description);
  line-height: 1.55;
  color: var(--ink);
}

.work-sheet__more {
  margin-top: auto;
  padding-top: 0.5rem;
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.work-sheet__link:hover .work-sheet__title {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.25em;
}

.work-sheet__link:hover .work-sheet__more {
  color: var(--ink);
}

/* ------------------------------------------------------- in the flat files */

.flat-files {
  margin-top: clamp(3rem, 7vw, 5rem);
  padding-top: clamp(1.5rem, 4vw, 2.5rem);
  border-top: 1px solid var(--hairline);
}

.flat-files__heading {
  font-size: var(--text-h3);
}

.flat-files__note {
  margin-top: 0.4rem;
  max-width: 40rem;
  font-size: var(--text-description);
  color: var(--ink);
}

.flat-files__list {
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--trace-faint);
}

.flat-files__entry {
  border-bottom: 1px solid var(--trace-faint);
}

.flat-files__entry > a {
  display: grid;
  grid-template-columns: 4rem 1fr;
  gap: 1.25rem;
  align-items: baseline;
  padding: 1rem 0.25rem;
  text-decoration: none;
  color: inherit;
}

.flat-files__number {
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}

.flat-files__title {
  font-size: 1.0625rem;
}

.flat-files__entry > a:hover .flat-files__title {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
}

.work-portfolio {
  margin-top: clamp(3rem, 7vw, 5rem);
}

.work-portfolio h2 {
  font-size: var(--text-h3);
}

.work-portfolio p {
  margin-top: 0.75rem;
  max-width: 44rem;
  font-size: var(--text-lede);
  line-height: 1.65;
  color: var(--ink);
}

/* ---------------------------------------------------- case study sheet */

.case-study {
  max-width: var(--content-max);
  margin-inline: auto;
  padding: 0 var(--gutter) var(--section-pad);
}

/* Wide feature banner at the top of a case study, matching the wide-image
   treatment used in the writings articles. Spans the full content width. */
.case-study__cover {
  margin: clamp(1.5rem, 4vw, 2.5rem) 0 0;
}

.case-study__cover img {
  width: 100%;
  height: auto;
  border: 1px solid var(--hairline);
}

.case-study__body {
  margin-top: clamp(2rem, 5vw, 3rem);
}

/* Demoted headings inside the body: h2 acts as the section label, h3 as the
   subsection. Match the prose scale but keep BLUF/Role/Details prominent. */
.case-study__body.prose h2 {
  margin-top: 2.5em;
  font-family: var(--font-display);
  font-size: var(--text-h2);
  letter-spacing: -0.01em;
}

.case-study__body.prose h2:first-child {
  margin-top: 0;
}

.case-study__wip {
  margin-top: 1.5rem;
  padding: 0.85rem 1.1rem;
  border: 1px dashed var(--hairline);
  background: rgba(255, 255, 255, 0.3);
  font-size: var(--text-description);
  color: var(--ink);
}

.case-study__video {
  margin: clamp(2rem, 5vw, 3.5rem) 0;
}

.case-study .pull-quote figcaption {
  margin-top: 1rem;
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
}

.case-study .pull-quote blockquote {
  margin: 0;
}

.case-study .pull-quote blockquote p {
  margin-bottom: 1rem;
}

.case-study .pull-quote blockquote p:last-child {
  margin-bottom: 0;
}
