/* Nolan design system for Defyn blocks.
   Everything is scoped to .defyn-section (and .nl-*) so existing Stackable pages are untouched.
   Source of truth: Nolan Build Spec (approved 13 Oct 2026), section 2. */

:root {
	--nl-blue: #134DA1;
	--nl-sky: #5ADBFF;          /* accent text on Nolan Blue only */
	--nl-orange: #FE9000;       /* CTA fills only; never text on white */
	--nl-navy: #16233B;         /* body text, labels on orange */
	--nl-grey: #5B6B84;
	--nl-tint: #F4F8FC;
	--nl-tile: #EDF1F6;
	--nl-rule: #DCE3ED;
	--nl-white: #FFFFFF;
	--nl-scrim: 9, 32, 72;      /* rgb for hero overlays */
	--nl-font: 'Helvetica Neue', Helvetica, Arial, sans-serif;
	--nl-display: 'Parkinsans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
	--nl-max: 1360px;
	--nl-gutter: 44px;
	--nl-section: clamp(56px, 7vw, 88px);
}

.defyn-section {
	--container: var(--nl-max);
	--theme-text-decoration: none; /* Blocksy applies this to headings */
	font-family: var(--nl-font);
	color: var(--nl-navy);
	line-height: 1.6;
	position: relative;
	padding-block: var(--nl-section);
	background-size: cover;
	background-position: center;
	-webkit-font-smoothing: antialiased;
}
.defyn-section *, .defyn-section *::before, .defyn-section *::after { box-sizing: border-box; }
.defyn-section button, .defyn-section input, .defyn-section select, .defyn-section textarea { font-family: inherit; }
:where(.defyn-section) img { max-width: 100%; height: auto; display: block; } /* low specificity so component image rules win */
.defyn-section a { color: var(--nl-blue); }
/* Theme (Blocksy) underlines content links; our components style their own links. */
.defyn-section a:not(.wp-block-button__link) { text-decoration: none; background-image: none; }
.defyn-section .text-media__body p a, .defyn-section .faq__answer a { text-decoration: underline; }
.defyn-section .container {
	width: 100%;
	max-width: var(--container);
	margin-inline: auto;
	padding-inline: var(--nl-gutter);
}
@media (max-width: 760px) { .defyn-section { --nl-gutter: 16px; } }
.defyn-section.is-style-narrow { --container: 980px; }
.defyn-section.is-style-wide { --container: 1600px; }
.defyn-section.has-background:not(.has-nl-blue-background-color) { }

