/* ============================================================
   ARCHIVE — DESIGN TOKENS
   Paper white / carved-ink black / dingay-stone gray.
   No gradients. No color beyond this quiet, mineral palette.
============================================================ */

:root {
  --paper: #ffffff;
  --paper-dim: #f8f7f4;
  --ink: #16150f;
  --ink-soft: #47443c;
  --stone: #8c8579;      /* the one accent — named for the dingay stone */
  --line: #e8e5de;
  --line-strong: #c4bfb3;

  --font-display: "Newsreader", "Iowan Old Style", "Georgia", serif;
  --font-body: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", Menlo, monospace;

  --nav-height: 68px;
  --gutter: clamp(20px, 4vw, 56px);
  --max-width: 1180px;

  --ease-slow: cubic-bezier(0.22, 0.61, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

button {
  font-family: inherit;
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
}

::selection {
  background: var(--ink);
  color: var(--paper);
}

:focus-visible {
  outline: 1.5px solid var(--ink);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================================
   LABELS / EYEBROWS / CATALOG NUMBERS
   Mono type marks this as archival metadata, not decoration.
============================================================ */

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--stone);
}

/* ============================================================
   SKIP LINK
============================================================ */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 16px;
  z-index: 200;
  font-family: var(--font-mono);
  font-size: 13px;
}

.skip-link:focus {
  left: var(--gutter);
  top: 12px;
}

/* ============================================================
   NAVIGATION
============================================================ */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.site-nav__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  height: var(--nav-height);
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-nav__mark {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.02em;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav__list {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 28px);
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: nowrap;
}

.site-nav__link {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--ink-soft);
  padding: 6px 0;
  border-bottom: 1px solid transparent;
  transition: color 0.15s var(--ease-slow), border-color 0.15s var(--ease-slow);
  white-space: nowrap;
}

.site-nav__link:hover {
  color: var(--ink);
}

.site-nav__link[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

.site-nav__toggle {
  display: none;
  width: 32px;
  height: 32px;
  position: relative;
}

.site-nav__toggle span,
.site-nav__toggle span::before,
.site-nav__toggle span::after {
  content: "";
  position: absolute;
  left: 6px;
  right: 6px;
  height: 1px;
  background: var(--ink);
}

.site-nav__toggle span { top: 15px; }
.site-nav__toggle span::before { top: -7px; }
.site-nav__toggle span::after { top: 7px; }

@media (max-width: 760px) {
  .site-nav__toggle {
    display: block;
  }

  .site-nav__list {
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s var(--ease-slow);
  }

  .site-nav__list.is-open {
    max-height: 420px;
  }

  .site-nav__list li {
    width: 100%;
  }

  .site-nav__link {
    width: 100%;
    padding: 14px var(--gutter);
    border-bottom: 1px solid var(--line);
    border-left: 2px solid transparent;
  }

  .site-nav__link[aria-current="page"] {
    border-left-color: var(--ink);
  }
}

/* ============================================================
   PAGE / VIEW SHELL
   #app is the single container every view renders into, so the
   shared max-width + horizontal gutter live here rather than on
   a per-view wrapper class.
============================================================ */

#app {
  min-height: calc(100vh - var(--nav-height));
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter) 96px;
}

.view-header {
  padding: 28px 0 16px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
}

.view-header h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(20px, 2.2vw, 24px);
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}

.view-header p {
  max-width: 56ch;
  color: var(--ink-soft);
  margin: 0;
  font-size: 14px;
}

/* Compact header variant — used where the list/grid below should carry
   the visual weight instead of the heading (e.g. Documents). */
.view-header--compact {
  margin-bottom: 12px;
}

/* ============================================================
   HOME
   A quiet entrance, not a landing page: a "Recent" grid of current
   archive entries, then a compact section index with counts.
============================================================ */

/* .home wraps this view's content; #app now provides the shared
   max-width/gutter, so no box-model rules are needed here. */
.recent-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.recent-item {
  background: var(--paper);
  padding: 28px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: background 0.15s var(--ease-slow);
}

.recent-item:hover {
  background: var(--paper-dim);
}

.recent-item:hover .recent-item__title {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.recent-item__frame {
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--paper-dim);
}

.recent-item__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.recent-item__label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--stone);
}

.recent-item__title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
  margin: 0;
}

