/*
 * formfast — Work page styles
 * Extends tokens.css + styles.css + about.css.
 * Scoped with .work-page where needed to avoid collisions with about page.
 */

/* ==========================================================================
   Active nav link — "Work" shows white, others are subdued
   ========================================================================== */
.work-page .site-header__nav a {
  color: var(--color-content-subdued-dark);
}

.work-page .site-header__nav a.is-active {
  color: var(--color-white);
}

/* Same lead-in rhythm as About subhero when stacked (tablet / mobile) */
.work-page {
  --about-subhero-stacked-gap: var(--spacing-2xl);
}

/* ==========================================================================
   Subhero heading — work-page margin overrides
   about.css defines the base .subhero__line-1/2 and .subhero__arrow;
   these rules remap the stagger offsets for "work / that shipped".

   Figma values (node 11:206):
     line-1 "work":        ml=0,    mt=5px,  w=242px
     arrow:                ml=210px, mt=46px
     line-2 "that shipped": ml=128px, mt=0,   w=334px
   ========================================================================== */
.work-page .subhero__line-1,
.subhero--work .subhero__line-1 {
  margin-top: 5px;
  width: 242px;       /* "work" — single short word */
}

.work-page .subhero__arrow,
.subhero--work .subhero__arrow {
  margin-left: 210px;
  margin-top: 50px;
}

/* Word groups in subhero (wrapHeadingLine) — second line, second word nudge */
.work-page .subhero__heading-word,
.subhero--work .subhero__heading-word {
  display: inline-block;
  white-space: nowrap;
}

.work-page .subhero__line-2 > .subhero__heading-word:nth-of-type(1),
.subhero--work .subhero__line-2 > .subhero__heading-word:nth-of-type(1) {
  transform: translateY(4px);
}

.work-page .subhero__line-2 > .subhero__heading-word:nth-of-type(2),
.subhero--work .subhero__line-2 > .subhero__heading-word:nth-of-type(2) {
  padding-top: 9px;
}

.work-page .subhero__line-2,
.subhero--work .subhero__line-2 {
  margin-left: 128px;
  margin-top: 0;
  width: 334px;        /* "that shipped" */
}

/* Shown between hero and cases on 768–1199px (tablet); hidden on mobile & desktop */
.work-subtitle {
  display: none;
}

/* ==========================================================================
   Cases section — work page tweaks
   ========================================================================== */

/* Allow the 2-col grid to grow beyond 2 rows for 6 items */
.work-page .cases__grid {
  grid-template-rows: auto; /* let CSS auto-place items across 3 rows */
}

/* Tablet only (768–1199): Work page rebuilt from Figma node 285:10211 */
@media (min-width: 768px) and (max-width: 1199px) {
  .work-page .subhero,
  .subhero--work {
    height: 420px;
  }

  .work-page .subhero__stripes,
  .subhero--work .subhero__stripes {
    left: var(--pad-section-x);
    right: var(--pad-section-x);
    top: 0;
    height: 300px;
  }

  .work-page .subhero__content,
  .subhero--work .subhero__content {
    flex-direction: row;
    align-items: flex-end;
    justify-content: flex-start;
    gap: 0;
  }

  .work-page .subhero__arrow,
  .subhero--work .subhero__arrow {
    margin-top: 50.25px;
  }

  .work-page .subhero .subhero__subtitle,
  .subhero--work .subhero__subtitle {
    display: none;
  }

  .work-page .work-subtitle {
    display: block;
    background-color: var(--color-black);
    padding: var(--section-padding-y) var(--pad-section-x) 0;
    font-family: var(--type-h5g-family);
    font-size: var(--type-h5g-size);
    font-weight: var(--type-h5g-weight);
    line-height: var(--type-h5g-line-height);
    letter-spacing: var(--type-h5g-letter-spacing);
    color: var(--color-white);
  }

  .work-page .work-subtitle > p {
    margin: 0;
    width: min(563px, 100%);
  }

  .work-page .cases {
    padding-top: 56px;
  }
}
