/*
 * Global refinement layer (loaded last).
 * Section chapters, card consistency, CTA prominence and readable small text
 * across every page. Colours come from theme.json tokens.
 */

:root {
	--rf-edge: rgba(157, 168, 255, .16);
	--rf-edge-hi: rgba(157, 168, 255, .34);
	--rf-card: linear-gradient(180deg, rgba(29, 45, 72, .72), rgba(22, 36, 58, .72));
	--rf-radius: 16px;
}

/* Section chapters ---------------------------------------------------- */

/* A hairline of light where one chapter meets the next. */
.ig-section,
.n-band,
.ig-cx { box-shadow: inset 0 1px 0 rgba(157, 168, 255, .07); }

.ig-section.is-style-section-night:not(.ig-service-hero) {
	background:
		radial-gradient(55% 60% at 100% 0%, rgba(118, 97, 255, .12), transparent 60%),
		var(--wp--preset--color--midnight) !important;
}

.ig-section.is-style-section-mist {
	background:
		radial-gradient(60% 70% at 0% 0%, rgba(110, 184, 241, .1), transparent 60%),
		radial-gradient(50% 60% at 100% 100%, rgba(118, 97, 255, .07), transparent 60%),
		var(--wp--preset--color--navy) !important;
}

.ig-section.is-style-section-plum {
	background:
		radial-gradient(60% 70% at 100% 100%, rgba(111, 224, 246, .08), transparent 60%),
		var(--wp--preset--color--plum) !important;
}

