/* Work — /work/ only. Built from site.css tokens. */

.demo-note { max-width: 72ch; }

/* hero: copy left, a strip of build crops right (HE-1) */
.whero-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero-strip { display: grid; gap: 14px; }
.hero-strip .hs-item:nth-child(2) { margin-left: 12%; }
.hero-strip .hs-item:nth-child(3) { margin-left: 4%; margin-right: 8%; }
@media (max-width: 1024px) {
  .whero-grid { grid-template-columns: 1fr; }
  .hero-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero-strip .hs-item:nth-child(n) { margin: 0; }
}
@media (max-width: 900px) { .hero-strip { display: none; } }

/* in-page jump nav */
.toc { margin-top: clamp(40px, 5vw, 64px); }
.toc ol { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 clamp(16px, 2.4vw, 28px); }
.toc a {
  display: grid; grid-template-columns: 2.4em 1fr; align-items: baseline; gap: 2px 0;
  min-height: 44px; padding: 16px 0 14px; text-decoration: none; font-size: .9375rem; text-wrap: balance;
  border-top: 1px solid var(--line-strong); font-weight: 500; letter-spacing: -.01em;
  transition: border-color .3s var(--ease);
}
.toc a:hover { border-top-color: var(--charcoal); }
.toc-n { grid-row: span 2; color: var(--copper-text); font-size: .8125rem; font-weight: 400; font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.toc-d { grid-column: 2; color: var(--muted); font-size: var(--fs-small); font-weight: 400; letter-spacing: 0; }
@media (max-width: 760px) { .toc ol { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) {
  .toc a { padding: 10px 0 8px; grid-template-columns: 2em 1fr; }
  .toc-d { display: none; }
  .toc-n { grid-row: auto; }
}

/* build band */
.build.band { padding: clamp(64px, 5vw, 72px) 0; }
.build-head { max-width: 820px; }
.build-for { margin-top: 18px; font-size: var(--fs-small); color: var(--muted); }
.band-charcoal .build-for { color: var(--muted-dark); }

/* problem / built / now: problem + built fold away on phones (W-3) */
.pwc {
  display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: clamp(24px, 3vw, 48px);
  margin-top: clamp(36px, 4.5vw, 56px); padding-top: clamp(24px, 3vw, 32px); border-top: 1px solid var(--line-strong);
}
.band-charcoal .pwc { border-top-color: var(--line-dark); }
.pwc-in { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(24px, 3vw, 48px); }
.pwc h3 { margin-bottom: 10px; }
.pwc p { color: var(--muted); max-width: 46ch; }
.band-charcoal .pwc p { color: var(--muted-dark); }
.pwc-more summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  min-height: 48px; font-size: var(--fs-h4); font-weight: 500; letter-spacing: -.012em;
}
.pwc-more summary::-webkit-details-marker { display: none; }
.pwc-more summary::after { content: "+"; content: "+" / ""; font-weight: 400; font-size: 1.5rem; color: var(--copper-text); transition: transform .35s var(--ease); flex: none; }
.band-charcoal .pwc-more summary::after { color: var(--mist); }
.pwc-more[open] summary::after { transform: rotate(45deg); }
.pwc-more[open] summary { margin-bottom: 12px; }
/* desktop: always open, summary hidden (only where the browser can force it) */
@supports selector(::details-content) {
  @media (min-width: 761px) {
    .pwc-more > summary { display: none; }
    .pwc-more::details-content { content-visibility: visible; display: block; }
  }
}
@media (max-width: 900px) {
  .pwc { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 760px) {
  .pwc { gap: 18px; padding-top: 6px; margin-top: 28px; }
  .pwc-in { grid-template-columns: 1fr; gap: 20px; padding-bottom: 8px; }
  .pwc-more { border-bottom: 1px solid var(--line-strong); }
  .band-charcoal .pwc-more { border-bottom-color: var(--line-dark); }
  .pwc-more summary { font-size: 1.0625rem; }
  .pwc-now h3 { font-size: 1.0625rem; margin-bottom: 6px; }
  .build.band { padding: 48px 0; }
}

/* gallery (WC-4): one lead screen per build; every other screen in a .gal-more strip.
   >=961px: head and "how it works now" sit beside the lead, problem/built and the strip run full width below.
   <=960px (WC-5): the lead and the strip merge into one scroll-snap strip. */
.gal:focus-visible, .gal-more:focus-visible { outline-offset: 6px; }
.gal-n { display: none; }
.g-phone .phone { width: 100%; }
.shot-open { position: relative; display: block; text-decoration: none; color: inherit; border-radius: var(--r-card); cursor: zoom-in; }
.shot-open .shot-frame { transition: border-color .25s var(--ease); }
.shot-open:hover .shot-frame { border-color: var(--line-strong); }
.band-charcoal .shot-open:hover .shot-frame { border-color: var(--muted-dark); }
.g-phone .shot-open { border-radius: var(--r-phone); }
.g-phone .phone img { aspect-ratio: 9 / 15; object-fit: cover; object-position: 50% var(--py, top); }

/* the strip of further screens */
.gm-lbl {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  font-size: var(--fs-kicker); letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
  padding-top: 16px; margin-bottom: 14px; border-top: 1px solid var(--line-strong);
}
.band-charcoal .gm-lbl { color: var(--muted-dark); border-top-color: var(--line-dark); }
.gm-hint::after { content: " →"; content: " →" / ""; }
.gm-track {
  display: flex; align-items: flex-start; gap: clamp(16px, 2vw, 24px); overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; padding: 4px 72px 14px 0;
  scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent;
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 72px), transparent);
          mask-image: linear-gradient(to right, #000 calc(100% - 72px), transparent);
}
.band-charcoal .gm-track { scrollbar-color: var(--line-dark) transparent; }
.gm-track > .shot { flex: 0 0 28%; scroll-snap-align: start; min-width: 0; }
.gm-track > .g-phone { flex-basis: 14%; }
.gm-track > .g-phone .shot-open { width: 66%; }
.gm-track .g-phone .phone { --phone-bezel: 6px; --r-phone: 22px; }

@media (min-width: 961px) {
  .build > .wrap {
    display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: clamp(40px, 5vw, 72px);
    grid-template-areas: "head lead" "now lead" "pwc pwc" "more more" "link link"; grid-template-rows: auto 1fr;
  }
  .build .pwc, .build .gal { display: contents; }
  .build-head { grid-area: head; }
  .pwc-now { grid-area: now; margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line-strong); }
  .band-charcoal .pwc-now { border-top-color: var(--line-dark); }
  .pwc-more { grid-area: pwc; margin-top: 40px; }
  .pwc-in { gap: clamp(24px, 3vw, 48px) clamp(40px, 5vw, 80px); }
  .pwc-in p, .pwc-now p { max-width: 62ch; }
  .gal > .g-lead, .g-set { grid-area: lead; align-self: start; }
  .g-set { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
  .g-set .phone { --phone-bezel: 6px; --r-phone: 22px; }
  .g-set .g-phone .phone img { aspect-ratio: auto; }
  .gal-more { grid-area: more; margin-top: 40px; min-width: 0; }
  .build-more { grid-area: link; }
  .gm-track .shot-frame.zoom { aspect-ratio: 16 / 10; }
  /* the lead shows the whole screen */
  .shot-frame.zoom.z-wide-full { aspect-ratio: auto; }
  .shot-frame.zoom.z-wide-full img { position: static; inset: auto; width: 100%; height: auto; transform: none; }
  .shot-frame.zoom.z-wide-full::after { display: none; }
}
@media (max-width: 960px) {
  .gal {
    display: flex; align-items: flex-start; gap: 16px; overflow-x: auto; overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter);
    margin: 28px calc(-1 * var(--gutter)) 0; padding: 4px var(--gutter) 12px;
    scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent;
  }
  .band-charcoal .gal { scrollbar-color: var(--line-dark) transparent; }
  .g-set, .gal-more, .gm-track { display: contents; }
  .gm-track > .g-phone .shot-open { width: auto; }
  .gm-lbl { display: none; }
  .gal .shot { flex: 0 0 44%; scroll-snap-align: start; min-width: 0; }
  .gal .g-phone { flex-basis: 22%; }
  .gal .g-phone .phone { --phone-bezel: 7px; --r-phone: 24px; }
  .gal-n { display: inline; font-variant-numeric: tabular-nums; color: var(--muted); }
  .band-charcoal .gal-n { color: var(--muted-dark); }
  .gal .cap { margin-top: 10px; flex-direction: row; flex-wrap: wrap; gap: 2px 10px; }
  .gal .cap > span:not(.gal-n) { flex-basis: 100%; }
  .gal .cap strong { order: -2; }
  .gal .cap .gal-n { order: -1; margin-left: auto; }
  .build.band { padding: 48px 0; }
  .pwc { margin-top: 28px; }
  .build-for { margin-top: 12px; }
}
@media (max-width: 760px) {
  .gal { gap: 12px; margin-top: 24px; }
  .gal .shot { flex-basis: 84%; }
  .gal .g-phone { flex-basis: 50%; }
}
.build-more { margin-top: 32px; }
@media (max-width: 760px) { .build-more { margin-top: 12px; } }
