/* art-project.css — shared skeleton for the two ITP/IMA Spring Show 2023
 * installation records (de-orbitis-planetarum, light-mnemonics).
 *
 * These pages replace the dead Squarespace-export passthroughs. They give the
 * works a native design in the site's own language: near-black ground, a
 * centered ~68ch text measure, galleries that break wider, and a deliberate
 * type scale (Space Grotesk display / IBM Plex Mono labels / Montserrat body).
 *
 * Per-page identity is one CSS custom property, --art-accent, set on the page
 * wrapper class (.art--deorbitis, .art--mnemonics). Nothing else here is
 * page-specific; the one signature flourish per page lives in each page's own
 * <style is:global> block.
 *
 * Everything is scoped under .art-project so it can never leak into the shared
 * nav or the core Webflow cascade. The pages use a dedicated body class
 * (.bodyart-project) rather than .bodyart because .bodyart pins height:100vh —
 * fine for the full-viewport art index, fatal for a scrolling article.
 */

.bodyart-project {
  margin: 0;
  background-color: #0b090e;
}

/* Float the shared nav over the hero footage (same trick as the index
 * landing: the video is the absolute-positioned backdrop, the nav sits on
 * top of it). .navigation is already transparent; lifting it out of flow
 * lets the hero stage start at the very top of the page. */
.bodyart-project .navigation {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
}

.art-project {
  /* ground + ink */
  --art-bg: #0b090e;
  --art-ink: #e9e6ee; /* body text */
  --art-ink-strong: #f6f4f9; /* lede, headings */
  --art-ink-dim: #97909f; /* mono labels, credits, captions */
  --art-rule: #241f2b; /* hairlines */
  --art-accent: #ffffff; /* overridden per page */

  /* measure + rhythm */
  --measure: 68ch;
  --wide: 1180px;
  --gutter: clamp(1.25rem, 5vw, 2.5rem);

  background-color: var(--art-bg);
  color: var(--art-ink);
  font-family: Montserrat, sans-serif;
  font-weight: 400;
  line-height: 1.75;
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.075rem);
  overflow-x: hidden; /* belt-and-braces: no horizontal scroll ever */
  -webkit-font-smoothing: antialiased;
}

/* Centered text column at the reading measure. */
.art-measure {
  max-width: var(--measure);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Galleries and other elements that break past the text measure. */
.art-wide {
  max-width: var(--wide);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.art-project p {
  margin: 0 0 1.35em;
  color: var(--art-ink);
}
.art-project p:last-child {
  margin-bottom: 0;
}

/* ---------- hero ---------- */

/* A full-bleed stage: the work's own moving image sits behind the title.
 * The page sets --hero-poster (a still frame) inline; it paints as a
 * background layer so reduced-motion users — for whom the <video> is hidden
 * entirely — still get the picture, and it doubles as the loading placeholder.
 * The scrim fades to --art-bg at the bottom so the stage dissolves into the
 * page instead of ending at an edge. */
.art-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  min-height: clamp(420px, 66vh, 760px);
  padding-top: clamp(2.5rem, 8vh, 5.5rem);
  padding-bottom: clamp(2rem, 6vh, 4rem);
  background: var(--hero-poster, none) center / cover no-repeat;
}

.art-hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.art-hero-scrim {
  position: absolute;
  inset: 0;
  /* Top band darker than the middle: the floating nav's mono links must stay
   * readable even when a bright light-tube sweeps through the footage. */
  background: linear-gradient(
    to bottom,
    rgba(11, 9, 14, 0.74),
    rgba(11, 9, 14, 0.18) 36%,
    rgba(11, 9, 14, 0.28) 62%,
    var(--art-bg) 99%
  );
}

.art-hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
}

/* Legibility over live footage: a whisper of shadow, not an outline. */
.art-hero h1,
.art-hero .art-tags li {
  text-shadow: 0 1px 18px rgba(0, 0, 0, 0.55);
}

@media (prefers-reduced-motion: reduce) {
  .art-hero-video {
    display: none; /* the poster background above stands in */
  }
}

.art-hero h1 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 400;
  font-size: clamp(2.6rem, 1.4rem + 6vw, 5.25rem);
  line-height: 1.01;
  letter-spacing: -0.02em;
  color: var(--art-ink-strong);
}

