/* === ARCHIVE PAGE — ultra-v4 ================================
   Light register: scanning/reading mode, counterpart to the
   dark homepage browsing mode.
   =========================================================== */

/* === BASE ================================================== */
body.archive-page {
  background: var(--panel-bg);
  color: var(--ink);
  min-height: 100svh;
  overflow-x: hidden;
}

/* === NAV OVERRIDES ========================================= */
body.archive-page nav {
  position: sticky;
  top: 0;
  background: var(--panel-bg);
  border-bottom: none;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
  transition: none;
  mix-blend-mode: normal;
  z-index: var(--z-nav);
}

body.archive-page .icon-link {
  background-color: var(--ink-ghost);
}

@media (hover: hover) and (pointer: fine) {
  body.archive-page .icon-link:hover {
    background-color: var(--ink);
    transform: scale(1.08);
  }
}

body.archive-page .nav-logo {
  display: flex;
  align-items: center;
  color: var(--ink);
}


body.archive-page :focus-visible {
  outline-color: var(--ink-ghost);
}

/* === MAIN LAYOUT =========================================== */
/* Same 12-col / 16px-gap grid as the debug overlay + homepage */
.archive-main {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: 16px;
  padding: clamp(48px, 6vw, 80px) var(--gutter) clamp(80px, 10vw, 120px);
}

/* Content lives in the central 6 columns (4–9 of 12) at desktop.
   Expands at smaller viewports so nothing feels cramped. */
.archive-list {
  grid-column: 3 / 11;            /* 8 cols — desktop default   */
}

@media (max-width: 1200px) {
  .archive-list { grid-column: 2 / 12; } /* 10 cols */
}

@media (max-width: 900px) {
  .archive-list { grid-column: 1 / -1; } /* full width */
}

/* === HEADER ================================================ */

/* === PROJECT LIST ========================================== */
.archive-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.archive-item {
  border-top: 1px solid rgba(10, 10, 14, 0.08);
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity 0.45s var(--ease-out),
    transform 0.45s var(--ease-out);
  transition-delay: calc(min(var(--stagger, 0), 7) * 35ms);
}

.archive-item:last-child {
  border-bottom: 1px solid rgba(10, 10, 14, 0.08);
}

.archive-item.visible {
  opacity: 1;
  transform: translateY(0);
}

.archive-item-link {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: clamp(18px, 2.4vw, 28px) 0;
  text-decoration: none;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

/* Number */
.archive-item-number {
  font-size: var(--text-xs);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  color: var(--ink-ghost);
  min-width: 2.2ch;
  flex-shrink: 0;
  line-height: 1;
}

/* Orb colour dot */
.archive-item-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  opacity: 0.85;
}

/* Client · Year */
.archive-item-meta {
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-secondary);
  flex: 0 0 clamp(140px, 22%, 260px);
  line-height: var(--leading-meta);
}

/* Project title — the dominant element */
.archive-item-title {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 900;
  line-height: var(--leading-headline);
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--ink);
  flex: 1;
  transition: transform 0.28s var(--ease-out);
}

/* Type tag */
.archive-item-type {
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0;
  color: var(--ink-ghost);
  text-align: right;
  flex: 0 0 clamp(120px, 18%, 220px);
  line-height: var(--leading-meta);
}

/* Desktop hover — title slides right, row gets subtle bg */
@media (hover: hover) and (pointer: fine) {
  .archive-item-link:hover {
    background: rgba(10, 10, 14, 0.025);
  }

  .archive-item-link:hover .archive-item-title {
    transform: translateX(6px);
  }

  .archive-item-link:hover .archive-item-number {
    color: var(--ink-secondary);
  }
}

.archive-item-link:active .archive-item-title {
  transform: translateX(3px);
  opacity: 0.65;
}

/* === MOBILE ================================================ */
@media (max-width: 640px) {
  .archive-item-link {
    flex-wrap: wrap;
    gap: 6px 12px;
    padding: 20px 0;
  }

  /* Top row: number · dot · client·year on one line */
  .archive-item-number { order: 1; }
  .archive-item-dot    { order: 2; align-self: center; }
  .archive-item-meta   { order: 3; flex: 1; }

  /* Title spans full width below */
  .archive-item-title  {
    order: 4;
    flex: 0 0 100%;
  }

  /* Type hidden on mobile — keeps it clean */
  .archive-item-type   { display: none; }
}

/* === FOOTER ================================================
   Archive uses .site-footer classes from style.css.
   Override: links in a row (matching desktop default).
   ========================================================= */
body.archive-page .site-footer { scroll-snap-align: none; }

/* === REDUCED MOTION ======================================== */
@media (prefers-reduced-motion: reduce) {
  .archive-item {
    transition: none !important;
    opacity: 1;
    transform: none;
  }
}
