/* ==========================================================================
   home.css — the art page at the bare domain
   --------------------------------------------------------------------------
   Loaded ONLY on the front page. It deliberately does not share sections.css:
   nothing here is a proposal, and a page that exists to show one painting
   should not carry 65KB of quote-table styling to do it.

   It does share tokens.css and base.css, so the logo, the mono eyebrow and
   the focus rings all match the proposals.
   ========================================================================== */

.hr-home {
  position: relative;
  min-height: 100svh;          /* svh, not vh: on a phone the browser chrome
                                  must not push the credit off the bottom */
  display: grid;
  /* Three rows: logo, the quote taking whatever is left, then the footer. */
  grid-template-rows: auto 1fr auto;
  padding: clamp(20px, 3.4vw, 44px);
  gap: clamp(24px, 4vh, 56px);
  overflow: hidden;
  background: var(--hr-ink);
  color: var(--hr-white);
}

/* ---- The painting -------------------------------------------------------
   Full bleed and behind everything. object-fit: cover crops rather than
   distorts, and the centre is usually where the subject is.               */

.hr-home__art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Set per painting — see the Focal point field. The page is a wide
     letterbox and most of these are portrait-format, so centring the crop
     cuts the sitter's head off. */
  object-position: 50% var(--hr-art-pos, 30%);
  z-index: 0;
}

/* A wash over the painting so white text stays legible on a pale canvas.
   Weighted to the left and bottom, which is where the type sits — the right
   side of the image stays as close to the original as it can. */
.hr-home__wash {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(to right, rgba(20, 1, 26, .78) 0%, rgba(20, 1, 26, .45) 45%, rgba(20, 1, 26, .18) 100%),
    linear-gradient(to top, rgba(20, 1, 26, .70) 0%, rgba(20, 1, 26, 0) 38%);
}

/* Everything above the wash. */
.hr-home__logo,
.hr-home__figure,
.hr-home__foot { position: relative; z-index: 2; }

.hr-home__logo { justify-self: start; align-self: start; display: block; }
/* 42px is the proposal header's logo size — the two pages should not
   disagree about how big the company is. */
.hr-home__logo img { display: block; height: clamp(34px, 3.2vw, 42px); width: auto; }

/* ---- The quote ----------------------------------------------------------
   The whole point of the page. It is allowed to be enormous, and it is
   allowed to wrap wherever it likes — this is a painting with words on it,
   not a paragraph.                                                          */

.hr-home__figure {
  align-self: center;
  /* Measured against the viewport, not in ch. A ch is the width of a "0",
     and in a high-contrast italic serif that is far narrower than the
     average letter — a 17ch measure came out at about one word per line and
     ran off the bottom of the screen. */
  max-width: min(72vw, 1120px);
  margin: 0;
}

.hr-home__quote {
  margin: 0;
  font-family: var(--hr-font-art);
  font-style: italic;
  font-weight: 400;
  font-size: var(--hr-art-size);
  line-height: 1.06;
  letter-spacing: -0.015em;
  text-wrap: balance;
  hyphens: none;
}

/* Long quotes get smaller type, so a fifteen-word line and a six-word line
   both fill the screen rather than one overflowing it. The length band is
   set on the figure by front-page.php, which is the only place that knows
   how long the sentence is. */
.hr-home__figure                   { --hr-art-size: clamp(2.2rem, 5.2vw, 4.6rem); }
.hr-home__figure[data-len="short"] { --hr-art-size: clamp(2.8rem, 7.0vw, 6.2rem); }
.hr-home__figure[data-len="long"]  { --hr-art-size: clamp(1.8rem, 4.0vw, 3.5rem); }

/* The opening mark hangs into the left margin so the first letter lines up
   with the logo and the footer above and below it. */
.hr-home__mark--open  { margin-left: -0.42em; }
.hr-home__mark--close { margin-right: -0.42em; }

/* The mono eyebrow, spelled out here rather than inherited.

   .hr-eyebrow lives in components.css, which this page deliberately does not
   load — so the class in the markup was styling nothing and both of these
   were rendering as plain body text. Two short rules is a better trade than
   pulling in 30KB of component CSS for a page with no components on it. */
.hr-home__artist {
  margin: clamp(18px, 2.4vw, 30px) 0 0;
  font-family: var(--hr-font-mono);
  font-size: var(--hr-text-base);
  letter-spacing: var(--hr-tracking-eyebrow);
  text-transform: uppercase;
  color: var(--hr-pink);
}

/* ---- The footer ---------------------------------------------------------- */

.hr-home__foot {
  align-self: end;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px 28px;
}

.hr-home__back {
  display: inline-block;
  font-size: var(--hr-text-lg);
  color: var(--hr-white);
  /* Underlined from the start, like the design — it is the only way off this
     page, so it should not need hovering to be found. */
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
  text-decoration-color: rgba(255, 255, 255, .45);
  transition: text-decoration-color var(--hr-dur-slow) var(--hr-ease);
}
.hr-home__back:hover { text-decoration-color: var(--hr-white); }

.hr-home__credit {
  margin: 0;
  font-family: var(--hr-font-mono);
  font-size: var(--hr-text-xs);
  letter-spacing: var(--hr-tracking-eyebrow);
  text-transform: uppercase;
  color: rgba(255, 255, 255, .62);
}

/* ---- Narrow screens -----------------------------------------------------
   The footer stacks rather than squeezing the credit against the link, and
   the quote gets a wider measure because there is less width to play with. */

@media (max-width: 700px) {
  .hr-home__figure { max-width: none; }
  /* Nothing to spare on a phone: every band drops a step. */
  .hr-home__figure,
  .hr-home__figure[data-len="short"] { --hr-art-size: clamp(2rem, 8.4vw, 3rem); }
  .hr-home__figure[data-len="long"]  { --hr-art-size: clamp(1.6rem, 6.4vw, 2.3rem); }
  .hr-home__foot   { flex-direction: column; align-items: flex-start; }
}

/* A painting is the content here, so there is nothing to soften for reduced
   motion beyond the arrow, which base.css already neutralises. */
