/* ==========================================================================
   Legacy pages (Elementor / Vintech content) — unified typography + Beatnik hero.
   Loaded only on non-block pages.
   ========================================================================== */

/* ---------- Typography ---------- */
/* Vintech sets all headings to weight 400 + capitalize. Use the system's weight and sentence case;
   widget-specific weights set in Elementor still win (higher specificity). */
body.btk-v2 :where(h1, h2, h3, h4, h5, h6) { font-weight: 700; text-transform: none; }
body.btk-v2 :where(h5, h6) { font-weight: 500; }
/* Hand-written page CSS sometimes forces a system font stack: body text → Albert Sans (icons excluded). */
body.btk-legacy #pxl-main :where(p, span, li, a, div, td, th, label, small, strong, em, b, dt, dd, blockquote, figcaption, button, input, select, textarea, cite)
	:not(i):not([class*="icon"]):not(.fa):not(.fas):not(.far):not(.fab):not([class*=" fa-"]):not([class^="bi"]):not([class*=" bi-"]):not([class*="caseicon"]):not(:is(h1, h2, h3, h4, h5, h6) *):not(code):not(pre),
body.btk-legacy #pxl-main :is(p, li, td, dd, label, input, select, textarea, blockquote) {
	font-family: var(--font-body) !important;
}
body.btk-legacy #pxl-main :is(h1, h2, h3, h4, h5, h6) :not(i):not([class*="icon"]) { font-family: var(--font-heading) !important; }

/* Vintech pads #pxl-main for its old overlay header; heroes now start directly under the new header. */
body.btk-legacy #pxl-main { padding-top: 0; }
body.btk-legacy--gen-hero #pxl-main { padding-top: clamp(2.5rem, 1.5rem + 3vw, 4.5rem); }
.btk-dup-title { display: none !important; }

