/* ==========================================================================
   Jexii Builder — supplemental theme styles

   Design tokens (color, typography, spacing, shadows) and element styling
   live in theme.json. This file holds only the few rules that theme.json
   cannot express. Keep it minimal.
   ========================================================================== */


/* --------------------------------------------------------------------------
   Layout: remove the default block gap between the header, main, and footer
   template parts so site sections sit flush.
   -------------------------------------------------------------------------- */

body > .wp-site-blocks > * {
	margin-block: 0;
}


/* --------------------------------------------------------------------------
   Responsive safety net: prevent horizontal scroll from full-bleed sections
   or image breakouts. overflow-x only — never overflow-y, which would break
   position: sticky and similar.
   -------------------------------------------------------------------------- */

html,
body {
	overflow-x: clip;
	max-width: 100%;
}


/* --------------------------------------------------------------------------
   Color-scheme block styles for the Group block.

   Registered in functions.php (jexii_builder_register_block_styles) and applied
   to any core/group as one of four looks that map the theme palette onto the
   section. Loaded on the front end and in the editor canvas, so the preview
   matches the published page exactly. Padding/width are NOT set here — those
   are the group's own native spacing/layout controls (patterns pre-set them).
   -------------------------------------------------------------------------- */

.wp-block-group.is-style-jxb-light {
	background: var(--wp--preset--color--base, #ffffff);
	color: var(--wp--preset--color--ink, #1e3a5f);
}

.wp-block-group.is-style-jxb-soft {
	background: var(--wp--preset--color--surface, #f5f7f9);
	color: var(--wp--preset--color--ink, #1e3a5f);
}

.wp-block-group.is-style-jxb-dark {
	background: var(--wp--preset--color--primary-dark, #0e4f6e);
	color: var(--wp--preset--color--base, #ffffff);
}

.wp-block-group.is-style-jxb-brand {
	background: var(--wp--preset--gradient--hero-deep,
		linear-gradient(135deg, #0e4f6e 0%, #1a7097 60%, #06b6d4 100%));
	color: var(--wp--preset--color--base, #ffffff);
}

/* On dark/brand schemes keep headings legible (white) ... */
.wp-block-group.is-style-jxb-dark :where(h1, h2, h3, h4, h5, h6),
.wp-block-group.is-style-jxb-brand :where(h1, h2, h3, h4, h5, h6) {
	color: var(--wp--preset--color--base, #ffffff);
}

/* ... and tint plain links with the accent (real buttons keep their own style). */
.wp-block-group.is-style-jxb-dark a:not(.wp-element-button),
.wp-block-group.is-style-jxb-brand a:not(.wp-element-button) {
	color: var(--wp--preset--color--accent, #06b6d4);
}