.recent-item__meta {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  color: var(--stone);
}

.recent-item--empty {
  padding: 28px;
  gap: 12px;
}

.recent-item__doc {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--stone);
}

.home-index-header {
  margin-top: 48px;
}

.archive-index {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.archive-index__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 20px;
  background: var(--paper);
  text-decoration: none;
  color: inherit;
  transition: background 0.15s var(--ease-slow);
}

.archive-index__row:hover {
  background: var(--paper-dim);
}

.archive-index__row:hover .archive-index__label {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.archive-index__label {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
}

.archive-index__count {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--stone);
  flex-shrink: 0;
}

.archive-index__count--empty {
  color: var(--line-strong);
}

@media (max-width: 720px) {
  .recent-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   GRIDS / CARDS  (Discography + Projects index)
============================================================ */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.card {
  background: var(--paper);
  padding: 20px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: background 0.15s var(--ease-slow);
}

.card:hover {
  background: var(--paper-dim);
}

.card__cover {
  aspect-ratio: 1 / 1;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--paper-dim);
}

.card__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card__placeholder {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--stone);
  text-transform: uppercase;
  text-align: center;
  padding: 12px;
}

.card__title {
  font-family: var(--font-display);
  font-size: 18px;
  margin: 0;
  font-weight: 500;
}

.card__id {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--stone);
  text-transform: uppercase;
}

.card__description {
  font-family: var(--font-body);
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink-soft);
  margin: 0;
}

.card__meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--stone);
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

/* Project index: fixed two-up grid so two cards fill the row instead of
   leaving empty auto-fill tracks (which showed as a bare gray area). */
.project-grid {
  grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 720px) {
  .project-grid {
    grid-template-columns: 1fr;
  }
}

/* Project cards run a little wider with a landscape screenshot */
.project-grid .card__cover {
  aspect-ratio: 16 / 10;
}

/* ============================================================
   DETAIL VIEWS  (Release / Project detail)
============================================================ */

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-soft);
  margin: 40px 0 0;
}

.back-link:hover {
  color: var(--ink);
}

.detail {
  display: grid;
  grid-template-columns: minmax(240px, 380px) 1fr;
  gap: 56px;
  padding: 40px 0 0;
  align-items: start;
}

@media (max-width: 720px) {
  .detail {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

.detail__cover {
  border: 1px solid var(--line);
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--paper-dim);
}

.project-detail .detail__cover {
  aspect-ratio: 16 / 10;
}

.detail__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail__body h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(26px, 3.4vw, 36px);
  margin: 10px 0 6px;
}

.detail__kind {
  color: var(--ink-soft);
  margin: 0 0 20px;
  font-size: 15px;
}

.detail__description {
  max-width: 60ch;
  margin: 0 0 28px;
}

.detail__links {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--line);
}

.detail__link-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.03em;
}

.detail__link-row a {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--line-strong);
}

.detail__link-row a:hover {
  text-decoration-color: var(--ink);
}

.unavailable {
  color: var(--stone);
}

/* ============================================================
   RESEARCH ARCHIVE LIST
   Same "vitrine" treatment as the Discography/Projects card grid —
   a single bordered block, hairline dividers between rows, paper-dim
   hover — so the list reads as the same kind of archive index rather
   than a plain data table.
============================================================ */

.doc-list__head {
  display: grid;
  grid-template-columns: 150px 1fr 110px 90px 90px;
  gap: 18px;
  padding: 0 20px 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--stone);
}

.doc-list {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-top: 10px;
}

.doc-row {
  display: grid;
  grid-template-columns: 150px 1fr 110px 90px 90px;
  gap: 18px;
  align-items: baseline;
  padding: 20px;
  background: var(--paper);
  text-decoration: none;
  color: inherit;
  transition: background 0.15s var(--ease-slow);
}

.doc-row--linked:hover {
  background: var(--paper-dim);
}

.doc-row--linked:hover .doc-row__title {
  color: var(--ink);
  text-decoration-color: var(--ink);
}

.doc-row__id {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.03em;
  color: var(--stone);
  overflow-wrap: anywhere;
}

.doc-row__title {
  font-family: var(--font-display);
  font-size: 17px;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--line-strong);
  transition: text-decoration-color 0.15s var(--ease-slow);
}

.doc-row__action {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-align: right;
  white-space: nowrap;
}

