/* ==========================================================================
   Boers & Yanks in Africa — theme styles
   Colors, fonts and sizes come from theme.json presets.
   ========================================================================== */

:root {
	--by-navy-950: var(--wp--preset--color--navy-950);
	--by-navy-900: var(--wp--preset--color--navy-900);
	--by-navy-800: var(--wp--preset--color--navy-800);
	--by-gold: var(--wp--preset--color--gold);
	--by-gold-light: var(--wp--preset--color--gold-light);
	--by-crimson: var(--wp--preset--color--crimson);
	--by-sand: var(--wp--preset--color--sand);
	--by-line: rgba(17, 30, 52, 0.1);
	--by-gold-line: rgba(212, 167, 60, 0.3);
	--by-shadow: 0 18px 40px -18px rgba(11, 21, 38, 0.35);
	--by-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
	--by-header-h: 84px;
	--by-oswald: var(--wp--preset--font-family--oswald);
	--by-playfair: var(--wp--preset--font-family--playfair);
	--by-script: var(--wp--preset--font-family--script);
	scroll-padding-top: calc(var(--by-header-h) + 12px);
}

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

*, *::before, *::after { box-sizing: border-box; }

body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }

/* Root blocks sit flush: sections set their own rhythm. */
.wp-site-blocks > *,
.by-main > * { margin-block: 0; }

::selection { background: var(--by-gold); color: var(--by-navy-950); }

:focus-visible { outline: 2px solid var(--by-gold); outline-offset: 3px; }

/* --------------------------------------------------------------------------
   Header
   ----------------------------------------------------------------------- */

.by-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: var(--by-navy-900);
	border-bottom: 1px solid var(--by-gold-line);
	transition: background-color 0.35s var(--by-ease), box-shadow 0.35s var(--by-ease), border-color 0.35s;
}

.admin-bar .by-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .by-header { top: 46px; } }

/* Home: header floats over the hero until the page scrolls. */
body:not(.editor-styles-wrapper) .by-header--overlay {
	position: fixed;
	left: 0;
	right: 0;
	background: linear-gradient(180deg, rgba(11, 21, 38, 0.75) 0%, rgba(11, 21, 38, 0) 100%);
	border-bottom-color: transparent;
}

body:not(.editor-styles-wrapper) .by-header--overlay.is-scrolled {
	background: rgba(17, 30, 52, 0.96);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	border-bottom-color: var(--by-gold-line);
	box-shadow: 0 10px 30px -15px rgba(0, 0, 0, 0.5);
}

.by-header__bar {
	min-height: var(--by-header-h);
	gap: 1.5rem;
	padding: 0.5rem clamp(1rem, 4vw, 2.5rem);
	color: #fff;
}

.by-brand { gap: 0.8rem; }

.by-brand__mark { margin: 0; flex-shrink: 0; }
.by-brand__mark img {
	display: block;
	width: 52px;
	height: 52px;
	border-radius: 50%;
	object-fit: cover;
	border: 2px solid var(--by-gold);
	box-shadow: 0 0 0 3px rgba(212, 167, 60, 0.18);
}

.by-brand__text { gap: 0; line-height: 1; }

.by-brand__name {
	margin: 0;
	font-family: var(--by-playfair);
	font-weight: 900;
	font-size: 1.3rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	line-height: 1;
	white-space: nowrap;
}

.by-brand__name,
.by-brand__name a {
	color: var(--by-gold);
	text-decoration: none;
	background: linear-gradient(120deg, #D4A73C 0%, #F0C75E 50%, #D4A73C 100%);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
}

.by-brand__sub {
	margin: 0.1rem 0 0;
	font-family: var(--by-script);
	font-weight: 700;
	font-size: 1.2rem;
	color: var(--by-gold-light);
	line-height: 1;
}

.by-header__right { gap: 2rem; }

.by-header .by-nav .wp-block-navigation-item__content {
	color: rgba(255, 255, 255, 0.85);
	padding: 0.4rem 0;
	position: relative;
	text-decoration: none;
	transition: color 0.2s;
}

.by-nav .wp-block-navigation-item__content::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 1px;
	background: var(--by-gold);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 0.3s var(--by-ease);
}

.by-header .by-nav .wp-block-navigation-item__content:hover,
.by-header .by-nav .wp-block-navigation-item__content:focus-visible { color: var(--by-gold-light); }
.by-nav .wp-block-navigation-item__content:hover::after { transform: scaleX(1); }

.by-nav .wp-block-navigation__container { gap: 1.9rem; }

.by-nav .wp-block-navigation__responsive-container-open,
.by-nav .wp-block-navigation__responsive-container-close { color: var(--by-gold); }

.by-nav .wp-block-navigation__responsive-container-open svg { width: 30px; height: 30px; }

/* Mobile menu overlay */
.by-nav .wp-block-navigation__responsive-container.is-menu-open {
	padding: 2rem clamp(1rem, 6vw, 3rem);
	background:
		radial-gradient(ellipse at top right, rgba(212, 167, 60, 0.15), transparent 60%),
		var(--by-navy-950) !important;
}

