/* ── KenKenetic · Design — project template ─────────────────────
   Featured header · intro · side-scrolling media rows by type.
   ──────────────────────────────────────────────────────────────── */
.proj { scroll-padding-top: var(--bar-h); }
/* the project header is a single row (overrides the feed's stacked .bar) */
.proj .bar { flex-direction: row; align-items: center; gap: 0.9rem; padding: 0.75rem 1rem; }
.proj .home { align-self: center; }
.back-link { font-size: 0.68rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-2); text-decoration: none; padding-left: 0.4rem; }
.back-link:hover { color: var(--ink); }
body.lb-open { overflow: hidden; }

/* ── Featured header — a single image, not a repeat of the rows ── */
.hero { position: relative; width: 100%; background: var(--bg-card); overflow: hidden; }
.hero-img {
  display: block; width: 100%; height: auto;
  aspect-ratio: 16 / 9; max-height: 74vh; object-fit: cover; object-position: center;
}

/* ── Intro ─────────────────────────────────────────────────────── */
.intro { max-width: 760px; margin: 0 auto; padding: 2.2rem 1.4rem 1rem; }
.intro-eyebrow {
  display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center;
  font-size: 0.6rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--accent);
}
.intro-eyebrow .dot { color: var(--ink-2); }
.intro-title {
  font-size: clamp(1.5rem, 4.6vw, 2.4rem); font-weight: 800; letter-spacing: -0.015em;
  line-height: 1.04; margin: 0.6rem 0 0.9rem; text-transform: uppercase;
}
.intro-blurb { font-size: 0.98rem; line-height: 1.7; color: var(--ink); opacity: 0.82; max-width: 62ch; }
.intro-meta {
  display: flex; flex-wrap: wrap; gap: 0.4rem 0.9rem; margin-top: 1.1rem;
  font-size: 0.6rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-2);
}
.intro-meta span { position: relative; }
.intro-meta span + span::before { content: '·'; position: absolute; left: -0.55rem; }
.intro-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 1rem; }
.intro-tags .tag {
  font-size: 0.64rem; letter-spacing: 0.06em; color: var(--ink-2);
  border: 1px solid var(--line); border-radius: 999px; padding: 0.3rem 0.7rem;
}

/* ── Media rows ────────────────────────────────────────────────── */
.rows { padding: 1.6rem 0 4rem; }
.row { margin-bottom: 2.4rem; }
.row-head {
  display: flex; align-items: baseline; gap: 0.6rem;
  max-width: 1240px; margin: 0 auto 0.8rem; padding: 0 1.4rem;
}
.row-label { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; }
.row-kind { font-size: 0.58rem; letter-spacing: 0.1em; color: var(--ink-2); }
.row-hint { margin-left: auto; font-size: 0.56rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-2); opacity: 0.7; }

.row-scroll { position: relative; }
.row-track {
  display: flex; gap: 0.6rem; overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch;
  padding: 0 1.4rem 0.7rem; scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}
.row-track::-webkit-scrollbar { height: 5px; }
.row-track::-webkit-scrollbar-thumb { background: var(--line); border-radius: 999px; }
.row-track::-webkit-scrollbar-track { background: transparent; }

.tile {
  flex: 0 0 auto; scroll-snap-align: start; position: relative; cursor: pointer; padding: 0;
  border: 1px solid var(--line); border-radius: 4px; overflow: hidden; background: var(--bg-card);
  height: clamp(200px, 34vw, 380px);
}
.tile img {
  height: 100%; width: 100%; display: block; object-fit: cover;
  transition: transform .5s cubic-bezier(0.16,1,0.3,1);
}
.tile:hover img { transform: scale(1.03); }
.tile-blank { display: block; width: 100%; height: 100%; background: var(--bg-card); }

/* film affordances */
.tile-play {
  position: absolute; inset: 0; margin: auto; width: 46px; height: 46px; border-radius: 50%;
  background: rgba(23,21,15,0.42); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  border: 1px solid rgba(255,255,255,0.55);
  transition: background .2s, transform .2s;
}
.tile-play::after {
  content: ''; position: absolute; top: 50%; left: 54%; transform: translate(-50%,-50%);
  border-style: solid; border-width: 7px 0 7px 12px;
  border-color: transparent transparent transparent #fff;
}
.tile.is-film:hover .tile-play { background: var(--accent); transform: scale(1.06); }
.tile-dur {
  position: absolute; right: 0.4rem; bottom: 0.4rem; z-index: 2;
  font-size: 0.55rem; letter-spacing: 0.06em; color: #fff; font-variant-numeric: tabular-nums;
  background: rgba(23,21,15,0.6); padding: 0.12rem 0.36rem; border-radius: 3px;
}