/* ---------- Ghost button (on dark) ---------- */
.btk-btn--ghost { --btn-bg: transparent; --btn-fg: #fff; --btn-bg-hover: #fff; --btn-border: rgba(255,255,255,.32); }
.btk-btn--ghost .btk-btn__icon { background: rgba(255,255,255,.12); }
@media (hover: hover) { .btk-btn--ghost:hover { --btn-fg: var(--bt-teal-900); } .btk-btn--ghost:hover .btk-btn__icon { background: var(--bt-mint-100); } }

/* ==========================================================================
   Generated page hero (pages without their own H1)
   ========================================================================== */
.btk-phero {
	position: relative; isolation: isolate; overflow: hidden; color: #fff; padding-bottom: clamp(3.5rem, 2.5rem + 4vw, 6rem);
	background:
		linear-gradient(rgba(169,195,188,.07) 1px, transparent 1px) 0 0 / 64px 64px,
		linear-gradient(90deg, rgba(169,195,188,.07) 1px, transparent 1px) 0 0 / 64px 64px,
		radial-gradient(55% 80% at 85% 30%, rgba(8,126,105,.4), transparent 65%),
		linear-gradient(180deg, var(--bt-teal-950), var(--bt-teal-900));
}
.btk-phero::after { content: ""; position: absolute; z-index: -1; width: 40vw; aspect-ratio: 1; right: -8vw; top: -10vw; border-radius: 50%; pointer-events: none;
	background: radial-gradient(circle, rgba(61,214,163,.18), rgba(61,214,163,0) 65%); animation: btkp-glow 18s var(--ease-in-out) infinite alternate; }
@keyframes btkp-glow { to { transform: translate(-5vw, 6vh) scale(1.1); } }
.btk-phero__crumbs { padding: 1rem 0 0; font-size: .8125rem; color: var(--bt-grey-300); }
.btk-phero__crumbs a { color: var(--bt-grey-300); text-decoration: none; display: inline-block; padding-block: .35rem; }
.btk-phero__crumbs a:hover { color: #fff; text-decoration: underline; }
.btk-phero__crumbs .breadcrumb_last { color: #fff; }
.btk-phero__inner { display: grid; justify-items: start; gap: 1.1rem; padding-top: clamp(2.5rem, 1.5rem + 3vw, 4.5rem); }
.btk-phero__eyebrow { margin: 0; font-family: var(--font-mono); font-size: var(--fs-label); letter-spacing: var(--ls-label); text-transform: uppercase; color: var(--bt-mint-400); }
.btk-phero__title { margin: 0; max-width: 22ch; font-family: var(--font-heading) !important; font-weight: 700; font-size: var(--fs-h1); line-height: 1.06; letter-spacing: -0.035em; color: #fff; text-transform: none; animation: btkp-rise var(--dur-slower) var(--ease-expo) both; }
.btk-phero--post .btk-phero__title { max-width: 26ch; font-size: clamp(2rem, 1.4rem + 2.6vw, 3.6rem); }
@keyframes btkp-rise { from { transform: translateY(16px); } }
.btk-phero__meta { margin: 0; font-size: .9375rem; color: var(--bt-grey-300); }
.btk-phero__lead { margin: 0; max-width: 44rem; font-size: var(--fs-lead); line-height: 1.6; color: var(--bt-grey-300); }
.btk-phero__ctas { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: .5rem; }

/* ==========================================================================
   Existing hand-built heroes → Beatnik hero (restyled in place, content unchanged)
   HERO  = full-width hero blocks; HEAD = narrower title blocks (case studies, posts, clients, booking)
   COPY  = the element that directly contains the H1 (eyebrow, H1, lead, tags, buttons)
   ========================================================================== */
/* Heroes that paint a full-bleed ::before (100vw) get the dark surface on that layer; the rest on the element itself. */
body.btk-legacy--own-hero #pxl-main :is(#btl-about-hero, div[class*="-section"][class*="-hero"]) { background: transparent !important; }
body.btk-legacy--own-hero #pxl-main :is(#btl-about-hero, div[class*="-section"][class*="-hero"])::before,
body.btk-legacy--own-hero #pxl-main :is(#beatnik-sa-hero, header.bt-hero) {
	background:
		linear-gradient(rgba(169,195,188,.07) 1px, transparent 1px) 0 0 / 64px 64px,
		linear-gradient(90deg, rgba(169,195,188,.07) 1px, transparent 1px) 0 0 / 64px 64px,
		radial-gradient(55% 80% at 85% 30%, rgba(8,126,105,.4), transparent 65%),
		linear-gradient(180deg, var(--bt-teal-950), var(--bt-teal-900)) !important;
}
/* Full-width heroes sit flush under the site header (Elementor's 10px container padding removed) and run edge to edge. */
body.btk-legacy--own-hero #pxl-main :is(#beatnik-sa-hero, header.bt-hero) { border-radius: 0 !important; box-shadow: 0 0 0 100vmax var(--bt-teal-950) !important; clip-path: inset(0 -100vmax); }
body.btk-legacy--own-hero #pxl-main :is(#btl-about-hero, #beatnik-sa-hero, header.bt-hero, div[class*="-section"][class*="-hero"]) [class*="glow"] { background: rgba(61,214,163,.16) !important; }
body.btk-legacy--own-hero #pxl-main header:has(h1):not(.bt-hero) {
	padding: clamp(1.75rem, 1rem + 3vw, 3rem) !important; border-radius: var(--radius-xl) !important; border: 0 !important;
	background:
		linear-gradient(rgba(169,195,188,.07) 1px, transparent 1px) 0 0 / 48px 48px,
		linear-gradient(90deg, rgba(169,195,188,.07) 1px, transparent 1px) 0 0 / 48px 48px,
		radial-gradient(70% 90% at 90% 10%, rgba(8,126,105,.4), transparent 65%),
		var(--bt-teal-900) !important;
	color: #fff !important;
}

/* Headline */
body.btk-legacy--own-hero #pxl-main :is(#btl-about-hero, #beatnik-sa-hero, header.bt-hero, div[class*="-section"][class*="-hero"], header:has(h1)) h1 { color: #fff !important; }
body.btk-legacy--own-hero #pxl-main :is(#btl-about-hero, #beatnik-sa-hero, header.bt-hero, div[class*="-section"][class*="-hero"], header:has(h1)) h1 :is(span, em, strong) { color: var(--bt-mint-400) !important; -webkit-text-fill-color: currentColor; background: none !important; }

/* Copy column: everything next to the H1 */
body.btk-legacy--own-hero #pxl-main :is(#btl-about-hero, #beatnik-sa-hero, header.bt-hero, div[class*="-section"][class*="-hero"]) :has(> h1) > :not(h1),
body.btk-legacy--own-hero #pxl-main :is(#btl-about-hero, #beatnik-sa-hero, header.bt-hero, div[class*="-section"][class*="-hero"]) :has(> h1) > :not(h1) :where(p, span, li, small, strong, b):not(a *),
body.btk-legacy--own-hero #pxl-main header:has(h1) :where(p, span, li, small, strong, b, dt, dd, div, time):not(a *) { color: var(--bt-grey-300) !important; }
/* Eyebrow = the element just before the H1 */
body.btk-legacy--own-hero #pxl-main :is(#btl-about-hero, #beatnik-sa-hero, header.bt-hero, div[class*="-section"][class*="-hero"], header:has(h1)) :has(+ h1),
body.btk-legacy--own-hero #pxl-main :is(#btl-about-hero, #beatnik-sa-hero, header.bt-hero, div[class*="-section"][class*="-hero"], header:has(h1)) :has(+ h1) * { color: var(--bt-mint-400) !important; }
/* An eyebrow drawn as a pill keeps its shape on the dark surface */
body.btk-legacy--own-hero #pxl-main :is(#btl-about-hero, #beatnik-sa-hero, header.bt-hero, div[class*="-section"][class*="-hero"], header:has(h1)) :is([class*="tag"], [class*="badge"], [class*="pill"]):has(+ h1),
body.btk-legacy--own-hero #pxl-main :is(#btl-about-hero, #beatnik-sa-hero, header.bt-hero, div[class*="-section"][class*="-hero"], header:has(h1)) :has(+ h1) :is([class*="tag"], [class*="badge"], [class*="pill"]) {
	background: rgba(61,214,163,.1) !important; border-color: rgba(61,214,163,.35) !important;
}
/* Content-specific fixes on the dark surface / AA on mint */
body.btk-legacy--own-hero .wd-demo-caption { color: var(--bt-grey-300) !important; }
body.btk-legacy :is(.sa-badge, .sa-check, .bm-phone:not(.second) .bm-phone-block) { color: var(--bt-green-700) !important; }
/* Tags / pills (non-link items in a row) */
body.btk-legacy--own-hero #pxl-main :is(#btl-about-hero, #beatnik-sa-hero, header.bt-hero, div[class*="-section"][class*="-hero"], header:has(h1)) :has(> h1) > div:not(:has(a)) > :is(span, li, div) {
	color: #fff !important; background: rgba(255,255,255,.05) !important; border-color: rgba(255,255,255,.22) !important;
}
/* Buttons: first = primary (green), others = ghost on dark */
body.btk-legacy--own-hero #pxl-main :is(#btl-about-hero, #beatnik-sa-hero, header.bt-hero, div[class*="-section"][class*="-hero"], header:has(h1)) :has(> h1) > div a:first-of-type,
body.btk-legacy--own-hero #pxl-main :is(#btl-about-hero, #beatnik-sa-hero, header.bt-hero, div[class*="-section"][class*="-hero"], header:has(h1)) :has(> h1) > a:first-of-type {
	background: var(--bt-green-600) !important; color: #fff !important; border-color: var(--bt-green-600) !important; border-radius: 999px !important;
}
body.btk-legacy--own-hero #pxl-main :is(#btl-about-hero, #beatnik-sa-hero, header.bt-hero, div[class*="-section"][class*="-hero"], header:has(h1)) :has(> h1) > div a:first-of-type:hover,
body.btk-legacy--own-hero #pxl-main :is(#btl-about-hero, #beatnik-sa-hero, header.bt-hero, div[class*="-section"][class*="-hero"], header:has(h1)) :has(> h1) > a:first-of-type:hover { background: var(--bt-green-700) !important; }
body.btk-legacy--own-hero #pxl-main :is(#btl-about-hero, #beatnik-sa-hero, header.bt-hero, div[class*="-section"][class*="-hero"], header:has(h1)) :has(> h1) > div a:not(:first-of-type),
body.btk-legacy--own-hero #pxl-main :is(#btl-about-hero, #beatnik-sa-hero, header.bt-hero, div[class*="-section"][class*="-hero"], header:has(h1)) :has(> h1) > a:not(:first-of-type) {
	background: transparent !important; color: #fff !important; border: 1px solid rgba(255,255,255,.32) !important; border-radius: 999px !important; padding: .7rem 1.25rem !important;
}
body.btk-legacy--own-hero #pxl-main :is(#btl-about-hero, #beatnik-sa-hero, header.bt-hero, div[class*="-section"][class*="-hero"], header:has(h1)) :has(> h1) > div a:not(:first-of-type):hover,
body.btk-legacy--own-hero #pxl-main :is(#btl-about-hero, #beatnik-sa-hero, header.bt-hero, div[class*="-section"][class*="-hero"], header:has(h1)) :has(> h1) > a:not(:first-of-type):hover { background: #fff !important; color: var(--bt-teal-900) !important; }
body.btk-legacy--own-hero #pxl-main :is(#btl-about-hero, #beatnik-sa-hero, header.bt-hero, div[class*="-section"][class*="-hero"], header:has(h1)) a :where(span, svg, i) { color: inherit !important; }
/* Links inside narrow title blocks */
body.btk-legacy--own-hero #pxl-main header:has(h1) a:not(:has(> *)) { color: var(--bt-mint-400) !important; }