.by-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container { gap: 1.4rem; }

.by-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	font-family: var(--by-playfair);
	font-size: 1.9rem;
	text-transform: none;
	letter-spacing: 0;
	font-weight: 700;
	color: #fff;
}

.by-header__cta .wp-block-button__link {
	padding: 0.75em 1.4em;
	font-size: 0.8rem;
	white-space: nowrap;
}

@media (max-width: 1100px) {
	.by-header .by-header__cta { display: none; }
}

@media (max-width: 600px) {
	:root { --by-header-h: 70px; }
	.by-brand__mark img { width: 44px; height: 44px; }
	.by-brand__name { font-size: 1.05rem; }
	.by-brand__sub { font-size: 1.05rem; }
}

/* --------------------------------------------------------------------------
   Shared building blocks
   ----------------------------------------------------------------------- */

.by-section {
	padding-top: var(--wp--preset--spacing--70);
	padding-bottom: var(--wp--preset--spacing--70);
}

.by-section__head { margin-bottom: var(--wp--preset--spacing--60); }
.by-section__head > * + * { margin-top: 1rem; }

.is-style-by-eyebrow {
	font-family: var(--by-oswald);
	font-size: 0.8rem !important;
	font-weight: 600;
	letter-spacing: 0.32em;
	text-transform: uppercase;
	color: var(--by-crimson);
	display: flex;
	align-items: center;
	gap: 0.8rem;
	margin-bottom: 0.6rem;
}

.is-style-by-eyebrow::before {
	content: "";
	width: 2.25rem;
	height: 1px;
	background: currentColor;
}

.is-style-by-eyebrow.has-text-align-center { justify-content: center; }
.is-style-by-eyebrow.has-text-align-center::after {
	content: "";
	width: 2.25rem;
	height: 1px;
	background: currentColor;
}

.has-navy-900-background-color .is-style-by-eyebrow,
.has-navy-950-background-color .is-style-by-eyebrow,
.wp-block-cover .is-style-by-eyebrow,
.by-page-hero .is-style-by-eyebrow,
.by-page-hero .is-style-by-eyebrow a { color: var(--by-gold); }

.is-style-by-eyebrow a { text-decoration: none; }

.by-lead {
	font-size: var(--wp--preset--font-size--large);
	line-height: 1.6;
	color: var(--by-navy-800);
}

.has-white-color .by-lead { color: rgba(255, 255, 255, 0.85); }

.has-white-color :where(h1, h2, h3, h4, h5, h6),
.wp-block-cover :where(h1, h2, h3, h4) { color: #fff; }

/* Buttons */
.wp-block-button__link {
	transition: background-color 0.25s, color 0.25s, transform 0.25s var(--by-ease), box-shadow 0.25s;
	box-shadow: 0 10px 24px -12px rgba(212, 167, 60, 0.7);
}

.wp-block-button__link:hover { transform: translateY(-2px); }

.is-style-by-ghost .wp-block-button__link {
	background: transparent;
	color: #fff;
	border: 1px solid rgba(255, 255, 255, 0.55);
	box-shadow: none;
}

.is-style-by-ghost .wp-block-button__link:hover {
	background: rgba(255, 255, 255, 0.08);
	border-color: var(--by-gold);
	color: var(--by-gold-light);
}

:where(.by-section:not(.has-background), .by-section--parchment) .is-style-by-ghost .wp-block-button__link {
	color: var(--by-navy-900);
	border-color: var(--by-navy-900);
}

/* Gold check list */
.is-style-by-checks {
	list-style: none;
	padding-left: 0;
	margin: 1.25rem 0;
}

.is-style-by-checks li {
	position: relative;
	padding-left: 2rem;
	margin-bottom: 0.75rem;
	line-height: 1.55;
}

.is-style-by-checks li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.2em;
	width: 1.15rem;
	height: 1.15rem;
	border-radius: 50%;
	background: var(--by-gold);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M10 0a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm4.7 7.2-5.5 5.9a1 1 0 0 1-1.4 0L5.3 10.6a1 1 0 1 1 1.4-1.4l1.8 1.8 4.8-5.2a1 1 0 1 1 1.4 1.4Z'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M10 0a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm4.7 7.2-5.5 5.9a1 1 0 0 1-1.4 0L5.3 10.6a1 1 0 1 1 1.4-1.4l1.8 1.8 4.8-5.2a1 1 0 1 1 1.4 1.4Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Cards */
.is-style-by-card {
	background: #fff;
	border: 1px solid var(--by-line);
	border-radius: 4px;
	padding: clamp(1.5rem, 3vw, 2.25rem);
	box-shadow: 0 1px 0 rgba(17, 30, 52, 0.04);
}

.is-style-by-card-dark {
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015));
	border: 1px solid var(--by-gold-line);
	border-radius: 4px;
	padding: clamp(1.75rem, 3vw, 2.5rem);
}