/* Plain sections: near-black with a faint technical grid in one corner. */
.ig-section:not([class*="is-style-section-"]):not(.ig-related) {
	position: relative;
	isolation: isolate;
}
.ig-section:not([class*="is-style-section-"]):not(.ig-related)::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background-image: linear-gradient(rgba(157, 168, 255, .045) 1px, transparent 1px), linear-gradient(90deg, rgba(157, 168, 255, .045) 1px, transparent 1px);
	background-size: 56px 56px;
	-webkit-mask-image: radial-gradient(40% 55% at 100% 0%, #000, transparent 70%);
	mask-image: radial-gradient(40% 55% at 100% 0%, #000, transparent 70%);
	pointer-events: none;
}

/* Service and company heroes: a soft accent light behind the copy. */
.ig-service-hero {
	background:
		radial-gradient(50% 80% at 0% 0%, color-mix(in srgb, var(--accent, #7661FF) 16%, transparent), transparent 60%),
		radial-gradient(45% 70% at 100% 100%, rgba(118, 97, 255, .14), transparent 60%),
		var(--wp--preset--color--midnight) !important;
}
.ig-service-hero__title { font-size: clamp(2.2rem, 1.2rem + 3.4vw, 3.6rem) !important; letter-spacing: -.03em; line-height: 1.06; }

/* Section introductions: consistent eyebrow, heading and lede rhythm. */
.ig-section__intro { margin-bottom: clamp(36px, 4vw, 56px); }
.ig-section__intro .is-style-eyebrow { margin-bottom: 14px !important; }
.ig-section :where(h2) { max-width: 24ch; }
.ig-section__lead { color: var(--wp--preset--color--text-2); }

/* Cards ----------------------------------------------------------------- */

.ig-card,
.ig-panel,
.ig-ticket,
.ig-deliver,
.ig-tech__item,
.ig-tba,
.n-ind,
.n-office,
.n-stats,
.n-console,
.n-tslider,
.n-cta,
.ig-form-wrap {
	border-radius: var(--rf-radius) !important;
	border-color: var(--rf-edge) !important;
}

.ig-card,
.ig-panel,
.ig-deliver,
.ig-tech__item,
.n-ind { background: var(--rf-card) !important; transition: border-color .3s ease, transform .3s ease, box-shadow .3s ease; }

.ig-card:hover,
.ig-tech__item:hover,
.n-ind:hover { border-color: var(--rf-edge-hi) !important; box-shadow: 0 24px 50px -32px rgba(118, 97, 255, .7); }

.ig-tech__item { border: 1px solid var(--rf-edge); }

/* Calls to action: a lit panel rather than another flat band. */
.ig-cta .ig-cta__inner {
	position: relative;
	overflow: hidden;
	padding: clamp(36px, 5vw, 64px);
	border-radius: 24px;
	border: 1px solid var(--rf-edge-hi);
	background:
		radial-gradient(70% 90% at 100% 0%, rgba(118, 97, 255, .35), transparent 60%),
		radial-gradient(60% 80% at 0% 100%, rgba(111, 224, 246, .12), transparent 60%),
		rgba(11, 11, 34, .6);
	box-shadow: 0 40px 80px -50px rgba(118, 97, 255, .8);
}
.ig-cta .ig-cta__inner h2 { font-size: clamp(1.9rem, 1.2rem + 2.4vw, 3rem); }

/* Readable small text ------------------------------------------------- */

.n-stat > p:not(.n-num),
.n-ind p,
.n-office .n-addr,
.n-step p,
.n-svc-body p,
.ig-card p,
.ig-scope li,
.ig-checks li,
.ig-tests li,
.ig-tech__item p,
.ig-con-card p,
.ig-reason p,
.ig-spk__role,
.ig-spk__session,
.ig-ev__desc,
.n-card .wp-block-post-excerpt,
.n-fnav .wp-block-navigation-item__content { font-size: max(.95rem, 15px) !important; }

.is-style-eyebrow,
.n-eyebrow,
.ig-cx-eyebrow,
.ig-offer__question,
.ig-offer__label,
.ig-ticket__label { font-size: .78rem !important; letter-spacing: .12em; }

/* Body copy: Manrope medium, comfortable measure. */
.ig-section p,
.n-band p { line-height: 1.7; }
.ig-prose { font-size: 1.0625rem; }
.ig-prose p,
.ig-prose li { max-width: 68ch; }

/* Newsroom press releases */
.ig-press { display: grid; gap: 0; margin: 0; padding: 0; }
.ig-press__item { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 4px 32px; padding: 26px 0; border-top: 1px solid var(--rf-edge); margin: 0 !important; }
.ig-press__item > * { margin: 0 !important; }
.ig-press__date { grid-row: span 2; font-family: var(--wp--preset--font-family--mono); font-size: .8rem; letter-spacing: .06em; color: var(--wp--preset--color--cyan); padding-top: 4px; }
.ig-press__title { font-size: 1.25rem !important; }
.ig-press__title a { color: var(--wp--preset--color--text-1); text-decoration: none; }
.ig-press__title a:hover { color: var(--wp--preset--color--cyan); text-decoration: underline; }
.ig-press__excerpt p { margin: 6px 0 0; }
@media (max-width: 600px) { .ig-press__item { grid-template-columns: minmax(0, 1fr); } .ig-press__date { grid-row: auto; } }

/* Without JavaScript, rotating content is shown in full rather than hidden. */
html:not(.n-js) .n-hslide,
html:not(.n-js) .n-tslide { grid-area: auto; opacity: 1; visibility: visible; transform: none; }
html:not(.n-js) .n-tslide + .n-tslide { margin-top: 28px !important; padding-top: 28px; border-top: 1px solid var(--rf-edge); }
html:not(.n-js) .ig-cx-countdown { display: none; }

/* FAQ (core Details blocks) */
.ig-faq__list { display: grid; gap: 12px; max-width: 900px; }
.ig-faq__list > * { margin: 0 !important; }
.ig-faq__item { border: 1px solid var(--rf-edge); border-radius: 14px; background: var(--rf-card); padding: 0; }
.ig-faq__item summary { cursor: pointer; padding: 20px 24px; font-family: var(--wp--preset--font-family--heading); font-weight: 600; font-size: 1.06rem; color: var(--wp--preset--color--text-1); list-style-position: inside; }
.ig-faq__item summary:focus-visible { outline: 2px solid var(--wp--preset--color--cyan); outline-offset: 2px; border-radius: 14px; }
.ig-faq__item[open] summary { color: var(--wp--preset--color--cyan); }
.ig-faq__item > p { margin: 0; padding: 0 24px 22px; max-width: 72ch; }

/* =====================================================================
 * Global footer (one consolidated layout; replaces earlier piecemeal rules)
 * =================================================================== */

.n-footer { padding: clamp(56px, 6vw, 80px) 26px 28px !important; }
.n-footer > * { margin-block: 0 !important; }

/* Brand column and link area share one top line. */
.n-fgrid {
	display: grid;
	grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
	gap: clamp(32px, 5vw, 72px);
	align-items: start;
}
.n-fgrid > *,
.n-flinks > *,
.n-fcol > * { margin: 0 !important; }

.n-fbrand > * + * { margin-top: 16px !important; }
.n-flogo img { width: 200px !important; height: auto; }
.n-fbrand p { font-size: .94rem; line-height: 1.6; max-width: 34ch; }
.n-faddr { color: var(--wp--preset--color--text-2); }
.n-faddr a { color: var(--wp--preset--color--text-1); }
.n-social { margin-top: 20px !important; }

/* Four equal link columns, tops aligned. */
.n-flinks {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 28px 32px;
	align-items: start;
}
.n-fcol { display: flex; flex-direction: column; min-width: 0; }
.n-fcol__title {
	margin: 0 0 16px !important;
	min-height: 1em;
	line-height: 1.2;
}
.n-fnav,
.n-fnav .wp-block-navigation__container { margin: 0 !important; padding: 0; }
.n-fnav .wp-block-navigation__container { display: flex !important; flex-direction: column; align-items: flex-start; gap: 11px !important; }
.n-fnav .wp-block-navigation-item { margin: 0; }
.n-fnav .wp-block-navigation-item__content {
	padding: 0 !important;
	line-height: 1.4;
	font-size: .94rem !important;
	color: var(--wp--preset--color--text-2);
	transition: color .2s ease;
}
.n-fnav .wp-block-navigation-item__content:hover,
.n-fnav .wp-block-navigation-item__content:focus-visible { color: var(--wp--preset--color--text-1); text-decoration: underline; text-underline-offset: .2em; }

/* Legal row: divider, copyright left, legal links right. */
.n-copy {
	margin-top: clamp(40px, 5vw, 56px) !important;
	padding-top: 22px;
	border-top: 1px solid var(--wp--preset--color--line);
	display: flex !important;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 10px 24px;
	font-size: .86rem;
}
.n-copy > * { margin: 0 !important; }
.n-legal { margin-left: 0 !important; }
.n-copy a { color: var(--wp--preset--color--text-2); text-decoration: none; }
.n-copy a:hover { color: var(--wp--preset--color--text-1); text-decoration: underline; }

/* Laptop and tablet: brand above, four link columns in a row. */
@media (max-width: 1100px) {
	.n-fgrid { grid-template-columns: minmax(0, 1fr); gap: 44px; }
	.n-fbrand { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 40px; align-items: start; }
	.n-fbrand > * + * { margin-top: 0 !important; }
	.n-fbrand > .n-flogo { grid-column: 1 / -1; margin-bottom: 18px !important; }
	.n-fbrand > .n-social { grid-column: 2; margin-top: 18px !important; }
}

/* Small tablet: two link columns. */
@media (max-width: 720px) {
	.n-fbrand { display: block; }
	.n-fbrand > * + * { margin-top: 16px !important; }
	.n-flinks { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 24px; }
	.n-copy { flex-direction: column; align-items: flex-start; }
}

/* Very narrow phones: one column. */
@media (max-width: 359.98px) {
	.n-flinks { grid-template-columns: minmax(0, 1fr); }
}
.n-fcol__title { font-feature-settings: "zero" 1; }
@media (max-width: 1100px) { .n-fbrand > .n-social { margin-top: 14px !important; } }

/* Site-wide heading consistency.
   Page headers (insights, archives, articles, legal) use the same title scale as
   service and company heroes, and every closing call to action uses one size
   whether or not the editor applied a font-size preset. */
.ig-page-header h1,
.ig-page-header .wp-block-post-title,
.ig-page-header .wp-block-query-title { font-size: clamp(2.2rem, 1.2rem + 3.4vw, 3.6rem) !important; letter-spacing: -.03em; line-height: 1.06; }
.ig-cta .ig-cta__inner h2 { font-size: clamp(1.9rem, 1.2rem + 2.4vw, 3rem) !important; }

/* Homepage contact section.
   An older rule made each contact line a 20px + 1fr grid for an inline SVG icon.
   The icon later moved to an absolutely positioned ::before, so the text itself
   landed in the 20px column and wrapped a few characters per line. Lines are
   ordinary blocks again, set as quiet detail rows beside the form. */
.n-cgrid { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(40px, 5vw, 72px); }
.n-cgrid > * { min-width: 0; }
ul.n-cmeta { gap: 10px; margin-top: 32px; max-width: 460px; }
ul.n-cmeta > li {
	display: block;
	min-width: 0;
	overflow-wrap: break-word;
	padding: 15px 18px 15px 52px;
	border: 1px solid var(--n-line);
	border-radius: 12px;
	background: rgba(255, 255, 255, .025);
	line-height: 1.5;
}
ul.n-cmeta > li::before { left: 18px; top: 17px; }
ul.n-cmeta > li:nth-child(n+3) { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M3 10h18M8 3v4M16 3v4'/%3E%3C/svg%3E"); }
@media (max-width: 980px) {
	.n-cgrid { grid-template-columns: minmax(0, 1fr); }
	ul.n-cmeta { max-width: none; }
}
.n-cgrid > .n-reveal { display: flex; flex-direction: column; gap: 18px; }
.n-cgrid > .n-reveal > ul.n-cmeta { margin-top: 14px; }
.n-cgrid > .n-reveal > .n-lede { max-width: 46ch; }
