/* ============================================================
   braineight — Elementor Pro compatibility overrides
   ------------------------------------------------------------
   These rules make the Elementor-landing template (JSON under
   elementor-templates/braineight-landing.json) render 1:1 with
   the Svelte reference design.

   Elementor wraps every widget in .elementor-widget-wrap and
   every widget in .elementor-widget-container. We neutralize
   those wrappers where they would break the original layout
   and opt-in to CSS-Grid on sections that are meant to be grids.
============================================================ */

/* Let widget wrappers inherit text color and not interfere with layout. */
.elementor-widget-heading .elementor-heading-title {
	color: inherit;
	margin: 0;
}

.elementor-widget-text-editor p,
.elementor-widget-text-editor span,
.elementor-widget-text-editor div {
	margin: 0;
}

/* Buttons — give Elementor's button widget a transparent base and let the
   .btn / .btn-accent / .btn-ghost classes (added via "CSS Classes" field)
   do the styling. */
.elementor-widget-button .elementor-button-wrapper {
	display: inline-flex;
}
.elementor-widget-button .elementor-button {
	background: transparent !important;
	padding: 0 !important;
	border-radius: 999px;
	font-weight: 500;
	transition: none;
}
.elementor-widget-button .elementor-button-content-wrapper,
.elementor-widget-button .elementor-button-text {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

/* Re-apply btn styling on button *widget* wrappers that carry btn classes. */
.elementor-widget.b8-btn-wrap .elementor-button-wrapper,
.elementor-widget.b8-btn-wrap .elementor-button {
	display: inline-flex;
}

/* Any button widget with our btn classes on its wrapper.
   Elementor puts _css_classes on .elementor-widget (the widget wrapper),
   so we re-derive the look here. */
.elementor-widget.btn.btn-accent .elementor-button,
.elementor-widget.btn.btn-ghost .elementor-button,
.elementor-widget.btn.btn-primary .elementor-button {
	height: 42px;
	padding: 0 18px !important;
	border-radius: 999px;
	font-size: 14px;
	font-weight: 500;
	letter-spacing: -0.005em;
	border: 1px solid transparent;
	white-space: nowrap;
	position: relative;
	overflow: hidden;
}
.elementor-widget.btn.btn-accent .elementor-button {
	color: #fff !important;
	background: linear-gradient(135deg, var(--accent-1) 0%, var(--accent-2) 55%, var(--accent-3) 110%) !important;
	box-shadow: 0 10px 40px -10px color-mix(in oklab, var(--accent-1) 60%, transparent);
}
.elementor-widget.btn.btn-ghost .elementor-button {
	background: transparent !important;
	color: var(--fg) !important;
	border: 1px solid var(--border-strong) !important;
}
.elementor-widget.btn.btn-ghost .elementor-button:hover {
	background: var(--bg-card-hover) !important;
	border-color: var(--fg-dim) !important;
}
.elementor-widget.btn.btn-primary .elementor-button {
	background: var(--fg) !important;
	color: var(--bg) !important;
	box-shadow: 0 8px 30px -8px color-mix(in oklab, var(--fg) 40%, transparent);
}
.elementor-widget.btn.btn-sm .elementor-button {
	height: 34px;
	padding: 0 14px !important;
	font-size: 13px;
}

/* ===== Hero ================================================ */
.elementor-section.b8-hero-section {
	position: relative;
	z-index: 1;
	padding: 110px 0 80px;
	overflow: hidden;
}
.elementor-section.b8-hero-section > .elementor-container {
	max-width: 1280px !important;
	padding: 0 32px;
	align-items: center;
	gap: 56px;
}
@media (max-width: 980px) {
	.elementor-section.b8-hero-section {
		padding: 70px 0 40px;
	}
	.elementor-section.b8-hero-section > .elementor-container {
		flex-direction: column;
		gap: 40px;
	}
}

/* Heading h1 inside hero — reuse .display typography. */
.b8-hero-section .elementor-widget-heading.display .elementor-heading-title {
	font-family: var(--font-display);
	font-size: clamp(44px, 6.4vw, 92px);
	line-height: 0.98;
	letter-spacing: -0.035em;
	font-weight: 500;
	margin: 22px 0 24px;
	text-wrap: balance;
}
.b8-hero-section .elementor-widget-heading.display .accent-text {
	background: linear-gradient(120deg, var(--accent-1), var(--accent-2) 50%, var(--accent-3));
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	font-style: italic;
	font-family: var(--font-display);
	display: inline-block;
	padding-right: 0.14em;
	margin-right: -0.06em;
}

/* Hero CTAs inner section — inline flex */
.elementor-section.b8-hero-ctas {
	margin: 0 !important;
}
.elementor-section.b8-hero-ctas > .elementor-container {
	gap: 12px;
	flex-wrap: wrap;
	padding: 0;
	max-width: none !important;
	justify-content: flex-start;
}
.elementor-section.b8-hero-ctas .elementor-column {
	width: auto !important;
	flex: 0 0 auto;
}

/* Hero text column — kill default widget margins. */
.b8-hero-section .elementor-widget {
	margin-bottom: 0 !important;
}
.b8-hero-section .elementor-widget-text-editor .lead {
	font-size: clamp(16px, 1.25vw, 19px);
	color: var(--fg-dim);
	line-height: 1.55;
	max-width: 520px;
	text-wrap: pretty;
	margin: 0 0 32px;
}
.b8-hero-section .elementor-widget-html:last-child {
	margin-top: 36px;
}

/* ===== Trust ================================================ */
.elementor-section.b8-trust-section {
	position: relative;
	z-index: 1;
	border-top: 1px solid var(--border);
	border-bottom: 1px solid var(--border);
	padding: 48px 0;
	background: linear-gradient(180deg, transparent, color-mix(in oklab, var(--accent-1) 4%, transparent), transparent);
}
.elementor-section.b8-trust-section > .elementor-container {
	max-width: 1280px !important;
	padding: 0 32px;
	gap: 24px;
}
.b8-trust-section .elementor-widget-heading.big .elementor-heading-title {
	font-family: var(--font-display);
	font-size: clamp(42px, 4.2vw, 64px);
	font-weight: 500;
	letter-spacing: -0.03em;
	line-height: 1;
	color: var(--fg);
	margin: 0;
}
.b8-trust-section .elementor-widget-heading.big .unit {
	color: var(--accent-1);
	font-size: 0.5em;
	margin-left: 2px;
}
.b8-trust-section .elementor-widget-text-editor .label {
	margin-top: 10px;
	font-size: 12px;
	color: var(--fg-mute);
	letter-spacing: 0.05em;
	text-transform: uppercase;
	font-family: var(--font-mono);
}

/* ===== Section wrapper padding ================================ */
.elementor-section.b8-services-section,
.elementor-section.b8-usp-section,
.elementor-section.b8-cases-section,
.elementor-section.b8-process-section,
.elementor-section.b8-cta-section {
	position: relative;
	z-index: 1;
	padding: 120px 0;
}
@media (max-width: 720px) {
	.elementor-section.b8-services-section,
	.elementor-section.b8-usp-section,
	.elementor-section.b8-cases-section,
	.elementor-section.b8-process-section,
	.elementor-section.b8-cta-section {
		padding: 80px 0;
	}
}
.elementor-section.b8-services-section > .elementor-container,
.elementor-section.b8-usp-section > .elementor-container,
.elementor-section.b8-cases-section > .elementor-container,
.elementor-section.b8-process-section > .elementor-container,
.elementor-section.b8-cta-section > .elementor-container {
	max-width: 1280px !important;
	padding: 0 32px;
}

/* Section header reused pattern: kicker (span), h2, sub (p). */
.b8-services-header .elementor-widget-text-editor:first-child span.sec-kicker,
.b8-usp-header .elementor-widget-text-editor:first-child span.sec-kicker,
.b8-cases-header .elementor-widget-text-editor:first-child span.sec-kicker,
.b8-process-header .elementor-widget-text-editor:first-child span.sec-kicker {
	display: inline-block;
}
.b8-services-header .elementor-widget-heading.sec-title .elementor-heading-title,
.b8-usp-header .elementor-widget-heading.sec-title .elementor-heading-title,
.b8-cases-header .elementor-widget-heading.sec-title .elementor-heading-title,
.b8-process-header .elementor-widget-heading.sec-title .elementor-heading-title {
	font-family: var(--font-display);
	font-size: clamp(32px, 3.6vw, 54px);
	line-height: 1.04;
	letter-spacing: -0.025em;
	font-weight: 500;
	margin: 14px 0 0;
	max-width: 720px;
}
.b8-services-header .elementor-widget-text-editor .sec-sub,
.b8-usp-header .elementor-widget-text-editor .sec-sub,
.b8-cases-header .elementor-widget-text-editor .sec-sub,
.b8-process-header .elementor-widget-text-editor .sec-sub {
	font-size: 15px;
	color: var(--fg-dim);
	line-height: 1.55;
	max-width: 520px;
	margin: 12px 0 40px;
}

/* ===== USP grid ============================================== */
.elementor-section.b8-usp-section > .elementor-container > .elementor-column > .elementor-widget-wrap {
	display: grid;
	grid-template-columns: 1.4fr 1fr 1fr;
	grid-auto-rows: minmax(220px, auto);
	gap: 20px;
	align-content: start;
}
.elementor-section.b8-usp-section .b8-span-all {
	grid-column: 1 / -1;
}
.elementor-section.b8-usp-section .b8-usp-item {
	background: var(--bg-card);
	border: 1px solid var(--border);
	border-radius: 18px;
	padding: 28px;
	margin: 0 !important;
	transition: border-color 0.25s ease, background 0.25s ease;
}
.elementor-section.b8-usp-section .b8-usp-item:hover {
	border-color: var(--border-strong);
	background: var(--bg-card-hover);
}
.elementor-section.b8-usp-section .b8-usp-lg {
	grid-row: span 2;
}
.elementor-section.b8-usp-section .b8-usp-item > .elementor-container {
	height: 100%;
	padding: 0;
	max-width: none !important;
}
.elementor-section.b8-usp-section .b8-usp-item > .elementor-container > .elementor-column {
	width: 100% !important;
}
.elementor-section.b8-usp-section .usp-kicker {
	display: block;
	font-family: var(--font-mono);
	font-size: 11px;
	letter-spacing: 0.08em;
	color: var(--accent-1);
	text-transform: uppercase;
	margin-bottom: 12px;
}
.elementor-section.b8-usp-section .elementor-widget-heading.usp-title .elementor-heading-title {
	font-family: var(--font-display);
	font-size: clamp(26px, 2.4vw, 34px);
	line-height: 1.05;
	letter-spacing: -0.02em;
	font-weight: 500;
	margin: 0 0 12px;
}
.elementor-section.b8-usp-section .elementor-widget-heading.b8-usp-title-sm .elementor-heading-title {
	font-size: 22px !important;
}
.elementor-section.b8-usp-section .usp-desc {
	font-size: 14px;
	color: var(--fg-dim);
	line-height: 1.55;
	margin: 0 0 16px;
}
.elementor-section.b8-usp-section .b8-usp-btn {
	display: flex;
	align-items: center;
	justify-content: center;
}
.elementor-section.b8-usp-section .b8-usp-btn > .elementor-container {
	align-items: center;
	justify-content: center;
}
@media (max-width: 980px) {
	.elementor-section.b8-usp-section > .elementor-container > .elementor-column > .elementor-widget-wrap {
		grid-template-columns: 1fr;
	}
	.elementor-section.b8-usp-section .b8-usp-lg { grid-row: auto; }
}

/* ===== Cases grid ============================================ */
.elementor-section.b8-cases-section > .elementor-container > .elementor-column > .elementor-widget-wrap {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	grid-auto-rows: minmax(280px, auto);
	gap: 16px;
}
.elementor-section.b8-cases-section .b8-span-all {
	grid-column: 1 / -1;
}
.elementor-section.b8-cases-section .b8-case-item {
	background: var(--bg-card);
	border: 1px solid var(--border);
	border-radius: 18px;
	padding: 24px;
	margin: 0 !important;
	position: relative;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	gap: 14px;
}
.elementor-section.b8-cases-section .b8-case-item.tall {
	grid-row: span 2;
}
.elementor-section.b8-cases-section .b8-case-item > .elementor-container {
	max-width: none !important;
	padding: 0;
	height: 100%;
	align-items: stretch;
}
.elementor-section.b8-cases-section .b8-case-item .elementor-widget-heading.case-title .elementor-heading-title {
	font-family: var(--font-display);
	font-size: 22px;
	line-height: 1.15;
	letter-spacing: -0.01em;
	font-weight: 500;
	margin: 0;
}
.elementor-section.b8-cases-section .case-meta {
	display: flex;
	gap: 12px;
	font-family: var(--font-mono);
	font-size: 10px;
	color: var(--fg-mute);
	letter-spacing: 0.1em;
	text-transform: uppercase;
}
@media (max-width: 980px) {
	.elementor-section.b8-cases-section > .elementor-container > .elementor-column > .elementor-widget-wrap {
		grid-template-columns: 1fr;
	}
	.elementor-section.b8-cases-section .b8-case-item.tall { grid-row: auto; }
}

/* ===== Process =============================================== */
.elementor-section.b8-process-section > .elementor-container > .elementor-column > .elementor-widget-wrap {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 16px;
}
.elementor-section.b8-process-section .b8-span-all {
	grid-column: 1 / -1;
}
.elementor-section.b8-process-section .b8-proc-item {
	background: var(--bg-card);
	border: 1px solid var(--border);
	border-radius: 18px;
	padding: 28px;
	margin: 0 !important;
	position: relative;
}
.elementor-section.b8-process-section .b8-proc-item > .elementor-container {
	max-width: none !important;
	padding: 0;
}
.elementor-section.b8-process-section .proc-num {
	display: block;
	font-family: var(--font-mono);
	font-size: 12px;
	color: var(--accent-1);
	letter-spacing: 0.06em;
	margin-bottom: 16px;
}
.elementor-section.b8-process-section .elementor-widget-heading.proc-title .elementor-heading-title {
	font-family: var(--font-display);
	font-size: 24px;
	font-weight: 500;
	letter-spacing: -0.01em;
	margin: 0 0 10px;
}
.elementor-section.b8-process-section .proc-desc {
	font-size: 13px;
	color: var(--fg-dim);
	line-height: 1.55;
	margin: 0;
}
.elementor-section.b8-process-section .proc-dot {
	position: absolute;
	top: 18px;
	right: 18px;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--border);
}
.elementor-section.b8-process-section .proc-dot.active {
	background: var(--accent-1);
	box-shadow: 0 0 12px var(--accent-1);
}
@media (max-width: 980px) {
	.elementor-section.b8-process-section > .elementor-container > .elementor-column > .elementor-widget-wrap {
		grid-template-columns: 1fr 1fr;
	}
}
@media (max-width: 560px) {
	.elementor-section.b8-process-section > .elementor-container > .elementor-column > .elementor-widget-wrap {
		grid-template-columns: 1fr;
	}
}

