/* Layout 13: Lightbox Gallery. The structure layer over the kit's base.css. Tokens only (brand.css); no business values.
   A dark page built around a photo viewer: one large framed photo with a thumbnail strip, outlined boxes for every
   button and group, small typewriter mono for labels and specs, faint film lines down the page, the work leading.
   Extra tokens: --well (behind photos), --hair (film lines), --act/--on-act (the one filled action), --mono,
   --display-case, --grain-o. */

/* ---------- the page: faint film lines and a little grain, everything outlined ---------- */
body.lb { position: relative; }
body.lb::before { content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    linear-gradient(90deg, transparent calc(9% - 1px), var(--hair) calc(9% - 1px), var(--hair) 9%, transparent 9%),
    linear-gradient(90deg, transparent calc(21% - 1px), var(--hair) calc(21% - 1px), var(--hair) 21%, transparent 21%),
    linear-gradient(90deg, transparent calc(79% - 1px), var(--hair) calc(79% - 1px), var(--hair) 79%, transparent 79%),
    linear-gradient(90deg, transparent calc(91% - 1px), var(--hair) calc(91% - 1px), var(--hair) 91%, transparent 91%); }
body.lb::after { content: ""; position: fixed; inset: 0; z-index: 46; pointer-events: none; opacity: var(--grain-o, 0.05);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E"); }
@media (max-width: 980px) { body.lb::before { display: none; } }
/* the film lines show through the plain page sections only; bands (showpiece, light, accent) cover them */
.lb main { position: relative; z-index: 1; }
.lb .band-page, .lb .lb-open { background: transparent; }
.lb .edge-line path { stroke: var(--line-strong); opacity: .9; }
.lb .edge-line path + path { opacity: .5; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.lb h1, .lb h2 { text-transform: var(--display-case, none); }
.lb h3 { font-size: clamp(20px, 1.6vw, 24px); text-transform: var(--display-case, none); }

/* boxes: every button is an outlined box with mono capitals; the one main action is filled (.act) */
.box, .act { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: var(--btn-pad);
  font: var(--btn-weight) var(--btn-size)/1 var(--btn-face); letter-spacing: var(--btn-track); text-transform: uppercase; text-decoration: none;
  white-space: nowrap; border: 1px solid var(--line-strong); border-radius: var(--r-s); background: transparent; color: var(--head); cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease; }
.box:hover { border-color: var(--head); background: rgba(255, 255, 255, 0.07); }
.act { background: var(--act); color: var(--on-act); border-color: var(--act); }
.act:hover { background: transparent; color: var(--act); }
.band-light .box { color: var(--light-head); border-color: var(--light-head); }
.band-light .box:hover { background: rgba(0, 0, 0, 0.06); }
.band-accent .act { background: var(--on-accent); color: var(--accent); border-color: var(--on-accent); }
.band-accent .act:hover { background: transparent; color: var(--on-accent); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: var(--s4); }
@media (max-width: 640px) { .actions .act, .actions .box { flex: 1 1 100%; } }

/* section heads: a short red rule that draws out, no slant */
.lb .section-head h2 { padding-bottom: 16px; }
.lb .section-head h2::after { height: 2px; width: 56px; transform: none; left: 0; }
html.fx body.lb .section-head h2::after { transform: scaleX(0); transition: transform .6s .2s cubic-bezier(.2,.7,.2,1); }
html.fx body.lb .section-head.in h2::after { transform: scaleX(1); }
.lb h2 { font-size: clamp(28px, 3.4vw, 48px); }

/* ---------- the menu: logo with a row of outlined mono boxes under it, a white box action top right;
   after the first scroll it becomes one slim floating outlined bar, clear of the top edge ---------- */
.lbh { position: sticky; top: 0; z-index: 50; height: 132px; pointer-events: none; }
.lbh-in { pointer-events: auto; position: relative; margin: 0 auto; max-width: calc(var(--wrap) + 2 * var(--s3)); height: 132px;
  padding: 22px var(--s3) 0; display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "brand . call" "nav nav ."; align-content: start; row-gap: 14px; column-gap: 16px;
  border: 1px solid transparent; transition: height .3s ease, max-width .35s ease, top .3s ease, padding .3s ease, background-color .3s ease, border-color .3s ease; }
.lbh-brand { grid-area: brand; display: flex; align-items: center; }
.lbh-brand img { height: 54px; width: auto; transition: height .3s ease; }
.lbh-nav { grid-area: nav; display: flex; gap: 8px; }
.lbh-nav .box { min-height: 36px; padding: 0 12px; font-size: var(--nav-size); }
.lbh-call { grid-area: call; min-height: 40px; padding: 0 16px; font-size: var(--nav-size); }
.lbh-menu { display: none; grid-area: menu; min-height: 40px; padding: 0 14px; font-size: var(--nav-size); }
.lbh.scrolled .lbh-in { top: 12px; height: 62px; max-width: min(1180px, calc(100% - 32px)); padding: 0 10px 0 18px;
  grid-template-areas: "brand nav call"; grid-template-columns: auto 1fr auto; align-content: center; align-items: center;
  background: var(--glass); border-color: var(--line); -webkit-backdrop-filter: blur(16px) saturate(1.3); backdrop-filter: blur(16px) saturate(1.3); }
.lbh.scrolled .lbh-brand img { height: 34px; }
.lbh.scrolled .lbh-nav { justify-content: center; }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .lbh.scrolled .lbh-in { background: var(--bar); } }
@media (max-width: 1180px) { .lbh.scrolled .lbh-nav .box:nth-child(n+4) { display: none; } }
@media (max-width: 980px) {
  .lbh { height: 76px; }
  .lbh-in { height: 76px; padding: 0 var(--s2); grid-template-areas: "brand menu call"; grid-template-columns: 1fr auto auto; align-content: center; align-items: center; column-gap: 8px; }
  .lbh-brand img { height: 36px; }
  .lbh-menu { display: inline-flex; }
  .lbh-nav { display: none; }
  .lbh-nav.open { display: grid; gap: 8px; position: absolute; left: 10px; right: 10px; top: calc(100% + 8px); padding: 12px; background: var(--bar); border: 1px solid var(--line); }
  .lbh-nav.open .box { min-height: 52px; font-size: 16px; justify-content: flex-start; }
  .lbh.scrolled .lbh-in { top: 10px; height: 58px; max-width: calc(100% - 20px); padding: 0 8px 0 12px; grid-template-areas: "brand menu call"; grid-template-columns: 1fr auto auto; }
  .lbh.scrolled .lbh-nav .box { display: flex; }
  .lbh.scrolled .lbh-brand img { height: 30px; }
}
@media (max-width: 420px) { .lbh-call-n { display: none; } .lbh-brand img { height: 30px; } }
@media (prefers-reduced-motion: reduce) { .lbh-in, .lbh-brand img { transition: none; } }

/* ---------- the opening: headline column + the viewer ---------- */
.lb-open { position: relative; padding: var(--s3) 0 var(--s6); }
.lb-grid { display: grid; grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.6fr); gap: var(--s5); align-items: center; }
.lb-copy h1 { font-size: clamp(30px, 3.1vw, 46px); line-height: 1.04; }
.lb-copy .lead { font-size: calc(var(--body-size) + 1px); margin-top: var(--s3); color: var(--text); }
.lb-rate { margin-top: var(--s3); font: 400 15px/1.4 var(--mono); color: var(--mute); text-transform: uppercase; letter-spacing: .04em; }
.lb-rate b { font: var(--display-weight) 22px/1 var(--display); color: var(--head); margin-right: 8px; letter-spacing: 0; }
.lb-rate span { display: block; margin-top: 4px; font-size: 13px; }

