/*
 * FSI supplemental styles — custom block styles + a few pattern helpers.
 * Loaded on the front end and in the editor. Uses theme.json CSS vars only.
 */

/* ---------- Custom block style: FSI Card ---------- */
.wp-block-group.is-style-fsi-card {
	background: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 14px;
	padding: clamp(1.5rem, 4vw, 2.25rem);
	height: 100%;
	transition: transform 120ms ease, box-shadow 120ms ease;
}
.wp-block-group.is-style-fsi-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 14px 30px -14px color-mix(in srgb, var(--wp--preset--color--ink) 32%, transparent);
}
.wp-block-group.is-style-fsi-card :where(h3, h4) {
	margin-top: 0;
}

/* ---------- Custom block style: FSI Dark Panel ---------- */
.wp-block-group.is-style-fsi-panel-dark {
	background: var(--wp--preset--gradient--ink-fade);
	color: var(--wp--preset--color--contrast);
	border-radius: 18px;
	padding: clamp(2rem, 6vw, 4rem);
}
.wp-block-group.is-style-fsi-panel-dark :where(h1, h2, h3, h4, p, li) {
	color: var(--wp--preset--color--contrast);
}
.wp-block-group.is-style-fsi-panel-dark a:not(.wp-element-button) {
	color: #cfe3ff;
}

/* ---------- Custom block style: Check list ---------- */
.wp-block-list.is-style-fsi-check {
	list-style: none;
	padding-left: 0;
	margin-left: 0;
}
.wp-block-list.is-style-fsi-check li {
	position: relative;
	padding-left: 1.9rem;
	margin-bottom: 0.6rem;
}
.wp-block-list.is-style-fsi-check li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.15em;
	width: 1.15rem;
	height: 1.15rem;
	border-radius: 999px;
	background:
		linear-gradient(135deg, var(--wp--preset--color--brand), var(--wp--preset--color--signal));
	-webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='white' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/></svg>") center / 78% no-repeat;
	mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='white' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/></svg>") center / 78% no-repeat;
}
.is-style-fsi-panel-dark .wp-block-list.is-style-fsi-check li::before {
	background: linear-gradient(135deg, #7dd3fc, #34d399);
}

/* ---------- Custom block style: Spectrum separator ---------- */
.wp-block-separator.is-style-fsi-spectrum {
	height: 4px;
	max-width: 96px;
	border: 0;
	opacity: 1;
	border-radius: 999px;
	background: var(--wp--preset--gradient--spectrum);
}
.wp-block-separator.is-style-fsi-spectrum.alignwide,
.wp-block-separator.is-style-fsi-spectrum.alignfull {
	max-width: none;
}

/* ---------- Eyebrow label (used above section headings) ---------- */
.fsi-eyebrow {
	font-family: var(--wp--preset--font-family--display);
	font-weight: 600;
	font-size: 0.8rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--wp--preset--color--brand);
}
.is-style-fsi-panel-dark .fsi-eyebrow,
.has-ink-background-color .fsi-eyebrow,
.has-ink-2-background-color .fsi-eyebrow {
	color: var(--wp--preset--color--signal);
}

