/* Home work index. SPEC "Home: the work index". No hero, no bento, no frosted glass. */

.home-page { background: var(--cream); color: var(--olive); }

.index__stage {
  position: sticky;
  top: 0;
  height: 58vh;
  background: var(--olive);
  overflow: hidden;
  z-index: 3;
  pointer-events: none;
}
.index__img,
.index__loop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.index__img {
  opacity: 0;
  z-index: 1;
  transition: opacity 0.35s ease;
}
.index__img.is-show { opacity: 1; z-index: 2; }
.index__stage.is-instant .index__img,
.index__stage.is-instant .index__loop { transition: none; }
.index__loop {
  z-index: 3;
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}
.index__loop.is-on { opacity: 1; }
.index__empty {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  padding: 2rem;
  background: var(--olive);
  color: var(--cream);
}
.index__empty[hidden] { display: none; }
.index__empty.is-title-high { align-items: start; padding-top: 16vh; }
.index__empty.is-title-low { align-items: end; padding-bottom: 28vh; }
.index__empty-title {
  margin: 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  line-height: 1.15;
  text-align: center;
  text-wrap: balance;
}
.index__shade {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(26, 26, 23, 0.45), rgba(26, 26, 23, 0) 28%);
}
.index__dot {
  position: absolute;
  z-index: 5;
  width: 16px;
  height: 16px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--cream);
  transform: translate(-50%, -50%) scale(0);
  pointer-events: auto;
  cursor: pointer;
}
.index__dot.is-in { animation: index-dot-pop 0.3s ease both; }
@keyframes index-dot-pop {
  from { transform: translate(-50%, -50%) scale(0); }
  to { transform: translate(-50%, -50%) scale(1); }
}

/* Floating caption is desktop only. Phone uses the block under the image. */
.index__caption { display: none; }

.index__bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 18px 0;
  color: var(--cream);
  pointer-events: auto;
}
.index__bar .wordmark { color: var(--cream); opacity: 0.75; }
.index__role, .index__nav { display: none; }
.menu-toggle, .menu__close {
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--cream);
  opacity: 0.75;
}
.menu {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: var(--cream);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.25rem;
  padding: 18px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.menu.is-open { opacity: 1; visibility: visible; pointer-events: auto; }
.menu__close { position: absolute; top: 22px; right: 18px; color: var(--olive); }
.menu a {
  font-family: var(--font-serif);
  font-size: clamp(2.25rem, 12vw, 3rem);
  line-height: 1.1;
  color: var(--olive);
  text-decoration: none;
  text-wrap: balance;
}

.index__under {
  position: relative;
  z-index: 2;
  padding: 18px 18px 0;
  background: var(--cream);
  color: var(--olive);
}
.index__phone-pov {
  margin: 0 0 16px;
  padding-bottom: 16px;
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.45;
  border-bottom: 1px solid color-mix(in srgb, currentColor 18%, transparent);
}
.index__phone-kicker {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.7;
}
.index__phone-line {
  margin: 0.35rem 0 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 16px;
  line-height: 1.3;
  text-wrap: balance;
}
.index__bottom {
  position: relative;
  z-index: 2;
  padding: 22px 18px 2rem;
  background: var(--cream);
  color: var(--olive);
  pointer-events: auto;
}
.index__line {
  margin: 0 0 18px;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: 24px;
  line-height: 1.15;
  text-wrap: balance;
}
.index__list { display: flex; flex-direction: column; }
.index__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 44px;
  border-top: 1px solid color-mix(in srgb, var(--olive) 20%, transparent);
  color: inherit;
  text-decoration: none;
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.3;
  opacity: 0.55;
}
.index__row:first-child { border-top: 0; }
.index__row.is-active { opacity: 1; }
.index__row.is-active .index__title { font-weight: 500; }
.index__agency { flex: none; text-align: right; }
.index__row:focus-visible { outline: 1px solid currentColor; outline-offset: 2px; }