.lbx { position: relative; outline-offset: 6px; }
.lbx-frame { position: relative; border: 1px solid var(--line); padding: 12px; background: var(--well); }
.cm { position: absolute; width: 18px; height: 18px; border: 0 solid var(--head); pointer-events: none; }
.cm.tl { top: -7px; left: -7px; border-top-width: 1px; border-left-width: 1px; }
.cm.tr { top: -7px; right: -7px; border-top-width: 1px; border-right-width: 1px; }
.cm.bl { bottom: -7px; left: -7px; border-bottom-width: 1px; border-left-width: 1px; }
.cm.br { bottom: -7px; right: -7px; border-bottom-width: 1px; border-right-width: 1px; }
/* without script: the photos sit in a row you can swipe */
.lbx-stage { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; }
.lbx-item { margin: 0; flex: 0 0 88%; scroll-snap-align: start; display: flex; flex-direction: column; height: clamp(320px, 60vh, 640px); }
.lbx-pic { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; }
.lbx-pic img, .lbx-pic picture { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.lbx-pic picture { display: contents; }
.lbx-item figcaption { display: flex; flex-wrap: wrap; gap: 4px 18px; padding: 12px 2px 0; margin-top: 12px; border-top: 1px solid var(--line);
  font: 400 13px/1.35 var(--mono); text-transform: uppercase; letter-spacing: .05em; color: var(--mute); }
.lbx-item figcaption .no { color: var(--accent-text); font-weight: 700; }
.lbx-item figcaption .what { color: var(--head); font-weight: 700; }
.lbx-bar { display: none; }
.lbx-src { margin-top: 10px; font: 400 12.5px/1.4 var(--mono); color: var(--mute); }
/* with script: one photo at a time, chosen by the visitor (never on its own) */
html.lbx-on .lbx-stage { display: grid; overflow: visible; }
html.lbx-on .lbx-item { grid-area: 1 / 1; display: none; opacity: 0; visibility: hidden; transform: scale(1.025); transition: opacity .45s ease, transform .6s cubic-bezier(.2,.7,.2,1), visibility 0s .45s; }
html.lbx-on .lbx-item.was { display: flex; }
html.lbx-on .lbx-item:first-child:not(.was), html.lbx-on .lbx-item.on { display: flex; }
html.lbx-on .lbx-item.on { opacity: 1; visibility: visible; transform: none; transition: opacity .45s ease, transform .6s cubic-bezier(.2,.7,.2,1), visibility 0s; }
html.lbx-on .lbx-bar { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px; align-items: center; margin-top: 18px; }
.lbx-count { font: 400 14px/1 var(--mono); color: var(--mute); letter-spacing: .06em; white-space: nowrap; }
.lbx-count b { color: var(--head); font-weight: 700; }
.lbx-thumbs { display: flex; gap: 8px; overflow-x: auto; padding: 4px; scrollbar-width: none; justify-content: flex-end; }
.lbx-thumbs::-webkit-scrollbar { display: none; }
.lbx-th { flex: none; width: 72px; height: 54px; padding: 0; border: 1px solid var(--line); background: var(--well); cursor: pointer; opacity: .55; transition: opacity .2s ease, border-color .2s ease; border-radius: var(--r-s); overflow: hidden; }
.lbx-th img { width: 100%; height: 100%; object-fit: cover; }
.lbx-th:hover { opacity: .85; }
.lbx-th[aria-current="true"] { opacity: 1; border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.lbx-nav { display: flex; gap: 8px; }
.lbx-nav .box { min-height: 44px; padding: 0 14px; font-size: 13px; }
@media (prefers-reduced-motion: reduce) { html.lbx-on .lbx-item, html.lbx-on .lbx-item.on { transition: none; transform: none; } }
@media (max-width: 980px) {
  .lb-open { padding: var(--s2) 0 var(--s5); }
  .lb-grid { grid-template-columns: minmax(0, 1fr); gap: var(--s4); }
  .lb-copy h1 { font-size: clamp(28px, 7.4vw, 44px); }
  .lbx-frame { padding: 8px; }
  .lbx-item { height: min(96vw, 60svh); }
  html.lbx-on .lbx-bar { grid-template-columns: auto 1fr; }
  .lbx-thumbs { grid-column: 1 / -1; grid-row: 2; justify-content: flex-start; }
  .lbx-nav { justify-content: flex-end; }
  .lbx-th { width: 60px; height: 46px; }
}

/* ---------- the showpiece band ---------- */
.lb .show { --show-glow: rgba(255, 255, 255, 0.07); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.lb .show-steps b { text-transform: var(--display-case, none); font-size: clamp(18px, 1.5vw, 22px); }
.lb .show-steps li:nth-child(1) { --n: "01"; } .lb .show-steps li:nth-child(2) { --n: "02"; } .lb .show-steps li:nth-child(3) { --n: "03"; } .lb .show-steps li:nth-child(4) { --n: "04"; } .lb .show-steps li:nth-child(5) { --n: "05"; } .lb .show-steps li:nth-child(6) { --n: "06"; }
.lb .show-steps li b::before { content: var(--n) "  "; font: 700 14px/1 var(--mono); color: var(--accent-text); letter-spacing: .06em; white-space: pre; }


/* ---------- services: outlined spec boxes; the main service wide with its photo ---------- */
.svc { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s3); }
.lb .card { display: block; background: var(--page); border: 1px solid var(--line); border-radius: var(--r-l); box-shadow: none; overflow: visible; position: relative; }
.lb a.card:hover { transform: none; box-shadow: none; }
.lb .card img { aspect-ratio: auto; border: 0; }
.lb .svc-box { grid-column: span 2; display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
.lb .svc-main { grid-row: span 2; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
.lb .svc-type { grid-column: span 1; grid-template-columns: minmax(0, 1fr); }
.svc-pic { position: relative; border-right: 1px solid var(--line); overflow: hidden; background: var(--well); min-height: 240px; }
.svc-box:not(.svc-main) .svc-pic img { position: absolute; inset: 0; }
.svc-main .svc-pic { border-right: 0; border-bottom: 1px solid var(--line); aspect-ratio: 16 / 10; min-height: 0; }
.svc-pic img, .svc-pic picture { width: 100%; height: 100%; object-fit: cover; display: block; }
.svc-body { padding: var(--s3); display: grid; align-content: start; gap: 12px; }
.svc-body p { color: var(--mute); }
.svc-body .act { justify-self: start; margin-top: 8px; }
.svc-type .svc-body { height: 100%; grid-template-rows: auto 1fr auto; }
.svc-type .box { justify-self: start; min-height: 44px; padding: 0 14px; font-size: 13px; margin-top: 8px; }
.specs { margin: 0; display: grid; }
.specs > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); font: 400 14px/1.35 var(--mono); text-transform: uppercase; letter-spacing: .04em; }
.specs > div:last-child { border-bottom: 1px solid var(--line); }
.specs dt { color: var(--mute); }
.specs dd { margin: 0; color: var(--head); font-weight: 700; text-align: right; }
.specs a { text-decoration-thickness: 1px; text-underline-offset: 3px; }
@media (max-width: 1100px) { .svc { grid-template-columns: repeat(2, minmax(0, 1fr)); } .lb .svc-main { grid-row: auto; } }
@media (max-width: 640px) { .svc { grid-template-columns: minmax(0, 1fr); } .lb .svc-box, .lb .svc-type { grid-column: auto; grid-template-columns: minmax(0, 1fr); }
  .svc-pic { border-right: 0; border-bottom: 1px solid var(--line); aspect-ratio: 16 / 10; min-height: 0; } }

/* ---------- reviews (optional): outlined boxes, word for word, a mono index ---------- */
.rq-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: var(--s3); }
.rq { margin: 0; border: 1px solid var(--line); background: var(--page); padding: var(--s4) var(--s3) var(--s3); display: grid; grid-template-rows: 1fr auto; gap: var(--s2); }
.rq p { font-size: calc(var(--body-size) + 1px); line-height: 1.5; color: var(--text); }
.rq cite { font: 700 14px/1.2 var(--mono); font-style: normal; letter-spacing: .06em; text-transform: uppercase; color: var(--head); border-top: 1px solid var(--line); padding-top: 14px; }

/* ---------- the job sheet: the light band, typed rows ---------- */
.sheet { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--light-line); font-family: var(--mono); }
.sheet li { display: grid; grid-template-columns: 92px minmax(0, 0.9fr) minmax(0, 1.6fr) auto; gap: 8px 24px; align-items: baseline; padding: 16px 0; border-bottom: 1px solid var(--light-line); }
.sheet time { font-size: 14px; letter-spacing: .06em; text-transform: uppercase; color: var(--light-mute); }
.sheet b { font: 700 16px/1.3 var(--mono); color: var(--light-head); text-transform: uppercase; letter-spacing: .03em; }
.sheet span { font-size: 16px; line-height: 1.45; color: var(--light-text); }
.sheet a { font: 700 13px/1 var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--light-head); padding: 10px 12px; border: 1px solid var(--light-line); text-decoration: none; }
.sheet a:hover { border-color: var(--light-head); }
.sheet a .vh { text-transform: none; }
.strip { display: flex; flex-wrap: wrap; gap: 12px; margin-top: var(--s4); }
.strip figure { margin: 0; width: 150px; border: 1px solid var(--light-line); padding: 6px; background: var(--light-card); }
.strip img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.strip figcaption { font: 700 12px/1 var(--mono); color: var(--light-mute); padding: 8px 2px 2px; letter-spacing: .08em; }
@media (max-width: 760px) {
  .sheet li { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; }
  .sheet b { grid-column: 1 / -1; grid-row: 2; }
  .sheet span { grid-column: 1 / -1; grid-row: 3; }
  .sheet a { grid-column: 2; grid-row: 1; padding: 8px 10px; }
  .strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .strip figure { width: auto; }
}

