/* ==========================================================================
   MotoJoy — marketing-page section patterns

   Owns every pattern in patterns/. Loaded on singular frontend views and in
   the editor canvas, so both render identically. Core-block primitives belong
   in content.css; this file styles the kit's sections only.

   Values come from theme.json. Breakpoints are the one exception, since a
   media-query condition cannot read a custom property.
   ========================================================================== */

/* Section rhythm: generous between sections, tight within — design-system.md
   §5.1. Patterns set their own internal spacing. */
.mj-section {
  margin-block: var(--wp--preset--spacing--8);
}

.mj-section:first-child {
  margin-block-start: 0;
}

/* Eyebrow label above a section heading. Real lowercase in the DOM with
   text-transform, so screen readers do not spell it out — CLAUDE.md §10. */
.mj-section__eyebrow {
  margin-block-end: var(--wp--preset--spacing--2);
  color: var(--wp--preset--color--brand-deep);
  font-size: var(--wp--preset--font-size--label);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--wp--custom--tracking-label);
}

/* --------------------------------------------------------------------------
   Hero — full-bleed media with an ink scrim. Text never sits directly on
   photography (design-system.md §9), and the scrim is what guarantees the
   contrast regardless of which image the client uploads.
   -------------------------------------------------------------------------- */
.mj-page-hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 32rem;
  padding-block: var(--wp--preset--spacing--8);
  background-color: var(--wp--preset--color--ink);
}

.mj-page-hero__media {
  position: absolute;
  inset: 0;
  margin: 0;
}

.mj-page-hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* The scrim. Sits above the media, below the content. */
.mj-page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    var(--wp--preset--color--ink),
    transparent
  );
}

.mj-page-hero__content {
  position: relative;
  z-index: 1;
  color: var(--wp--preset--color--text-on-dark);
}

/* On an ink plane the light-plane tokens are illegible — design-system.md
   §3.1. The eyebrow uses its dark-plane counterpart here. */
.mj-page-hero .mj-section__eyebrow {
  color: var(--wp--preset--color--text-on-dark-muted);
}

.mj-page-hero__title {
  max-width: var(--wp--custom--measure-prose);
  color: var(--wp--preset--color--text-on-dark);
}

.mj-page-hero__lead {
  max-width: var(--wp--custom--width-prose);
  color: var(--wp--preset--color--text-on-dark-muted);
  font-size: var(--wp--preset--font-size--lead);
}

.mj-page-hero__actions {
  margin-block-start: var(--wp--preset--spacing--5);
}

/* Secondary button sits on ink here, so its ink-on-transparent default would
   vanish. Repaint for the dark plane only. */
.mj-page-hero .is-style-motojoy-secondary .wp-block-button__link {
  color: var(--wp--preset--color--text-on-dark);
  border-color: var(--wp--preset--color--text-on-dark);
}
