/* ==========================================================================
   ebg hero H03 - ported from Layout H03 (.tj-banner-section-2).
   Light rounded panel with corner line patterns (.ebg-bg-shapes), portrait
   with outlined vertical brand marquee (.ebg-marquee-vr), glass growth card,
   quarter circle backdrop and vertical author label. Eyebrow, buttons and
   phone are elements (_core/elements). Discrete rem type ([CSS-WP-03]).
   ========================================================================== */

@layer components {

	.ebg-hero-h03 {
		position: relative;
		z-index: 1;
		margin: 15px;
		padding-block: 80px 55px;
		border-radius: 12px;
		--ebg-shape-1: url("../../img/library/hero-h03/pattern-2.svg");
		--ebg-shape-2: url("../../img/library/hero-h03/pattern-3.svg");

		overflow: hidden;
		background: var(--ebg-surface-3);
	}

	.ebg-hero-h03__grid {
		display: grid;
		grid-template-columns: 5fr 7fr;
		align-items: center;
		max-inline-size: 1320px;
		margin-inline: auto;
		padding-inline: 15px;
	}

	.ebg-hero-h03__content {
		max-inline-size: 450px;
		padding-block: 40px;

		& > * { margin-block: 0; }
	}

	.ebg-hero-h03__sub { margin-block-end: 15px; }

	.ebg-hero-h03__title {
		color: var(--ebg-ink);
		font-family: var(--font-display);
		font-size: var(--fs-64);
		font-weight: 600;
		line-height: 1.108;
		letter-spacing: -0.02em;
	}

	.ebg-hero-h03__btn-area {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		gap: 20px;
		margin-block-start: 20px;

		& > * { margin: 0; }
	}

	.ebg-hero-h03__actions {
		align-items: center;
		gap: 20px 30px;
	}

	/* Media: portrait, quarter circle, vertical brand text, growth card, author */
	.ebg-hero-h03__media {
		position: relative;
		z-index: 1;
		inline-size: 100%;
		max-inline-size: 740px;
		margin-block: 0;
		margin-inline: auto -30px;

		&::before {
			content: "";
			position: absolute;
			inset-block-end: 0;
			inset-inline-start: 0;
			z-index: -1;
			inline-size: 50%;
			block-size: 343px;
			border-start-start-radius: 100%;
			border-end-start-radius: 8px;
			background: var(--ebg-surface-1);
		}
	}

	.ebg-hero-h03__img {
		position: relative;
		max-inline-size: 640px;
		margin-block: 0;
		margin-inline-start: auto;
		overflow: hidden;
		border-radius: 12px;

		& > * { margin: 0; }
	}

	.ebg-hero-h03__photo img {
		display: block;
		inline-size: 100%;
		object-fit: cover;
	}

	.ebg-hero-h03__brand {
		/* Physical offsets: on a vertical writing-mode element, logical insets follow
		   its own axis (inset-inline-start = top). Keep physical; do not modernize. */
		position: absolute;
		top: 50%;
		right: 10px;
		margin: 0;
		color: transparent;
		-webkit-text-stroke: 2px rgb(255 255 255 / 0.6);
		font-size: 7.5rem;
		font-weight: 600;
		line-height: 0.9;
		translate: 0 -50%;
	}

	.ebg-hero-h03__growth {
		position: absolute;
		inset-block-end: 15px;
		inset-inline-start: 15px;
		inline-size: 198px;
		block-size: 209px;
		padding: 20px;
		border-radius: 10px;
		background-color: rgb(255 255 255 / 0.1);
		backdrop-filter: blur(10px);

		/* User experiment (2026-11-05) for the Firefox opaque-card bug: did not fix
		   it, kept for paint isolation and a composited image layer. */
		contain: layout paint;

		& img { inline-size: 100%; block-size: 100%; object-fit: contain; will-change: transform; transform: translate3d(0, 0, 0); }
	}

	.ebg-hero-h03__author {
		/* Physical offsets: see .ebg-hero-h03__brand. ebg declares
		   inset-inline-start: 88px here, but on a sideways-lr box that is the
		   bottom edge and bottom: 224px overrides it, so its computed left is 0.
		   Port the computed value, not the declaration. */
		position: absolute;
		bottom: 224px;
		left: 0;
		margin: 0;
		writing-mode: sideways-lr;

		& > * { margin: 0; }
	}

	.ebg-hero-h03__author-name {
		position: relative;
		color: var(--ebg-ink);
		font-size: var(--fs-24);
		font-weight: 600;
		line-height: 1.2;

		&::before {
			content: "";
			position: absolute;
			left: 50%;
			bottom: -18px;
			inline-size: 8px;
			block-size: 8px;
			border-radius: 50%;
			background: var(--ebg-accent);
			translate: -50% 0;
			animation: ebg-pulse-ring 1.5s linear infinite;
		}
	}

	.ebg-hero-h03__author-role {
		display: inline-flex;
		color: var(--ebg-ink-2);
		font-size: var(--fs-14);
		line-height: 1;
	}

	@media (min-width: 1201px) and (max-width: 1399px) {
		.ebg-hero-h03__title { font-size: var(--fs-60); }
		.ebg-hero-h03__img { max-inline-size: 580px; }
		.ebg-hero-h03__media { margin-inline-end: -20px; }
	}

	@media (min-width: 1025px) and (max-width: 1200px) {
		.ebg-hero-h03__title { font-size: var(--fs-52); }
		.ebg-hero-h03__img { max-inline-size: 520px; }
		.ebg-hero-h03__media { margin-inline-end: 0; &::before { block-size: 290px; } }
		.ebg-hero-h03__author { bottom: 180px; }
	}

	@media (max-width: 1024px) {
		.ebg-hero-h03__grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
		.ebg-hero-h03__content { max-inline-size: none; padding-block: 0; }
		.ebg-hero-h03__title { font-size: var(--fs-48); line-height: 1.25; }
		.ebg-hero-h03__media { margin-inline: auto; }
		.ebg-hero-h03__img { max-inline-size: calc(100% - 110px); }
		.ebg-hero-h03__author { bottom: 150px; }
	}

	@media (max-width: 575px) {
		.ebg-hero-h03 { margin: 8px; padding-block: 48px 40px; }
		.ebg-hero-h03__title { font-size: var(--fs-36); }
		.ebg-hero-h03__media::before { block-size: 260px; }
		.ebg-hero-h03__img { max-inline-size: calc(100% - 90px); }
		.ebg-hero-h03__photo img { min-block-size: 440px; }
		.ebg-hero-h03__brand { font-size: 6.25rem; }
		.ebg-hero-h03__growth { inline-size: 145px; block-size: 155px; padding: 10px; inset-block-end: 10px; inset-inline-start: 10px; }
		.ebg-hero-h03__author { bottom: 100px; }
	}

	@media (prefers-reduced-motion: no-preference) {
		.ebg-hero-h03__content > * { animation: ebg-rise 700ms cubic-bezier(0.16, 1, 0.3, 1) both; }
		.ebg-hero-h03__content > :nth-child(2) { animation-delay: 120ms; }
		.ebg-hero-h03__content > :nth-child(3) { animation-delay: 240ms; }
		/* Media choreography follows ebg (wow + animate.css): growth card fadeInUp
		   at 1.7s, brand marquee fadeIn at 2.2s. The media box itself stays static
		   so .ebg-morph-to shared-element view transitions hand over seamlessly
		   without opacity dips, blank flashes or double-fade hitches. */
		.ebg-hero-h03__growth { animation: ebg-fade-up 1s 1.7s both; }
		.ebg-hero-h03__brand { animation: ebg-fade 1s 2.2s both; }
	}

}