/* mono eyebrow row of hashtags */
.art-tags {
  margin: clamp(1.1rem, 2.5vw, 1.75rem) 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.15rem;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  line-height: 1.4;
  color: var(--art-accent);
}

.art-lede {
  margin-top: clamp(1.75rem, 4vw, 2.75rem);
  font-size: clamp(1.12rem, 1rem + 0.7vw, 1.4rem);
  line-height: 1.62;
  color: var(--art-ink-strong);
}

/* ---------- credits (definition-style, mono, small) ---------- */

.art-credits {
  margin-top: clamp(2.5rem, 6vw, 4rem);
  padding-top: clamp(1.5rem, 3vw, 2rem);
  border-top: 1px solid var(--art-rule);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.82rem;
  line-height: 1.65;
  color: var(--art-ink-dim);
}

.art-credits .art-credits-meta {
  margin: 0 0 1.25em;
  color: var(--art-ink-dim);
}

.art-credits dl {
  margin: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 0.5rem;
  row-gap: 0.4rem;
}
.art-credits dt {
  color: var(--art-ink-strong);
  white-space: nowrap;
}
.art-credits dd {
  margin: 0;
  color: var(--art-ink-dim);
}
.art-credits .art-credits-note {
  margin: 1.25em 0 0;
  color: var(--art-ink-dim);
}

@media (max-width: 440px) {
  .art-credits dl {
    grid-template-columns: 1fr;
    row-gap: 0.15rem;
  }
  .art-credits dd {
    margin-bottom: 0.6em;
  }
}

/* ---------- section structure ---------- */

.art-section {
  padding-top: clamp(3rem, 8vh, 6rem);
}

.art-section h2 {
  margin: 0 0 clamp(1.5rem, 3vw, 2.25rem);
  font-family: "Space Grotesk", sans-serif;
  font-weight: 400;
  font-size: clamp(1.75rem, 1.2rem + 2.4vw, 2.75rem);
  line-height: 1.05;
  letter-spacing: -0.015em;
  color: var(--art-ink-strong);
}

.art-project ul {
  margin: 0 0 1.35em;
  padding-left: 1.2em;
  color: var(--art-ink);
}
.art-project ul li {
  margin-bottom: 0.55em;
}
.art-project ul li::marker {
  color: var(--art-accent);
}

/* ---------- galleries: justified equal-height rows ----------
 * The documentation mixes portrait phone shots, landscape screenshots and
 * square drawings. Equal-height rows organize them WITHOUT cropping: every
 * image keeps its native aspect (portraits stay portraits — they matter),
 * rows share one height, widths fall where the proportions put them, and
 * partial rows center. A lone image is the exception: it is there to be
 * STUDIED (a drawing, a diagram), so it sits alone at natural proportions,
 * centered and height-bounded. */

.art-gallery {
  margin-top: clamp(1.75rem, 4vw, 2.5rem);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 1rem;
  --row-h: clamp(210px, 24vw, 340px);
}
.art-gallery img {
  height: var(--row-h);
  width: auto;
  max-width: 100%;
  display: block;
  border-radius: 2px;
  background-color: #16121b; /* placeholder tone while lazy-loading */
}

/* A lone image: full attention, natural proportions, bounded height. */
.art-gallery:has(> img:only-child) {
  display: block;
  max-width: var(--measure);
  margin-inline: auto;
}
.art-gallery:has(> img:only-child) img {
  height: auto;
  max-height: min(72vh, 640px);
  margin-inline: auto;
  width: auto;
  max-width: 100%;
}

@media (max-width: 560px) {
  /* Phones: a single natural-aspect column beats rows of thumbnails. */
  .art-gallery {
    display: block;
  }
  .art-gallery img {
    height: auto;
    width: 100%;
    margin-bottom: 1rem;
  }
}

/* ---------- accessibility ---------- */

.art-project a:focus-visible,
.art-project :focus-visible {
  outline: 2px solid var(--art-accent);
  outline-offset: 3px;
  border-radius: 2px;
}

@media (prefers-reduced-motion: reduce) {
  html:has(.art-project) {
    scroll-behavior: auto;
  }
  .art-project * {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* footer breathing room */
.art-foot {
  height: clamp(4rem, 12vh, 8rem);
}