/* Scroll reveal (only when JS has opted in) */
.by-js-reveal .by-reveal > * {
	opacity: 0;
	transform: translateY(28px);
	transition: opacity 0.9s var(--by-ease), transform 0.9s var(--by-ease);
}

.by-js-reveal .by-reveal.is-visible > * {
	opacity: 1;
	transform: none;
}

.by-js-reveal .by-reveal.is-visible > *:nth-child(2) { transition-delay: 0.12s; }
.by-js-reveal .by-reveal.is-visible > *:nth-child(3) { transition-delay: 0.24s; }

/* --------------------------------------------------------------------------
   Hero
   ----------------------------------------------------------------------- */

.by-hero {
	padding: 0 !important;
	overflow: hidden;
	background: var(--by-navy-950);
}

/* The artwork is 3:2 with its own lettering; never crop it vertically on
   wide screens, or that lettering collides with the tagline. */
@media (min-width: 782px) {
	.by-hero { min-height: max(100vh, 66.67vw) !important; }
}

.by-hero .wp-block-cover__image-background {
	transform: scale(1.04);
	animation: by-kenburns 18s var(--by-ease) both;
}

.by-hero .by-hero__slide {
	opacity: 0;
	transition: opacity 1.4s ease;
}

.by-hero .by-hero__slide.is-active { opacity: 1; }

@keyframes by-kenburns {
	from { transform: scale(1.1); }
	to { transform: scale(1.02); }
}

@media (prefers-reduced-motion: reduce) {
	.by-hero .wp-block-cover__image-background { animation: none; }
}

.by-hero .wp-block-cover__background {
	opacity: 1 !important;
	z-index: 1;
	background:
		linear-gradient(180deg, rgba(17, 30, 52, 0.55) 0%, rgba(17, 30, 52, 0) 28%, rgba(17, 30, 52, 0) 68%, rgba(11, 21, 38, 0.8) 84%, rgba(11, 21, 38, 0.97) 100%) !important;
}

.by-hero .wp-block-cover__inner-container {
	z-index: 2;
	padding: 0 clamp(1rem, 4vw, 2.5rem) 3.75rem;
}

.by-hero__tagline {
	font-family: var(--by-oswald);
	font-weight: 500;
	font-size: clamp(0.85rem, 1.6vw, 1.15rem);
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--by-gold-light);
	text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
	margin-bottom: 1.4rem;
}

@media (min-width: 782px) {
	.by-hero__tagline { white-space: nowrap; font-size: clamp(0.8rem, 1.1vw, 1rem); }
}

.by-hero__tagline span { color: rgba(255, 255, 255, 0.45); margin: 0 0.6em; }

.by-hero__actions { gap: 1rem; }

.by-hero__dots {
	position: absolute;
	z-index: 3;
	left: 50%;
	bottom: 1.6rem;
	transform: translateX(-50%);
	display: flex;
	gap: 0.5rem;
}

.by-hero__dots button {
	width: 8px;
	height: 8px;
	padding: 0;
	border: 0;
	border-radius: 4px;
	background: rgba(212, 167, 60, 0.4);
	cursor: pointer;
	transition: width 0.35s var(--by-ease), background-color 0.35s;
}

.by-hero__dots button.is-active { width: 26px; background: var(--by-gold); }

/* Phones: show the whole artwork, then the actions underneath it. */
@media (max-width: 781px) {
	.by-hero { min-height: 0 !important; display: block; }
	.by-hero .wp-block-cover__image-background,
	.by-hero .wp-block-cover__background {
		position: absolute;
		top: var(--by-header-h);
		bottom: auto;
		height: calc(100vw * 2 / 3);
	}
	.by-hero .wp-block-cover__background {
		background: linear-gradient(180deg, transparent 70%, var(--by-navy-950) 100%) !important;
	}
	.by-hero .wp-block-cover__inner-container {
		padding-top: calc(var(--by-header-h) + 100vw * 2 / 3 + 1.25rem);
		padding-bottom: 3.5rem;
	}
	.by-hero__tagline { letter-spacing: 0.16em; line-height: 2; }
	.by-hero__tagline span { margin: 0 0.3em; }
	.by-hero__actions .wp-block-button { flex: 1 1 100%; }
	.by-hero__actions .wp-block-button__link { width: 100%; }
	.by-hero__dots { bottom: auto; top: calc(var(--by-header-h) + 100vw * 2 / 3 - 1.5rem); }
}

/* --------------------------------------------------------------------------
   Pillars
   ----------------------------------------------------------------------- */

.by-pillars {
	padding-top: var(--wp--preset--spacing--60);
	padding-bottom: var(--wp--preset--spacing--60);
	border-top: 1px solid var(--by-gold-line);
	position: relative;
}

.by-pillars__grid { gap: 0 !important; }

.by-pillar {
	padding: 0.5rem clamp(1.25rem, 3vw, 2.75rem);
	position: relative;
}

