/* ==========================================================================
   Blueprint → Building hero  (loaded only on pages that use it)
   Default (no JS / reduced motion): static final-building hero.
   .bph--live: tall scroll track + sticky stage, driven by blueprint-hero.js
   ========================================================================== */

.bph { --bph-brand: #1B91C6; --ink: #101820; position: relative; background: #07111b; color: #fff; isolation: isolate; }
.bph__pin { position: relative; height: 100svh; min-height: 560px; overflow: hidden; }
.bph__visual, .bph__visual > * { position: absolute; inset: 0; }
.bph__visual img { width: 100%; height: 100%; object-fit: cover; }

/* Layers */
.bph__sky { background: linear-gradient(180deg, var(--sky-top, #07111b) 0%, var(--sky-mid, #0a1824) 55%, var(--sky-bottom, #0d2131) 100%); }
.bph__bg { opacity: 0; }
.bph__grid {
	opacity: 0;
	background-image:
		linear-gradient(color-mix(in srgb, var(--bph-lines, #fff) 16%, transparent) 1px, transparent 1px),
		linear-gradient(90deg, color-mix(in srgb, var(--bph-lines, #fff) 16%, transparent) 1px, transparent 1px),
		linear-gradient(color-mix(in srgb, var(--bph-lines, #fff) 6%, transparent) 1px, transparent 1px),
		linear-gradient(90deg, color-mix(in srgb, var(--bph-lines, #fff) 6%, transparent) 1px, transparent 1px);
	background-size: 160px 160px, 160px 160px, 32px 32px, 32px 32px;
	background-position: -1px -1px;
	-webkit-mask-image: radial-gradient(ellipse 80% 75% at 62% 45%, #000 30%, transparent 85%);
	mask-image: radial-gradient(ellipse 80% 75% at 62% 45%, #000 30%, transparent 85%);
}
.bph__drawing { opacity: 0; mix-blend-mode: screen; }
.bph__drawing img { object-fit: contain; object-position: 70% 50%; }
.bph__canvas { width: 100%; height: 100%; display: block; }
.bph__poster { z-index: 1; }
.bph__final { opacity: 0; }
.bph__scrim { background: linear-gradient(180deg, rgba(7, 12, 18, .5), rgba(7, 12, 18, 0) 16%), linear-gradient(90deg, rgba(7, 12, 18, .72) 0%, rgba(7, 12, 18, .42) 34%, rgba(7, 12, 18, 0) 58%), linear-gradient(0deg, rgba(7, 12, 18, .55), rgba(7, 12, 18, 0) 30%); pointer-events: none; }
.bph__fade { background: linear-gradient(180deg, rgba(16, 24, 32, 0) 45%, #101820 100%); opacity: 0; pointer-events: none; }

/* Annotations */
.bph__labels { pointer-events: none; }
.bph__label { position: absolute; left: 0; top: 0; display: inline-flex; gap: 8px; align-items: baseline; padding: 5px 9px; border: 1px solid color-mix(in srgb, var(--bph-lines, #fff) 55%, transparent); background: rgba(7, 17, 27, .55); font: 500 11px/1.2 "Inter", sans-serif; letter-spacing: .06em; text-transform: uppercase; color: rgba(255, 255, 255, .92); white-space: nowrap; opacity: 0; will-change: transform, opacity; }
.bph__label b { font-family: "Manrope", sans-serif; font-weight: 700; color: #fff; letter-spacing: .02em; }

/* Copy */
.bph__copy { position: absolute; z-index: 3; inset: 0; display: grid; align-items: center; padding: calc(var(--header-h, 84px) + 24px) var(--gutter, 40px) 120px; max-width: calc(var(--wrap, 1320px) + var(--gutter, 40px) * 2); margin-inline: auto; pointer-events: none; }
.bph__step { grid-area: 1 / 1; max-width: 560px; pointer-events: auto; }
.bph__eyebrow, .bph__stage { display: inline-flex; align-items: center; gap: 12px; margin: 0 0 22px; font: 600 12px/1 "Manrope", sans-serif; letter-spacing: .2em; text-transform: uppercase; color: rgba(255, 255, 255, .8); }
.bph__eyebrow::before { content: ""; width: 36px; height: 1px; background: var(--bph-brand); }
.bph__stage span { color: var(--bph-brand); font-size: 13px; font-variant-numeric: tabular-nums; }
.bph__title { font: 800 clamp(2.6rem, 1.2rem + 4.6vw, 6.2rem)/.98 "Manrope", sans-serif; letter-spacing: -.045em; margin: 0 0 26px; text-wrap: balance; }
.bph__h2 { font: 700 clamp(2.1rem, 1.2rem + 3.2vw, 4.4rem)/1.02 "Manrope", sans-serif; letter-spacing: -.04em; margin: 0 0 22px; }
.bph__text { font-size: clamp(1.02rem, .95rem + .35vw, 1.25rem); line-height: 1.6; color: rgba(255, 255, 255, .84); max-width: 44ch; margin: 0 0 30px; }
.bph__title, .bph__h2, .bph__text { text-shadow: 0 2px 30px rgba(0, 0, 0, .35); }
.bph .btn-row { gap: 12px; }

/* HUD */
.bph__hud { position: absolute; z-index: 3; left: var(--gutter, 40px); right: var(--gutter, 40px); bottom: 34px; display: none; align-items: center; gap: 18px; font: 600 12px/1 "Manrope", sans-serif; letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 255, 255, .7); pointer-events: none; }
.bph__count b { color: #fff; font-size: 15px; letter-spacing: .04em; }
.bph__bar { position: relative; flex: 0 0 180px; height: 2px; background: rgba(255, 255, 255, .2); overflow: hidden; }
.bph__bar span { position: absolute; inset: 0; background: var(--bph-brand); transform-origin: left; transform: scaleX(0); }
.bph__ticks { display: flex; gap: 22px; margin: 0 0 0 auto; padding: 0; list-style: none; }
.bph__ticks li { opacity: .45; transition: opacity .4s, color .4s; }
.bph__ticks li.is-on { opacity: 1; color: #fff; }
.bph__cue { position: absolute; z-index: 3; left: 50%; bottom: 84px; transform: translateX(-50%); display: none; flex-direction: column; align-items: center; gap: 10px; color: rgba(255, 255, 255, .75); text-decoration: none; font: 600 11px/1 "Manrope", sans-serif; letter-spacing: .18em; text-transform: uppercase; }
.bph__cue span { position: relative; width: 24px; height: 40px; border: 1.5px solid rgba(255, 255, 255, .55); border-radius: 14px; }
.bph__cue span::after { content: ""; position: absolute; left: 50%; top: 7px; width: 3px; height: 8px; margin-left: -1.5px; border-radius: 2px; background: var(--bph-brand); animation: bphCue 2s cubic-bezier(.22, 1, .36, 1) infinite; }
.bph__cue em { font-style: normal; }
@keyframes bphCue { 0% { transform: translateY(0); opacity: 0; } 30% { opacity: 1; } 80% { transform: translateY(14px); opacity: 0; } 100% { opacity: 0; } }

/* Transition into the next section: charcoal → page background, blueprint grid dissolving */
.bph-after { height: clamp(120px, 24vh, 280px); position: relative;
	background:
		linear-gradient(180deg, rgba(16, 24, 32, 0) 0%, rgba(255, 255, 255, 1) 100%),
		repeating-linear-gradient(90deg, color-mix(in srgb, var(--bph-brand, #1B91C6) 14%, transparent) 0 1px, transparent 1px 32px),
		#101820; }
.bph-after:focus { outline: none; }

/* ---------- STATIC (default): finished building + final copy ---------- */
.bph:not(.bph--live) .bph__step:not(.bph__step--final), .bph:not(.bph--live) .bph__canvas, .bph:not(.bph--live) .bph__labels, .bph:not(.bph--live) .bph__grid, .bph:not(.bph--live) .bph__drawing { display: none; }
.bph:not(.bph--live) .bph__step--intro { display: block; position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } /* keeps the page H1 for SEO / screen readers */
.bph:not(.bph--live) .bph__copy { align-items: end; padding-bottom: clamp(64px, 12vh, 140px); }

/* ---------- LIVE ---------- */
.bph--live { height: var(--bph-len-d, 550vh); }
.bph--live .bph__pin { position: sticky; top: 0; }
.bph--live .bph__poster { opacity: 0; visibility: hidden; transition: opacity .6s; }
.bph--live .bph__hud { display: flex; }
.bph--live .bph__cue { display: flex; }
.bph--live .bph__step { opacity: 0; visibility: hidden; will-change: opacity, transform; }
.bph--live .bph__step--intro { opacity: 1; visibility: visible; }
.bph--live .bph__step--intro .line__inner { display: block; transform: translateY(108%); transition: transform 1.3s cubic-bezier(.22, 1, .36, 1); }
.bph--live .bph__step--intro .line:nth-child(2) .line__inner { transition-delay: .12s; }
.bph--live .bph__step--intro .bph__eyebrow, .bph--live .bph__step--intro .bph__text, .bph--live .bph__step--intro .btn-row { opacity: 0; transform: translateY(18px); transition: opacity 1s, transform 1.1s cubic-bezier(.22, 1, .36, 1); }
.bph--live.is-in .bph__step--intro .line__inner { transform: none; }
.bph--live.is-in .bph__step--intro .bph__eyebrow { opacity: 1; transform: none; transition-delay: .5s; }
.bph--live.is-in .bph__step--intro .bph__text { opacity: 1; transform: none; transition-delay: .75s; }
.bph--live.is-in .bph__step--intro .btn-row { opacity: 1; transform: none; transition-delay: .9s; }
.bph--live .bph__cue { opacity: 0; transition: opacity .8s 1.4s; }
.bph--live.is-in .bph__cue { opacity: 1; }
.bph--live.is-scrolled .bph__cue { opacity: 0; transition-delay: 0s; }
.bph--seq .bph__sky, .bph--seq .bph__bg { display: none; }
.bph--gsap-pin.bph--live { height: auto; }
/* Engine failed after going live → behave like static */
.bph--failed .bph__poster { opacity: 1 !important; visibility: visible !important; }

/* Header stays transparent over the scene */
.has-bph .site-header:not(.is-solid) { background: transparent; }
.bph-active .scroll-progress { opacity: 0; }

/* ---------- Tablet ---------- */
@media (max-width: 1099px) {
	.bph--live { height: var(--bph-len-t, 400vh); }
	.bph__ticks { display: none; }
	.bph__step { max-width: 460px; }
}

/* ---------- Portrait tablet: stacked composition ---------- */
@media (min-width: 768px) and (max-width: 1099px) and (orientation: portrait) {
	.bph__copy { align-items: end; padding-bottom: 130px; }
	.bph__step { max-width: 620px; }
	.bph__scrim { background: linear-gradient(180deg, rgba(7, 12, 18, .5), rgba(7, 12, 18, 0) 14%), linear-gradient(0deg, rgba(7, 12, 18, .88) 0%, rgba(7, 12, 18, .55) 34%, rgba(7, 12, 18, 0) 55%); }
}

/* ---------- Mobile: building top, copy bottom ---------- */
@media (max-width: 767px) {
	.bph--live { height: var(--bph-len-m, 300vh); }
	.bph__copy { align-items: end; padding: 0 20px 110px; }
	.bph__step { max-width: none; }
	.bph__title { font-size: clamp(2.3rem, 10.5vw, 3.3rem); margin-bottom: 16px; }
	.bph__h2 { font-size: clamp(1.9rem, 8.6vw, 2.6rem); margin-bottom: 12px; }
	.bph__text { font-size: 1rem; margin-bottom: 20px; }
	.bph__eyebrow, .bph__stage { margin-bottom: 14px; font-size: 11px; }
	.bph__scrim { background: linear-gradient(0deg, rgba(7, 12, 18, .88) 0%, rgba(7, 12, 18, .6) 34%, rgba(7, 12, 18, 0) 58%); }
	.bph .btn-row .btn { flex: 1 1 auto; }
	.bph__hud { bottom: 76px; left: 20px; right: auto; }
	.bph__bar { flex-basis: 110px; }
	.bph__labels { display: none; }
	.bph__cue { bottom: auto; top: calc(var(--header-h, 64px) + 12px); left: auto; right: 20px; transform: none; }
	.bph__cue em { display: none; }
}

@media (prefers-reduced-motion: reduce) {
	.bph__cue span::after { animation: none; }
}

/* ==========================================================================
   Reference-building model (camera-matched to the master image)
   ========================================================================== */
.bph--model-ref { background: #0b2a44; }
.bph--model-ref .bph__sky { background: radial-gradient(ellipse 75% 70% at 66% 42%, #1d5f8a 0%, #12405f 40%, #0b2a44 80%); }
.bph__plate { position: absolute; display: block; max-width: none; object-fit: fill; transform-origin: 0 0; opacity: 0; will-change: transform, opacity; pointer-events: none; filter: brightness(1.12);
	-webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 22%, #000 90%, transparent 100%), linear-gradient(180deg, transparent 0%, #000 9%, #000 88%, transparent 100%);
	-webkit-mask-composite: source-in; mask-image: linear-gradient(90deg, transparent 0%, #000 22%, #000 90%, transparent 100%), linear-gradient(180deg, transparent 0%, #000 9%, #000 88%, transparent 100%); mask-composite: intersect; }
.bph--stacked .bph__plate { -webkit-mask-image: linear-gradient(180deg, #000 78%, transparent 100%); mask-image: linear-gradient(180deg, #000 78%, transparent 100%); }
.bph--model-ref .bph__scrim { background: linear-gradient(180deg, rgba(7, 26, 43, .45), rgba(7, 26, 43, 0) 14%), linear-gradient(90deg, rgba(7, 26, 43, .86) 0%, rgba(7, 26, 43, .72) 22%, rgba(7, 26, 43, .35) 38%, rgba(7, 26, 43, 0) 50%); }
.bph--model-ref.bph--stacked .bph__scrim { background: linear-gradient(180deg, rgba(7, 26, 43, .35), rgba(7, 26, 43, 0) 12%), linear-gradient(0deg, rgba(7, 26, 43, .92) 0%, rgba(7, 26, 43, .7) 28%, rgba(7, 26, 43, 0) 48%); }
.bph--model-ref .bph__fade { background: linear-gradient(180deg, rgba(11, 42, 68, 0) 55%, #0b2a44 100%); }

/* Stage indicator: "01 Blueprint" … current stage in brand blue */
.bph__ticks li span { margin-right: 6px; font-variant-numeric: tabular-nums; }
.bph__ticks li.is-on { color: var(--bph-brand); opacity: 1; }
.bph__ticks li.is-on::before { content: ""; display: inline-block; width: 18px; height: 1px; margin-right: 8px; vertical-align: middle; background: var(--bph-brand); }

/* Static (reduced motion / no WebGL): the master image itself, building kept centre-right */
.bph--model-ref:not(.bph--live) .bph__poster img, .bph--model-ref.bph--failed .bph__poster img { object-fit: cover; object-position: 60% 35%; filter: brightness(1.12); }
.bph--model-ref:not(.bph--live) .bph__poster::after, .bph--model-ref.bph--failed .bph__poster::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(7, 26, 43, .75) 0%, rgba(7, 26, 43, .4) 30%, rgba(7, 26, 43, 0) 50%); }
@media (max-width: 767px) {
	.bph--model-ref:not(.bph--live) .bph__poster img { object-position: 54% 30%; }
	.bph--model-ref:not(.bph--live) .bph__poster::after { background: linear-gradient(0deg, rgba(7, 26, 43, .95) 0%, rgba(7, 26, 43, .6) 35%, rgba(7, 26, 43, 0) 60%); }
}
.bph--model-ref + .bph-after { background: linear-gradient(180deg, #0b2a44 0%, rgba(7, 26, 43, 0) 100%), repeating-linear-gradient(90deg, color-mix(in srgb, var(--bph-brand, #1B91C6) 14%, transparent) 0 1px, transparent 1px 32px), #fff; }

/* Reference model: background is rendered in WebGL (same site + camera every stage) — CSS sky/grid unused */
.bph--model-ref.bph--ref .bph__sky, .bph--model-ref.bph--ref .bph__grid { display: none; }

/* Camera view tag (Perspective / Plan view / Front elevation) */
.bph__viewtag { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; border: 1px solid rgba(255, 255, 255, .35); border-radius: 999px; color: #fff; font-size: 11px; letter-spacing: .16em; white-space: nowrap; }
.bph__viewtag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--bph-brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--bph-brand) 35%, transparent); }
.bph__viewtag.is-swap { animation: bphTag .6s cubic-bezier(.22, 1, .36, 1); }
@keyframes bphTag { from { opacity: 0; transform: translateY(6px); } }
@media (max-width: 767px) { .bph__viewtag { display: none; } }

/* full-bleed before JavaScript runs (exact break-out is applied by the script, inside any container) */
.bph, .bph-after { box-sizing: border-box; max-width: none; }
:where(.elementor-widget-shortcode, .elementor-widget-container, .entry-content, .wp-block-shortcode) > .bph:not([style*="width"]) { width: 100vw; margin-left: calc(50% - 50vw); }


/* v2.2 static / reduced-motion hero: the render with background-size cover */
.bph--model-ref:not(.bph--live) .bph__poster img, .bph--model-ref.bph--failed .bph__poster img { object-fit: cover; object-position: 50% 35%; filter: none; }
@media (max-width: 767px) { .bph--model-ref:not(.bph--live) .bph__poster img, .bph--model-ref.bph--failed .bph__poster img { object-position: 55.6% 35%; } }

/* v2.3 — clean hero: no dark overlay, no step bar / 01-05 counter / camera-angle tag */
.bph .bph__scrim, .bph--model-ref .bph__scrim, .bph--model-ref.bph--stacked .bph__scrim { display: none; }
.bph .bph__hud, .bph--live .bph__hud { display: none !important; }
/* keep the copy readable straight on the image */
.bph .bph__title, .bph .bph__h2 { text-shadow: 0 2px 24px rgba(0, 0, 0, .45), 0 1px 3px rgba(0, 0, 0, .35); }
.bph .bph__text, .bph .bph__eyebrow, .bph .bph__stage { text-shadow: 0 1px 10px rgba(0, 0, 0, .6); }

/* v2.3.2 — one headline size for every hero step (intro, stages, completion) */
.bph .bph__title, .bph .bph__h2 { font: 700 clamp(2.1rem, 1.2rem + 3.2vw, 4.4rem)/1.02 "Manrope", sans-serif; letter-spacing: -.04em; margin: 0 0 22px; }
@media (max-width: 767px) { .bph .bph__title, .bph .bph__h2 { font-size: clamp(1.9rem, 8.6vw, 2.6rem); margin-bottom: 12px; } }

/* v2.3.3 — dark shade on the left and right edges only, clear middle; no bottom overlay */
.bph .bph__scrim, .bph--model-ref .bph__scrim, .bph--model-ref.bph--stacked .bph__scrim {
	display: block;
	background: linear-gradient(90deg, rgba(7, 12, 18, .8) 0%, rgba(7, 12, 18, .5) 18%, rgba(7, 12, 18, 0) 38%, rgba(7, 12, 18, 0) 62%, rgba(7, 12, 18, .5) 82%, rgba(7, 12, 18, .8) 100%);
}
.bph .bph__fade, .bph--model-ref .bph__fade { display: none; }
@media (max-width: 767px) {
	.bph .bph__scrim, .bph--model-ref .bph__scrim, .bph--model-ref.bph--stacked .bph__scrim {
		background: linear-gradient(90deg, rgba(7, 12, 18, .6) 0%, rgba(7, 12, 18, 0) 30%, rgba(7, 12, 18, 0) 70%, rgba(7, 12, 18, .6) 100%);
	}
}

/* v2.11.3 — mobile: dark overlay for readable copy (overall tint + deeper shade behind the text) */
@media (max-width: 767px) {
	.bph .bph__scrim, .bph--model-ref .bph__scrim, .bph--model-ref.bph--stacked .bph__scrim {
		display: block;
		z-index: 2; /* above the 3D canvas and the final photo, below the copy (z 3) */
		background:
			linear-gradient(180deg, rgba(7, 12, 18, .55) 0%, rgba(7, 12, 18, 0) 18%),
			linear-gradient(0deg, rgba(7, 12, 18, .92) 0%, rgba(7, 12, 18, .78) 30%, rgba(7, 12, 18, .35) 58%, rgba(7, 12, 18, 0) 78%),
			rgba(7, 12, 18, .28);
	}
}

/* v2.12.1 — darker overlay for stronger text contrast (all screens, every hero stage) */
.bph .bph__scrim, .bph--model-ref .bph__scrim, .bph--model-ref.bph--stacked .bph__scrim {
	display: block;
	z-index: 2; /* above the 3D canvas and the final photo, below the copy (z 3) */
	background:
		linear-gradient(180deg, rgba(7, 12, 18, .6) 0%, rgba(7, 12, 18, 0) 20%),
		linear-gradient(90deg, rgba(7, 12, 18, .92) 0%, rgba(7, 12, 18, .78) 26%, rgba(7, 12, 18, .45) 48%, rgba(7, 12, 18, .2) 66%, rgba(7, 12, 18, .45) 88%, rgba(7, 12, 18, .7) 100%),
		linear-gradient(0deg, rgba(7, 12, 18, .6) 0%, rgba(7, 12, 18, 0) 35%),
		rgba(7, 12, 18, .28);
}
@media (max-width: 767px) {
	.bph .bph__scrim, .bph--model-ref .bph__scrim, .bph--model-ref.bph--stacked .bph__scrim {
		background:
			linear-gradient(180deg, rgba(7, 12, 18, .65) 0%, rgba(7, 12, 18, 0) 20%),
			linear-gradient(0deg, rgba(7, 12, 18, .96) 0%, rgba(7, 12, 18, .86) 32%, rgba(7, 12, 18, .5) 60%, rgba(7, 12, 18, .15) 80%),
			rgba(7, 12, 18, .4);
	}
}
