/*
Theme Name:   ThinkBuild Foundry
Theme URI:    https://thinkbuildfoundry.com/
Description:  "Lab" — a dark, technical child theme for Astra built around the ThinkBuild Foundry logo colors. Deep navy with a faint blueprint grid, precise line drawings, monospace labels and Maker Orange for every action. Includes a custom homepage template and full WooCommerce styling (dark shop, light high-contrast cart and checkout panels).
Author:       ThinkBuild Foundry LLC
Template:     astra
Version:      2.2.1
Requires at least: 6.3
Requires PHP: 7.4
License:      GPL-2.0-or-later
Text Domain:  thinkbuild-foundry
*/

/* =========================================================
   1. Tokens
   ========================================================= */
:root {
	--tb-bg:          #07182C;   /* page background */
	--tb-panel:       rgba(11,35,64,.55);
	--tb-panel-solid: #0B2340;
	--tb-line:        rgba(255,255,255,.10);
	--tb-line-strong: rgba(255,255,255,.22);
	--tb-grid:        rgba(255,255,255,.035);

	--tb-white:  #FFFFFF;
	--tb-head:   #FFFFFF;
	--tb-text:   #B9C6D6;
	--tb-muted:  #9FB3CB;
	--tb-soft:   #DCE4EE;

	--tb-navy:   #0B3560;        /* logo navy */
	--tb-blue:   #7CC4F5;        /* logo blue, lifted for dark backgrounds */
	--tb-blue-logo: #3497D8;
	--tb-orange: #F2820A;        /* logo orange — every action */
	--tb-orange-hover: #F69A35;
	--tb-orange-text: #F4A340;   /* orange for text on dark */
	--tb-green:  #6CC24A;        /* logo green, lifted */
	--tb-yellow: #F4C327;

	/* light surfaces (cart / checkout / account) */
	--tb-paper:  #F6F8FB;
	--tb-ink:    #0A1424;
	--tb-ink-2:  #4A5568;
	--tb-rule:   #DDE3EC;

	--tb-font-head: "Space Grotesk", system-ui, sans-serif;
	--tb-font-body: "Inter", system-ui, sans-serif;
	--tb-font-mono: "JetBrains Mono", ui-monospace, monospace;

	--tb-radius: 14px;
	--tb-max:    1280px;
}

/* =========================================================
   2. Base
   ========================================================= */
html { background: var(--tb-bg); }
body,
.ast-separate-container,
.ast-plain-container,
.ast-page-builder-template,
#page, .site-content {
	background-color: var(--tb-bg) !important;
	background-image:
		linear-gradient(var(--tb-grid) 1px, transparent 1px),
		linear-gradient(90deg, var(--tb-grid) 1px, transparent 1px);
	background-size: 48px 48px;
}
body, button, input, select, textarea {
	font-family: var(--tb-font-body);
	color: var(--tb-text);
}
body { font-size: 17px; line-height: 1.6; }

h1, h2, h3, h4, h5, h6,
.entry-title, .entry-title a, .site-title, .site-title a,
.woocommerce-loop-product__title {
	font-family: var(--tb-font-head);
	color: var(--tb-head);
	letter-spacing: -0.025em;
	line-height: 1.08;
	font-weight: 600;
}
a { color: var(--tb-blue); text-underline-offset: 3px; }
a:hover, a:focus { color: var(--tb-orange-text); }
::selection { background: var(--tb-orange); color: var(--tb-ink); }
:focus-visible { outline: 2px solid var(--tb-orange); outline-offset: 3px; border-radius: 4px; }
hr { border-color: var(--tb-line); }
code, kbd, pre, .tb-mono { font-family: var(--tb-font-mono); }

/* Monospace label, e.g. "// programs" */
.tb-label {
	font-family: var(--tb-font-mono); font-size: 13px; letter-spacing: .04em;
	color: var(--tb-blue); margin: 0 0 16px; display: block;
}

/* =========================================================
   3. Buttons
   ========================================================= */
