/* =============================================================================
 * Krannon Archaeology — Home Hero Typography Hotfix v1.4.6.1
 *
 * Targets a regression introduced in v1.4.6: when the homepage hero became
 * a flex container, an inadvertent `width: 100%` on the inner .krannon-container
 * stripped the editorial container width. The result was content stuck to
 * the left edge with an oversized title.
 *
 * This file restores the editorial container width on the homepage hero
 * only, adds scoped clamps for the title and the excerpt, and leaves all
 * other hero styling — including the fullscreen behaviour from v1.4.6 and
 * the internal page hero refinements from v1.4.4 — untouched.
 *
 * All selectors are prefixed with body.home to keep the scope narrow.
 * Internal pages (body.page, body.single, archives) are not affected.
 * ========================================================================== */


/* -----------------------------------------------------------------------------
 * 1. Container width — undo the v1.4.6 width:100% override and restore the
 * theme-wide editorial container.
 * -------------------------------------------------------------------------- */

body.home .krannon-editorial-home-hero > .krannon-container,
body.home .krannon-section-hero > .krannon-container,
body.home .krannon-page-hero > .krannon-container {
  width: min(100% - 48px, 1280px);
  max-width: 1280px;
  margin-inline: auto;
}

@media (max-width: 720px) {
  body.home .krannon-editorial-home-hero > .krannon-container,
  body.home .krannon-section-hero > .krannon-container,
  body.home .krannon-page-hero > .krannon-container {
    width: min(100% - 32px, 1280px);
  }
}


/* -----------------------------------------------------------------------------
 * 2. Inner editorial column — keep title and copy aligned within a sensible
 * reading width. Left-aligned, never centred horizontally by accident.
 * -------------------------------------------------------------------------- */

body.home .krannon-editorial-home-hero .krannon-section-hero-inner,
body.home .krannon-editorial-home-hero .krannon-editorial-home-hero-inner,
body.home .krannon-section-hero .krannon-section-hero-inner,
body.home .krannon-page-hero .krannon-section-hero-inner {
  max-width: 760px;
  margin-inline: 0;
  text-align: left;
}


/* -----------------------------------------------------------------------------
 * 3. Title clamp — homepage hero only. Falls back to the Customizer
 * Typography variables when set, otherwise to sensible literals.
 *
 * !important is required here only because v1.4.4 already attaches an
 * !important rule to .krannon-page-title and .krannon-section-hero-title
 * for internal pages; the homepage clamp must beat that for body.home
 * without affecting any other context.
 * -------------------------------------------------------------------------- */

body.home .krannon-editorial-home-hero .krannon-section-hero-title,
body.home .krannon-editorial-home-hero .krannon-editorial-home-title,
body.home .krannon-section-hero .krannon-section-hero-title,
body.home .krannon-page-hero .krannon-section-hero-title,
body.home .krannon-page-hero .krannon-page-title {
  font-size: clamp(3rem, 6vw, var(--krannon-hero-title-max-desktop, 4.2rem)) !important;
  line-height: 1.02;
  letter-spacing: -.035em;
  margin: 0 0 18px;
}

@media (max-width: 900px) {
  body.home .krannon-editorial-home-hero .krannon-section-hero-title,
  body.home .krannon-editorial-home-hero .krannon-editorial-home-title,
  body.home .krannon-section-hero .krannon-section-hero-title,
  body.home .krannon-page-hero .krannon-section-hero-title,
  body.home .krannon-page-hero .krannon-page-title {
    font-size: clamp(2.4rem, 7vw, var(--krannon-hero-title-max-tablet, 3.2rem)) !important;
    line-height: 1.05;
  }
}

@media (max-width: 560px) {
  body.home .krannon-editorial-home-hero .krannon-section-hero-title,
  body.home .krannon-editorial-home-hero .krannon-editorial-home-title,
  body.home .krannon-section-hero .krannon-section-hero-title,
  body.home .krannon-page-hero .krannon-section-hero-title,
  body.home .krannon-page-hero .krannon-page-title {
    font-size: clamp(2.05rem, 10vw, var(--krannon-hero-title-max-mobile, 2.6rem)) !important;
    line-height: 1.08;
  }
}


/* -----------------------------------------------------------------------------
 * 4. Excerpt / lead clamp — homepage hero only.
 * -------------------------------------------------------------------------- */

body.home .krannon-editorial-home-hero .krannon-section-hero-lead,
body.home .krannon-editorial-home-hero .krannon-editorial-home-lead,
body.home .krannon-section-hero .krannon-section-hero-lead,
body.home .krannon-page-hero .krannon-section-hero-lead,
body.home .krannon-page-hero p {
  max-width: 760px;
  font-size: clamp(1.05rem, 1.45vw, 1.35rem);
  line-height: 1.55;
  margin: 0;
}

@media (max-width: 560px) {
  body.home .krannon-editorial-home-hero .krannon-section-hero-lead,
  body.home .krannon-editorial-home-hero .krannon-editorial-home-lead,
  body.home .krannon-section-hero .krannon-section-hero-lead,
  body.home .krannon-page-hero .krannon-section-hero-lead,
  body.home .krannon-page-hero p {
    font-size: 1rem;
    line-height: 1.5;
  }
}


/* -----------------------------------------------------------------------------
 * 5. Eyebrow above the title — small visual breathing room.
 * -------------------------------------------------------------------------- */

body.home .krannon-editorial-home-hero .krannon-eyebrow,
body.home .krannon-section-hero .krannon-eyebrow,
body.home .krannon-page-hero .krannon-eyebrow {
  margin: 0 0 14px;
}