@media (min-width: 768px) {
  html, body.home-page { height: 100%; overflow: hidden; }
  .index { height: 100vh; }
  .index__stage { position: absolute; inset: 0; height: auto; }
  /* Shade only where text sits (Nov 25): a soft corner pool behind the
     project list, plus a thin band for the top bar. The rest of the image
     stays clean. */
  .index__shade {
    background:
      radial-gradient(1000px 560px at 0 100%, rgba(26, 26, 23, 0.68) 0%, rgba(26, 26, 23, 0.5) 45%, rgba(26, 26, 23, 0.22) 78%, rgba(26, 26, 23, 0) 100%),
      linear-gradient(to bottom, rgba(26, 26, 23, 0.32), rgba(26, 26, 23, 0) 110px);
  }
  /* Per-case stronger pool, for light images (indexShade: "heavy") */
  body.index-heavy .index__shade {
    background:
      radial-gradient(1000px 560px at 0 100%, rgba(26, 26, 23, 0.8) 0%, rgba(26, 26, 23, 0.62) 45%, rgba(26, 26, 23, 0.3) 78%, rgba(26, 26, 23, 0) 100%),
      linear-gradient(to bottom, rgba(26, 26, 23, 0.4), rgba(26, 26, 23, 0) 110px);
  }
  body.index-heavy .index__caption { text-shadow: 0 1px 16px rgba(26, 26, 23, 0.85), 0 0 4px rgba(26, 26, 23, 0.6); }
  .index__under { display: none; }
  .index__caption {
    display: block;
    position: absolute;
    z-index: 5;
    max-width: 260px;
    color: var(--cream);
    text-decoration: none;
    pointer-events: auto;
    opacity: 0;
    text-shadow: 0 1px 10px rgba(26, 26, 23, 0.55);
    transition: opacity 0.3s ease;
  }
  .index__caption.is-in { opacity: 1; }
  .index__caption-kicker {
    display: block;
    font-family: var(--font-sans);
    font-weight: 500;
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    opacity: 0.7;
  }
  .index__caption-line {
    display: block;
    margin-top: 0.2rem;
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 16px;
    line-height: 1.25;
    text-wrap: balance;
  }
  .index__bar {
    top: 26px;
    left: 32px;
    right: 32px;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    align-items: first baseline;
    column-gap: 1rem;
  }
  .index__bar .wordmark { grid-column: 1 / 4; }
  .index__role {
    display: block;
    grid-column: 4 / 10;
    text-wrap: pretty;
    margin: 0;
    font-size: 12px;
    line-height: 1.35;
    color: var(--cream);
    opacity: 0.7;
  }
  .index__nav {
    display: flex;
    grid-column: 10 / 13;
    justify-self: end;
    gap: 1.35rem;
  }
  .index__nav a {
    font-size: 12px;
    color: var(--cream);
    text-decoration: none;
  }
  .menu-toggle { display: none; }
  .home-page .site-footer {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 8;
  }
  .index__bottom {
    position: absolute;
    left: 32px;
    bottom: 94px;
    width: min(560px, 44vw);
    z-index: 6;
    padding: 0;
    background: none;
    color: var(--cream);
  }
  .index__line { font-size: 30px; color: var(--cream); }
  .index__row {
    min-height: 33px;
    border-top-color: color-mix(in srgb, var(--cream) 18%, transparent);
  }
}

@media (prefers-reduced-motion: reduce) {
  .index__img, .index__loop, .index__caption, .menu { transition: none; }
  .index__dot.is-in { animation: none; transform: translate(-50%, -50%) scale(1); }
}

/* Nov 21: visible line removed; heading kept for screen readers and search. */
.index__sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Caption and dot in ink, for light, flat backgrounds (indexCaptionTone: "ink"). Nov 25. */
@media (min-width: 768px) {
  body.index-ink .index__caption { color: var(--ink); text-shadow: none; }
  body.index-ink .index__caption-kicker { opacity: 0.6; }
  body.index-ink .index__dot { background: var(--ink); }
}