/* ===== CTA =================================================== */
.elementor-section.b8-cta-section .cta-panel {
	background: linear-gradient(135deg, color-mix(in oklab, var(--accent-1) 18%, transparent), color-mix(in oklab, var(--accent-2) 12%, transparent)), var(--bg-elev);
	border: 1px solid var(--border);
	border-radius: 24px;
	padding: 64px 48px;
	margin: 0 !important;
	text-align: center;
}
.elementor-section.b8-cta-section .cta-panel > .elementor-container {
	max-width: 720px !important;
	padding: 0;
	margin: 0 auto;
	flex-direction: column;
	align-items: center;
	text-align: center;
}
.elementor-section.b8-cta-section .cta-panel > .elementor-container > .elementor-column {
	width: 100% !important;
}
.elementor-section.b8-cta-section .elementor-widget-heading.b8-cta-title .elementor-heading-title {
	font-family: var(--font-display);
	font-size: clamp(28px, 3vw, 44px);
	line-height: 1.1;
	letter-spacing: -0.02em;
	font-weight: 500;
	margin: 12px 0 16px;
}
.elementor-section.b8-cta-section .cta-panel p {
	font-size: 15px;
	color: var(--fg-dim);
	line-height: 1.55;
	margin: 0 0 32px;
}
.elementor-section.b8-cta-ctas {
	margin: 0 !important;
}
.elementor-section.b8-cta-ctas > .elementor-container {
	gap: 12px;
	justify-content: center;
	max-width: none !important;
	padding: 0;
}
.elementor-section.b8-cta-ctas .elementor-column {
	width: auto !important;
	flex: 0 0 auto;
}