/* desktop scroll arrows */
.row-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 34px; height: 34px; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  color: var(--ink); font-size: 1.1rem; line-height: 1;
  display: grid; place-items: center; transition: opacity .2s, border-color .2s;
}
.row-arrow--l { left: 0.35rem; }
.row-arrow--r { right: 0.35rem; }
.row-arrow:hover { border-color: var(--accent); }
.row-arrow.is-off { opacity: 0; pointer-events: none; }
.row-scroll.no-scroll .row-arrow, .row-scroll.no-scroll ~ .row-hint { display: none; }
@media (hover: none), (pointer: coarse) { .row-arrow { display: none; } }

/* project nav */
.proj-nav { max-width: 1240px; margin: 0 auto; padding: 0 1.4rem 4rem; display: flex; justify-content: space-between; gap: 1rem; }
.proj-nav a { text-decoration: none; color: var(--ink); font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.72; transition: opacity .2s; max-width: 46%; }
.proj-nav a:hover { opacity: 1; }
.proj-nav .pn-label { display: block; font-size: 0.54rem; color: var(--ink-2); margin-bottom: 0.2rem; letter-spacing: 0.16em; }
.proj-nav .pn-next { text-align: right; }

/* ── Lightbox ──────────────────────────────────────────────────── */
.lightbox {
  position: fixed; inset: 0; z-index: 80; display: grid; place-items: center;
  grid-template-columns: 56px 1fr 56px; grid-template-rows: 1fr auto;
  background: rgba(12,11,8,0.985);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.lightbox[hidden] { display: none; }
.lb-stage {
  grid-column: 2; grid-row: 1; width: 100%; height: 100%;
  display: grid; place-items: center; padding: 3.2rem 0 0.5rem;
}
.lb-stage img { max-width: 100%; max-height: 82vh; object-fit: contain; border-radius: 3px; }
.lb-stage video { max-width: 100%; max-height: 82vh; border-radius: 3px; background: #000; }
/* 16:9 shell so the Vimeo iframe scales without letterboxing the page */
.lb-frame { width: min(92vw, 1500px); aspect-ratio: 16 / 9; max-height: 82vh; }
.lb-frame[style*="9 / 16"] { width: auto; height: 82vh; max-width: 92vw; }
.lb-frame iframe { width: 100%; height: 100%; border: 0; border-radius: 3px; }
.lb-caption {
  grid-column: 2; grid-row: 2; padding: 0.7rem 0 1.1rem; text-align: center;
  font-size: 0.6rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(255,255,255,0.62); font-variant-numeric: tabular-nums;
}
.lb-close {
  position: fixed; top: 1rem; right: 1rem; z-index: 2; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.28); background: rgba(0,0,0,0.3); color: #fff; cursor: pointer; font-size: 0.9rem;
}
.lb-nav {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.22);
  background: rgba(0,0,0,0.25); color: #fff; cursor: pointer; font-size: 1.4rem; align-self: center;
  grid-row: 1;
}
.lb-prev { grid-column: 1; justify-self: start; margin-left: 0.4rem; }
.lb-next { grid-column: 3; justify-self: end; margin-right: 0.4rem; }
.lb-nav:hover, .lb-close:hover { border-color: #fff; background: rgba(0,0,0,0.5); }

/* ── Mobile ────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .hero-img { aspect-ratio: 4 / 3; max-height: 52vh; }
  .intro { padding: 1.6rem 1.1rem 0.6rem; }
  .intro-blurb { font-size: 0.9rem; line-height: 1.65; }
  .row-head { padding: 0 1.1rem; }
  .row-track { padding: 0 1.1rem 0.6rem; gap: 0.45rem; }
  .tile { height: clamp(170px, 52vw, 300px); }
  .row-hint { display: none; }
  .lightbox { grid-template-columns: 0 1fr 0; }
  .lb-nav { display: none; }                 /* swipe instead */
  .lb-stage { padding: 3rem 0.6rem 0.4rem; }
  .lb-stage img, .lb-stage video { max-height: 74vh; }
  .lb-frame { width: 94vw; }
  .proj-nav { padding: 0 1.1rem 3rem; font-size: 0.62rem; }
}
@media (max-width: 380px) {
  .tile { height: 150px; }
}
@media (prefers-reduced-motion: reduce) {
  .tile img { transition: none; }
}
