/* ── HOME PAGE — dark, hero + two directory links ─────────────── */
.home-wrap {
  width: 90%;
  max-width: 1100px;
  margin: 0 auto;
  padding-top: calc(env(safe-area-inset-top, 0px) + 1.75rem);
  padding-bottom: 6rem;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  position: relative;
  z-index: 2;
}

/* ---- The masthead - quiet, so the painting stays the page. ------- */
.masthead {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  color: var(--ink-soft);
}
.masthead-mark { width: 1.6rem; height: 1.6rem; flex-shrink: 0; }
.masthead-name {
  font-size: 0.85rem;
  letter-spacing: 0.3em;
  font-weight: 300;
  text-transform: lowercase;
}

/* ---- The column shrinks to the painting -------------------------
   width:fit-content resolves to the hero's rendered width, and the tiles
   below sit at width:100% of that - so they are as wide as the cover
   rather than as wide as the page, at any viewport. */
.home-col {
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
}

.home-tiles-wrap {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.home-tiles-eyebrow {
  font-size: 0.62rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding-left: 0.15rem;
}

/* The cover is shown WHOLE. No aspect-ratio box and no object-fit:cover:
   both of those crop, and the painting is the point. The wrapper shrinks to
   the image (width:fit-content) so the overlay gradient and the rounded
   corners land on the artwork rather than on a wider empty box. */
.hero {
  position: relative;
  display: block;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
  text-decoration: none;
  /* NO line-height:0 here. It was killing the inline descender gap under
     the image, and it cascaded into .hero-overlay - every line of the
     caption collapsed to zero height and 'coming soon' printed on top of
     the title. .hero-media is display:block, which removes that gap on
     its own; the line-height was belt-and-braces and cost the caption. */
  border-radius: 4px;
  overflow: hidden;
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.45),
    0 32px 100px rgba(0, 0, 0, 0.35);
}

.hero-media {
  display: block;
  width: auto;
  max-width: 100%;
  /* Capped so a square painting cannot push the tiles off the first screen.
     svh, not vh, so a phone's browser chrome is accounted for. */
  max-height: 78vh;
  max-height: 78svh;
  filter: brightness(1.02) saturate(1.08);
  transition: filter 1.2s ease;
}
.hero:hover .hero-media {
  filter: brightness(1.12) saturate(1.15);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2.5rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.55) 0%, transparent 65%);
}

.hero-label {
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  color: rgba(255, 255, 255, 0.62);
  margin-bottom: 0.5rem;
}
.hero-title {
  font-size: 1.8rem;
  font-weight: 300;
  color: #fff;
  letter-spacing: 0.06em;
}
.hero-date {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.52);
  margin-top: 0.4rem;
  letter-spacing: 0.1em;
}
.hero-action {
  margin-top: 1.2rem;
}
.hero-action span {
  display: inline-block;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.40);
  padding-bottom: 2px;
  transition: border-color 0.4s ease;
}
.hero:hover .hero-action span { border-color: #fff; }

/* ---- Tiles - the house grammar. A tile reads as a place. ---------- */
.home-tiles {
  width: 100%;
  display: grid;
  /* auto-FIT, not auto-fill: auto-fill leaves empty tracks standing, which
     is what pinned a lone tile to the left corner. fit collapses them so
     the tiles share the whole width. */
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 1rem;
}

.home-tile {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 1.3rem 1.2rem;
  border-radius: 0.9rem;
  text-decoration: none;
  /* Solid white, black glyph - the same family as the FAB pair and the
     pre-release door. On a page this dark, white IS the emphasis. */
  background: #fff;
  border: 1px solid rgba(19, 18, 26, 0.10);
  box-shadow: 0 0.6rem 1.6rem rgba(0, 0, 0, 0.45),
              0 1.5rem 3rem   rgba(0, 0, 0, 0.28);
  color: #13121a;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}
.home-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 0.8rem 2rem   rgba(0, 0, 0, 0.50),
              0 2rem   3.6rem rgba(0, 0, 0, 0.32);
}

.home-tile svg {
  width: 1.9rem;
  height: 1.9rem;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.home-tile-label {
  font-size: 1rem;
  letter-spacing: 0.16em;
  font-weight: 400;
  color: #13121a;
}
.home-tile-sub {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: rgba(19, 18, 26, 0.55);
  font-weight: 300;
}

/* ── Footer — home only. Carries the arroweb backlink. ────────── */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem 1.5rem;
  margin-top: -1.5rem;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  color: var(--ink-faint);
}
.site-footer a {
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 2px;
  transition: color 0.4s ease, border-color 0.4s ease;
}
.site-footer a:hover {
  color: var(--ink);
  border-color: var(--ink-faint);
}

.footer-social {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

@media (max-width: 600px) {
  .home-wrap { padding-top: 1.5rem; gap: 2rem; }
  .hero { aspect-ratio: 4/3; }
  .hero-title { font-size: 1.2rem; }
  .hero-overlay { padding: 1.5rem; }
  .home-tile-label { font-size: 0.9rem; }
  .site-footer { margin-top: 0; }
}
