/**
 * OptConnect hero sections (PR 3.3).
 *
 * One stylesheet for the whole hero family — `optconnect/hero-banner`,
 * `optconnect/hero-product` and `optconnect/hero-title`. They share the `.oc-hero`
 * shell and the `__eyebrow` / `__title` / `__text` / `__panel` parts; the
 * `--banner`, `--product` and `--title` modifiers differ only in surface and layout.
 *
 * It is deliberately short. Three things that could have lived here do not:
 *
 *   - **The title size is the theme's own.** The parent declares
 *     `h1 { font-size: xx-large }`, which is a fluid `clamp(2.15rem, …, 3rem)` —
 *     34px to 48px. The live hero is a flat 70px stepped down through five media
 *     queries (`custom-widgets.css:5113-5148`), so adopting the theme's scale drops
 *     all five and keeps hero titles in step with every other heading.
 *   - **The button is not styled here.** `theme.json` owns
 *     `styles.elements.button`, and the white on-band variant is the shared
 *     `.oc-button--inverse` in `button.css` (PR 3.3). That was PR 3.2's open item.
 *   - **The banner's overlay is not styled here.** It is `core/cover`'s own
 *     `dimRatio` + `overlayColor`, declared in the pattern, so the Site Editor's
 *     cover controls stay truthful about what will render.
 *
 * Same no-margins convention as `card-grid.css` (PR 3.1) and `cta-band.css`
 * (PR 3.2): nothing inside a block-gapped group gets a `margin` declaration here,
 * because core's flow layout emits `.wp-container-… > * + * { margin-block-start: … }`
 * at one-class specificity and this file loads after it. Spacing between blocks is
 * set with `blockGap` in the pattern markup.
 *
 * **Selectors are scoped `.oc-hero <part>`, not bare `<part>`, on purpose.** A part
 * that overrides a global-styles element rule — `.oc-hero__title` against
 * `:root :where(h1)` — is a (0,1,0) vs (0,1,0) tie, decided by whichever stylesheet
 * the browser saw last. Global styles print inline in `<head>` and this file is a
 * `<link>` enqueued on the same hook, so that order is not ours to rely on. The
 * extra class makes it (0,2,0) and the question does not arise. Same class of trap
 * as PR 3.1's `margin: 0` and PR 3.2's button `!important`.
 */

/* --------------------------------------------------------------------------
 * Shared parts
 * ---------------------------------------------------------------------- */

/* The eyebrow labels the section above the H1 — `restly_slider` emits it as a
   `<span class="sub-title">`, uppercased and 15px. Kept as a paragraph, because it
   is a label and not a heading, and given the tracking that makes uppercase text
   readable at a small size. Set on 36 of the 57 banner sections; the other 21 store
   an empty string, so the block is deleted on those pages rather than emptied. */
.oc-hero .oc-hero__eyebrow {
	font-size: var(--wp--preset--font-size--small, 0.875rem);
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.oc-hero .oc-hero__title {
	line-height: 1.15;
}

/* A partner's logo set in the banner copy (/sethleds/), at the 300px `medium` size live
   shows it. The figure is the panel's width otherwise, so the cap goes on both. */
.oc-hero .oc-hero__logo,
.oc-hero .oc-hero__logo img {
	max-width: min(100%, 300px);
}

/* A full-size logo is a strip of several (29885's eight hardware partners, 2560 ×
   182): the panel's width, as live sets it, or each logo is too small to read. */
.oc-hero .oc-hero__logo.size-full,
.oc-hero .oc-hero__logo.size-full img {
	max-width: 100%;
}

/* --------------------------------------------------------------------------
 * Banner hero — photo, dimmed, copy in a left-hand panel
 *
 * The panel's width and its left alignment come from the group's own
 * `layout: {type: constrained, contentSize: 640px, justifyContent: left}`, which
 * core turns into `max-width: 640px; margin-left: 0 !important` on each child. That
 * is per plans.md's rule to prefer per-block `layout.contentSize` over a CSS width,
 * so the Site Editor canvas matches the front end. Note it only emits when the
 * block sets `contentSize` or `wideSize` — `justifyContent` alone is silently
 * ignored (`wp-includes/block-supports/layout.php:307`), which is why the parent
 * theme's own `hero-full-width-image` pattern has a `justifyContent` that does
 * nothing.
 *
 * Nothing else is needed: `core/cover` centers its inner container vertically, and
 * `has-global-padding` (added by core at render for a full-width constrained block)
 * lines the panel up with the 1140px content width.
 * ---------------------------------------------------------------------- */

/* --------------------------------------------------------------------------
 * Product hero — copy beside the product photo
 *
 * The stack comes from `core/columns`, which collapses on its own at core's 781px
 * breakpoint, so there is no breakpoint of ours to keep in step. Once stacked the
 * image sits below the copy; the live mobile section puts it between the H1 and the
 * paragraph, which is a second copy of the whole hero in the Elementor data rather
 * than a reordering — see `patterns/hero-product.php`.
 * ---------------------------------------------------------------------- */
.oc-hero--product .oc-hero__cols {
	margin-bottom: 0; /* core/columns' own `:where()` margin-bottom — this is not a block gap. */
}

/* Product photography is shot on white at wildly different pixel sizes (14 KB to
   180 KB, 1:1 to 16:9). Capping the height stops a tall shot from setting the
   section's height, and `contain` keeps the whole device visible — `cover` would
   crop the connectors these photos exist to show. The same photography in a
   related-products column (`/products/ema/`, PR 6.1) gets the same cap. */
.oc-hero--product .oc-hero__media img,
.oc-related .oc-related__media img {
	max-height: 420px;
	width: auto;
	object-fit: contain;
}

/* --------------------------------------------------------------------------
 * Landing hero — copy beside an illustration, over the blue wave (PR 6.1)
 *
 * The four campaign landing pages' opener (`optconnect/page-landing`): a
 * `core/cover` like the banner, with the copy and the page's illustration in
 * `core/columns`. Its sibling with a form instead of the illustration is
 * `optconnect/form-hero`'s markup. The cover's 30% `contrast` dim is measured, not
 * chosen: white on the wave's lightest pixel is 4.07:1 bare and 5.92:1 at 30%.
 * ---------------------------------------------------------------------- */
.oc-hero--landing .oc-hero__cols {
	margin-bottom: 0; /* core/columns' own `:where()` margin-bottom — this is not a block gap. */
}

/* The illustrations are cut-outs on transparent backgrounds, 450–600px wide; this
   stops one from setting the hero's height, as `.oc-hero--product` does. */
.oc-hero--landing .oc-hero__media img {
	max-height: 420px;
	width: auto;
	object-fit: contain;
}

/* --------------------------------------------------------------------------
 * Title band hero — no photo
 *
 * Centered, with the 760px measure coming from the group's own
 * `layout.contentSize` rather than from here. The buttons row centers itself
 * natively (`layout.justifyContent`), because that one core does express.
 * ---------------------------------------------------------------------- */
.oc-hero--title {
	text-align: center;
}
