/*
 * Wizard layer — OLED black + brand palette + magic.
 * Loaded last. Keeps every existing class/markup; only restyles.
 * The animated spell canvas lives in assets/js/magic.js (#iwz-magic).
 */

/* ---------- Stacking: magic canvas behind the page ---------- */
#iwz-magic {
	position: fixed;
	inset: 0;
	width: 100vw;
	height: 100vh;
	z-index: 0;
	pointer-events: none;
	display: block;
}

.wp-site-blocks {
	position: relative;
	z-index: 1;
}

/* Section backdrops are transparent so the magic shows between panels */
.iwz-hero-section,
.iwz-section,
.iwz-social-proof-section,
.iwz-case-studies-section,
.iwz-cta-band,
.iwz-monitoring-page,
.iwz-case-study-page,
.iwz-diagnostic-page {
	background-color: transparent !important;
}

/* ---------- No sideways overflow ----------
 * Decorative glows (::before/::after) on these sections used to poke past the
 * right edge, leaving a strip of empty space in Safari/iOS. Clip them at the section.
 */
html,
body {
	overflow-x: clip;
	max-width: 100%;
}

.iwz-hero-section,
.iwz-section,
.iwz-social-proof-section,
.iwz-case-studies-section,
.iwz-cta-band,
.iwz-monitoring-page,
.iwz-monitoring-hero,
.iwz-monitoring-help,
.iwz-case-study-page,
.iwz-case-study-section,
.iwz-case-study-cta,
.iwz-diagnostic-page,
.wp-site-blocks > main,
.wp-site-blocks > .wp-block-group.alignfull {
	overflow-x: clip;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6,
.wp-block-heading {
	color: var(--iwz-text);
	font-family: var(--iwz-font);
}

h1.wp-block-heading,
.has-display-font-size {
	font-weight: 700;
	letter-spacing: -0.035em;
}

/* Raleway sets wider than the old fallback; keep the hero to ~4 lines */
.iwz-hero-section h1.has-display-font-size {
	font-size: clamp(2.6rem, 5.6vw, 4.6rem) !important;
	line-height: 1.06;
}

/* The highlighted half of headlines gets a slow spell-shimmer */
.iwz-hero-section h1 span,
.iwz-headline-accent,
.iwz-case-study-headline span,
h1 .has-teal-soft-color,
h2 .has-teal-soft-color {
	background: linear-gradient(100deg, #6DC3C9 0%, #48B9B7 30%, #E9FBFC 46%, #6DC3C9 54%, #48B9B7 75%, #6DC3C9 100%);
	background-size: 250% 100%;
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent !important;
	-webkit-text-fill-color: transparent;
	animation: iwz-shimmer 7s ease-in-out infinite;
}

@keyframes iwz-shimmer {
	0%, 100% { background-position: 100% 0; }
	50% { background-position: 0% 0; }
}

.iwz-eyebrow,
.iwz-status-pill {
	color: var(--iwz-teal-soft);
}

/* Little four-point brand sparkle before section eyebrow labels (not the pill labels inside cards) */
p.iwz-eyebrow:not(:empty):not([class*="card"] *):not(.iwz-status-pill) {
	padding-left: 1.15rem;
	background: no-repeat left center / 0.7rem 0.7rem
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23FF5662' d='M12 0c.9 6.5 4.6 10.6 12 12-7.4 1.4-11.1 5.5-12 12-.9-6.5-4.6-10.6-12-12 7.4-1.4 11.1-5.5 12-12z'/%3E%3C/svg%3E");
}

.iwz-status-pill {
	background: rgba(0, 63, 123, 0.28);
	border-color: rgba(109, 195, 201, 0.24);
}

strong, b { color: var(--iwz-text); }

/* ---------- Header: black glass ---------- */
.iwz-site-header.is-scrolled,
.has-iwz-fixed-header .iwz-site-header.is-scrolled {
	background: rgba(0, 0, 0, 0.72) !important;
	-webkit-backdrop-filter: blur(16px) saturate(140%);
	backdrop-filter: blur(16px) saturate(140%);
	box-shadow: 0 1px 0 rgba(109, 195, 201, 0.12), 0 18px 40px rgba(0, 0, 0, 0.6);
}

.iwz-nav-shell {
	background: rgba(6, 9, 18, 0.78) !important;
	border-color: rgba(109, 195, 201, 0.16) !important;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 10px 30px rgba(0, 0, 0, 0.5) !important;
}

.iwz-main-nav .wp-block-navigation-item__content {
	color: var(--iwz-text-soft);
	white-space: nowrap;
	padding-inline: 1rem !important;
}

@media (min-width: 782px) and (max-width: 1200px) {
	.iwz-main-nav .wp-block-navigation-item__content {
		padding-inline: 0.6rem !important;
		font-size: 0.84rem !important;
	}
}

.iwz-main-nav .wp-block-navigation-item__content:hover,
.iwz-main-nav .current-menu-item > .wp-block-navigation-item__content {
	color: var(--iwz-text);
}

.iwz-site-title,
.iwz-site-title a {
	color: var(--iwz-text) !important;
	letter-spacing: 0.08em;
}

.wp-block-navigation__responsive-container.is-menu-open {
	background: rgba(0, 0, 0, 0.96) !important;
}

/* ---------- Buttons ---------- */
.wp-block-button:not(.is-style-outline) .wp-block-button__link,
.iwz-button-primary .wp-block-button__link,
.iwz-header-cta-group .wp-block-button__link,
.iwz-form-actions .wp-element-button:not(.is-style-outline),
.iwz-submit-button {
	background-image: linear-gradient(110deg, #6DC3C9 0%, #48B9B7 42%, #A8E6EA 50%, #48B9B7 58%, #6DC3C9 100%);
	background-size: 260% 100%;
	background-position: 100% 0;
	border-color: rgba(109, 195, 201, 0.45);
	color: #00131F;
	box-shadow: 0 0 0 1px rgba(109, 195, 201, 0.15), 0 14px 36px rgba(72, 185, 183, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.35);
	transition: transform 180ms ease, box-shadow 260ms ease, background-position 700ms ease;
}

.wp-block-button:not(.is-style-outline) .wp-block-button__link:hover,
.wp-block-button:not(.is-style-outline) .wp-block-button__link:focus-visible,
.iwz-header-cta-group .wp-block-button__link:hover,
.iwz-submit-button:hover {
	background-position: 0 0;
	color: #00131F;
	box-shadow: 0 0 0 1px rgba(109, 195, 201, 0.35), 0 0 34px rgba(109, 195, 201, 0.45), 0 0 70px rgba(147, 39, 143, 0.25);
}

.wp-block-button:not(.is-style-outline) .wp-block-button__link::after,
.iwz-header-cta-group .wp-block-button__link::after,
.iwz-submit-button svg {
	background-color: #000000;
}

.wp-block-button.is-style-outline .wp-block-button__link,
.iwz-button-secondary .wp-block-button__link,
.iwz-button-ghost .wp-block-button__link,
.iwz-diagnostic-form .is-style-outline,
.iwz-form-actions .wp-element-button.is-style-outline {
	background: rgba(0, 63, 123, 0.22);
	border-color: rgba(109, 195, 201, 0.3);
	color: #FFFFFF;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.wp-block-button.is-style-outline .wp-block-button__link:hover,
.iwz-button-secondary .wp-block-button__link:hover {
	background: rgba(0, 63, 123, 0.42);
	border-color: rgba(109, 195, 201, 0.6);
	color: #FFFFFF;
	box-shadow: 0 0 30px rgba(0, 63, 123, 0.6);
}

.wp-block-button.is-style-outline .wp-block-button__link::after,
.iwz-button-secondary .wp-block-button__link::after,
.iwz-button-ghost .wp-block-button__link::after {
	background-color: rgba(0, 63, 123, 0.7);
}

/* ---------- Cards: black glass, lit by the cursor like a wand ---------- */
.iwz-feature-card,
.iwz-process-card,
.iwz-metric-card,
.iwz-side-stat,
.iwz-page-card,
.iwz-diagnostic-shell,
.iwz-cta-band__inner,
.iwz-showcase-card,
.iwz-testimonial-card,
.iwz-service-card,
.iwz-pricing-card,
.iwz-monitoring-include-card,
.iwz-monitoring-panel,
.iwz-case-study-panel,
.iwz-monitoring-hero-shell,
.iwz-monitoring-help-shell,
.iwz-monitoring-includes-shell,
.iwz-case-study-cta,
.iwz-case-study-insight-rail,
.iwz-dashboard-card--main,
.iwz-inbox-panel {
	--mx: 50%;
	--my: -30%;
	background:
		radial-gradient(520px circle at var(--mx) var(--my), rgba(109, 195, 201, 0.10), transparent 55%),
		linear-gradient(180deg, rgba(10, 14, 26, 0.82) 0%, rgba(3, 4, 9, 0.86) 100%) !important;
	border: 1px solid rgba(109, 195, 201, 0.13) !important;
	/* No backdrop blur: cards are ~85% opaque, and re-blurring over the animated canvas every frame is costly */
	-webkit-backdrop-filter: none !important;
	backdrop-filter: none !important;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 24px 60px rgba(0, 0, 0, 0.7) !important;
	transition: border-color 260ms ease, box-shadow 260ms ease, transform 260ms ease;
}

.iwz-feature-card:hover,
.iwz-process-card:hover,
.iwz-testimonial-card:hover,
.iwz-service-card:hover,
.iwz-pricing-card:hover,
.iwz-monitoring-include-card:hover,
.iwz-showcase-card:hover {
	border-color: rgba(109, 195, 201, 0.38) !important;
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, 0.06),
		0 0 0 1px rgba(109, 195, 201, 0.08),
		0 0 46px rgba(72, 185, 183, 0.14),
		0 24px 60px rgba(0, 0, 0, 0.7) !important;
}

/* Featured / highlighted pricing card gets the purple-to-coral spell edge */
.iwz-pricing-card.is-featured,
.iwz-pricing-card--featured,
.iwz-pricing-card:has(.iwz-pricing-card__badge) {
	border-color: rgba(147, 39, 143, 0.55) !important;
	box-shadow: 0 0 0 1px rgba(255, 86, 98, 0.12), 0 0 60px rgba(147, 39, 143, 0.22), 0 24px 60px rgba(0, 0, 0, 0.7) !important;
}

.iwz-pricing-card__badge {
	background: var(--iwz-spell) !important;
	color: #FFFFFF !important;
	border: 0 !important;
}

/* Numbers and stats */
.iwz-metric-card__number,
.iwz-side-stat__number,
.iwz-process-card__step,
.iwz-pricing-card__price,
.iwz-case-study-metric-value,
.iwz-showcase-card__value {
	font-variant-numeric: lining-nums tabular-nums;
}

/* Testimonial quote marks & arrows in brand coral/teal */
.iwz-testimonial-quote-icon,
.iwz-testimonial-quote-icon svg {
	color: var(--iwz-teal-soft);
	fill: currentColor;
}

.iwz-proof-arrow,
.iwz-proof-arrow svg {
	color: var(--iwz-coral);
	stroke: currentColor;
}

/* Client logos row */
.iwz-client-logo,
.iwz-logo-row > * {
	background: rgba(6, 9, 18, 0.7) !important;
	border-color: rgba(109, 195, 201, 0.1) !important;
}

/* Hero visual: let the brand mark float on black with a teal/purple aura */
.iwz-hero-image-shell {
	background:
		radial-gradient(circle at 50% 45%, rgba(72, 185, 183, 0.18), transparent 60%),
		radial-gradient(circle at 70% 80%, rgba(147, 39, 143, 0.18), transparent 55%),
		rgba(4, 6, 12, 0.7) !important;
	border-color: rgba(109, 195, 201, 0.16) !important;
}

.iwz-hero-badge {
	background: rgba(4, 6, 12, 0.88) !important;
	border-color: rgba(109, 195, 201, 0.22) !important;
}

/* ---------- Forms ---------- */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="tel"],
input[type="number"],
input[type="search"],
select,
textarea,
.wpforms-field input,
.wpforms-field textarea,
.wpforms-field select {
	background-color: rgba(3, 5, 11, 0.9) !important;
	color: #FFFFFF !important;
	border: 1px solid rgba(109, 195, 201, 0.2) !important;
	border-radius: 12px !important;
}

input::placeholder,
textarea::placeholder {
	color: #6E7B93 !important;
}

input:focus,
select:focus,
textarea:focus {
	border-color: var(--iwz-teal-soft) !important;
	box-shadow: 0 0 0 3px rgba(109, 195, 201, 0.2), 0 0 24px rgba(109, 195, 201, 0.15) !important;
	outline: none !important;
}

input[type="checkbox"],
input[type="radio"] {
	accent-color: var(--iwz-teal);
}

.iwz-form-progress__bar,
.iwz-form-progress span {
	background: var(--iwz-swoosh) !important;
}

/* Brevo newsletter form (footer + newsletter page) */
[id^="sib_signup_form"] input[type="text"],
[id^="sib_signup_form"] input[type="email"] {
	box-sizing: border-box !important;
	width: 100% !important;
	max-width: 100% !important;
	padding: 0.7rem 0.85rem !important;
	font-size: 0.95rem !important;
}

[id^="sib_signup_form"] label,
[id^="sib_signup_form"] p {
	color: var(--iwz-text-soft) !important;
}

[id^="sib_signup_form"] input[type="submit"],
[id^="sib_signup_form"] .sib-default-btn,
.wpforms-submit {
	background: linear-gradient(135deg, #6DC3C9 0%, #48B9B7 100%) !important;
	color: #00131F !important;
	border: 0 !important;
	border-radius: 12px !important;
	padding: 0.75rem 1.4rem !important;
	font-weight: 800 !important;
	cursor: pointer;
	box-shadow: 0 10px 28px rgba(72, 185, 183, 0.2) !important;
}

[id^="sib_signup_form"] input[type="submit"]:hover,
.wpforms-submit:hover {
	box-shadow: 0 0 30px rgba(109, 195, 201, 0.45) !important;
}

/* ---------- Footer ---------- */
.iwz-site-footer {
	background:
		linear-gradient(90deg, transparent, rgba(109, 195, 201, 0.5), rgba(147, 39, 143, 0.5), transparent) top / 100% 1px no-repeat,
		linear-gradient(180deg, rgba(0, 0, 0, 0.6) 0%, #000000 40%) !important;
	border: 0 !important;
	border-radius: 0 !important;
	position: relative;
	z-index: 1;
}

.iwz-site-footer h6,
.iwz-site-footer .wp-block-heading {
	color: var(--iwz-teal-soft);
	letter-spacing: 0.18em;
}

.iwz-site-footer a {
	color: var(--iwz-text-soft);
}

.iwz-site-footer a:hover {
	color: var(--iwz-text);
}

/* ---------- Single posts / prose ---------- */
.wp-block-post-content a:not(.wp-block-button__link),
.entry-content a:not(.wp-block-button__link) {
	color: var(--iwz-teal-soft);
	text-decoration-color: rgba(109, 195, 201, 0.4);
	text-underline-offset: 0.2em;
}

.wp-block-post-content a:not(.wp-block-button__link):hover {
	color: #FFFFFF;
	text-decoration-color: var(--iwz-coral);
}

.wp-block-quote,
blockquote {
	border-left: 3px solid var(--iwz-teal) !important;
	background: rgba(0, 63, 123, 0.12);
	border-radius: 0 14px 14px 0;
	padding: 1rem 1.25rem !important;
}

code, kbd {
	background: rgba(0, 63, 123, 0.25);
	color: #CFF3F5;
	border-radius: 6px;
	padding: 0.1em 0.35em;
}

pre, .wp-block-code {
	background: #05070D !important;
	border: 1px solid rgba(109, 195, 201, 0.14) !important;
	border-radius: 14px !important;
	color: #CFF3F5 !important;
}

pre code { background: none; padding: 0; }

.wp-block-table table,
.wp-block-table td,
.wp-block-table th {
	border-color: rgba(109, 195, 201, 0.16) !important;
}

.wp-block-table thead,
.wp-block-table th {
	background: rgba(0, 63, 123, 0.22);
	color: #FFFFFF;
}

hr, .wp-block-separator {
	border: 0 !important;
	height: 1px !important;
	background: linear-gradient(90deg, transparent, rgba(109, 195, 201, 0.45), rgba(147, 39, 143, 0.45), transparent) !important;
	opacity: 1 !important;
}

.wp-block-post-title,
.wp-block-query .wp-block-post-title a {
	color: var(--iwz-text);
}

.wp-block-post-date,
.wp-block-post-terms,
.wp-block-post-author {
	color: var(--iwz-text-faint);
}

/* ---------- Free Tools plugin & newsletter pages: re-skin via their own tokens ---------- */
body .iwft {
	--iwft-bg: #000000;
	--iwft-surface: rgba(8, 11, 20, 0.9);
	--iwft-surface-soft: #0E1424;
	--iwft-text-soft: #B9C4D6;
	--iwft-teal-soft: #6DC3C9;
	--iwft-border: rgba(109, 195, 201, 0.14);
	--iwft-shadow: 0 30px 80px rgba(0, 0, 0, 0.7);
}

body .iwnc,
body [class^="iwns"],
body [class^="iwss"] {
	--bg: #000000;
	--surface: rgba(8, 11, 20, 0.9);
	--surface2: #0E1424;
	--soft: #B9C4D6;
	--teal2: #6DC3C9;
}

body .iwnc-plan {
	background: rgba(0, 63, 123, 0.16);
}

/* ---------- Cookie wall ---------- */
.gcw-overlay {
	background: rgba(0, 0, 0, 0.72) !important;
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
}

.gcw-wall {
	background: linear-gradient(180deg, #0A0E1A 0%, #030409 100%) !important;
	color: var(--iwz-text-soft) !important;
	border: 1px solid rgba(109, 195, 201, 0.2) !important;
	box-shadow: 0 0 60px rgba(72, 185, 183, 0.12), 0 30px 80px rgba(0, 0, 0, 0.8) !important;
	font-family: var(--iwz-font) !important;
}

.gcw-wall__title,
.gcw-category__name {
	color: #FFFFFF !important;
}

.gcw-wall__desc,
.gcw-category__desc {
	color: var(--iwz-text-soft) !important;
}

.gcw-btn--primary {
	background: linear-gradient(135deg, #6DC3C9 0%, #48B9B7 100%) !important;
	color: #00131F !important;
	border: 0 !important;
}

.gcw-btn--secondary,
.gcw-btn--ghost {
	background: rgba(0, 63, 123, 0.3) !important;
	color: #FFFFFF !important;
	border: 1px solid rgba(109, 195, 201, 0.3) !important;
}

.gcw-category {
	background: rgba(255, 255, 255, 0.03) !important;
	border-color: rgba(109, 195, 201, 0.12) !important;
}

.gcw-prefs-btn__btn {
	background: #05070D !important;
	border: 1px solid rgba(109, 195, 201, 0.3) !important;
	color: var(--iwz-teal-soft) !important;
}

/* ---------- Scrollbar ---------- */
html {
	scrollbar-color: #1B2A3F #000000;
}

::-webkit-scrollbar { width: 10px; background: #000; }
::-webkit-scrollbar-thumb { background: #1B2A3F; border-radius: 10px; border: 2px solid #000; }
::-webkit-scrollbar-thumb:hover { background: #2A4766; }

/* ---------- Motion safety ---------- */
@media (prefers-reduced-motion: reduce) {
	.iwz-hero-section h1 span,
	.iwz-headline-accent,
	h1 .has-teal-soft-color,
	h2 .has-teal-soft-color {
		animation: none;
		background-position: 50% 0;
	}

	.wp-block-button__link {
		transition: none !important;
	}
}

/* ---------- Carried over from the live site's Site Editor custom CSS (InboxWizards 2.0) ---------- */
/* Newsletter form: pull it up under the heading */
#sib_signup_form_2 { margin-top: 8px !important; }
#sib_signup_form_2 > p:first-of-type { margin: 0 !important; line-height: 0; }
#sib_signup_form_2 > p:first-of-type br { display: none; }
.sib_signup_box_inside_2 > p.sib-email-area { margin-top: 0; }

/* Move the Cloudflare check below the fields, above Subscribe */
.sib_signup_box_inside_2 { display: flex; flex-direction: column; }
.sib_signup_box_inside_2 > .cf-turnstile { order: 1; }
.sib_signup_box_inside_2 > p:not([class]) { order: 2; }
/* Tighter spacing between newsletter form fields */
.sib_signup_box_inside_2 > p { margin: 0 0 10px !important; line-height: 1.3; }
.sib_signup_box_inside_2 > p input { margin-top: 3px; }
.sib_signup_box_inside_2 > .cf-turnstile { margin-bottom: 10px; }

/* ---------- Contact / diagnostic form: keep it tight ---------- */
/* Stray empty paragraphs WordPress can add around the form take no space */
.iwz-diagnostic-form p:empty,
.iwz-diagnostic-shell > p:empty {
	display: none;
}
.iwz-diagnostic-form .iwz-form-step {
	gap: 1rem;
}

/* "03 short steps" card: number beside the text instead of a tall narrow column */
.iwz-diagnostic-page .iwz-side-stat {
	display: grid !important;
	grid-template-columns: auto 1fr;
	align-items: center;
	column-gap: 1.25rem;
	max-width: 30rem;
	padding: 1.1rem 1.4rem !important;
}

.iwz-diagnostic-page .iwz-side-stat > * {
	margin: 0 !important;
	max-width: none !important;
}

.iwz-diagnostic-page .iwz-side-stat__number {
	font-size: clamp(2.2rem, 4vw, 3rem) !important;
	line-height: 1;
}

/* Less dead space between the contact section and the footer */
.iwz-diagnostic-page.alignfull {
	padding-bottom: var(--wp--preset--spacing--60) !important;
}

/* ======================================================================
 * Section rhythm - one consistent gap between sections instead of
 * stacked paddings + margins (which created 150-250px holes).
 * ==================================================================== */
:root {
	--iwz-sec: clamp(2rem, 3.4vw, 3rem);          /* section top/bottom padding: 32px -> 48px */
	--iwz-card-pad: clamp(1.75rem, 2.8vw, 2.5rem); /* big card interiors: 28px -> 40px */
}

/* No extra 24px "block gap" margin between whole sections / template parts */
:where(.wp-site-blocks, .wp-site-blocks > main, .iwz-homepage, .iwz-monitoring-page, .iwz-case-study-page, .iwz-case-study-page-shell) > :is(.alignfull, section.wp-block-template-part, footer.wp-block-template-part, .iwz-case-study-cta) {
	margin-block-start: 0 !important;
}

/* Every full-width section: same vertical padding */
.iwz-hero-section,
.iwz-section,
.iwz-social-proof-section,
.iwz-case-studies-section,
.iwz-monitoring-hero,
.iwz-monitoring-pricing,
.iwz-monitoring-includes,
.iwz-monitoring-help,
.iwz-cta-band,
.iwz-diagnostic-page.alignfull {
	padding-top: var(--iwz-sec) !important;
	padding-bottom: var(--iwz-sec) !important;
}

/* Big framed panels keep a comfortable but not cavernous interior */
.iwz-monitoring-hero-shell,
.iwz-monitoring-includes-shell,
.iwz-monitoring-help-shell,
.iwz-cta-band__inner,
.iwz-page-card {
	padding-top: var(--iwz-card-pad) !important;
	padding-bottom: var(--iwz-card-pad) !important;
}

/* Standard pages (privacy, free tools, newsletter...): less padding stacked above the footer */
main.iwz-page-shell {
	padding-bottom: var(--iwz-sec) !important;
}

/* Footer starts one section-gap below the content */
.iwz-site-footer {
	padding-top: var(--iwz-sec) !important;
}

/* Case-study pages: the shell's own gap separates panels; drop duplicate margins */
.iwz-case-study-page-shell {
	row-gap: clamp(1.5rem, 2.5vw, 2rem) !important;
}

.iwz-case-study-page-shell > *,
.iwz-case-study-page-shell > section > *,
.iwz-case-study-body-grid,
.iwz-case-study-paired-sections {
	margin-block-start: 0 !important;
}

.iwz-case-study-body-grid {
	margin-bottom: 0 !important;
}

/* Blog posts: trim padding stacked around post navigation and "More posts" */
body.single main > .alignfull {
	padding-bottom: var(--iwz-sec) !important;
}

body.single main > .alignfull > .wp-block-group:has(> nav) {
	margin-bottom: 0 !important;
}

body.single main > .alignfull + * {
	margin-block-start: 0 !important;
	padding-top: var(--iwz-sec) !important;
}

/* Last few doubled-up gaps */
.iwz-client-logos {
	padding-bottom: 0 !important;
}

main.iwz-page-shell:has(> .alignfull:last-child) {
	padding-bottom: 0 !important;
}

.iwz-case-study-overview-grid {
	margin-bottom: 0 !important;
}

/* Phones: client logos two per row in shorter tiles (was one tall tile per row) */
@media (max-width: 600px) {
	.iwz-logo-row {
		display: grid !important;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 10px !important;
	}

	.iwz-logo-row .iwz-client-logo {
		min-height: 56px !important;
		padding: 10px !important;
		width: auto !important;
	}

	.iwz-logo-row .iwz-client-name {
		margin: 0 !important;
	}

	.iwz-logo-row .iwz-client-logo:last-child:nth-child(odd) {
		grid-column: 1 / -1;
	}
}

/* ======================================================================
 * Compact footer
 * ==================================================================== */
.iwz-site-footer.iwz-footer-compact {
	padding-top: clamp(1.75rem, 3vw, 2.5rem) !important;
	padding-bottom: 1rem !important;
}

.iwz-footer-compact > * + * {
	margin-block-start: 0 !important;
}

.iwz-footer-grid {
	display: grid;
	grid-template-columns: 1.15fr 0.9fr 1.35fr;
	gap: 1.75rem 3rem;
	align-items: start;
}

.iwz-footer-grid > * > * {
	margin-block: 0 !important;
}

.iwz-footer-compact h6.wp-block-heading {
	margin: 0 0 0.65rem !important;
	font-size: 0.72rem;
}

.iwz-footer-brand .wp-block-site-title {
	font-size: 1.35rem !important;
	line-height: 1.2;
	margin: 0 0 0.45rem !important;
}

.iwz-footer-brand p {
	font-size: 0.92rem;
	line-height: 1.55;
	max-width: 34ch;
	color: var(--iwz-text-faint);
}

/* Four links as a tight 2x2 grid */
.iwz-footer-links .wp-block-navigation__container {
	display: grid !important;
	grid-template-columns: repeat(2, max-content);
	gap: 0.45rem 1.6rem !important;
}

.iwz-footer-links .wp-block-navigation-item__content {
	font-size: 0.92rem;
	padding: 0 !important;
}

/* Newsletter: email + Subscribe on one row, Cloudflare check, then small print */
.iwz-footer-news form.sib_signup_form {
	margin: 0 !important;
	padding: 0 !important;
}

.iwz-footer-news .sib_signup_form > p,
.iwz-footer-news .sib-FIRSTNAME-area,
.iwz-footer-news .sib-LASTNAME-area,
.iwz-footer-news .sib_signup_box_inside_2 > p:empty {
	display: none !important; /* hidden inputs / optional name fields / empty paragraphs */
}

.iwz-footer-news .sib_signup_box_inside_2 {
	display: grid !important;
	grid-template-columns: 1fr auto;
	column-gap: 0.6rem;
	row-gap: 0.55rem;
	align-items: end;
}

.iwz-footer-news .sib_signup_box_inside_2 > * {
	margin: 0 !important;
	order: 0 !important;
}

.iwz-footer-news .sib_msg_disp,
.iwz-footer-news .cf-turnstile,
.iwz-footer-news .sib_signup_box_inside_2 > p:not([class]):not(:has(input)):not(:empty) {
	grid-column: 1 / -1;
}

.iwz-footer-news .sib_msg_disp:empty,
.iwz-footer-news .invi-recaptcha {
	display: none !important;
}

.iwz-footer-news p.sib-email-area {
	grid-column: 1;
	font-size: 0.78rem !important;
	line-height: 1.2 !important;
	color: var(--iwz-text-faint) !important;
}

.iwz-footer-news p.sib-email-area br {
	display: none;
}

.iwz-footer-news input.sib-email-area {
	margin-top: 0.3rem !important;
	padding: 0.6rem 0.8rem !important;
	font-size: 0.95rem !important;
}

.iwz-footer-news .sib_signup_box_inside_2 > p:has(input[type="submit"]) {
	grid-column: 2;
}

.iwz-footer-news input.sib-default-btn {
	padding: 0.66rem 1.1rem !important;
	margin: 0 !important;
}

.iwz-footer-news .sib_signup_box_inside_2 > p:not([class]):not(:has(input)):not(:empty) {
	font-size: 0.74rem !important;
	line-height: 1.45 !important;
	color: var(--iwz-text-faint) !important;
}

/* Bottom bar */
.iwz-footer-bottom {
	margin-top: 1.5rem !important;
	padding-top: 0.85rem;
	border-top: 1px solid rgba(109, 195, 201, 0.1);
	gap: 0.5rem 1.5rem;
}

.iwz-footer-bottom p {
	margin: 0 !important;
	font-size: 0.8rem;
	color: var(--iwz-text-faint);
}

@media (max-width: 900px) {
	.iwz-footer-grid {
		grid-template-columns: 1fr 1fr;
	}

	.iwz-footer-news {
		grid-column: 1 / -1;
	}
}

@media (max-width: 560px) {
	.iwz-footer-grid {
		grid-template-columns: 1fr;
		gap: 1.4rem;
	}
}

.iwz-footer-news .cf-turnstile {
	order: 1 !important;
}

.iwz-footer-news .sib_signup_box_inside_2 > p:not([class]):not(:has(input)):not(:empty) {
	order: 2 !important;
}

.iwz-footer-bottom {
	border-radius: 0 !important;
}

@media (min-width: 901px) {
	.iwz-footer-grid {
		grid-template-columns: 1fr 0.85fr 1.25fr;
		column-gap: 2.5rem;
	}
}


/* ---------- Footer v2: four columns, newsletter = first | last, email, subscribe ---------- */
@media (min-width: 901px) {
	.iwz-footer-grid {
		grid-template-columns: 1.05fr 0.8fr 0.95fr 1.3fr;
		column-gap: 2.25rem;
	}
}

@media (max-width: 900px) and (min-width: 561px) {
	.iwz-footer-grid {
		grid-template-columns: 1fr 1fr;
	}

	.iwz-footer-news {
		grid-column: 1 / -1;
	}
}

/* Explore: back to a simple list now the columns are narrower */
.iwz-footer-links .wp-block-navigation__container {
	grid-template-columns: 1fr;
	gap: 0.4rem !important;
}

/* Core promise: compact checklist */
.iwz-footer-promise ul {
	margin: 0 !important;
	padding-left: 0 !important;
	display: grid;
	gap: 0.4rem;
}

.iwz-footer-promise li {
	font-size: 0.9rem;
	line-height: 1.4;
	color: var(--iwz-text-soft);
	margin: 0 !important;
}

/* Newsletter: names side by side, email full width, then Subscribe */
.iwz-footer-news .sib-FIRSTNAME-area,
.iwz-footer-news .sib-LASTNAME-area {
	display: block !important;
}

.iwz-footer-news .sib_signup_box_inside_2 {
	grid-template-columns: 1fr 1fr;
	row-gap: 0.5rem;
	column-gap: 0.5rem;
	align-items: start;
}

.iwz-footer-news .sib_signup_box_inside_2 > * {
	grid-column: 1 / -1;
}

.iwz-footer-news p.sib-FIRSTNAME-area { grid-column: 1; grid-row: 2; }
.iwz-footer-news p.sib-LASTNAME-area  { grid-column: 2; grid-row: 2; }
.iwz-footer-news p.sib-email-area     { grid-column: 1 / -1; grid-row: 3; }
.iwz-footer-news .sib_signup_box_inside_2 > p:has(input[type="submit"]) { grid-column: 1 / -1; grid-row: 4; }
.iwz-footer-news .cf-turnstile { grid-row: 5; }
.iwz-footer-news .sib_signup_box_inside_2 > p:not([class]):not(:has(input)):not(:empty) { grid-row: 6; }
.iwz-footer-news .sib_msg_disp { grid-row: 1; }

.iwz-footer-news p.sib-FIRSTNAME-area,
.iwz-footer-news p.sib-LASTNAME-area {
	font-size: 0.78rem !important;
	line-height: 1.2 !important;
	color: var(--iwz-text-faint) !important;
	min-width: 0;
}

.iwz-footer-news p.sib-FIRSTNAME-area br,
.iwz-footer-news p.sib-LASTNAME-area br {
	display: none;
}

.iwz-footer-news input.sib-FIRSTNAME-area,
.iwz-footer-news input.sib-LASTNAME-area {
	margin-top: 0.3rem !important;
	padding: 0.6rem 0.8rem !important;
	font-size: 0.95rem !important;
	width: 100% !important;
	box-sizing: border-box !important;
}

.iwz-footer-news input.sib-default-btn {
	margin-top: 0.15rem !important;
}

.iwz-footer-promise ul {
	padding-left: 1.35rem !important;
}

@media (max-width: 560px) {
	.iwz-footer-grid {
		grid-template-columns: 1fr 1fr;
		gap: 1.5rem 1rem;
	}

	.iwz-footer-brand,
	.iwz-footer-news {
		grid-column: 1 / -1;
	}

	.iwz-footer-links .wp-block-navigation-item__content,
	.iwz-footer-promise li {
		font-size: 0.86rem;
	}
}