.tb-btn,
.ast-button, .button, button.button,
.wp-block-button__link, .wp-element-button,
input[type="submit"],
.woocommerce a.button, .woocommerce button.button, .woocommerce input.button,
.woocommerce #respond input#submit,
.woocommerce a.button.alt, .woocommerce button.button.alt,
.wc-block-components-button:not(.is-link) {
	display: inline-flex; align-items: center; justify-content: center; gap: 10px;
	min-height: 48px; padding: 0 24px !important;
	font-family: var(--tb-font-body); font-weight: 600; font-size: 15px;
	text-transform: none; letter-spacing: 0; line-height: 1.2;
	background: var(--tb-orange) !important; color: var(--tb-ink) !important;
	border: 0 !important; border-radius: 8px !important;
	text-decoration: none; transition: background .15s ease;
}
.tb-btn:hover,
.ast-button:hover, .button:hover, button.button:hover,
.wp-block-button__link:hover, .wp-element-button:hover,
input[type="submit"]:hover,
.woocommerce a.button:hover, .woocommerce button.button:hover,
.woocommerce a.button.alt:hover, .woocommerce button.button.alt:hover,
.wc-block-components-button:not(.is-link):hover {
	background: var(--tb-orange-hover) !important; color: var(--tb-ink) !important;
}
.tb-btn--ghost {
	background: transparent !important; color: var(--tb-white) !important;
	border: 1px solid var(--tb-line-strong) !important;
}
.tb-btn--ghost:hover { background: transparent !important; color: #fff !important; border-color: #fff !important; }

/* =========================================================
   4. Header
   ========================================================= */
.ast-primary-header-bar, .main-header-bar,
.ast-mobile-header-wrap .ast-primary-header-bar,
.ast-above-header-bar, .ast-below-header-bar {
	background: rgba(7,24,44,.88) !important;
	backdrop-filter: blur(10px);
	border-bottom: 1px solid var(--tb-line) !important;
}
.site-title a, .ast-site-identity .site-title a { color: #fff !important; }
.main-header-menu .menu-link,
.ast-builder-menu .menu-item > .menu-link {
	font-family: var(--tb-font-body) !important; font-weight: 500; font-size: 15px;
	text-transform: none !important; letter-spacing: 0 !important;
	color: var(--tb-soft) !important;
}
.ast-builder-menu .menu-item:hover > .menu-link,
.ast-builder-menu .current-menu-item > .menu-link { color: #fff !important; }
.ast-builder-menu .current-menu-item > .menu-link { box-shadow: inset 0 -2px 0 var(--tb-orange); }
.main-header-menu .sub-menu, .ast-builder-menu .sub-menu {
	background: var(--tb-panel-solid) !important; border: 1px solid var(--tb-line) !important; border-radius: 10px;
}
.ast-mobile-popup-drawer .ast-mobile-popup-inner,
.ast-header-break-point .main-header-menu { background: var(--tb-bg) !important; }
.ast-mobile-menu-trigger-minimal, .menu-toggle { color: #fff !important; }
.ast-header-break-point .ast-mobile-menu-buttons-minimal.menu-toggle svg { fill: #fff !important; }

/* Header cart */
.ast-site-header-cart .ast-woo-header-cart-info-wrap,
.ast-site-header-cart .ast-addon-cart-wrap,
.ast-site-header-cart .ast-cart-menu-wrap,
.ast-site-header-cart .astra-icon { color: var(--tb-soft) !important; }
.ast-site-header-cart .ast-cart-menu-wrap .count,
.ast-site-header-cart i.astra-icon::after,
.astra-icon.astra-icon-shopping-cart::after {
	background: var(--tb-orange) !important; color: var(--tb-ink) !important;
}

/* =========================================================
   5. Content pages & posts
   ========================================================= */
.ast-separate-container .ast-article-single,
.ast-separate-container .ast-article-post,
.ast-separate-container .comments-area,
.ast-separate-container .ast-archive-description,
.ast-separate-container .ast-author-box,
.ast-separate-container .site-main > .ast-row,
.ast-separate-container .ast-woocommerce-container,
.ast-plain-container .site-main {
	background: transparent !important;
}
.ast-separate-container .ast-article-single,
.ast-separate-container .ast-article-post {
	border: 1px solid var(--tb-line); border-radius: var(--tb-radius);
	background: var(--tb-panel) !important;
}
.entry-content, .entry-content p, .entry-content li { color: var(--tb-text); }
.entry-content blockquote {
	border-left: 3px solid var(--tb-orange); background: var(--tb-panel);
	padding: 20px 24px; border-radius: 0 10px 10px 0; color: var(--tb-soft);
}
.entry-meta, .entry-meta a, .posted-on, .ast-blog-meta-container { color: var(--tb-muted) !important; font-family: var(--tb-font-mono); font-size: 13px; }
.ast-archive-description, .ast-single-entry-banner, .woocommerce-products-header {
	background: transparent !important; border-bottom: 1px solid var(--tb-line);
	padding: 64px 0 40px !important; margin-bottom: 40px;
}
.ast-archive-description *, .ast-single-entry-banner *, .woocommerce-products-header * { color: #fff !important; }
.ast-pagination a, .page-numbers {
	color: var(--tb-soft) !important; border: 1px solid var(--tb-line) !important; border-radius: 8px;
}
.page-numbers.current { background: var(--tb-orange) !important; color: var(--tb-ink) !important; border-color: var(--tb-orange) !important; }
.widget-title, .widget h2 { color: #fff !important; font-family: var(--tb-font-head); }
table, th, td { border-color: var(--tb-line) !important; }

/* =========================================================
   6. Footer
   ========================================================= */
.site-footer,
.site-primary-footer-wrap,
.site-above-footer-wrap,
.site-below-footer-wrap {
	background: var(--tb-bg) !important;
	color: var(--tb-muted) !important;
	border-top: 1px solid var(--tb-line) !important;
}
.site-below-footer-wrap { font-family: var(--tb-font-mono); font-size: 13px; }
.site-footer a { color: var(--tb-soft) !important; }
.site-footer a:hover { color: var(--tb-orange-text) !important; }
.site-footer .widget-title, .site-footer h2, .site-footer h3, .site-footer h4 { color: #fff !important; }
#ast-scroll-top { background: var(--tb-orange) !important; color: var(--tb-ink) !important; border-radius: 8px !important; }

/* =========================================================
   7. Forms (dark default — light pages override in woocommerce.css)
   ========================================================= */
input[type="text"], input[type="email"], input[type="tel"], input[type="url"],
input[type="password"], input[type="search"], input[type="number"], input[type="date"],
textarea, select {
	background: rgba(255,255,255,.04) !important; color: #fff !important;
	border: 1px solid var(--tb-line-strong) !important; border-radius: 8px !important;
	min-height: 48px; padding: .7em 1em;
}
input::placeholder, textarea::placeholder { color: var(--tb-muted); }
input:focus, textarea:focus, select:focus {
	border-color: var(--tb-blue) !important; box-shadow: 0 0 0 3px rgba(124,196,245,.2) !important; outline: none;
}
label { color: var(--tb-soft); font-weight: 500; }

/* =========================================================
   8. v1.1 fixes: footer heading sizes, logo legibility
   ========================================================= */
.site-footer h2, .site-footer .widget-title,
.site-footer .wp-block-heading.has-x-large-font-size,
.site-footer .wp-block-heading.has-large-font-size {
	font-size: 20px !important; line-height: 1.2 !important; margin-bottom: 16px !important;
}
.site-footer p, .site-footer li { color: var(--tb-muted); font-size: 15px; }

/* Logo display options (Customize → ThinkBuild Homepage → "Logo / header style")
   blue   = light blue header bar, logo in its original colours (default)
   circle = dark header, logo on a blue circle
   light  = white header bar, logo in its original colours
   filter = dark header, navy parts of the logo turned white
   dark   = dark navy header, logo untouched */
body.tb-logo-circle .custom-logo-link img.custom-logo,
body.tb-logo-circle .site-logo-img img {
	background: #B3D1EE; border-radius: 50%; padding: 12px; box-sizing: content-box;
	width: 58px !important; height: 58px !important; max-width: none !important; object-fit: contain;
	box-shadow: 0 0 0 3px rgba(124,196,245,.35);
}
@media (max-width: 921px) {
	body.tb-logo-circle .custom-logo-link img.custom-logo,
	body.tb-logo-circle .site-logo-img img { width: 44px !important; height: 44px !important; padding: 9px; }
}
body.tb-logo-light .custom-logo,
body.tb-logo-light .site-logo-img img { filter: url(#tb-logo-light); }

body.tb-header-light .ast-primary-header-bar,
body.tb-header-light .main-header-bar,
body.tb-header-light .ast-mobile-header-wrap .ast-primary-header-bar,
body.tb-header-light .ast-above-header-bar,
body.tb-header-light .ast-below-header-bar {
	background: #FFFFFF !important; backdrop-filter: none;
	border-bottom: 1px solid #DDE3EC !important;
}
body.tb-header-blue .ast-primary-header-bar,
body.tb-header-blue .main-header-bar,
body.tb-header-blue .ast-mobile-header-wrap .ast-primary-header-bar,
body.tb-header-blue .ast-above-header-bar,
body.tb-header-blue .ast-below-header-bar {
	background: #B3D1EE !important; border-bottom: 1px solid #8FB8DE !important;
}
body.tb-header-light .site-title a,
body.tb-header-light .ast-builder-menu .menu-item > .menu-link,
body.tb-header-light .main-header-menu > .menu-item > .menu-link { color: #0A1424 !important; }
body.tb-header-light .ast-builder-menu .menu-item:hover > .menu-link,
body.tb-header-light .ast-builder-menu .current-menu-item > .menu-link { color: #0B3560 !important; }
body.tb-header-light .ast-site-header-cart,
body.tb-header-light .ast-site-header-cart a,
body.tb-header-light .ast-site-header-cart .ast-woo-header-cart-info-wrap,
body.tb-header-light .ast-site-header-cart .ast-woo-header-cart-total,
body.tb-header-light .ast-site-header-cart .woocommerce-Price-amount,
body.tb-header-light .ast-site-header-cart .ast-cart-menu-wrap,
body.tb-header-light .ast-site-header-cart .astra-icon { color: #0A1424 !important; }
body.tb-header-light .ast-site-header-cart svg { fill: #0A1424 !important; }
body.tb-header-light .ast-site-header-cart .ast-cart-menu-wrap .count,
body.tb-header-light .ast-site-header-cart i.astra-icon::after { color: #0A1424 !important; background: var(--tb-orange) !important; }
body.tb-header-light .menu-toggle, body.tb-header-light .ast-mobile-menu-trigger-minimal { color: #0A1424 !important; }
body.tb-header-light .ast-header-break-point .ast-mobile-menu-buttons-minimal.menu-toggle svg,
body.tb-header-light .ast-mobile-menu-buttons svg { fill: #0A1424 !important; }

/* =========================================================
   9. Phone / tablet menu: always white text on navy (v1.5.4)
   ========================================================= */
body #ast-mobile-header .main-header-menu,
body .ast-mobile-popup-drawer .main-header-menu {
	background: var(--tb-bg) !important; border-top: 1px solid var(--tb-line);
	border-bottom: 1px solid var(--tb-line);
}
body #ast-mobile-header .ast-builder-menu .main-header-menu .menu-item > .menu-link,
body .ast-mobile-popup-drawer .ast-builder-menu .main-header-menu .menu-item > .menu-link {
	color: #FFFFFF !important; border-bottom: 1px solid var(--tb-line) !important;
	padding-top: 14px !important; padding-bottom: 14px !important; box-shadow: none !important;
}
body #ast-mobile-header .ast-builder-menu .main-header-menu .current-menu-item > .menu-link,
body .ast-mobile-popup-drawer .ast-builder-menu .main-header-menu .current-menu-item > .menu-link { color: var(--tb-orange-text) !important; }
body #ast-mobile-header .main-header-menu .ast-menu-toggle,
body .ast-mobile-popup-drawer .ast-menu-toggle { color: #FFFFFF !important; }
body #ast-mobile-header .main-header-menu .sub-menu,
body .ast-mobile-popup-drawer .main-header-menu .sub-menu { background: var(--tb-panel-solid) !important; }

/* =========================================================
   10. Slim white header (default, v1.8): ~73px instead of ~117px
   ========================================================= */
body.tb-header-slim .ast-primary-header-bar,
body.tb-header-slim .main-header-bar { padding-top: 6px !important; padding-bottom: 6px !important; }
body.tb-header-slim .site-primary-header-wrap { min-height: 0 !important; }
body.tb-header-slim .custom-logo-link img.custom-logo,
body.tb-header-slim .site-logo-img img {
	width: 60px !important; height: 60px !important; max-width: none !important;
	background: none !important; padding: 0 !important; border-radius: 0 !important; box-shadow: none !important; filter: none !important;
}
body.tb-header-slim #ast-desktop-header .main-header-menu > .menu-item,
body.tb-header-slim #ast-desktop-header .main-header-menu > .menu-item > .menu-link { line-height: 40px !important; transition: color .2s ease !important; }
body.tb-header-slim #ast-desktop-header .site-header-section > .ast-builder-layout-element,
body.tb-header-slim #ast-desktop-header .ast-site-header-cart,
body.tb-header-slim #ast-desktop-header .ast-site-header-cart a.cart-container { line-height: 40px !important; height: auto !important; min-height: 0 !important; }
body.tb-header-slim .ast-builder-menu .current-menu-item > .menu-link { box-shadow: inset 0 -2px 0 var(--tb-orange); }
@media (max-width: 921px) {
	body.tb-header-slim .custom-logo-link img.custom-logo,
	body.tb-header-slim .site-logo-img img { width: 50px !important; height: 50px !important; }
}
/* Keep the same gap below the (now thinner) header on Blog / About / Contact */
body.tb-header-slim.ast-theme-transparent-header .entry-content > .uagb-is-root-container:first-child { padding-top: 155px !important; }
@media (max-width: 921px) {
	body.tb-header-slim.ast-theme-transparent-header .entry-content > .uagb-is-root-container:first-child { padding-top: 130px !important; }
}

/* =========================================================
   11. Hanging logo tab (default, v1.9)
   Navy header, three-colour stripe, logo on a white tab with a blue left edge,
   orange right edge and green bottom edge (three faces of the cube).
   ========================================================= */
body.tb-header-tab #masthead,
body.tb-header-tab #ast-desktop-header,
body.tb-header-tab .ast-main-header-wrap { overflow: visible !important; }
body.tb-header-tab .ast-primary-header-bar,
body.tb-header-tab .main-header-bar {
	background: var(--tb-navy) !important; backdrop-filter: none !important;
	border-bottom: 0 !important; position: relative; overflow: visible !important;
}
body.tb-header-tab #ast-desktop-header .ast-primary-header-bar { padding: 10px 0 !important; }
body.tb-header-tab .ast-primary-header-bar::after {
	content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px;
	background: linear-gradient(90deg, #3497D8 0 33.33%, #46A52A 33.33% 66.66%, #F2820A 66.66% 100%);
}
body.tb-header-tab .site-primary-header-wrap { min-height: 0 !important; }

/* Menu + cart: white, compact line height */
body.tb-header-tab .ast-builder-menu .menu-item > .menu-link { color: #FFFFFF !important; }
body.tb-header-tab .ast-builder-menu .current-menu-item > .menu-link { color: #FFFFFF !important; box-shadow: inset 0 -2px 0 var(--tb-orange); }
body.tb-header-tab .ast-builder-menu .menu-item:hover > .menu-link { color: var(--tb-orange-text) !important; }
body.tb-header-tab .ast-site-header-cart,
body.tb-header-tab .ast-site-header-cart a,
body.tb-header-tab .ast-site-header-cart .ast-woo-header-cart-info-wrap,
body.tb-header-tab .ast-site-header-cart .woocommerce-Price-amount,
body.tb-header-tab .ast-site-header-cart .astra-icon { color: #FFFFFF !important; }
body.tb-header-tab .ast-site-header-cart svg { fill: #FFFFFF !important; }
body.tb-header-tab #ast-desktop-header .main-header-menu > .menu-item,
body.tb-header-tab #ast-desktop-header .main-header-menu > .menu-item > .menu-link { line-height: 40px !important; transition: color .2s ease !important; }
body.tb-header-tab #ast-desktop-header .site-header-section > .ast-builder-layout-element,
body.tb-header-tab #ast-desktop-header .ast-site-header-cart,
body.tb-header-tab #ast-desktop-header .ast-site-header-cart a.cart-container { line-height: 40px !important; height: auto !important; min-height: 0 !important; }
body.tb-header-tab .menu-toggle, body.tb-header-tab .ast-mobile-menu-trigger-minimal { color: #FFFFFF !important; }
body.tb-header-tab .ast-mobile-menu-buttons svg { fill: #FFFFFF !important; }

/* The tab */
body.tb-header-tab .custom-logo-link {
	display: block; position: relative; z-index: 20;
	background: #FFFFFF; padding: 12px 14px 14px;
	border-left: 6px solid #3497D8; border-right: 6px solid #F2820A; border-bottom: 6px solid #46A52A;
	border-radius: 0 0 16px 16px; box-shadow: 0 10px 24px rgba(0,0,0,.35);
}
body.tb-header-tab .custom-logo-link img.custom-logo {
	width: 96px !important; height: 96px !important; max-width: none !important; display: block;
	background: none !important; padding: 0 !important; border-radius: 0 !important; box-shadow: none !important; filter: none !important;
}
body.tb-header-tab #ast-desktop-header .site-header-primary-section-left,
body.tb-header-tab #ast-desktop-header .site-header-primary-section-left .ast-builder-layout-element,
body.tb-header-tab #ast-desktop-header .site-branding { align-self: flex-start !important; align-items: flex-start !important; }
body.tb-header-tab #ast-desktop-header .custom-logo-link { margin: -10px 0 -78px !important; }

/* Phones & tablets: tab sits inside the header (no overhang) so it never covers the menu */
@media (max-width: 921px) {
	/* Phones: white logo panel from the screen edge, full header height,
	   closed off on the right by a vertical blue-green-orange border */
	body.tb-header-tab #ast-mobile-header .ast-primary-header-bar { padding: 0 0 4px !important; }
	body.tb-header-tab #ast-mobile-header .site-primary-header-wrap { padding-left: 0 !important; padding-bottom: 0 !important; }
	body.tb-header-tab #ast-mobile-header .site-header-primary-section-left,
	body.tb-header-tab #ast-mobile-header .site-header-primary-section-left .ast-builder-layout-element,
	body.tb-header-tab #ast-mobile-header .site-branding { align-self: stretch !important; height: 100%; }
	body.tb-header-tab #ast-mobile-header .custom-logo-link {
		margin: 0 !important; height: 100%; display: flex !important; align-items: center;
		padding: 8px 14px 8px 16px !important; background: #FFFFFF !important;
		border: 0 !important; border-right: 5px solid transparent !important;
		border-image: linear-gradient(180deg, #3497D8 0 33.33%, #46A52A 33.33% 66.66%, #F2820A 66.66% 100%) 1 !important;
		border-radius: 0 !important; box-shadow: none !important;
	}
	body.tb-header-tab #ast-mobile-header .custom-logo-link img.custom-logo { width: 56px !important; height: 56px !important; }
	/* Stripe runs across the whole header, under the white panel too */
	body.tb-header-tab #ast-mobile-header .custom-logo-link { margin-bottom: -4px !important; padding-bottom: 12px !important; }
	body.tb-header-tab #ast-mobile-header .ast-primary-header-bar::after { z-index: 30 !important; height: 5px !important; }
}

/* Spacing below the header on Blog / About / Contact (header is ~64px, tab hangs below it) */
body.tb-header-tab.ast-theme-transparent-header .entry-content > .uagb-is-root-container:first-child { padding-top: 190px !important; }
@media (max-width: 921px) {
	body.tb-header-tab.ast-theme-transparent-header .entry-content > .uagb-is-root-container:first-child { padding-top: 140px !important; }
}
/* Courses / cart / checkout panels: leave room for the tab */
body.tb-header-tab .tb-shop-intro { padding-top: 72px; }
body.tb-header-tab.tb-dark-surface #primary,
body.tb-header-tab.tb-light-surface #primary { margin-top: 80px !important; }
@media (max-width: 921px) {
	body.tb-header-tab .tb-shop-intro { padding-top: 32px; }
	body.tb-header-tab.tb-dark-surface #primary,
	body.tb-header-tab.tb-light-surface #primary { margin-top: 24px !important; }
}
