/* Page styles: tokens only. Concept: the gallery is a wall of vertical
   frames hung in the rhythm of blind slats; the hero carries the slats. */

body { font-weight: 500; }   /* brand book: Medium for paragraphs */

/* ── Header + hero share the shade ground in both themes ── */
.top { background: var(--ink-field); color: var(--on-ink); }
.top .site-header { background: var(--ink-field); }
.top .site-header.is-scrolled { background: var(--ink-field); box-shadow: 0 1px 0 color-mix(in srgb, var(--on-ink) 14%, transparent); }
.wordmark { font-family: var(--font-display); font-weight: 700; font-size: 1rem; letter-spacing: 0.32em; text-decoration: none; margin-right: auto; padding-block: 12px; }
.header-link { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-size: var(--fs-small); font-weight: 600; text-decoration: none; color: var(--on-ink); }
.header-link:hover { color: var(--accent-fill); }
.header-link svg { width: 18px; height: 18px; flex: none; }
.header-link span { display: none; }
@media (min-width: 560px) { .header-link span { display: inline; } }

.hero-slats { min-height: min(78svh, 760px); align-content: end; isolation: isolate; }
.hero-slats::before {
  /* the blind: hairline slats over the right of the hero, one in Pear */
  content: ""; position: absolute; z-index: -1; top: 0; bottom: 0; right: 0; width: min(46vw, 620px);
  background:
    linear-gradient(var(--accent-fill), var(--accent-fill)) 0 62% / 100% 3px no-repeat,
    repeating-linear-gradient(to bottom, color-mix(in srgb, var(--bombay) 55%, transparent) 0 1px, transparent 1px 28px);
  -webkit-mask-image: linear-gradient(to left, #000 40%, transparent);
  mask-image: linear-gradient(to left, #000 40%, transparent);
}
@media (max-width: 759px) { .hero-slats::before { width: 100%; bottom: auto; height: 34%; opacity: 0.6; } }
.hero-slats .eyebrow { color: var(--accent-fill); }
.hero-slats .display { max-width: 14ch; }
.hero-slats .lead { color: var(--on-ink-muted); }
.hero-slats .button-quiet { border-color: color-mix(in srgb, var(--on-ink) 40%, transparent); color: var(--on-ink); }
.button { border-radius: var(--radius-button); font-weight: 600; min-height: 48px; }
.button svg { width: 18px; height: 18px; }

/* ── Intro ── */
.note { display: flex; gap: 12px; align-items: baseline; font-size: var(--fs-small); color: var(--muted); max-width: 52ch; }
.note::before { content: ""; flex: none; width: 10px; height: 10px; background: var(--accent-fill); outline: 1px solid var(--ink); transform: translateY(1px); }

/* ── Gallery wall ── */
.wall { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 12px; align-items: start; }
.wall > .tile:first-child { grid-column: 1 / -1; }
@media (min-width: 760px) {
  .wall { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 56px 20px; }
  .wall > .tile:first-child { grid-column: 1 / span 5; }
  .wall > .tile:nth-child(2) { grid-column: 6 / span 4; margin-top: 18%; }
  .wall > .tile:nth-child(3) { grid-column: 10 / span 3; }
  .wall > .tile:nth-child(4) { grid-column: 2 / span 4; }
  .wall > .tile:nth-child(5) { grid-column: 7 / span 5; margin-top: -24%; }
}
.tile { display: grid; gap: 14px; }
.tile-open { position: relative; display: block; aspect-ratio: 9 / 16; overflow: hidden; background: var(--surface-2); color: var(--on-ink); }
.tile-open img, .tile-open video { width: 100%; height: 100%; object-fit: cover; transition: transform 900ms var(--ease-out); }
.tile-open:hover img, .tile-open:hover video { transform: scale(1.03); }
.tile-open:focus-visible { outline-offset: 4px; }
.tile-kind {
  position: absolute; left: 0; top: 0; display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 12px; background: var(--ink-field); color: var(--on-ink);
  font-size: var(--fs-micro); font-weight: 600; letter-spacing: var(--tr-eyebrow); text-transform: uppercase;
}
.tile-kind svg { width: 12px; height: 12px; color: var(--accent-fill); }
.tile-cap { display: grid; gap: 6px; grid-template-columns: auto 1fr; column-gap: 14px; align-items: baseline; }
.tile-num { font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; line-height: 1; font-variant-numeric: tabular-nums; }
.tile-cap p { font-size: var(--fs-small); line-height: 1.45; }
.tile-cap .todo { grid-column: 2; font-size: var(--fs-micro); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
@media (max-width: 759px) {
  .tile-num { font-size: 1.125rem; }
  .tile-cap { column-gap: 8px; }
}

/* ── What the frames show: rule list on the slat band ── */
.band .rule-list > * { border-top-color: var(--ink); }
.rule-list .label { font-variant-numeric: tabular-nums; }

/* ── Contacts ── */
.contacts .kv dd a { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.25rem, 1rem + 1vw, 1.75rem); text-decoration: none; letter-spacing: -0.01em; display: inline-block; padding-block: 4px; }
.contacts .kv dd a:hover { text-decoration: underline; text-decoration-color: var(--accent-fill); text-decoration-thickness: 3px; text-underline-offset: 0.2em; }
.contacts .kv > div { align-items: baseline; }

.site-footer { background: var(--ink-field); color: var(--on-ink-muted); }
.site-footer .wordmark { color: var(--on-ink); }
.footer-row { display: flex; flex-wrap: wrap; gap: 12px 32px; align-items: baseline; justify-content: space-between; }

/* ── Lightbox ── */
.lightbox { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; padding: 0; border: 0; background: var(--ink-field); color: var(--on-ink); }
.lightbox::backdrop { background: var(--ink-field); }
.lightbox[open] { display: grid; grid-template-rows: auto 1fr auto; }
.lb-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 8px 12px 8px 20px; font-size: var(--fs-small); color: var(--on-ink-muted); }
.lb-stage { position: relative; min-height: 0; overflow: hidden; margin-inline: 12px; }
.lb-stage img, .lb-stage video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.lb-cap { padding: 12px 20px 20px; font-size: var(--fs-small); color: var(--on-ink-muted); text-align: center; }
.lb-nav { display: flex; gap: 4px; }
.lb-btn { display: inline-grid; place-items: center; width: 48px; height: 48px; border: 0; background: transparent; color: var(--on-ink); cursor: pointer; }
.lb-btn:hover { color: var(--accent-fill); }
.lb-btn svg { width: 24px; height: 24px; }
.lightbox :focus-visible { outline-color: var(--accent-fill); }

@media (prefers-reduced-motion: reduce) {
  .tile-open img, .tile-open video { transition: none; }
  .tile-open:hover img, .tile-open:hover video { transform: none; }
}

/* focus on the shade grounds: the light-theme signal is black, so switch to Pear */
.top :focus-visible, .site-footer :focus-visible { outline-color: var(--accent-fill); }