.by-pillar + .by-pillar { border-left: 1px solid var(--by-gold-line); }

.by-pillar > * { margin: 0; }
.by-pillar > * + * { margin-top: 0.6rem; }

.by-pillar__num {
	font-family: var(--by-oswald);
	font-size: 0.85rem;
	letter-spacing: 0.3em;
	color: var(--by-gold);
}

.by-pillar__title {
	font-size: clamp(1.4rem, 2.3vw, 1.75rem);
	color: #fff;
}

.by-pillar p:last-child { color: rgba(255, 255, 255, 0.7); }

@media (max-width: 781px) {
	.by-pillar { padding: 1.5rem 0; }
	.by-pillar + .by-pillar { border-left: 0; border-top: 1px solid var(--by-gold-line); }
}

/* --------------------------------------------------------------------------
   Who we are
   ----------------------------------------------------------------------- */

.by-about { gap: clamp(2rem, 6vw, 5.5rem); }

.by-motto {
	font-family: var(--by-playfair);
	font-style: italic;
	font-size: var(--wp--preset--font-size--large);
	color: var(--by-navy-900);
	border-left: 3px solid var(--by-gold);
	padding: 0.25rem 0 0.25rem 1.25rem;
	margin-top: 2rem;
}

.by-frame {
	position: relative;
	isolation: isolate;
	margin: 1rem 1rem 1rem 0;
}

.by-frame::before {
	content: "";
	position: absolute;
	inset: 1.1rem -1.1rem -1.1rem 1.1rem;
	border: 2px solid var(--by-gold);
	z-index: -1;
}

.by-frame img {
	display: block;
	width: 100%;
	height: auto;
	box-shadow: var(--by-shadow);
}

/* --------------------------------------------------------------------------
   What we do / sectors
   ----------------------------------------------------------------------- */

.by-section--parchment {
	background-image:
		radial-gradient(ellipse at 10% 0%, rgba(212, 167, 60, 0.12), transparent 50%),
		radial-gradient(ellipse at 90% 100%, rgba(168, 52, 42, 0.06), transparent 50%);
}

.by-sectors { gap: 1.25rem; }

.by-sector {
	position: relative;
	overflow: hidden;
	transition: transform 0.35s var(--by-ease), box-shadow 0.35s var(--by-ease);
}

.by-sector::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 3px;
	background: linear-gradient(90deg, var(--by-gold), var(--by-gold-light));
	transform: scaleX(0.25);
	transform-origin: left;
	transition: transform 0.45s var(--by-ease);
}

.by-sector:hover { transform: translateY(-5px); box-shadow: var(--by-shadow); }
.by-sector:hover::before { transform: scaleX(1); }

.by-sector > * { margin: 0; }
.by-sector > * + * { margin-top: 0.7rem; }

.by-sector__num {
	font-family: var(--by-playfair);
	font-weight: 900;
	font-size: 2.6rem;
	line-height: 1;
	color: transparent;
	-webkit-text-stroke: 1px var(--by-gold);
}

.by-sector__title { font-size: 1.3rem; }

.by-sector p:last-child { font-size: 0.95rem; color: #4a4f5c; }

.by-statement {
	margin-top: var(--wp--preset--spacing--60) !important;
	padding: clamp(2.5rem, 5vw, 4rem) clamp(1.5rem, 5vw, 4rem) !important;
	position: relative;
	border-radius: 4px;
	background-image: radial-gradient(ellipse at 50% 0%, rgba(212, 167, 60, 0.18), transparent 65%);
}

.by-statement::before {
	content: "";
	position: absolute;
	inset: 10px;
	border: 1px solid var(--by-gold-line);
	pointer-events: none;
}

.by-statement__big {
	font-family: var(--by-playfair);
	font-weight: 800;
	font-size: var(--wp--preset--font-size--x-large);
	line-height: 1.25;
	color: var(--by-gold-light);
	margin: 0;
}

.by-statement__small {
	font-size: var(--wp--preset--font-size--large);
	color: rgba(255, 255, 255, 0.82);
	margin-top: 0.75rem;
}

/* --------------------------------------------------------------------------
   Why it works
   ----------------------------------------------------------------------- */

.by-section--dark {
	background-image:
		radial-gradient(ellipse at 15% 10%, rgba(212, 167, 60, 0.1), transparent 45%),
		radial-gradient(ellipse at 85% 90%, rgba(168, 52, 42, 0.12), transparent 45%);
}

.by-formula {
	font-family: var(--by-oswald);
	font-weight: 500;
	font-size: clamp(0.85rem, 1.6vw, 1.05rem);
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.8);
}

.by-formula span {
	color: var(--by-gold);
	font-weight: 700;
	margin: 0 0.55em;
}

.by-advantages { gap: 1.5rem; }

.by-advantage {
	display: flex;
	flex-direction: column;
	transition: border-color 0.3s, transform 0.35s var(--by-ease);
}