/* ===== Footer ================================================ */
.elementor-section.b8-footer-section {
	border-top: 1px solid var(--border);
	padding: 64px 0 32px;
	background: var(--bg-elev);
	position: relative;
	z-index: 1;
}
.elementor-section.b8-footer-section > .elementor-container {
	max-width: 1280px !important;
	padding: 0 32px;
	flex-direction: column;
	gap: 32px;
}
.elementor-section.b8-footer-grid > .elementor-container {
	max-width: none !important;
	padding: 0;
	gap: 32px;
}
.elementor-section.b8-footer-grid .elementor-widget-heading.b8-footer-h .elementor-heading-title {
	font-size: 13px;
	font-weight: 500;
	color: var(--fg);
	letter-spacing: 0.04em;
	text-transform: uppercase;
	margin: 0 0 14px;
}
.elementor-section.b8-footer-grid .elementor-widget-icon-list .elementor-icon-list-item a {
	color: var(--fg-dim);
	font-size: 14px;
	transition: color 0.2s ease;
}
.elementor-section.b8-footer-grid .elementor-widget-icon-list .elementor-icon-list-item a:hover {
	color: var(--fg);
}
.elementor-section.b8-footer-grid .elementor-widget-icon-list .elementor-icon-list-item .elementor-icon-list-icon {
	display: none;
}
.elementor-section.b8-footer-bottom > .elementor-container {
	max-width: none !important;
	padding: 16px 0 0;
	border-top: 1px solid var(--border);
	justify-content: space-between;
}
.elementor-section.b8-footer-bottom span {
	font-family: var(--font-mono);
	font-size: 11px;
	color: var(--fg-mute);
	letter-spacing: 0.06em;
}