@media (prefers-reduced-motion: reduce) { .btk-phero::after, .btk-phero__title { animation: none !important; } }

/* Beatnik illustrations replacing the old hero mock-ups (Elementor pages) */
.btk-elm-illus { width: 100%; max-width: 620px; margin-inline: auto; align-self: center; }

/* ==========================================================================
   One design language on Elementor / theme pages (top-level sections only; components keep their layouts)
   Root structure: .elementor-element > section#btl-… > .xx-section
   ========================================================================== */
body.btk-legacy #pxl-main .elementor-element > :is(section, div)[id] > [class*="-section"]:not([class*="-hero"]) {
	padding-top: clamp(3.5rem, 2rem + 5vw, 7rem) !important; padding-bottom: clamp(3.5rem, 2rem + 5vw, 7rem) !important;
}
/* Section headings: the global H2 scale (cards, panels and CTAs keep their own sizes) */
body.btk-legacy:not(.single-portfolio):not(.single-post) #pxl-main .elementor-element > :is(section, div)[id] > [class*="-section"]:not([class*="-hero"]) h2:not([class*="-section"] :is([class*="-card"], [class*="-item"], [class*="-box"], [class*="-tile"], [class*="-panel"], [class*="-cta"], aside, li) h2),
body.btk-legacy:not(.single-portfolio):not(.single-post) #pxl-main .elementor-widget-heading h2.elementor-heading-title {
	font-size: var(--fs-h2) !important; line-height: 1.1 !important; letter-spacing: -0.03em !important; font-weight: 700 !important;
}
body.btk-legacy #pxl-main .elementor-element > :is(section, div)[id] > [class*="-section"] h3 { font-weight: 700 !important; letter-spacing: -0.015em; }
/* Body copy rhythm */
body.btk-legacy #pxl-main .elementor-element > :is(section, div)[id] p { line-height: 1.65 !important; }
/* Eyebrows / kickers: the global label style */
body.btk-legacy #pxl-main .elementor-element > :is(section, div)[id] :is([class*="eyebrow"], [class*="kicker"], [class*="-super"], [class*="section-num"]):not(:has(*)) {
	font-family: var(--font-mono) !important; font-size: var(--fs-label) !important; letter-spacing: var(--ls-label) !important; text-transform: uppercase !important; font-weight: 500 !important;
}
/* Cards: one radius and border colour */
body.btk-legacy #pxl-main .elementor-element > :is(section, div)[id] [class*="-card"]:not([class*="-cards"]):not(a):not(span) { border-radius: var(--radius-lg) !important; }
body.btk-legacy #pxl-main .elementor-element > :is(section, div)[id] [class*="-card"]:not([class*="-cards"]) { border-color: var(--bt-border); }

