/* ============================================================
   SYZYGY Architects — home
   One screen that never scrolls: a full-screen photograph for
   the current project, every project named along the bottom,
   and a line that shows how far along you are.
   ============================================================ */

html, body { height: 100%; }
body { overflow: hidden; overscroll-behavior: none; background: var(--ink); }

.ld {
  position: fixed; inset: 0; overflow: hidden; background: var(--ink); color: var(--paper);
  touch-action: none; user-select: none; -webkit-user-select: none; cursor: grab;
}
.ld.is-dragging { cursor: grabbing; }

/* photographs: the current one fades in as the last fades out */
.ld-slide { position: absolute; inset: 0; opacity: 0; transition: opacity var(--slow) var(--ease-out); }
.ld-slide.is-on { opacity: 1; }
.ld-slide picture { position: absolute; inset: 0; }
.ld-slide img {
  width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: 50% 50%;
  -webkit-user-drag: none;
}
/* shade, so the header above and the names below read on any photograph */
.ld::before, .ld::after, .fs-shade::before, .fs-shade::after { content: ""; position: absolute; left: 0; right: 0; z-index: 1; pointer-events: none; }
.ld::before, .fs-shade::before { top: 0; height: 20vh; background-image: linear-gradient(to bottom, rgb(var(--shade) / 0.5), rgb(var(--shade) / 0)); }
.ld::after, .fs-shade::after {
  bottom: 0; height: 48vh;
  background-image: linear-gradient(to top, rgb(var(--shade) / 0.92) 0%, rgb(var(--shade) / 0.56) 42%, rgb(var(--shade) / 0) 70%);
}

/* the names and the line arrive once the loader has handed over */
.ld-foot { opacity: 0; transition: opacity var(--slow) ease; }
.ld.is-live .ld-foot { opacity: 1; }

.ld-carousel {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  padding-bottom: max(clamp(56px, 9vh, 92px), calc(env(safe-area-inset-bottom) + 32px));
}
.ld-strip {
  position: relative; width: 100%; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 13%, #000 87%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 13%, #000 87%, transparent 100%);
}
.ld-track { display: flex; align-items: flex-end; gap: clamp(44px, 8vw, 132px); width: max-content; will-change: transform; }
.ld-item {
  flex: 0 0 auto; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 4px;
  min-height: 44px; padding: 10px; text-align: center; color: var(--paper);
  opacity: 0.5; transition: opacity var(--mid) var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.ld-item.is-on { opacity: 1; }
.ld-item:focus-visible { outline: 1px solid var(--paper); outline-offset: 6px; border-radius: 2px; }
.ld-name {
  padding-bottom: 2px; white-space: nowrap;
  font-family: var(--font-display); font-size: 12px; font-weight: 400; line-height: 1.15; letter-spacing: 0.01em;
}
/* an unseen bold copy holds each name's widest size, so selecting one never nudges the row */
.ld-name::after { content: attr(data-name); display: block; height: 0; overflow: hidden; visibility: hidden; font-weight: 600; }
/* the selected name is bolder, and a hairline grows under it when the pointer is over it */
.ld-item.is-on .ld-name {
  font-weight: 600;
  background-image: linear-gradient(currentColor, currentColor);
  background-position: 0 100%; background-repeat: no-repeat; background-size: 0 1px;
  transition: background-size var(--mid) var(--ease-out);
}
.ld-item.is-on:hover .ld-name, .ld-item.is-on:focus-visible .ld-name { background-size: 100% 1px; }
.ld-meta {
  white-space: nowrap; font-family: var(--font-body); font-size: 8px; font-weight: 400; line-height: 1.2;
  letter-spacing: 0.16em; text-transform: uppercase; font-variant-numeric: tabular-nums;
}
.ld-meta i { display: inline-block; width: 1px; height: 0.72em; margin: 0 0.55em; background: currentColor; opacity: 0.5; }

/* the line: a hairline, with a bar that grows to show how far along you are */
.ld-line {
  position: absolute; z-index: 3; left: var(--edge); right: var(--edge); bottom: clamp(24px, 4vh, 38px);
  height: 3px; pointer-events: none;
}
.ld-line::before {
  content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; transform: translateY(-50%);
  background: rgb(246 242 235 / 0.34);
}
.ld-line span {
  position: absolute; inset: 0; background: rgb(246 242 235 / 0.95);
  transform: scaleX(var(--at, 0)); transform-origin: 0 50%; will-change: transform;
  transition: transform var(--slow) var(--ease-out);
}

@media (max-width: 767px) {
  .ld-track { gap: clamp(20px, 6vw, 40px); }
  .ld-carousel { padding-bottom: max(56px, calc(env(safe-area-inset-bottom) + 32px)); }
}
@media (prefers-reduced-motion: reduce) {
  .ld-slide, .ld-foot, .ld-item, .ld-name, .ld-line span { transition: none !important; }
}