/* Alternating bands */
.defyn-section.is-tint, .defyn-section.has-nl-tint-background-color { background-color: var(--nl-tint); }
.defyn-section.has-nl-blue-background-color { background-color: var(--nl-blue); color: #fff; }

/* Section head: eyebrow, heading, intro, optional action on the right */
.nl-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin-bottom: 34px; flex-wrap: wrap; }
.nl-head--center { justify-content: center; text-align: center; }
.nl-head--center .nl-intro { margin-inline: auto; }
.nl-head__text { max-width: 760px; }
.nl-eyebrow { font-size: 11.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--nl-blue); margin: 0 0 12px; }
.nl-title { font-size: clamp(26px, 3vw, 42px); font-weight: 700; line-height: 1.12; letter-spacing: -.02em; color: var(--nl-blue); margin: 0; }
.nl-intro { font-size: 15.5px; line-height: 1.6; color: var(--nl-grey); margin: 14px 0 0; max-width: 62ch; }
.has-nl-blue-background-color .nl-eyebrow { color: var(--nl-sky); }
.has-nl-blue-background-color .nl-title { color: #fff; }
.has-nl-blue-background-color .nl-intro { color: rgba(255,255,255,.84); }

/* Buttons. Labels on orange are navy (6.88:1), never white. */
.nl-btn { display: inline-block; font-size: 13px; font-weight: 700; line-height: 1.2; text-decoration: none; padding: 15px 28px; border: 1.5px solid transparent; white-space: nowrap; cursor: pointer; transition: background-color .2s ease, color .2s ease, border-color .2s ease; }
.nl-btn--primary { background: var(--nl-orange); color: var(--nl-navy) !important; }
.nl-btn--primary:hover { background: #ffa526; }
.nl-btn--outline { border-color: rgba(255,255,255,.6); color: #fff !important; }
.nl-btn--outline:hover { background: rgba(255,255,255,.12); }
.nl-btn--white { background: #fff; color: var(--nl-navy) !important; }
.nl-btn--arrow { padding: 3px 0 4px; border: 0; border-bottom: 2px solid var(--nl-orange); color: var(--nl-blue) !important; }
/* Focus ring: navy on light backgrounds (orange is only 2.1:1 on white, under the 3:1 WCAG 1.4.11 needs); orange on Nolan Blue and photo heroes (3.5:1). */
.nl-btn:focus-visible, .defyn-section a:focus-visible, .defyn-section button:focus-visible, .defyn-section summary:focus-visible { outline: 3px solid var(--nl-navy); outline-offset: 3px; }
.nl-on-dark a:focus-visible, .nl-on-dark button:focus-visible, .nl-bg-blue a:focus-visible, .nl-bg-blue button:focus-visible { outline-color: var(--nl-orange); }

/* Core buttons inside Nolan sections: first = orange, others = outline (on dark) or blue outline (on light) */
.defyn-section .wp-block-buttons { display: flex; flex-wrap: wrap; gap: 14px; }
.defyn-section .wp-block-button .wp-block-button__link { border-radius: 0; font-family: var(--nl-font); font-size: 13px; font-weight: 700; padding: 15px 28px; background: var(--nl-orange); color: var(--nl-navy); border: 1.5px solid var(--nl-orange); text-decoration: none; }
.defyn-section .wp-block-button + .wp-block-button .wp-block-button__link,
.defyn-section .wp-block-buttons .wp-block-button.is-style-outline .wp-block-button__link { background: transparent; color: var(--nl-blue); border-color: var(--nl-blue); }
.nl-on-dark .wp-block-button + .wp-block-button .wp-block-button__link,
.nl-on-dark .wp-block-button.is-style-outline .wp-block-button__link { color: #fff; border-color: rgba(255,255,255,.6); }

/* Hairline grids: 1px gaps over a rule-coloured background */
/* Cells draw their own 1px lines, so a part-filled last row has no grey gap. */
.nl-hairline { display: grid; gap: 1px; padding: 1px; list-style: none; margin: 0; }
.nl-hairline > * { background: #fff; margin: 0; box-shadow: 0 0 0 1px var(--nl-rule); }

/* Brand device watermark (decorative) */
.nl-watermark { position: absolute; z-index: -1; pointer-events: none; height: auto; }
.nl-isolate { isolation: isolate; overflow: hidden; }

/* Chips */
.nl-chip { display: inline-block; background: var(--nl-blue); color: #fff; font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; padding: 5px 9px; }

.screen-reader-text.nl-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap; }

@media (prefers-reduced-motion: reduce) {
	.defyn-section *, .defyn-section *::before, .defyn-section *::after { transition: none !important; animation: none !important; }
}

/* Editor helpers */
.defyn-media-placeholder { min-height: 160px; }
.nl-editor-note { font-size: 12px; font-style: italic; color: #8FA3BF; margin: 8px 0 0; }

/* Background bands (block setting, not free colour picking) */
.defyn-section.nl-bg-white { background-color: #fff; }
.defyn-section.nl-bg-tint { background-color: var(--nl-tint); border-top: 1px solid var(--nl-rule); border-bottom: 1px solid var(--nl-rule); }
.defyn-section.nl-bg-blue { background-color: var(--nl-blue); color: #fff; }
.nl-bg-blue .nl-eyebrow { color: var(--nl-sky); }
.nl-bg-blue .nl-title { color: #fff; }
.nl-bg-blue .nl-intro { color: rgba(255,255,255,.84); }
.nl-bg-blue .nl-btn--arrow { color: #fff !important; }

/* Editor canvas: keep the same gutters and button look as the site (theme editor styles are more specific). */
.editor-styles-wrapper .defyn-section .container { padding-inline: var(--nl-gutter); max-width: var(--container); margin-inline: auto; }
.editor-styles-wrapper .defyn-section .wp-block-button .wp-block-button__link { background: var(--nl-orange); color: var(--nl-navy); border-color: var(--nl-orange); }
.editor-styles-wrapper .defyn-section .wp-block-button + .wp-block-button .wp-block-button__link { background: transparent; color: var(--nl-blue); border-color: var(--nl-blue); }
.editor-styles-wrapper .nl-on-dark .wp-block-button + .wp-block-button .wp-block-button__link { color: #fff; border-color: rgba(255,255,255,.6); }
/* Editor canvas, round two (QA 23 Oct): the hero carousel wrapper in the editor is not .defyn-section, and Blocksy's
   ":root h1/h2" editor colour outranks single-class selectors. Match what visitors see. */
.editor-styles-wrapper .wp-block-defyn-hero-carousel .container { padding-inline: var(--nl-gutter); max-width: var(--container); margin-inline: auto; }
.editor-styles-wrapper .wp-block-defyn-hero-carousel .hero-slide__title,
.editor-styles-wrapper .wp-block-defyn-hero-carousel .hero-slide__product,
.editor-styles-wrapper .page-banner .page-banner__title { color: #fff; }
.editor-styles-wrapper .defyn-section .wp-block-button__link,
.editor-styles-wrapper .wp-block-defyn-hero-carousel .wp-block-button__link { border-radius: 0; border-style: solid; border-width: 1.5px; }
.editor-styles-wrapper .wp-block-defyn-hero-carousel .wp-block-button .wp-block-button__link { background: var(--nl-orange); color: var(--nl-navy); border-color: var(--nl-orange); }
.editor-styles-wrapper .wp-block-defyn-hero-carousel .wp-block-button + .wp-block-button .wp-block-button__link { background: transparent; color: #fff; border-color: rgba(255,255,255,.6); }