.by-advantage:hover { border-color: var(--by-gold); transform: translateY(-4px); }

.by-advantage > * { margin: 0; }
.by-advantage h3 { margin-top: 0.4rem; font-size: 1.6rem; }

.by-advantage__sub {
	font-family: var(--by-oswald);
	font-size: 0.78rem;
	letter-spacing: 0.25em;
	text-transform: uppercase;
	color: var(--by-gold);
}

.by-advantage .is-style-by-checks { margin: 1.5rem 0; color: rgba(255, 255, 255, 0.82); font-size: 0.95rem; }

.by-advantage__body {
	margin-top: auto !important;
	padding-top: 1.25rem;
	border-top: 1px solid var(--by-gold-line);
	font-family: var(--by-playfair);
	font-style: italic;
	font-size: 1.05rem;
	line-height: 1.55;
	color: var(--by-gold-light);
}

/* --------------------------------------------------------------------------
   Commitment
   ----------------------------------------------------------------------- */

.by-commitment { gap: clamp(2rem, 6vw, 5rem); }

.by-commitment__list li {
	font-size: 1.08rem;
	padding-bottom: 0.75rem;
	border-bottom: 1px solid var(--by-line);
}

.by-pledge {
	padding: clamp(2.25rem, 4vw, 3.5rem) !important;
	position: relative;
	border-radius: 4px;
	box-shadow: var(--by-shadow);
	background-image: radial-gradient(ellipse at 100% 0%, rgba(212, 167, 60, 0.2), transparent 60%);
}

.by-pledge::after {
	content: "";
	position: absolute;
	right: 0;
	bottom: 0;
	width: 40%;
	height: 4px;
	background: linear-gradient(90deg, transparent, var(--by-gold));
}

.by-pledge__mark {
	font-size: 2.5rem;
	line-height: 1;
	color: var(--by-gold);
	margin: 0 0 1rem;
}

.by-pledge__text {
	font-family: var(--by-playfair);
	font-weight: 700;
	font-size: clamp(1.5rem, 2.6vw, 2.1rem);
	line-height: 1.3;
	margin: 0;
}

.by-pledge__text em { display: block; margin-top: 0.6rem; color: var(--by-gold-light); }

/* --------------------------------------------------------------------------
   Purpose
   ----------------------------------------------------------------------- */

.by-purpose .wp-block-cover__image-background { object-position: 50% 100%; filter: saturate(0.85); }

.by-purpose {
	padding-top: var(--wp--preset--spacing--70) !important;
	padding-bottom: var(--wp--preset--spacing--70) !important;
}

.by-purpose__text {
	font-family: var(--by-playfair);
	font-style: italic;
	font-weight: 500;
	font-size: clamp(1.45rem, 3vw, 2.3rem);
	line-height: 1.45;
	color: #fff;
}

.by-fleuron {
	color: var(--by-gold);
	letter-spacing: 0.6em;
	font-size: 1.1rem;
}

/* --------------------------------------------------------------------------
   Contact
   ----------------------------------------------------------------------- */

.by-contact { gap: clamp(2rem, 5vw, 4.5rem); }

.by-sides { gap: 1rem; margin-top: 2rem; }

.by-side {
	border-left: 3px solid var(--by-gold);
	padding: 0.25rem 0 0.25rem 1rem;
}

.by-side > * { margin: 0; }
.by-side p:last-child { font-size: 0.93rem; color: #4a4f5c; margin-top: 0.3rem; }

.by-side__label {
	font-family: var(--by-oswald);
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	font-size: 0.85rem;
	color: var(--by-navy-900);
}

@media (max-width: 480px) {
	.by-sides { grid-template-columns: 1fr !important; }
}

.by-wa-card {
	margin-top: 2rem !important;
	padding: 2rem !important;
	border-radius: 4px;
	position: relative;
	overflow: hidden;
}

.by-wa-card::before {
	content: "";
	position: absolute;
	top: -60px;
	right: -60px;
	width: 180px;
	height: 180px;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(37, 211, 102, 0.22), transparent 70%);
}

.by-wa-card > * { margin-top: 0; margin-bottom: 0; position: relative; }
.by-wa-card > * + * { margin-top: 0.75rem; }
.by-wa-card p { color: rgba(255, 255, 255, 0.8); }

.by-wa-card__title {
	font-family: var(--by-playfair);
	font-weight: 800;
	font-size: 1.5rem;
	color: #fff !important;
}

.by-wa-card .wp-block-buttons { margin-top: 1.25rem; }

.by-wa-card__direct { font-size: 0.9rem; }
.by-wa-card__direct a, .by-footer .by-wa-link { color: var(--by-gold-light); text-decoration: none; }
.by-wa-card__direct a:hover, .by-footer .by-wa-link:hover { text-decoration: underline; }

.by-wa-button .wp-block-button__link,
a.by-wa-button {
	background: #25D366;
	color: #0B1526;
	box-shadow: 0 10px 24px -12px rgba(37, 211, 102, 0.8);
}

