/* Butts Studios design portfolio (exploratory, 2026-10-13). Layered on styles.css tokens; no edits to the shared sheet. */

/* ---------- shared pieces ---------- */
.pf-shot { margin: 0; }
.pf-shot .pf-frame {
  border: 1px solid var(--line); border-radius: 3px; overflow: hidden; background: #0b0b0b;
}
.pf-shot img { width: 100%; height: auto; display: block; }
.pf-shot figcaption { margin-top: 10px; font-size: 13px; color: var(--muted); line-height: 1.4; }
.pf-shot figcaption b { color: var(--fg); font-weight: 700; }
.pf-tag {
  display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); border: 1px solid var(--line); border-radius: 3px; padding: 4px 10px;
}

.swatches { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.swatches li { display: grid; gap: 6px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.swatches i { display: block; width: 56px; height: 56px; border-radius: 4px; border: 1px solid var(--line); }

.pf-note { font-size: 13px; color: var(--muted); max-width: 70ch; }

/* ---------- option A: case-study rows ---------- */
.pf-switch { display: inline-flex; gap: 6px; margin-top: 28px; flex-wrap: wrap; }
.pf-switch a {
  text-decoration: none; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  border: 1.5px solid var(--line); border-radius: 3px; padding: 8px 14px;
}
.pf-switch a[aria-current] { border-color: var(--fg); background: var(--fg); color: var(--bg); }
.pf-switch a:not([aria-current]):hover { border-color: var(--fg); }

.case { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.65fr); gap: clamp(28px, 5vw, 72px); align-items: start;
  padding-block: clamp(48px, 7vw, 88px); border-bottom: 1px solid var(--line); }
.case:last-child { border-bottom: 0; }
.case-info { display: grid; gap: 18px; position: sticky; top: 24px; }
.case-no { font-weight: 800; font-size: 14px; color: var(--muted); }
.case h2 { font-size: clamp(34px, 4.6vw, 60px); font-weight: 800; line-height: .96; letter-spacing: -.035em; }
.case .kind { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 700; margin: 0; }
.case p.desc { margin: 0; font-family: var(--serif); font-size: 19px; line-height: 1.5; max-width: 40ch; }
.case dl { margin: 0; display: grid; gap: 14px; }
.case dt { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.case dd { margin: 6px 0 0; font-size: 15px; }
.case-media { display: grid; gap: 16px; grid-template-columns: repeat(6, minmax(0, 1fr)); }
.case-media > * { grid-column: span 6; }
.case-media .half { grid-column: span 3; }
.case-media .third { grid-column: span 2; }
.case-media .two-thirds { grid-column: span 4; }

/* logo plates: brand marks shown on their own grounds */
.plate { border: 1px solid var(--line); border-radius: 3px; display: grid; place-items: center; padding: clamp(20px, 4vw, 48px); min-height: 180px; height: 100%; }
.plate img { max-width: 100%; max-height: 120px; width: auto; height: auto; }
.plate.ha { background: #1f1f1d; }
.plate.ha-light { background: #F1ECE2; }
.plate.dat-ink { background: #1a1916; }
.plate.dat-paper { background: #f5f3ee; }
.plate.rwa { background: #1f1f1f; }
.plate.rwa img { max-height: 150px; }
.plate .plate-cap { margin: 14px 0 0; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #9A948A; text-align: center; }
.plate.ha-light .plate-cap, .plate.dat-paper .plate-cap { color: #6B655B; }

/* phone shots */
.phone { border: 1px solid var(--line); border-radius: 3px; overflow: hidden; background: #0b0b0b; max-width: 260px; margin-inline: auto; }
.phone img { width: 100%; height: auto; display: block; }
.phones { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; align-items: start; }

/* product screens grid (A) */
.screens { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 36px) clamp(16px, 2.4vw, 28px); }
.screens .pf-shot.wide { grid-column: span 2; }

/* archive strip */
.archive-list { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2px; background: var(--line); border: 2px solid var(--line); border-radius: 4px; overflow: hidden; }
.archive-list a { background: var(--bg); padding: 22px 18px; text-decoration: none; display: grid; gap: 6px; transition: background .2s; }
.archive-list a:hover { background: var(--surface); }
.archive-list b { font-size: 20px; font-weight: 800; letter-spacing: -.02em; }
.archive-list span { font-size: 12px; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; font-weight: 600; }

/* ---------- option B: masonry wall ---------- */
.wall { columns: 3 320px; column-gap: clamp(14px, 2vw, 24px); }
.wall > * { break-inside: avoid; margin: 0 0 clamp(14px, 2vw, 24px); }
.wall .pf-shot figcaption { margin-top: 8px; }
.wall .plate { min-height: 220px; }
.wall .phone { max-width: 300px; }
.wall-card {
  border: 1px solid var(--line); border-radius: 3px; padding: 22px; display: grid; gap: 12px; background: var(--surface);
}
.wall-card h3 { font-size: 26px; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.wall-card p { margin: 0; font-family: var(--serif); font-size: 17px; line-height: 1.45; }
.wall-card .swatches i { width: 40px; height: 40px; }
.wall-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 28px; padding: 0; list-style: none; }
.wall-filters button {
  appearance: none; background: none; color: inherit; cursor: pointer; font: 700 12px/1 var(--display); letter-spacing: .08em; text-transform: uppercase;
  border: 1.5px solid var(--line); border-radius: 3px; padding: 9px 14px;
}
.wall-filters button[aria-pressed="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.wall [hidden] { display: none !important; }

/* ---------- partnerships: open the archived site ---------- */
.open-site {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; text-decoration: none;
  font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  border: 1.5px solid var(--fg); border-radius: 3px; padding: 8px 14px;
}
.open-site:hover { background: var(--fg); color: var(--bg); }
.open-site small { font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: none; color: var(--muted); }
.open-site:hover small { color: inherit; }
.archive-note { font-size: 13px; color: var(--muted); margin: 18px 0 0; max-width: 70ch; }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .screens { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .archive-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .case { grid-template-columns: minmax(0, 1fr); }
  .case-info { position: static; }
}
@media (max-width: 600px) {
  .screens { grid-template-columns: minmax(0, 1fr); }
  .screens .pf-shot.wide { grid-column: auto; }
  .case-media .half, .case-media .third, .case-media .two-thirds { grid-column: span 6; }
  .case-media .third.keep { grid-column: span 3; }
  .archive-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .swatches i { width: 44px; height: 44px; }
}
.plate img.ha-logo { width: min(420px, 100%); max-height: none; }
.wall-card .pf-tag { justify-self: start; }
.open-site + .open-site { margin-left: 8px; margin-top: 8px; }

/* ---------- zoom targets (2026-10-13) ---------- */
a.zoom { display: block; cursor: zoom-in; color: inherit; text-decoration: none; }
.plate a.zoom { display: inline-block; }
a.zoom:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
.pf-frame a.zoom img, .phone a.zoom img { transition: opacity .2s; }
a.zoom:hover img { opacity: .9; }

/* ---------- products (A): one sheet per product ---------- */
.pf-products { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(40px, 5vw, 72px) clamp(28px, 4vw, 56px); align-items: start; }
.pf-product { display: grid; gap: 18px; }
.product-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.product-head h3 { font-size: clamp(26px, 2.6vw, 34px); font-weight: 800; letter-spacing: -.03em; line-height: 1; margin: 0; }
.product-head p { margin: 8px 0 0; font-family: var(--serif); font-size: 17px; line-height: 1.45; max-width: 46ch; }
.product-head .open-site { margin-top: 0; flex: none; }
.product-gallery { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; align-items: start; }
.product-gallery > * { grid-column: span 3; }
.product-gallery > .lead { grid-column: span 6; }
.product-gallery > .lead.with-phone { grid-column: span 5; }
.product-gallery > .k-phone { grid-column: span 1; }
.product-gallery .k-phone .phone { border-radius: 3px; max-width: none; }
.product-gallery figcaption { margin-top: 6px; font-size: 12px; }

/* ---------- products (B): wall tile with thumbs ---------- */
.wall-product .thumbs { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.wall-product .thumbs li { display: grid; gap: 4px; }
.wall-product .thumbs a.zoom { border: 1px solid var(--line); border-radius: 4px; overflow: hidden; background: #0b0b0b; }
.wall-product .thumbs img { display: block; width: 100%; height: auto; }
.wall-product .thumbs span { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.wall-product figcaption { display: grid; gap: 4px; }
.wall-product .wp-name { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.open-site.sm { margin-top: 0; padding: 5px 10px; font-size: 11px; }

/* ---------- lightbox ---------- */
html.lb-open { overflow: hidden; }
.lb { position: fixed; inset: 0; z-index: 1000; background: #050707; color: #EDE7DB;
  display: grid; grid-template-rows: auto minmax(0, 1fr);
  padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); }
.lb[hidden] { display: none; }
.lb-top { display: flex; align-items: center; gap: 14px; padding: 0 4px 10px; }
.lb-cap { margin: 0; flex: 1; font: 600 14px/1.35 var(--display); }
.lb-count { font: 700 12px/1 var(--display); letter-spacing: .08em; color: #9A948A; }
.lb-stage { position: relative; display: grid; place-items: center; min-height: 0; }
.lb-stage img { display: block; max-width: 100%; max-height: calc(100dvh - 96px); width: auto; height: auto; object-fit: contain;
  border: 1px solid #2B2824; border-radius: 4px; background: #0b0b0b; }
.lb-stage img.is-svg { width: min(900px, 90vw); padding: clamp(24px, 8vw, 96px); background: #1f1f1d; }
.lb button { appearance: none; cursor: pointer; display: grid; place-items: center; width: 44px; height: 44px; padding: 0;
  border: 1px solid rgba(237, 231, 219, .3); border-radius: 50%; background: rgba(5, 7, 7, .7); color: #EDE7DB; font: 400 24px/1 var(--display); }
.lb button:hover { background: #EDE7DB; color: #050707; }
.lb button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.lb .lb-prev, .lb .lb-next { position: absolute; top: 50%; transform: translateY(-50%); }
.lb .lb-prev { left: 8px; }
.lb .lb-next { right: 8px; }
.lb button[hidden] { display: none; }

@media (max-width: 900px) {
  .pf-products { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .product-head { flex-direction: column; gap: 12px; }
  .product-gallery > .lead.with-phone { grid-column: span 6; }
  .product-gallery > .k-phone { grid-column: span 2; }
  .lb-stage img { max-height: calc(100dvh - 84px); }
}
.wall-card .open-site { justify-self: start; }

/* ---------- The Signals Institute plates (2026-10-13) ---------- */
.plate.tsi-ink { background: #0A0A0A; }
.plate.tsi-paper { background: #F5F3EE; }
.plate.tsi-paper .plate-cap { color: #6B655B; }

/* ---------- item pages: links from the portfolio (2026-10-13) ---------- */
a.pf-name { text-decoration: none; color: inherit; }
a.pf-name:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.pf-more { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; text-decoration: none; }
.pf-more:hover { color: var(--muted); }
.pf-more-row { margin: 0; }
.product-head .pf-more { margin-top: 10px; }

/* ---------- featured products: full-row cards with a larger gallery (Principal 2026-10-13) ---------- */
.pf-sub { margin: 0 0 22px; }
.pf-featured + .pf-sub { margin-top: clamp(56px, 7vw, 96px); }
.pf-featured { display: grid; gap: clamp(48px, 6vw, 88px); }
.pf-featured .product-head h3 { font-size: clamp(30px, 3.4vw, 46px); }
.pf-featured .product-head p { font-size: 19px; max-width: 60ch; }
.pf-featured .product-gallery { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; grid-auto-flow: row dense; }
.pf-featured .product-gallery > * { grid-column: span 4; }
.pf-featured .product-gallery > .f2 { grid-column: span 2; }
.pf-featured .product-gallery > .f3 { grid-column: span 3; }
.pf-featured .product-gallery > .f4 { grid-column: span 4; }
.pf-featured .product-gallery > .f5 { grid-column: span 5; }
.pf-featured .product-gallery > .f6 { grid-column: span 6; }
.pf-featured .product-gallery figcaption { font-size: 13px; }
@media (max-width: 900px) {
  .pf-featured .product-gallery > .f2 { grid-column: span 4; }
  .pf-featured .product-gallery > .f3, .pf-featured .product-gallery > .f4 { grid-column: span 6; }
  .pf-featured .product-gallery > .f5, .pf-featured .product-gallery > .f6 { grid-column: span 12; }
}
@media (max-width: 600px) {
  .pf-featured .product-gallery > .f3, .pf-featured .product-gallery > .f4 { grid-column: span 12; }
  .pf-featured .product-gallery > .f2 { grid-column: span 6; }
}

/* "Mockup" label: device-frame composites are marked as mockups wherever they appear (2026-10-14) */
.mock-tag { display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--fg); border: 1px solid var(--line); border-radius: 3px; padding: 3px 8px; margin-right: 6px; vertical-align: 1px; }
/* partnership cards: mockup in the frame, real captures as zoomable thumbs below */
.work .frame.mock { background: var(--surface); }
.work .frame.mock a.zoom { display: block; position: absolute; inset: 0; }
.work .frame.mock img { object-fit: contain; padding: 4% 3%; box-sizing: border-box; }
.work .frame .mock-tag { position: absolute; left: 12px; top: 12px; background: var(--bg); margin: 0; z-index: 1; }
.work .frame > a.zoom { display: block; position: absolute; inset: 0; }
.work .thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; padding: 0; list-style: none; }
.work .thumbs a { display: block; height: 64px; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; background: var(--surface); transition: border-color .2s; }
.work .thumbs a:hover, .work .thumbs a:focus-visible { border-color: var(--fg); }
.work .thumbs img { display: block; height: 100%; width: auto; }