.doc-row__type,
.doc-row__date {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--stone);
}

@media (max-width: 640px) {
  .doc-list__head {
    display: none;
  }

  .doc-row {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 18px 20px;
  }

  .doc-row__action {
    text-align: left;
  }
}

/* ============================================================
   YEBMBO DINGAYOCH — MASONRY GALLERY
============================================================ */

.gallery {
  columns: 4 240px;
  column-gap: 1px;
}

@media (max-width: 900px) {
  .gallery { columns: 3 200px; }
}

@media (max-width: 600px) {
  .gallery { columns: 2 160px; }
}

.gallery__tile {
  break-inside: avoid;
  margin-bottom: 1px;
  border: 1px solid var(--line);
  background: var(--paper);
  display: block;
  width: 100%;
  padding: 0;
  text-align: left;
}

.gallery__frame {
  width: 100%;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--paper-dim);
  overflow: hidden;
}

.gallery__tile--short .gallery__frame { aspect-ratio: 4 / 3; }
.gallery__tile--medium .gallery__frame { aspect-ratio: 3 / 4; }
.gallery__tile--tall .gallery__frame { aspect-ratio: 2 / 3; }

.gallery__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery__placeholder {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--stone);
  text-transform: uppercase;
  text-align: center;
  padding: 10px;
}

.gallery__caption {
  padding: 8px 10px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.gallery__caption .tag {
  color: var(--stone);
  text-transform: uppercase;
}

/* Lightbox */

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(22, 21, 15, 0.94);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px var(--gutter);
}

.lightbox[hidden] {
  display: none;
}

.lightbox__figure {
  max-width: 900px;
  max-height: 100%;
  width: 100%;
  color: var(--paper);
  text-align: center;
}

.lightbox__frame {
  border: 1px solid rgba(253, 252, 250, 0.3);
  background: rgba(253, 252, 250, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  max-height: 72vh;
  overflow: hidden;
}

.lightbox__frame img {
  max-height: 72vh;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

.lightbox__caption {
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(253, 252, 250, 0.7);
}

.lightbox__close {
  position: absolute;
  top: 24px;
  right: var(--gutter);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid rgba(253, 252, 250, 0.4);
  padding: 8px 14px;
}

.lightbox__close:hover {
  border-color: var(--paper);
}

/* Audio section */

.audio-section {
  margin-top: 64px;
  padding-top: 40px;
  border-top: 1px solid var(--line);
}

.audio-track {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 20px;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.audio-track__title {
  font-family: var(--font-display);
  font-size: 17px;
  margin: 0 0 10px;
}

.audio-track audio {
  width: 100%;
  max-width: 480px;
}

.audio-track__catalog {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--stone);
}

.audio-note {
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--stone);
}

/* ============================================================
   MEHABERE-SUB — record label / imprint page
============================================================ */

.label-page {
  padding-top: 4px;
}

.label-page__section {
  padding: 40px 0;
  border-top: 1px solid var(--line);
}

.label-page__section--video {
  padding-top: 0;
  border-top: none;
}

.label-page__section .eyebrow {
  display: block;
  margin-bottom: 16px;
}

.label-page__frame {
  max-width: 900px;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  background: var(--paper-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.label-page__frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.label-page__placeholder {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--stone);
}

.label-page__placeholder-box {
  border: 1px solid var(--line);
  background: var(--paper-dim);
  padding: 56px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.label-page__description {
  max-width: 60ch;
  margin: 0;
}

.label-page__links {
  max-width: 60ch;
}

.label-page__links .detail__link-row:first-child {
  border-top: 1px solid var(--line);
}

/* ============================================================
   ABOUT
============================================================ */

.about {
  padding-top: 4px;
  max-width: 46ch;
}

.about__block {
  margin: 0 0 36px;
}

.about__email {
  margin: 10px 0 0;
}

.about__email a {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--line-strong);
}

.about__email a:hover {
  text-decoration-color: var(--ink);
}

.about__links {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
}

.about__links li {
  padding: 8px 0;
}

.about__links a {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--line-strong);
}

.about__links a:hover {
  text-decoration-color: var(--ink);
}

/* ============================================================
   404 / EMPTY STATES
============================================================ */

.empty-state {
  padding: 40px 0;
  color: var(--stone);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