/* Vintech theme widgets (testimonial slider, accordion, post grid, sidebar) */
body.btk-v2 .pxl-swiper-slide .pxl-item--inner { background: var(--bt-grey-50) !important; border-radius: var(--radius-lg) !important; }
body.btk-v2 .pxl-item--star { background: var(--bt-mint-100) !important; color: var(--bt-green-700) !important; }
body.btk-v2 .pxl-accordion--content { background: var(--bt-mint-100) !important; color: var(--bt-teal-900) !important; }
body.btk-v2 .pxl-post--category a { background: var(--bt-green-600) !important; color: #fff !important; border-radius: 999px !important; }
body.btk-v2 :is(.widget, .tag-cloud-link, .wp-block-tag-cloud a) { border-color: var(--bt-border) !important; }
body.btk-v2 :is(.tag-cloud-link, .wp-block-tag-cloud a):hover { background: var(--bt-green-600) !important; border-color: var(--bt-green-600) !important; color: #fff !important; }

/* Narrow article columns (case studies, blog posts): section headings use the H3 tier of the same scale */
body.btk-legacy:is(.single-portfolio, .single-post) #pxl-main :is(.elementor-widget-heading h2.elementor-heading-title, [class*="-section"] h2, article h2, .entry-content h2) {
	font-size: var(--fs-h3) !important; line-height: 1.2 !important; letter-spacing: -0.02em !important; font-weight: 700 !important;
}
/* Theme leftovers: borders, post meta and near-black text in Vintech widgets → palette */
body.btk-v2 :is(.pxl-post--inner, .pxl--item, .widget, input, select, textarea, th, td) { border-color: var(--bt-border) !important; }
body.btk-v2 :is(.post-date, .pxl-post--date, .pxl-item--meta) { color: var(--bt-grey-600) !important; }
body.btk-v2 :is(.pxl-post--content, .pxl-item--title.style-default, .pxl-empty) { color: var(--bt-grey-600) !important; }
/* Vintech heading widget: same scale and eyebrow as everywhere else */
body.btk-v2:not(.single-portfolio):not(.single-post) #pxl-main .pxl-heading h2.pxl-item--title { font-size: var(--fs-h2) !important; line-height: 1.1 !important; letter-spacing: -0.03em !important; font-weight: 700 !important; }
body.btk-v2:is(.single-portfolio, .single-post) #pxl-main .pxl-heading h2.pxl-item--title { font-size: var(--fs-h3) !important; line-height: 1.2 !important; font-weight: 700 !important; }
body.btk-v2 #pxl-main .pxl-heading :is(.pxl-item--subtitle, .pxl-heading--subtitle) { font-family: var(--font-mono) !important; font-size: var(--fs-label) !important; letter-spacing: var(--ls-label) !important; text-transform: uppercase !important; color: var(--bt-green-700) !important; }
