/* The homepage's type system (agreed 2 December 2026): six styles used across the whole page, whatever component
   each section was copied from, and one spacing pattern for every copy block (kicker 14px, heading 25px,
   paragraph 22px, link 30px). Sizes are DESIGN.md's display, headline, title, body, text-link and caption.

   Loaded only by pages/home.phtml. Every selector starts from the homepage wrapper and its sections, so it
   outranks the component and page sheets (imd.css, imd-system.css, imd-supplier.css, imd-look-closer.css)
   without !important; they keep their layout, colour and grid rules. */

.imd-publication.assembled-home[data-composition="home"] {
  --home-display: clamp(34px, 4.8vw, 74px);
  --home-headline: clamp(31px, 3.6vw, 49px);
  --home-title: clamp(22px, 2vw, 27px);
  --home-body: 14px;
  --home-label: 12px;
  --home-note: 10px;
  --home-measure: 430px;
}

/* Display: the hero heading, once per page. */
.imd-publication.assembled-home[data-composition="home"] .home-component .material .copy h1 {
  margin: 0 0 25px;
  font: 400 var(--home-display) / 1 var(--font-serif);
  letter-spacing: -.04em;
  text-transform: none;
}

/* Headline: every section heading. */
.imd-publication.assembled-home[data-composition="home"] .home-component :is(
  .copy h2,
  .issue-promise h2,
  .section-heading h2,
  .customer-offer h3,
  .contact-copy h2
) {
  margin: 0 0 25px;
  font: 400 var(--home-headline) / 1.08 var(--font-serif);
  letter-spacing: -.04em;
  text-transform: none;
}

/* A heading band carries its own padding, so its heading adds no space below. */
.imd-publication.assembled-home[data-composition="home"] .home-component .section-heading h2 {
  margin: 0;
}

/* Title: a heading inside a section, such as the rows of How we work together. Each row is a grid, so the
   12px under the title is the row gap rather than a margin. */
.imd-publication.assembled-home[data-composition="home"] .home-component .working-rows h3 {
  margin: 0;
  font: 400 var(--home-title) / 1.13 var(--font-serif);
  letter-spacing: -.02em;
}

.imd-publication.assembled-home[data-composition="home"] .home-component .working .working-rows > div:has(> h3) {
  row-gap: 12px;
}

/* Body: every paragraph, at one size and one measure at all widths. */
.imd-publication.assembled-home[data-composition="home"] .home-component :is(
  .copy > p:not(.kicker, .signed, .small-note),
  .customer-copy p,
  .working-rows p,
  .contact-copy > p:not(.email-note)
) {
  max-width: var(--home-measure);
  margin: 0 0 22px;
  font: 400 var(--home-body) / 1.6 var(--font-serif);
}

.imd-publication.assembled-home[data-composition="home"] .home-component :is(.working-rows p, .customer-copy p:last-child) {
  margin-bottom: 0;
}

/* Label: kickers, links, form labels and the send button. */
.imd-publication.assembled-home[data-composition="home"] .home-component :is(
  .kicker,
  .issue-promise > span,
  .issue-promise > p,
  .text-link,
  .email-note,
  .email-note a,
  .supplier-contact label,
  .supplier-contact .submit
) {
  font: 400 var(--home-label) / 1.6 var(--font-mono);
}

.imd-publication.assembled-home[data-composition="home"] .home-component .kicker {
  margin: 0 0 14px;
}

/* The hero's kicker reads as a line of copy, in the same style as the paragraph under its heading. */
.imd-publication.assembled-home[data-composition="home"] .home-component .material .copy > .kicker {
  font: 400 var(--home-body) / 1.6 var(--font-serif);
  letter-spacing: normal;
  text-transform: none;
}

/* An unfilled slot (kicker, signed line, small note) adds no space. Some copy columns are flex columns, where
   margins do not collapse, so an empty slot would otherwise widen the gap around it. */
.imd-publication.assembled-home[data-composition="home"] .home-component .copy > p:empty {
  margin: 0;
}

/* Inline-block, so its margin adds to the paragraph's 22px instead of collapsing into it. */
.imd-publication.assembled-home[data-composition="home"] .home-component .text-link {
  margin-top: 8px;
}

/* Note: captions and small print. */
.imd-publication.assembled-home[data-composition="home"] .home-component :is(
  figcaption,
  .small-note,
  .grid-foot,
  .supplier-contact small,
  .supplier-contact .privacy
) {
  font: 400 var(--home-note) / 1.6 var(--font-mono);
}

/* A copy panel beside a photograph (Portrait, Opening) has the design system's copy padding and holds its text
   centred against the photograph, as the hero and Look closer already do. */
.imd-publication.assembled-home[data-composition="home"] .home-component :is(.label-intro, .opening-shape) > .copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-self: stretch;
  padding: 35px;
}

@media (max-width: 1000px) {
  .imd-publication.assembled-home[data-composition="home"] .home-component :is(.label-intro, .opening-shape) > .copy {
    padding: 27px;
  }
}

@media (max-width: 600px) {
  .imd-publication.assembled-home[data-composition="home"] .home-component :is(.label-intro, .opening-shape) > .copy {
    padding: 25px;
  }
}

/* Opening's title band shows only once one of its slots has words; while the page editor is on it stays open so
   the slots can be filled. */
html:not(.imd-ed-active) .imd-publication.assembled-home[data-composition="home"] .home-component .issue-promise:not(:has(> :not(:empty))) {
  display: none;
}

/* Portrait's photograph takes Opening's height, so the two sections side by side are the same height. */
.imd-publication.assembled-home[data-composition="home"] .home-component .label-intro > .photo img {
  height: 410px;
}

@media (max-width: 600px) {
  .imd-publication.assembled-home[data-composition="home"] .home-component .label-intro > .photo img {
    height: 290px;
  }
}

/* Portrait's caption strip shows only once it has words; while the page editor is on it stays open. */
html:not(.imd-ed-active) .imd-publication.assembled-home[data-composition="home"] .home-component .label-intro > .photo > figcaption:empty {
  display: none;
}
