/* ==========================================================================
   Naxonify – About page (template-about.php)
   Every rule is scoped to .nx-about so no other page is affected.
   Colors, radii and shadows reuse the theme's own tokens from main.css;
   the fallbacks after each comma are the same values, used only if a
   token is ever renamed.
   ========================================================================== */

.nx-about {
	--nxa-blue: var(--blue-600, #0868f7);
	--nxa-blue-dark: var(--blue-700, #0558d6);
	--nxa-blue-soft: var(--blue-50, #eaf2ff);
	--nxa-blue-on-dark: var(--blue-400, #7eb0ff);
	--nxa-navy: var(--navy-950, #10172d);
	--nxa-navy-2: var(--navy-900, #18233f);
	--nxa-ink: var(--ink, #202942);
	--nxa-muted: var(--text-muted, #5b6475);
	--nxa-on-dark-muted: var(--text-on-dark-muted, #bcc6d9);
	--nxa-surface: var(--surface, #ffffff);
	--nxa-surface-muted: var(--surface-muted, #f5f7fa);
	--nxa-border: var(--border, #e5e9f0);
	--nxa-radius: var(--radius-lg, 16px);
	--nxa-radius-sm: var(--radius-md, 10px);
	--nxa-shadow: var(--shadow-card, 0 1px 2px rgba(16, 23, 45, .04), 0 4px 16px rgba(16, 23, 45, .06));
	--nxa-shadow-hover: var(--shadow-raised, 0 12px 32px rgba(16, 23, 45, .12));
	--nxa-max: var(--container-max, 1200px);
	--nxa-gutter: clamp(20px, 4vw, 32px);
	--nxa-section-y: clamp(64px, 8vw, 112px);
	--nxa-ease: cubic-bezier(.2, .7, .2, 1);

	color: var(--nxa-ink);
	overflow-x: clip; /* hero shapes never cause horizontal scroll */
}

/* Classic themes may wrap group blocks in an inner container; let the
   grid/flex rules below see the real children either way. */
.nx-about .wp-block-group__inner-container { display: contents; }

.nx-about *,
.nx-about *::before,
.nx-about *::after { box-sizing: border-box; }

/* ---------- Shared section frame ---------- */
.nx-about .nx-about-section {
	position: relative;
	margin: 0;
	padding-block: var(--nxa-section-y);
	padding-inline: max(var(--nxa-gutter), (100% - var(--nxa-max)) / 2);
}
.nx-about .nx-about-section--muted { background: var(--nxa-surface-muted); }

.nx-about h1,
.nx-about h2,
.nx-about h3 {
	color: var(--nxa-navy);
	font-weight: 800;
	letter-spacing: -0.02em;
	margin: 0;
	text-wrap: balance;
	overflow-wrap: break-word;
}
.nx-about h2 { font-size: clamp(1.75rem, 1.2rem + 2vw, 2.75rem); line-height: 1.15; }
.nx-about h3 { font-size: clamp(1.125rem, 1rem + .4vw, 1.3rem); line-height: 1.3; }
.nx-about p { margin: 0; line-height: 1.7; overflow-wrap: break-word; }

/* Bold text inside headings and paragraphs = brand highlight.
   (In the editor: select words and press Bold to highlight them.) */
.nx-about h1 strong,
.nx-about h2 strong,
.nx-about h3 strong { color: var(--nxa-blue); font-weight: inherit; }
.nx-about p strong {
	color: var(--nxa-navy);
	font-weight: 700;
	background: linear-gradient(transparent 62%, rgba(8, 104, 247, .16) 62%);
	padding-inline: 2px;
}

.nx-about .nx-about-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: .78rem;
	font-weight: 700;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--nxa-blue);
	margin-bottom: 18px;
}
.nx-about .nx-about-eyebrow::before {
	content: "";
	width: 22px;
	height: 2px;
	border-radius: 2px;
	background: currentColor;
}

.nx-about .nx-about-section__head { max-width: 720px; margin-bottom: clamp(36px, 5vw, 56px); }

/* ---------- 1. Hero ---------- */
.nx-about .nx-about-hero {
	padding-block: clamp(72px, 10vw, 136px) clamp(64px, 9vw, 120px);
	background: var(--nxa-surface);
	isolation: isolate;
	overflow: hidden;
}
.nx-about .nx-about-hero :is(.nx-about-eyebrow, h1, .nx-about-lead) { position: relative; }

/* Soft brand shapes drifting slowly behind the copy */
.nx-about .nx-about-hero::before,
.nx-about .nx-about-hero::after {
	content: "";
	position: absolute;
	z-index: -1; /* always behind the copy (hero is isolated) */
	border-radius: 50%;
	pointer-events: none;
	will-change: transform;
}
.nx-about .nx-about-hero::before {
	width: clamp(280px, 42vw, 620px);
	aspect-ratio: 1;
	right: max(-160px, -12vw);
	top: -18%;
	background: radial-gradient(circle at 35% 35%, rgba(8, 104, 247, .16), rgba(8, 104, 247, 0) 68%);
	animation: nxa-drift 18s ease-in-out infinite alternate;
}
.nx-about .nx-about-hero::after {
	width: clamp(200px, 28vw, 420px);
	aspect-ratio: 1;
	right: clamp(8%, 18vw, 26%);
	bottom: -30%;
	border: 1px solid rgba(8, 104, 247, .14);
	background:
		radial-gradient(rgba(16, 23, 45, .10) 1.2px, transparent 1.3px) 0 0 / 18px 18px;
	-webkit-mask: radial-gradient(circle, #000 55%, transparent 72%);
	        mask: radial-gradient(circle, #000 55%, transparent 72%);
	animation: nxa-drift-2 22s ease-in-out infinite alternate;
}

.nx-about .nx-about-hero h1 {
	font-size: clamp(2.1rem, 1.3rem + 3.6vw, 4rem);
	line-height: 1.08;
	letter-spacing: -0.03em;
	max-width: 18ch;
}
.nx-about .nx-about-hero .nx-about-lead {
	margin-top: 24px;
	max-width: 600px;
	font-size: clamp(1.05rem, 1rem + .35vw, 1.25rem);
	color: var(--nxa-muted);
}
.nx-about .nx-about-hero .nx-about-eyebrow {
	padding: 7px 14px;
	border-radius: var(--radius-pill, 999px);
	background: var(--nxa-blue-soft);
}
.nx-about .nx-about-hero .nx-about-eyebrow::before { width: 8px; height: 8px; border-radius: 50%; }

/* Hero entrance (pure CSS, runs on first paint) */
.nx-about .nx-about-hero :is(.nx-about-eyebrow, h1, .nx-about-lead) { animation: nxa-rise .8s var(--nxa-ease) both; }
.nx-about .nx-about-hero h1 { animation-delay: .08s; }
.nx-about .nx-about-hero .nx-about-lead { animation-delay: .16s; }

/* ---------- 2. Philosophy ---------- */
.nx-about .nx-about-split {
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
	gap: clamp(32px, 6vw, 96px);
	align-items: start;
}
.nx-about .nx-about-split__body { display: grid; gap: 20px; font-size: clamp(1.02rem, .98rem + .25vw, 1.15rem); color: var(--nxa-muted); }
.nx-about .nx-about-split__body .nx-about-statement {
	font-size: clamp(1.3rem, 1.1rem + .9vw, 1.75rem);
	line-height: 1.4;
	font-weight: 700;
	color: var(--nxa-navy);
	letter-spacing: -0.01em;
	padding-left: 20px;
	border-left: 3px solid var(--nxa-blue);
}
.nx-about .nx-about-split__body .nx-about-statement strong { background: none; color: var(--nxa-blue); padding: 0; }

/* ---------- 3. Approach cards ---------- */
.nx-about .nx-about-cards {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(16px, 2vw, 28px);
}
.nx-about .nx-about-card {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 14px;
	margin: 0;
	padding: clamp(26px, 3vw, 36px);
	background: var(--nxa-surface);
	border: 1px solid var(--nxa-border);
	border-radius: var(--nxa-radius);
	box-shadow: var(--nxa-shadow);
	color: var(--nxa-muted);
	transition: transform .35s var(--nxa-ease), box-shadow .35s var(--nxa-ease), border-color .35s var(--nxa-ease);
}
.nx-about .nx-about-card:hover {
	transform: translateY(-6px);
	box-shadow: var(--nxa-shadow-hover);
	border-color: rgba(8, 104, 247, .28);
}
/* Icon tile — the icon is drawn by CSS so the editor only holds text */
.nx-about .nx-about-card::before {
	content: "";
	width: 52px;
	height: 52px;
	margin-bottom: 6px;
	border-radius: 14px;
	background-color: var(--nxa-blue-soft);
	background-repeat: no-repeat;
	background-position: center;
	background-size: 26px;
	transition: transform .35s var(--nxa-ease);
}
.nx-about .nx-about-card:hover::before { transform: scale(1.06); }
/* 1: target (business first) */
.nx-about .nx-about-card:nth-child(1)::before {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230868f7' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Ccircle cx='12' cy='12' r='5'/%3E%3Ccircle cx='12' cy='12' r='1.4' fill='%230868f7'/%3E%3C/svg%3E");
}
/* 2: chart + person (data informs, people decide) */
.nx-about .nx-about-card:nth-child(2)::before {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230868f7' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 20h18'/%3E%3Cpath d='M6 16v-4M10 16V8M14 16v-6'/%3E%3Ccircle cx='18.5' cy='7' r='2'/%3E%3Cpath d='M15.5 14a3 3 0 0 1 6 0'/%3E%3C/svg%3E");
}
/* 3: compass (build for today, prepare for next) */
.nx-about .nx-about-card:nth-child(3)::before {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230868f7' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='m15.5 8.5-2 5-5 2 2-5z'/%3E%3C/svg%3E");
}

/* ---------- 4. Values ---------- */
.nx-about .nx-about-values {
	display: grid;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	gap: clamp(14px, 1.6vw, 22px);
	counter-reset: nxa-value;
}
.nx-about .nx-about-value {
	grid-column: span 2;
	counter-increment: nxa-value;
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 18px;
	margin: 0;
	padding: clamp(24px, 2.6vw, 32px);
	background: var(--nxa-surface);
	border: 1px solid var(--nxa-border);
	border-radius: var(--nxa-radius);
	overflow: hidden;
	transition: transform .35s var(--nxa-ease), box-shadow .35s var(--nxa-ease), border-color .35s var(--nxa-ease);
}
.nx-about .nx-about-value:nth-child(4),
.nx-about .nx-about-value:nth-child(5) { grid-column: span 3; }
.nx-about .nx-about-value::before {
	content: counter(nxa-value, decimal-leading-zero);
	font-size: clamp(2.2rem, 1.8rem + 1.4vw, 3rem);
	font-weight: 800;
	line-height: 1;
	letter-spacing: -0.04em;
	color: transparent;
	-webkit-text-stroke: 1.5px rgba(8, 104, 247, .55);
	transition: color .35s var(--nxa-ease);
}
.nx-about .nx-about-value::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	height: 3px;
	width: 100%;
	background: var(--nxa-blue);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform .45s var(--nxa-ease);
}
.nx-about .nx-about-value:hover { transform: translateY(-4px); box-shadow: var(--nxa-shadow-hover); border-color: transparent; }
.nx-about .nx-about-value:hover::before { color: var(--nxa-blue); }
.nx-about .nx-about-value:hover::after { transform: scaleX(1); }
.nx-about .nx-about-value p {
	font-size: clamp(1.1rem, 1rem + .45vw, 1.35rem);
	line-height: 1.35;
	font-weight: 600;
	color: var(--nxa-muted);
}
.nx-about .nx-about-value p strong { background: none; padding: 0; color: var(--nxa-blue); font-weight: 800; }

/* ---------- 5. CTA ---------- */
.nx-about .nx-about-cta { padding-block: clamp(48px, 7vw, 96px) var(--nxa-section-y); }
.nx-about .nx-about-cta__panel {
	position: relative;
	overflow: hidden;
	isolation: isolate;
	display: grid;
	justify-items: center;
	gap: 18px;
	text-align: center;
	padding: clamp(44px, 7vw, 88px) clamp(24px, 6vw, 80px);
	border-radius: clamp(18px, 2vw, 24px);
	background: var(--nxa-navy);
	color: var(--nxa-on-dark-muted);
}
.nx-about .nx-about-cta__panel::before {
	content: "";
	position: absolute;
	inset: auto -10% -60% auto;
	z-index: -1;
	width: min(560px, 80%);
	aspect-ratio: 1;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(8, 104, 247, .38), rgba(8, 104, 247, 0) 65%);
}
.nx-about .nx-about-cta__panel h2 { color: #fff; max-width: 20ch; }
.nx-about .nx-about-cta__panel h2 strong { color: var(--nxa-blue-on-dark); }
.nx-about .nx-about-cta__panel p { max-width: 620px; font-size: clamp(1rem, .96rem + .25vw, 1.15rem); }
.nx-about .nx-about-cta__panel .wp-block-buttons { margin-top: 10px; justify-content: center; }

/* Buttons (match the site's pill CTA) */
.nx-about .wp-block-buttons { display: flex; flex-wrap: wrap; gap: 12px; }
.nx-about .wp-block-button { margin: 0; }
.nx-about .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 52px;
	padding: 14px 30px;
	border-radius: var(--radius-pill, 999px);
	background: var(--nxa-blue);
	color: #fff;
	font: inherit;
	font-weight: 700;
	font-size: 1.02rem;
	line-height: 1.2;
	text-decoration: none;
	border: 0;
	box-shadow: 0 8px 24px rgba(8, 104, 247, .35);
	transition: background-color .25s ease, transform .25s var(--nxa-ease), box-shadow .25s ease;
}
.nx-about .wp-block-button__link::after {
	content: "";
	width: 14px;
	height: 14px;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 17 17 7M8 7h9v9'/%3E%3C/svg%3E") center / contain no-repeat;
	        mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 17 17 7M8 7h9v9'/%3E%3C/svg%3E") center / contain no-repeat;
	transition: transform .25s var(--nxa-ease);
}
.nx-about .wp-block-button__link:hover,
.nx-about .wp-block-button__link:focus-visible {
	background: var(--nxa-blue-dark);
	color: #fff;
	transform: translateY(-2px);
	box-shadow: 0 14px 32px rgba(8, 104, 247, .45);
}
.nx-about .wp-block-button__link:hover::after { transform: translate(2px, -2px); }
.nx-about .wp-block-button__link:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

/* ---------- Scroll reveals (only once about.js is running) ---------- */
.nx-about.nx-about--js .nx-about-section:not(.nx-about-hero),
.nx-about.nx-about--js .nx-about-card,
.nx-about.nx-about--js .nx-about-value {
	opacity: 0;
	translate: 0 28px;
}
.nx-about.nx-about--js .nx-about-section.is-visible:not(.nx-about-hero),
.nx-about.nx-about--js .nx-about-card.is-visible,
.nx-about.nx-about--js .nx-about-value.is-visible {
	opacity: 1;
	translate: 0 0;
	transition: opacity .7s var(--nxa-ease) var(--nx-delay, 0ms),
	            translate .7s var(--nxa-ease) var(--nx-delay, 0ms),
	            transform .35s var(--nxa-ease), box-shadow .35s var(--nxa-ease), border-color .35s var(--nxa-ease);
}

@keyframes nxa-rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes nxa-drift { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(-40px, 30px, 0) scale(1.08); } }
@keyframes nxa-drift-2 { from { transform: translate3d(0, 0, 0) rotate(0deg); } to { transform: translate3d(30px, -24px, 0) rotate(20deg); } }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
	.nx-about .nx-about-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.nx-about .nx-about-card:nth-child(3) { grid-column: 1 / -1; }
	.nx-about .nx-about-values { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.nx-about .nx-about-value,
	.nx-about .nx-about-value:nth-child(4) { grid-column: span 1; }
	.nx-about .nx-about-value:nth-child(5) { grid-column: 1 / -1; }
}
@media (max-width: 781px) {
	.nx-about .nx-about-split { grid-template-columns: minmax(0, 1fr); gap: 24px; }
	.nx-about .nx-about-cards { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
	.nx-about .nx-about-values { grid-template-columns: minmax(0, 1fr); }
	.nx-about .nx-about-value:nth-child(n) { grid-column: auto; flex-direction: row; align-items: center; gap: 18px; }
	.nx-about .nx-about-value::before { min-width: 2.6ch; font-size: 2rem; }
	.nx-about .wp-block-buttons,
	.nx-about .wp-block-button { width: 100%; }
	.nx-about .wp-block-button__link { width: 100%; }
	.nx-about .nx-about-split__body .nx-about-statement { padding-left: 16px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
	.nx-about *,
	.nx-about *::before,
	.nx-about *::after,
	.nx-about .nx-about-hero::before,
	.nx-about .nx-about-hero::after {
		animation: none !important;
		transition: none !important;
	}
	.nx-about .nx-about-card:hover,
	.nx-about .nx-about-value:hover,
	.nx-about .wp-block-button__link:hover { transform: none; }
}