/* ---------- Hero ---------- */
.fsi-hero {
	position: relative;
	overflow: clip;
	background: var(--wp--preset--gradient--signal-fade);
	color: var(--wp--preset--color--contrast);
}
.fsi-hero :where(h1, p) {
	color: var(--wp--preset--color--contrast);
}
.fsi-hero::after {
	content: "";
	position: absolute;
	inset: auto 0 0 0;
	height: 4px;
	background: var(--wp--preset--gradient--spectrum);
}
.fsi-hero-bars {
	position: absolute;
	right: clamp(-2rem, 2vw, 2rem);
	bottom: 4px;
	display: flex;
	align-items: flex-end;
	gap: 10px;
	opacity: 0.5;
	pointer-events: none;
}
.fsi-hero-bars span {
	width: 14px;
	border-radius: 4px 4px 0 0;
	background: linear-gradient(180deg, #7dd3fc, #2563eb);
}
.fsi-hero-bars span:nth-child(1) { height: 46px; }
.fsi-hero-bars span:nth-child(2) { height: 92px; }
.fsi-hero-bars span:nth-child(3) { height: 148px; }
.fsi-hero-bars span:nth-child(4) { height: 104px; }
.fsi-hero-bars span:nth-child(5) { height: 200px; }
.fsi-hero-bars span:nth-child(6) { height: 132px; }
@media (max-width: 781px) {
	.fsi-hero-bars { display: none; }
}

/* ---------- Stat figure ---------- */
.fsi-stat .fsi-stat-num {
	font-family: var(--wp--preset--font-family--display);
	font-weight: 700;
	font-size: clamp(2rem, 5vw, 2.75rem);
	line-height: 1;
	color: var(--wp--preset--color--ink);
}
.is-style-fsi-panel-dark .fsi-stat .fsi-stat-num {
	color: var(--wp--preset--color--contrast);
}
.fsi-stat .fsi-stat-label {
	font-size: 0.9rem;
	color: var(--wp--preset--color--muted);
}
.is-style-fsi-panel-dark .fsi-stat .fsi-stat-label {
	color: #b8c6d6;
}

/* ---------- Credibility logo/word strip ---------- */
.fsi-proof {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem 2rem;
	align-items: center;
	justify-content: center;
	color: var(--wp--preset--color--muted);
	font-family: var(--wp--preset--font-family--display);
	font-weight: 500;
	font-size: 0.95rem;
}

/* ---------- Fallback menu (before a real nav menu is assigned) ---------- */
ul.fsi-fallback-menu {
	display: flex;
	gap: 1.25rem;
	list-style: none;
	margin: 0;
	padding: 0;
	font-family: var(--wp--preset--font-family--display);
	font-weight: 500;
}
ul.fsi-fallback-menu a { text-decoration: none; color: var(--wp--preset--color--ink); }
ul.fsi-fallback-menu a:hover { text-decoration: underline; text-underline-offset: 0.3em; }

/* ---------- Fluent Forms — align with the FSI design system ---------- */
.fluentform {
	--fluentform-primary: var(--wp--preset--color--brand);
}
.fluentform .ff-el-form-control {
	font-family: var(--wp--preset--font-family--body);
	font-size: 1rem;
	color: var(--wp--preset--color--ink);
	background: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 8px;
	padding: 0.7rem 0.85rem;
	box-shadow: none;
	transition: border-color 120ms ease, box-shadow 120ms ease;
}
.fluentform .ff-el-form-control:focus {
	border-color: var(--wp--preset--color--brand);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--wp--preset--color--brand) 22%, transparent);
	outline: none;
}
.fluentform .ff-el-input--label label {
	font-family: var(--wp--preset--font-family--display);
	font-weight: 600;
	font-size: 0.92rem;
	color: var(--wp--preset--color--ink);
}
.fluentform .ff-el-is-required .ff-el-is-asterisk,
.fluentform .ff-el-input--label.asterisk-right label:after {
	color: var(--wp--preset--color--accent);
}
.fluentform .ff-el-group {
	margin-bottom: 1.15rem;
}
.fluentform .ff-btn-submit {
	font-family: var(--wp--preset--font-family--display);
	font-weight: 600;
	font-size: 1rem;
	background: var(--wp--preset--color--brand);
	color: var(--wp--preset--color--contrast);
	border: 0;
	border-radius: 8px;
	padding: 0.85rem 1.6rem;
	cursor: pointer;
	transition: background-color 120ms ease, transform 120ms ease;
}
.fluentform .ff-btn-submit:hover {
	background: var(--wp--preset--color--brand-strong);
	transform: translateY(-1px);
}
.fluentform .ff-message-success {
	border-radius: 10px;
	border: 1px solid color-mix(in srgb, var(--wp--preset--color--signal) 40%, var(--wp--preset--color--border));
	background: color-mix(in srgb, var(--wp--preset--color--signal) 8%, var(--wp--preset--color--surface));
	color: var(--wp--preset--color--ink);
}
.fluentform .error.text-danger,
.fluentform .ff-el-is-error .text-danger {
	color: #b91c1c;
	font-size: 0.85rem;
}
@media (prefers-reduced-motion: reduce) {
	.fluentform .ff-btn-submit,
	.fluentform .ff-el-form-control { transition: none; }
}