.by-wa-button .wp-block-button__link:hover,
a.by-wa-button:hover { background: #4be083; color: #0B1526; }

.by-form-card {
	box-shadow: var(--by-shadow);
	border-top: 4px solid var(--by-gold);
}

.by-form-card > h3 { margin-top: 0; font-size: 1.6rem; }

/* Form */
.by-form { margin-top: 1.25rem; }

.by-form__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1rem 1.25rem;
}

@media (max-width: 600px) {
	.by-form__grid { grid-template-columns: 1fr; }
}

.by-field { display: flex; flex-direction: column; gap: 0.4rem; }
.by-field--full { grid-column: 1 / -1; }

.by-field > span {
	font-family: var(--by-oswald);
	font-size: 0.75rem;
	font-weight: 500;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--by-navy-800);
}

.by-field input,
.by-field select,
.by-field textarea {
	width: 100%;
	font: inherit;
	font-size: 1rem;
	color: var(--wp--preset--color--ink);
	background: #FFFDF8;
	border: 1px solid #D9CFB6;
	border-radius: 3px;
	padding: 0.8rem 0.9rem;
	transition: border-color 0.2s, box-shadow 0.2s;
}

.by-field textarea { resize: vertical; min-height: 130px; }

.by-field input:focus,
.by-field select:focus,
.by-field textarea:focus {
	outline: none;
	border-color: var(--by-gold);
	box-shadow: 0 0 0 3px rgba(212, 167, 60, 0.25);
}

.by-form__submit {
	margin-top: 1.5rem;
	width: 100%;
	cursor: pointer;
	border: 0;
}

