/**
 * Content Section block — front end and editor.
 *
 * Editorial section for pages: mono subtitle + regular-weight title on the
 * left, content on the right (stacked on narrow screens or by choice), then
 * an optional closing headline and a link. Brand-guide tokens; selectors are
 * prefixed with the block wrapper so they win over the theme's .entry-content
 * rules without !important (except where the theme itself uses it).
 */
.wp-block-veramatic-section {
	--vsec-ink: var(--v-midnight, #070028);
	--vsec-muted: var(--v-midnight-2, #2a1c69);
	--vsec-cloud: var(--v-cloud, #eaefff);
	--vsec-blurple: var(--v-blurple, #7a5cff);
	--vsec-link: var(--v-blurple-text, #654bda); /* Blurple darkened for small text: AA on white */
	--vsec-grad: var(--v-grad, linear-gradient(90deg, #7a5cff 0%, #cd45e9 20%, #ff5973 40%, #ff854c 60%, #ffaf24 80%, #ffd500 100%));
	--vsec-navy: var(--v-midnight, #070028);
	--vsec-bg: #fff;           /* what a hovered outline button shows its text in */
	--vsec-line: var(--v-cloud, #eaefff);      /* divider hairline */
	--vsec-max: var(--v-max, 1440px); /* the page column */
	--vsec-s2: var(--v-s2, 1rem);
	--vsec-s3: var(--v-s3, 1.618rem);
	--vsec-s4: var(--v-s4, 2.618rem);
	--vsec-s5: var(--v-s5, 4.236rem);
	--vsec-s6: var(--v-s6, 6.854rem);
	--vsec-media: 38%;        /* graphic column, beside the text (block setting) */
	margin: 0;
	padding: var(--vsec-s5) 0;
	font-family: var(--v-font, "Be Vietnam Pro", sans-serif);
	color: var(--vsec-ink);
}
.wp-block-veramatic-section.vsec--divider {
	border-top: 1px solid var(--vsec-line);
}

/* Width: page column (default), full-bleed with the content edge to edge,
   or full-bleed with the content held in the 1440px page column. */
.wp-block-veramatic-section.vsec--full,
.wp-block-veramatic-section.vsec--full-contained {
	box-sizing: border-box;
	width: 100vw;
	max-width: 100vw;
	margin-left: calc(50% - 50vw) !important; /* !important: a left/right margin set in the editor (even 0) must not cancel the breakout */
	margin-right: calc(50% - 50vw) !important;
}
.wp-block-veramatic-section.vsec--full .vsec__inner,
.wp-block-veramatic-section.vsec--full-contained .vsec__inner {
	margin: 0 auto;
	padding: 0 var(--v-gutter, 20px);
}
.wp-block-veramatic-section.vsec--full-contained .vsec__inner {
	box-sizing: border-box;
	max-width: var(--v-max, 1440px); /* the page column, exactly as the theme's page wrapper sizes it: 1440px with the gutters inside, gutters dropped once the viewport clears 1480px */
}
@media (min-width: 1480px) {
	.wp-block-veramatic-section.vsec--full-contained .vsec__inner { padding-left: 0; padding-right: 0; }
}

/* Background: Cloud or Midnight fill. In the page column it becomes a rounded
   panel; full-width it is a band. Midnight re-points the tokens so text, links,
   bullets and sub cards flip to their dark-field colours. */
.wp-block-veramatic-section.vsec--bg-cloud {
	--vsec-bg: var(--v-cloud, #eaefff);
	--vsec-line: var(--v-line-ink, rgba(7, 0, 40, 0.09));
	background: var(--v-cloud, #eaefff);
}
.wp-block-veramatic-section.vsec--bg-navy {
	--vsec-ink: #fff;
	--vsec-muted: var(--v-on-dark-2, rgba(234, 239, 255, 0.854));
	--vsec-link: #fff;
	--vsec-bg: var(--v-midnight, #070028);
	--vsec-line: var(--v-line-dark, rgba(234, 239, 255, 0.146));
	background: var(--vsec-navy);
	color: #fff;
}
.wp-block-veramatic-section.vsec--bg-cloud.vsec--column,
.wp-block-veramatic-section.vsec--bg-navy.vsec--column {
	padding: var(--vsec-s5) var(--vsec-s4);
	border-radius: var(--v-r-panel, 20px);
}
.wp-block-veramatic-section.vsec--bg-navy .vsec__link--text:hover,
.wp-block-veramatic-section.vsec--bg-navy .vsec__link--text:focus {
	color: var(--vsec-blurple);
}
.wp-block-veramatic-section.vsec--bg-navy .vsec__content blockquote {
	border-left-color: var(--vsec-blurple);
	color: var(--v-on-dark-2, rgba(234, 239, 255, 0.854));
}
/* Sub Cards inside a Midnight section: glassy cards unless the block set its own colours */
.wp-block-veramatic-section.vsec--bg-navy .wp-block-veramatic-sub-cards {
	--vcards-card-bg: rgba(255, 255, 255, 0.06);
	--vcards-line: var(--v-line-dark, rgba(234, 239, 255, 0.146));
	--vcards-ink: #fff;
	--vcards-muted: var(--v-on-dark-2, rgba(234, 239, 255, 0.854));
	--vcards-tile: var(--v-fill-dark-2, rgba(234, 239, 255, 0.09));
	--vcards-tile-ink: #fff;
}

/* Grid */
.wp-block-veramatic-section .vsec__grid {
	display: grid;
	grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
	gap: var(--vsec-s4) var(--vsec-s5);
	align-items: start;
}
.wp-block-veramatic-section.vsec--stack .vsec__grid {
	grid-template-columns: minmax(0, 1fr);
	gap: var(--vsec-s3);
}
.wp-block-veramatic-section.vsec--stack .vsec__body {
	max-width: 46rem;
}
.wp-block-veramatic-section.vsec--center .vsec__grid {
	grid-template-columns: minmax(0, 1fr);
	gap: var(--vsec-s3);
	justify-items: center;
	text-align: center;
}
.wp-block-veramatic-section.vsec--center .vsec__head {
	max-width: 52rem;
}
.wp-block-veramatic-section.vsec--center .vsec__body {
	width: 100%;
	max-width: 46rem;
}
/* Lists and cards read left-to-right even in a centered section */
.wp-block-veramatic-section.vsec--center .vsec__content ul,
.wp-block-veramatic-section.vsec--center .vsec__content ol {
	display: inline-block;
	text-align: left;
}
.wp-block-veramatic-section.vsec--center .vsec__content .wp-block-veramatic-sub-cards {
	text-align: left;
}

/* Head */
.wp-block-veramatic-section .vsec__eyebrow {
	margin: 0 0 var(--vsec-s2);
	font-family: var(--v-font-mono, "IBM Plex Mono", monospace);
	font-weight: var(--v-fw-medium, 500);
	font-size: var(--v-fs-caption, 0.786rem);
	line-height: var(--v-lh-text, 1.5);
	letter-spacing: var(--v-ls-mono, 0.06em);
	text-transform: uppercase;
	color: var(--vsec-muted);
}
.wp-block-veramatic-section .vsec__title {
	margin: 0;
	font-family: var(--v-font, "Be Vietnam Pro", sans-serif);
	font-size: var(--v-fs-h2, 1.618rem);
	font-weight: var(--v-fw-regular, 400);
	line-height: var(--v-lh-head, 1.2);
	letter-spacing: var(--v-ls-head, -0.01em);
	color: var(--vsec-ink);
	text-wrap: pretty;
}
.wp-block-veramatic-section .vsec__title .callout-gradient,
.wp-block-veramatic-section .vsec__headline .callout-gradient { font-weight: inherit; }
.wp-block-veramatic-section .vsec__title em {
	font-style: normal;
	background: var(--vsec-grad);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

/* Content (inner blocks) */
.wp-block-veramatic-section .vsec__content > :first-child { margin-top: 0; }
.wp-block-veramatic-section .vsec__content > :last-child { margin-bottom: 0; }
.wp-block-veramatic-section .vsec__content ul {
	list-style: none;
	margin: 0 0 1.5em;
	padding: 0;
}
.wp-block-veramatic-section .vsec__content ul li {
	position: relative;
	margin: 0 0 0.5em;
	padding-left: 1.5em;
}
.wp-block-veramatic-section .vsec__content ul li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.72em;
	width: 0.5em;
	height: 0.5em;
	border-radius: 50%;
	background: var(--vsec-blurple);
}
.wp-block-veramatic-section .vsec__content ol {
	margin: 0 0 1.5em 1.5em;
	padding: 0;
}
.wp-block-veramatic-section .vsec__content .wp-block-image,
.wp-block-veramatic-section .vsec__content figure {
	margin: var(--vsec-s3) 0;
}
.wp-block-veramatic-section .vsec__content img {
	border-radius: var(--v-r-card, 12px);
}
.wp-block-veramatic-section .vsec__content blockquote {
	margin: var(--vsec-s3) 0;
	padding: 0 0 0 var(--vsec-s3);
	border-left: 3px solid var(--vsec-blurple);
	font-size: var(--v-fs-lead, 1.128rem);
	line-height: var(--v-lh-text, 1.5);
	color: var(--vsec-muted);
}

/* Headline: the bold closing statement */
.wp-block-veramatic-section .vsec__headline {
	margin: var(--vsec-s3) 0 0;
	font-size: var(--v-fs-h3, 1.272rem);
	font-weight: var(--v-fw-regular, 400);
	line-height: var(--v-lh-sub, 1.3);
	letter-spacing: var(--v-ls-head, -0.01em);
	color: var(--vsec-ink);
	text-wrap: pretty;
}
.wp-block-veramatic-section .vsec__headline em {
	font-style: normal;
	background: var(--vsec-grad);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

/* Link */
.wp-block-veramatic-section .vsec__action {
	margin: var(--vsec-s3) 0 0;
}
.wp-block-veramatic-section .vsec__link--text {
	color: var(--vsec-link);
	font-weight: var(--v-fw-semibold, 600);
	text-decoration: none;
	white-space: nowrap;
}
.wp-block-veramatic-section .vsec__link--text:visited { color: var(--vsec-link); }
.wp-block-veramatic-section .vsec__link--text:hover,
.wp-block-veramatic-section .vsec__link--text:focus {
	color: var(--vsec-blurple);
	text-decoration: underline;
	text-underline-offset: 3px;
}
/* Outline button: shared assets/css/veramatic-buttons.css (.v-btn) */
.wp-block-veramatic-section .vsec__link:focus-visible {
	outline: 3px solid var(--vsec-blurple);
	outline-offset: 3px;
}

/* Graphic: optional image beside or below the text. Beside, the head sits
   above the body on one side and the image takes the other (grid areas);
   below, it spans the full section under everything. */
.wp-block-veramatic-section .vsec__graphic {
	grid-area: graphic;
	align-self: center;
	margin: 0;
	min-width: 0;
}
.wp-block-veramatic-section .vsec__img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: var(--v-r-card, 12px);
	box-shadow: var(--v-shadow-contact, 0 16px 42px -26px rgba(7, 0, 40, 0.45));
}
.wp-block-veramatic-section.vsec--media-right .vsec__head,
.wp-block-veramatic-section.vsec--media-left .vsec__head,
.wp-block-veramatic-section.vsec--media-below .vsec__head { grid-area: head; }
.wp-block-veramatic-section.vsec--media-right .vsec__body,
.wp-block-veramatic-section.vsec--media-left .vsec__body,
.wp-block-veramatic-section.vsec--media-below .vsec__body { grid-area: body; }

.wp-block-veramatic-section.vsec--media-right .vsec__grid,
.wp-block-veramatic-section.vsec--media-left .vsec__grid {
	grid-template-columns: minmax(0, 1fr) var(--vsec-media);
	grid-template-areas:
		"head graphic"
		"body graphic";
	column-gap: var(--vsec-s6);
	row-gap: var(--vsec-s3);
}
.wp-block-veramatic-section.vsec--media-left .vsec__grid {
	grid-template-columns: var(--vsec-media) minmax(0, 1fr);
	grid-template-areas:
		"graphic head"
		"graphic body";
}
.wp-block-veramatic-section.vsec--media-right .vsec__body,
.wp-block-veramatic-section.vsec--media-left .vsec__body { max-width: none; }
/* Beside a graphic that is taller than the text, a two-row grid shares the spare
   height between the head row and the body row, which opens a hole under the
   title. Spacer rows above and below take the spare height instead, so the head
   and body stay together and sit centred against the graphic. Row gaps would
   count the empty spacer rows too, so the head-to-body space is a margin here. */
@media (min-width: 901px) {
	.wp-block-veramatic-section.vsec--media-right:not(.vsec--center) .vsec__grid,
	.wp-block-veramatic-section.vsec--media-left:not(.vsec--center) .vsec__grid {
		grid-template-rows: 1fr auto auto 1fr;
		grid-template-areas:
			". graphic"
			"head graphic"
			"body graphic"
			". graphic";
		row-gap: 0;
	}
	.wp-block-veramatic-section.vsec--media-left:not(.vsec--center) .vsec__grid {
		grid-template-areas:
			"graphic ."
			"graphic head"
			"graphic body"
			"graphic .";
	}
	.wp-block-veramatic-section.vsec--media-right:not(.vsec--center) .vsec__head + .vsec__body,
	.wp-block-veramatic-section.vsec--media-left:not(.vsec--center) .vsec__head + .vsec__body { margin-top: var(--vsec-s3); }
}

.wp-block-veramatic-section.vsec--media-below .vsec__grid {
	grid-template-areas:
		"head body"
		"graphic graphic";
}
.wp-block-veramatic-section.vsec--stack.vsec--media-below .vsec__grid,
.wp-block-veramatic-section.vsec--center.vsec--media-below .vsec__grid,
.wp-block-veramatic-section.vsec--center.vsec--media-right .vsec__grid,
.wp-block-veramatic-section.vsec--center.vsec--media-left .vsec__grid {
	grid-template-columns: minmax(0, 1fr);
	grid-template-areas:
		"head"
		"body"
		"graphic";
}
.wp-block-veramatic-section.vsec--center .vsec__graphic {
	width: 100%;
	max-width: 52rem;
	justify-self: center;
}
.wp-block-veramatic-section.vsec--center.vsec--media-right .vsec__body,
.wp-block-veramatic-section.vsec--center.vsec--media-left .vsec__body { max-width: 46rem; }

/* Responsive */
@media (max-width: 900px) {
	.wp-block-veramatic-section.vsec--media-right .vsec__grid,
	.wp-block-veramatic-section.vsec--media-left .vsec__grid,
	.wp-block-veramatic-section.vsec--media-below .vsec__grid {
		grid-template-columns: minmax(0, 1fr);
		grid-template-areas:
			"head"
			"body"
			"graphic";
	}
	.wp-block-veramatic-section { padding: var(--vsec-s4) 0; }
	.wp-block-veramatic-section.vsec--bg-cloud.vsec--column,
	.wp-block-veramatic-section.vsec--bg-navy.vsec--column { padding: var(--vsec-s4) var(--vsec-s3); }
	.wp-block-veramatic-section .vsec__grid {
		grid-template-columns: minmax(0, 1fr);
		gap: var(--vsec-s3);
	}
	.wp-block-veramatic-section .vsec__title { font-size: var(--v-fs-h2, 1.618rem); }
	/* One column: a graphic keeps its scale. One that took a quarter of the row on a
	   wide screen (a portrait, a badge) should not balloon to the full width here, so
	   its cap follows the block's own graphic-width setting; diagrams set near 40% or
	   more still run the full width. */
	.wp-block-veramatic-section .vsec__graphic { max-width: min(100%, calc(var(--vsec-media) * 2.4)); }
}
/* Phones: tighter bands */
@media (max-width: 600px) {
	.wp-block-veramatic-section { padding: var(--vsec-s3) 0; }
	.wp-block-veramatic-section.vsec--bg-cloud.vsec--column,
	.wp-block-veramatic-section.vsec--bg-navy.vsec--column { padding: var(--vsec-s3) var(--v-s2h, 1.272rem); }
}
@media (prefers-reduced-motion: reduce) {
	.wp-block-veramatic-section .vsec__link--button { transition: none; }
}

/* First block on a page: swallow .entry-content's 1.5em top margin so it sits flush under the header */
.entry-content > .wp-block-veramatic-section:first-child { margin-top: -1.5em; }
