/* ==========================================================================
   Krishen Khanna — home page add-on. Linked only on "/"; builds on main.css.
   ========================================================================== */

/* ------------------------------------------------------------ hero: a recent Bandwalla, full bleed */
.hero-figure { margin: 0; }
/* header + hero fill the first screen; the panorama is cover-cropped around its centre */
.hero--home { height: calc(100svh - var(--header-h)); }
.no-anim .hero--home { height: 749px; }                    /* 864 − 115: a laptop's fold, for tall captures */
.hero--home img { object-position: 50% 20%; }   /* the Journey Continues p.47 painting: room above the centre tuba on laptop screens */
/* the work's tombstone sits below the image, never on it */
.figcaption--hero { padding-bottom: 0; gap: 0 .6em; }
.figcaption--hero a { color: inherit; text-decoration: none; }
.figcaption--hero a:hover { color: var(--ink); }
/* one figcaption, two tombstones: each .hero-cap's spans join the caption's flex row (display: contents); the other is
   display:none, so it is neither seen nor read. Same query as the portrait <source>. */
.hero-cap { display: contents; }
/* the eyebrow sits on paint: full ink, not grey, so the 11px label stays legible */
.hero--home .hero__eyebrow { color: var(--on-image); }
/* laptops: the page heroes' scrim, a touch denser where the eyebrow sits (4.45:1 measured; 4.5 needed) */
.hero--home::after { background: linear-gradient(to top, rgba(0, 0, 0, .78) 0%, rgba(0, 0, 0, .62) 40%, rgba(0, 0, 0, 0) 100%); }
.hero-cap--narrow { display: none; }
/* the hero's name block lines up with the centred container (logo, tombstone, quotes) on screens wider than it */
.hero--home .hero__overlay--left { left: max(0px, calc((100% - var(--container) - 2 * var(--gutter)) / 2)); }
@media (max-width: 768px), (max-width: 1024px) and (orientation: portrait) {
  .hero--art-directed img { object-position: 50% 30%; }
  .hero-cap--wide { display: none; }
  .hero-cap--narrow { display: contents; }
  /* the portrait is pale behind the name block: a taller, denser scrim (a page overlay; the painting is untouched)
     keeps the small type at 4.5:1 or better */
  /* on the Home hero whatever the painting (keyed to the retired phone crop, it had stopped applying
     and the name block fell to 2.9:1 on the painting's yellows) */
  .hero--home::after {
    height: 68%;
    background: linear-gradient(to top, rgba(10, 10, 10, .88), rgba(10, 10, 10, .74) 45%, rgba(10, 10, 10, 0));
  }
  .hero--home .hero__overlay { text-shadow: 0 0 2px rgba(0, 0, 0, .55), 0 1px 12px rgba(0, 0, 0, .45); }
}

/* ------------------------------------------------------------ now: three current items */
.now-card__img { aspect-ratio: 4 / 3; }
.now-card__img picture, .now-card__img img { width: 100%; height: 100%; }
.now-card__img img { object-fit: cover; }
/* an artwork shown whole in the 4:3 frame, on the page colour (a cut-out on #0A0A0A, so the frame vanishes): never cropped */
.now-card__img--whole { background: var(--white); }
.now-card__img--whole img { object-fit: contain; background: transparent; }
/* why the Bandwalla: the photograph at its own proportions, never squared off (the paintings in it stay whole) */
.feature__media--whole .figure__media { aspect-ratio: auto; overflow: visible; }
.feature__media--whole .figure__media picture, .feature__media--whole .figure__media img { width: 100%; height: auto; object-fit: contain; }


/* ------------------------------------------------------------ why the Bandwalla: the LLP book it comes from */
.feature__credit { margin-top: var(--para); color: var(--grey-2); }
.feature__credit cite { font-style: normal; }

/* ------------------------------------------------------------ the procession: a full-bleed band
   Same query as the art-directed <source> in home.html: the phone's crop states its own 4:5 here, so the band holds
   its height before the file arrives */
.home-panorama__media, .home-panorama__media img { display: block; width: 100%; height: auto; }
@media (max-width: 768px), (max-width: 1024px) and (orientation: portrait) {
  .home-panorama__media--phone img { aspect-ratio: 4 / 5; }   /* only with a phone crop; else the whole work at its own proportions */
}
.home-panorama__words { margin-top: var(--gap-y); }

/* ------------------------------------------------------------ sculpture: two bronzes beside the words
   Every frame is 2:3 and its edge is the page's #0A0A0A, so the frames vanish. From 900px the words take the site's left
   column (5fr) and the pair the right (7fr), centred on one another; the caption is centred under each bronze. */
.home-sculpt__head { margin-bottom: var(--gap-y); }
.home-sculpt__head h2 { margin: 0; }
.home-bronzes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px 15px; }
.home-bronze .figure__media img { width: 100%; height: auto; }
.home-bronze .figcaption { flex-direction: column; align-items: center; gap: 0; padding-top: 4px; text-align: center; }
@media (max-width: 460px) { .home-bronze .figcaption { letter-spacing: .06em; } }
@media (min-width: 461px) and (max-width: 520px) { .home-bronze .figcaption { letter-spacing: .02em; } }
@media (max-width: 400px) { .home-bronze .figcaption { letter-spacing: .02em; } }   /* the longest dimension lines stay on one line at 360 */
@media (min-width: 900px) {
  .home-sculpt { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--gap-x); align-items: center; }
  .home-sculpt__words { padding-right: var(--gap-x); }
  .home-bronzes { gap: 0 44px; }
}
/* below that: the heading, the bronzes, then the words, so two long italic passages do not run together under the procession */
@media (max-width: 899px) {
  .home-sculpt { display: flex; flex-direction: column; }
  .home-sculpt__words { display: contents; }
  .home-sculpt .quote-quiet { order: 3; margin-top: var(--gap-y); }
}