/* ---------- visit: a spec list and the rating plate ---------- */
.visit-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: var(--s5); align-items: start; }
.specs-lg > div { font-size: 15px; padding: 14px 0; grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr); }
.specs-lg dd { text-align: left; overflow-wrap: anywhere; }
.plate { border: 1px solid var(--line); padding: var(--s4); position: relative; }
.plate-n { font: var(--display-weight) clamp(64px, 7vw, 104px)/0.9 var(--display); color: var(--head); margin-bottom: var(--s2); }
.plate p:not(.plate-n) { color: var(--mute); font: 400 15px/1.45 var(--mono); text-transform: uppercase; letter-spacing: .04em; }
.plate .actions { margin-top: var(--s3); }
@media (max-width: 980px) { .visit-grid { grid-template-columns: minmax(0, 1fr); gap: var(--s4); } .plate { padding: var(--s3); } }

/* ---------- closing band and footer ---------- */
.lb .closing p { margin-top: 12px; font: 400 17px/1.4 var(--mono); text-transform: uppercase; letter-spacing: .05em; }
.lb .closing .actions { margin-top: 0; }
.lb .foot h3 { font-size: 15px; color: var(--head); }

/* ---------- phone action bar (its own class: the kit's .bar waits for a .hero this layout does not have) ---------- */
.pbar { display: none; }
@media (max-width: 980px) {
  .pbar { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: var(--bar); border-top: 1px solid var(--line);
    transform: translateY(110%); transition: transform .25s ease-out; }
  .pbar.up { transform: none; }
  .pbar .act, .pbar .box { min-height: 48px; }
}
@media (prefers-reduced-motion: reduce) { .pbar { transition: none; } }