.by-form__fineprint { font-size: 0.8rem; color: #6b7080; margin: 0.9rem 0 0; text-align: center; }

.by-hp, .byq-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

.by-form-notice {
	border-radius: 3px;
	padding: 1.25rem 1.5rem;
	margin-top: 1rem;
}

.by-form-notice--ok { background: #F1F8F2; border: 1px solid #b9dcc0; }
.by-form-notice--ok strong { font-family: var(--by-playfair); font-size: 1.25rem; color: var(--by-navy-900); }
.by-form-notice--ok .by-wa-button {
	display: inline-flex;
	text-decoration: none;
	margin-top: 0.25rem;
	font-family: var(--by-oswald);
	letter-spacing: 0.12em;
	text-transform: uppercase;
	padding: 0.9em 1.6em;
	border-radius: 2px;
	font-size: 0.9rem;
}

.by-form-notice--error { background: #FBEDEC; border: 1px solid #e8b9b4; color: var(--by-crimson); }

/* --------------------------------------------------------------------------
   Inner pages & blog
   ----------------------------------------------------------------------- */

.by-page-hero {
	padding-top: var(--wp--preset--spacing--70);
	padding-bottom: var(--wp--preset--spacing--60);
	background-image: radial-gradient(ellipse at 50% 0%, rgba(212, 167, 60, 0.18), transparent 60%);
	border-bottom: 3px solid var(--by-gold);
}

.by-page-hero h1 { color: #fff; }
.by-page-hero > * + * { margin-top: 0.75rem; }

.by-meta {
	font-family: var(--by-oswald);
	font-size: 0.8rem;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: #8a8f9c;
}

.by-page-hero .by-meta { color: rgba(255, 255, 255, 0.65); }

.by-content {
	padding-top: var(--wp--preset--spacing--60);
	padding-bottom: var(--wp--preset--spacing--70);
}

.by-featured { margin-top: calc(-1 * var(--wp--preset--spacing--40)) !important; }
.by-featured img { box-shadow: var(--by-shadow); }

.by-post-nav {
	max-width: var(--wp--style--global--content-size);
	margin: 0 auto var(--wp--preset--spacing--60) !important;
	padding: 1.5rem clamp(1rem, 4vw, 2.5rem) 0;
	border-top: 1px solid var(--by-line);
}

.by-posts { gap: 1.5rem; }

.by-post-card { padding: 0 0 1.75rem !important; overflow: hidden; height: 100%; transition: transform 0.3s var(--by-ease), box-shadow 0.3s; }
.by-post-card:hover { transform: translateY(-4px); box-shadow: var(--by-shadow); }
.by-post-card > *:not(.wp-block-post-featured-image) { padding-left: 1.5rem; padding-right: 1.5rem; }
.by-post-card .wp-block-post-featured-image { margin: 0 0 1.25rem; }
.by-post-card .wp-block-post-title { font-size: 1.35rem; margin-top: 0.4rem; }
.by-post-card .wp-block-post-title a { color: var(--by-navy-900); text-decoration: none; }
.by-post-card .wp-block-post-title a:hover { color: var(--by-crimson); }

@media (max-width: 900px) {
	.by-posts.is-layout-grid { grid-template-columns: 1fr !important; }
}

.wp-block-query-pagination { margin-top: var(--wp--preset--spacing--50); font-family: var(--by-oswald); letter-spacing: 0.1em; }

.by-404 { min-height: 60vh; display: flex; flex-direction: column; justify-content: center; }
.by-404 .wp-block-buttons { margin-top: 2rem; }

/* --------------------------------------------------------------------------
   Footer
   ----------------------------------------------------------------------- */

.by-footer {
	padding-top: var(--wp--preset--spacing--70);
	padding-bottom: 1.5rem;
	border-top: 3px solid var(--by-gold);
	background-image: radial-gradient(ellipse at 0% 0%, rgba(212, 167, 60, 0.08), transparent 50%);
}

.by-footer__cols { gap: clamp(2rem, 5vw, 4rem); }

.by-footer p { color: rgba(255, 255, 255, 0.72); }

.by-footer__tagline {
	font-family: var(--by-script);
	font-size: 1.6rem;
	color: var(--by-gold-light) !important;
	margin-top: 1.25rem;
	margin-bottom: 0;
}

.by-footer__motto {
	font-family: var(--by-oswald);
	letter-spacing: 0.3em;
	text-transform: uppercase;
	font-size: 0.8rem;
	margin-top: 0.4rem;
}

.by-footer__heading {
	font-family: var(--by-oswald);
	font-weight: 600;
	font-size: 0.85rem !important;
	letter-spacing: 0.25em;
	text-transform: uppercase;
	color: var(--by-gold) !important;
	margin-bottom: 1.25rem;
}

.by-footer__links { list-style: none; padding: 0; margin: 0; }
.by-footer__links li + li { margin-top: 0.6rem; }
.by-footer__links a { color: rgba(255, 255, 255, 0.78); text-decoration: none; transition: color 0.2s, padding 0.2s; }
.by-footer__links a:hover { color: var(--by-gold-light); padding-left: 4px; }

.by-footer__bottom {
	margin-top: var(--wp--preset--spacing--60) !important;
	padding-top: 1.5rem;
	border-top: 1px solid rgba(255, 255, 255, 0.1);
	gap: 0.5rem 2rem;
}

.by-footer__bottom p { margin: 0; font-size: 0.82rem; color: rgba(255, 255, 255, 0.5); }

/* --------------------------------------------------------------------------
   Lead-qualifier chat widget
   ----------------------------------------------------------------------- */

.byq { font-family: var(--wp--preset--font-family--inter); }

.byq-launch {
	position: fixed;
	right: 1.5rem;
	bottom: 1.5rem;
	z-index: 1000;
	width: 64px;
	height: 64px;
	border: 0;
	border-radius: 50%;
	background: #25D366;
	color: #fff;
	display: grid;
	place-items: center;
	cursor: pointer;
	box-shadow: 0 14px 30px -10px rgba(0, 0, 0, 0.45);
	transition: transform 0.3s var(--by-ease), opacity 0.3s;
}

.byq-launch::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 50%;
	border: 2px solid #25D366;
	animation: byq-pulse 2.4s ease-out infinite;
}

@keyframes byq-pulse {
	from { transform: scale(1); opacity: 0.7; }
	to { transform: scale(1.6); opacity: 0; }
}

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

.byq-launch:hover { transform: scale(1.08); }

.byq-badge {
	position: absolute;
	top: -2px;
	right: -2px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: var(--by-crimson);
	color: #fff;
	font-size: 10px;
	font-weight: 700;
	display: grid;
	place-items: center;
}

.byq.is-open .byq-launch { opacity: 0; transform: scale(0.7); pointer-events: none; }

.byq-panel {
	position: fixed;
	right: 1.5rem;
	bottom: 1.5rem;
	z-index: 1001;
	width: 380px;
	max-width: calc(100vw - 24px);
	height: 600px;
	max-height: calc(100vh - 48px);
	display: flex;
	flex-direction: column;
	background: var(--by-sand);
	border-radius: 10px;
	overflow: hidden;
	box-shadow: 0 30px 70px -20px rgba(0, 0, 0, 0.55);
	opacity: 0;
	transform: translateY(24px) scale(0.98);
	pointer-events: none;
	visibility: hidden;
	transition: opacity 0.3s var(--by-ease), transform 0.3s var(--by-ease), visibility 0s 0.3s;
}

.byq.is-open .byq-panel {
	opacity: 1;
	transform: none;
	pointer-events: auto;
	visibility: visible;
	transition: opacity 0.3s var(--by-ease), transform 0.3s var(--by-ease);
}

@media (max-width: 480px) {
	.byq-panel { right: 12px; bottom: 12px; height: calc(100vh - 24px); }
	.byq-launch { right: 1rem; bottom: 1rem; }
}

.byq-head {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.9rem 1rem;
	background: var(--by-navy-900);
	border-bottom: 1px solid var(--by-gold-line);
	color: #fff;
}

.byq-head img { width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--by-gold); object-fit: cover; }

.byq-titles { flex: 1; display: flex; flex-direction: column; line-height: 1.25; }
.byq-titles strong { font-family: var(--by-playfair); font-size: 1rem; }
.byq-titles span { font-size: 0.75rem; color: #8fe3ad; }
.byq-titles span::before { content: "● "; font-size: 0.6rem; vertical-align: 1px; }

.byq-close {
	background: none;
	border: 0;
	color: rgba(255, 255, 255, 0.7);
	font-size: 1.75rem;
	line-height: 1;
	cursor: pointer;
	padding: 0.25rem 0.5rem;
}

.byq-close:hover { color: var(--by-gold-light); }

.byq-progress { height: 3px; background: rgba(17, 30, 52, 0.12); }
.byq-bar { height: 100%; width: 0; background: linear-gradient(90deg, var(--by-gold), var(--by-gold-light)); transition: width 0.5s var(--by-ease); }

.byq-log {
	flex: 1;
	overflow-y: auto;
	padding: 1.1rem 1rem;
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
	background:
		radial-gradient(ellipse at top, rgba(212, 167, 60, 0.08), transparent 60%),
		var(--by-sand);
}

.byq-msg {
	max-width: 86%;
	padding: 0.65rem 0.9rem;
	border-radius: 10px;
	font-size: 0.9rem;
	line-height: 1.5;
	white-space: pre-line;
	animation: byq-in 0.3s var(--by-ease) both;
}

@keyframes byq-in { from { opacity: 0; transform: translateY(6px); } }

.byq-msg--bot { align-self: flex-start; background: #fff; color: var(--wp--preset--color--ink); border-top-left-radius: 2px; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06); }
.byq-msg--user { align-self: flex-end; background: var(--by-navy-900); color: #fff; border-top-right-radius: 2px; }

.byq-typing { display: flex; gap: 4px; padding: 0.85rem 1rem; }
.byq-typing span { width: 6px; height: 6px; border-radius: 50%; background: #b5b9c4; animation: byq-dot 1s infinite; }
.byq-typing span:nth-child(2) { animation-delay: 0.15s; }
.byq-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes byq-dot { 50% { transform: translateY(-4px); background: var(--by-gold); } }

.byq-input {
	padding: 0.85rem 1rem 1rem;
	border-top: 1px solid var(--by-line);
	background: #fff;
	max-height: 55%;
	overflow-y: auto;
}

.byq-input:empty { display: none; }

.byq-opts { display: flex; flex-direction: column; gap: 0.45rem; }

.byq-opt {
	text-align: left;
	font: inherit;
	font-size: 0.875rem;
	padding: 0.6rem 0.85rem;
	border: 1px solid #D9CFB6;
	border-radius: 6px;
	background: #FFFDF8;
	color: var(--by-navy-900);
	cursor: pointer;
	transition: border-color 0.2s, background-color 0.2s;
}

.byq-opt:hover, .byq-opt:focus-visible { border-color: var(--by-gold); background: #FBF3DF; }

.byq-text { display: flex; gap: 0.5rem; }

.byq-text input, .byq-contact input {
	flex: 1;
	width: 100%;
	font: inherit;
	font-size: 0.9rem;
	padding: 0.65rem 0.8rem;
	border: 1px solid #D9CFB6;
	border-radius: 6px;
	background: #FFFDF8;
}

.byq-text input:focus, .byq-contact input:focus { outline: none; border-color: var(--by-gold); box-shadow: 0 0 0 3px rgba(212, 167, 60, 0.2); }

.byq-contact { display: flex; flex-direction: column; gap: 0.5rem; }

.byq-send, .byq-submit, .byq-wa, .byq-restart {
	font-family: var(--by-oswald);
	letter-spacing: 0.1em;
	text-transform: uppercase;
	font-size: 0.82rem;
	border: 0;
	border-radius: 6px;
	cursor: pointer;
	padding: 0.75rem 1rem;
}

.byq-send, .byq-submit { background: var(--by-gold); color: var(--by-navy-950); }
.byq-send:hover, .byq-submit:hover { background: var(--by-gold-light); }
.byq-submit:disabled { opacity: 0.6; cursor: wait; }

.byq-err { color: var(--by-crimson); font-size: 0.8rem; margin: 0; }
.byq-err:empty { display: none; }

.byq-done { display: flex; flex-direction: column; gap: 0.5rem; }

.byq-wa {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	background: #25D366;
	color: #0B1526;
	text-decoration: none;
}

.byq-wa svg { width: 20px; height: 20px; }
.byq-wa:hover { background: #4be083; color: #0B1526; }

.byq-restart { background: transparent; color: var(--by-navy-800); text-decoration: underline; }

/* Keep the two-line wordmark tight in both the site and the editor. */
.by-brand .by-brand__text.is-layout-flex { gap: 0.1rem; }

/* Purpose banner: keep the artwork as texture, not a second logo. */
.by-purpose .wp-block-cover__background { opacity: 0.9 !important; }