/* ===== Ambient + nav + tweaks wrappers ====================== */
.elementor-section.b8-ambient-section,
.elementor-section.b8-nav-section,
.elementor-section.b8-tweaks-section {
	padding: 0 !important;
	margin: 0 !important;
}
.elementor-section.b8-ambient-section > .elementor-container,
.elementor-section.b8-nav-section > .elementor-container,
.elementor-section.b8-tweaks-section > .elementor-container {
	max-width: none !important;
	padding: 0 !important;
}
.elementor-section.b8-ambient-section .elementor-widget-container,
.elementor-section.b8-nav-section .elementor-widget-container,
.elementor-section.b8-tweaks-section .elementor-widget-container {
	padding: 0 !important;
}

/* ===== Services header ====================================== */
.elementor-section.b8-services-header > .elementor-container {
	max-width: none !important;
	padding: 0;
	margin-bottom: 40px;
}

/* Kill widget default margins inside grids */
.b8-usp-item .elementor-widget,
.b8-case-item .elementor-widget,
.b8-proc-item .elementor-widget,
.b8-cta-panel .elementor-widget {
	margin-bottom: 0 !important;
}

/* Elementor-canvas compatibility: remove default body margin so our
   sticky nav and ambient layer pin to the viewport edges. */
body.elementor-template-canvas {
	background: var(--bg);
}
