/* Spektra Install v8: projects.html, the full record. Inherits every token from hero.css and the page hero,
   section label and CTA from pages.css; the photo dialog styles (.project-dialog) live in hero.css.
   Rows, chips and totals are built by assets/page-projects.js from assets/projects.js. */

/* ---- hero: the totals strip is the hero's foot, same hairline + numeral grammar as the home hero ---- */
.pr-hero .hero-line { max-width: 46ch; }
.pr-totals { display: flex; flex-wrap: wrap; gap: 18px 56px; min-height: 86px; margin: clamp(32px, 5vh, 56px) 0 0; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, 0.3); }
.pr-totals div { display: flex; flex-direction: column; gap: 8px; }
.pr-totals dt { order: 2; font-size: 12.5px; letter-spacing: 0.02em; color: var(--text-2); }
.pr-totals dd { order: 1; margin: 0; font-size: clamp(2rem, 3.4vw, 3.2rem); line-height: 1; font-weight: 700; letter-spacing: -0.035em; color: #fff; font-variant-numeric: tabular-nums; text-shadow: 0 2px 20px rgba(0, 0, 0, 0.45); }

/* ---- the record ---- */
.pr-section { padding: clamp(56px, 7vw, 96px) var(--gutter); scroll-margin-top: var(--nav-h); }
.pr-inner { max-width: 1280px; margin: 0 auto; }
.pr-heading { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px 40px; margin-bottom: clamp(28px, 4vw, 40px); }
.pr-heading h2 { margin: 0; font-size: clamp(2rem, 3.4vw, 3rem); line-height: 1.05; letter-spacing: -0.02em; font-weight: 700; }
.pr-heading p { margin: 0; max-width: 44ch; font-size: clamp(0.95rem, 1.2vw, 1.05rem); color: var(--text-2); }

/* filter rail: each choice is a thin bar with a two-digit count beneath, the hero marks' grammar */
.pr-rail { display: grid; gap: 22px; margin-bottom: clamp(24px, 3vw, 36px); }
.pr-group { margin: 0; padding: 0; border: 0; min-width: 0; }
.pr-group legend { display: block; margin-bottom: 8px; padding: 0; font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(207, 200, 186, 0.75); }
.pr-chips { display: flex; flex-wrap: wrap; gap: 0 22px; }
.pr-chip { position: relative; cursor: pointer; }
.pr-chip input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.pr-chip span { position: relative; display: flex; flex-direction: column; gap: 7px; min-width: 88px; min-height: 48px; padding: 10px 12px 8px 0; font-size: 14px; font-weight: 500; line-height: 1.2; color: var(--text-2); transition: color 160ms var(--ease-out); }
.pr-chip span::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: rgba(255, 255, 255, 0.28); }
.pr-chip span::after { content: ""; position: absolute; left: 0; top: -0.5px; height: 2px; width: 100%; background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform 300ms var(--ease-out); }
.pr-chip b { font-size: 11px; font-weight: 600; letter-spacing: 0.12em; color: var(--gold); font-variant-numeric: tabular-nums; }
.pr-chip:hover span { color: var(--text); }
.pr-chip input:checked + span { color: #fff; }
.pr-chip input:checked + span::after { transform: scaleX(1); }
.pr-chip input:focus-visible + span { outline: 2px solid var(--gold-2); outline-offset: 2px; border-radius: 2px; }

.pr-status-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin: 0 0 14px; }
.pr-status { margin: 0; font-size: 13.5px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.pr-status b { color: var(--text); font-weight: 600; }
.pr-clear { margin: 0; padding: 6px 0; border: 0; background: none; font-size: 13.5px; font-weight: 600; color: var(--gold-2); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.pr-clear:hover { color: #fff; }
.pr-clear[hidden] { display: none; }

/* the schedule: a column header, then one hairline row per project */
.pr-cols { display: grid; grid-template-columns: 150px minmax(0, 1fr) 454px; gap: 0 clamp(24px, 3vw, 40px); padding-bottom: 10px; font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(207, 200, 186, 0.55); }
.pr-list { list-style: none; margin: 0; padding: 0; border-bottom: 1px solid var(--line); }
.pr-row { position: relative; display: grid; grid-template-columns: 150px minmax(0, 1fr) 454px; gap: 20px clamp(24px, 3vw, 40px); padding: 28px 0 30px; border-top: 1px solid var(--line); scroll-margin-top: calc(var(--nav-h) + 16px); }
.pr-row[hidden] { display: none; }
.pr-row::before { content: ""; position: absolute; left: 0; top: -1px; width: 44px; height: 2px; background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform 900ms var(--ease-out); }
.pr-row.is-seen::before, .pr-row:target::before { transform: scaleX(1); }
.pr-row:target .pr-name { color: var(--gold-2); }

.pr-num { display: block; padding-top: 10px; font-size: 11px; font-weight: 600; letter-spacing: 0.12em; color: var(--gold); font-variant-numeric: tabular-nums; }
.pr-fig { margin: 22px 0 0; display: flex; flex-direction: column; }
.pr-fig b { font-size: clamp(3rem, 4.4vw, 4.2rem); line-height: 0.92; font-weight: 700; letter-spacing: -0.04em; color: #fff; font-variant-numeric: tabular-nums; }
.pr-fig b.is-word { font-size: clamp(1.6rem, 2.2vw, 2rem); line-height: 1; letter-spacing: -0.02em; }
.pr-fig span { margin-top: 8px; font-size: 13px; line-height: 1.35; color: var(--text-2); }

.pr-text { min-width: 0; padding-top: 10px; }
.pr-name { margin: 0; font-size: clamp(1.35rem, 1.9vw, 1.7rem); line-height: 1.15; font-weight: 600; letter-spacing: -0.012em; }
.pr-where { margin: 8px 0 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; font-size: 14px; line-height: 1.45; color: var(--text-2); }
.pr-city { font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); }
.pr-scope { margin: 14px 0 0; max-width: 52ch; font-size: 15px; line-height: 1.55; color: var(--text-2); }
.pr-stats { display: flex; flex-wrap: wrap; gap: 10px 24px; margin: 16px 0 0; }
.pr-stats div { display: flex; flex-direction: column; gap: 3px; }
.pr-stats dt { order: 2; font-size: 12px; color: var(--text-2); }
.pr-stats dd { order: 1; margin: 0; font-size: 18px; font-weight: 600; line-height: 1.1; color: var(--text); font-variant-numeric: tabular-nums; }
.pr-open { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin: 12px 0 0; padding: 0; border: 0; background: none; font-size: 14px; font-weight: 600; color: var(--gold-2); cursor: pointer; }
.pr-open svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform 180ms var(--ease-out); }
.pr-open:hover { color: #fff; }
.pr-open:hover svg { transform: translateX(3px); }

/* photos: the cover, with a rail of the next three; the last carries "+N" when there are more */
.pr-photos { display: grid; grid-template-columns: minmax(0, 1fr) 84px; gap: 10px; align-items: stretch; }
.pr-cover { position: relative; display: block; width: 100%; margin: 0; padding: 0; border: 0; background: var(--bg-2); cursor: zoom-in; aspect-ratio: 4 / 3; align-self: stretch; overflow: hidden; }
.pr-cover img { width: 100%; height: 100%; object-fit: cover; transition: filter 300ms var(--ease-out); }
.pr-cover:hover img { filter: brightness(1.07); }
.pr-count { position: absolute; left: 12px; top: 12px; padding: 5px 8px; background: rgba(14, 14, 13, 0.78); font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text); }
.pr-thumbs { display: grid; grid-auto-rows: 84px; gap: 9px; align-content: start; }
.pr-thumb { position: relative; width: 84px; height: 84px; margin: 0; padding: 0; border: 0; background: var(--bg-2); cursor: zoom-in; overflow: hidden; }
.pr-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pr-more { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(14, 14, 13, 0.6); font-size: 15px; font-weight: 600; letter-spacing: 0.02em; color: #fff; }
.pr-empty { margin: 0; padding: 36px 0; border-top: 1px solid var(--line); font-size: 15px; color: var(--text-2); }
.pr-empty[hidden] { display: none; }
.pr-empty .pr-clear { margin-left: 8px; font-size: 15px; }

/* ---- responsive ---- */
@media (max-width: 999px) {
  .pr-cols { display: none; }
  .pr-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "mark photos" "text photos"; gap: 16px 28px; align-items: start; }
  .pr-mark { grid-area: mark; }
  .pr-text { grid-area: text; padding-top: 0; }
  .pr-photos { grid-area: photos; }
  .pr-fig { margin-top: 14px; }
}
@media (max-width: 759px) {
  .pr-totals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 12px; min-height: 0; margin-top: 28px; padding-top: 18px; }
  .pr-totals dd { font-size: 1.75rem; }
  .pr-totals dt { font-size: 12px; }
  .pr-section { padding: 56px var(--gutter) 48px; }
  .pr-heading { margin-bottom: 24px; }
  .pr-rail { gap: 18px; margin-bottom: 22px; }
  .pr-chips { flex-wrap: nowrap; gap: 0 16px; margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter) 2px; overflow-x: auto; scroll-snap-type: x proximity; overscroll-behavior-x: contain; scrollbar-width: none; }
  .pr-chips::-webkit-scrollbar { display: none; }
  .pr-chip { flex: 0 0 auto; scroll-snap-align: start; }
  .pr-chip span { min-width: 0; padding-right: 10px; }
  .pr-row { grid-template-columns: minmax(0, 1fr); grid-template-areas: "mark" "photos" "text"; gap: 14px; padding: 20px 0 24px; }
  .pr-fig { margin: 8px 0 0; flex-direction: row; align-items: baseline; gap: 10px; }
  .pr-fig b { font-size: 2.6rem; }
  .pr-fig b.is-word { font-size: 1.4rem; }
  .pr-fig span { margin: 0; }
  .pr-photos { grid-template-columns: minmax(0, 1fr); }
  .pr-cover { aspect-ratio: 3 / 2; }
  .pr-thumbs { display: none; }
  .pr-name { font-size: 1.35rem; }
  .pr-scope { font-size: 14.5px; }
  .pr-open { min-height: 48px; }
  .pr-empty { padding: 28px 0; }
}
@media (prefers-reduced-motion: reduce) {
  .pr-row::before { transition: none; transform: scaleX(1); }
  .pr-chip span, .pr-chip span::after, .pr-cover img, .pr-open svg { transition: none; }
}
