/*
Theme Name:  Nanook Software Child
Theme URI:   https://nanooksoftware.com
Description: Nanook Software child theme for Astra. Design tokens, PHP page templates, and the aurora-wave motif for nanooksoftware.com.
Author:      Nanook Software (Kerry Hataley)
Author URI:  https://nanooksoftware.com
Template:    astra
Version:     1.0.0
Text Domain: nanooksoftware-child
*/

/* ============================================================
   1. Design tokens (NANOOK-REDESIGN-PLAN.md §2)
   ============================================================ */
:root {
	--nk-navy: #16283a;
	--nk-navy-deep: #0e1d2c;
	--nk-navy-deepest: #0b1622;
	--nk-ice: #a9c6d6;
	--nk-ice-light: #eaf2f7;
	--nk-bg: #f5f9fb;
	--nk-border: #dde8ee;
	/* Plan §2 specifies #3e7ea3; darkened one step to meet WCAG AA 4.5:1
	   for eyebrow/link text on the #f5f9fb page background. */
	--nk-accent: #3b7899;
	--nk-cyan: #7fd4e8;
	--nk-body: #3c4f5e;
	--nk-muted: #5f7482;
	--nk-white: #ffffff;
	--nk-strip-border: #24425c;
	--nk-steel: #223e58;
	--nk-font-head: 'Familjen Grotesk', sans-serif;
	--nk-font-body: 'Inter', sans-serif;
	--nk-radius: 8px;
}

/* ============================================================
   2. Global typography & base
   ============================================================ */
body {
	background: var(--nk-bg);
	color: var(--nk-body);
	font-family: var(--nk-font-body);
}

h1, h2, h3, h4, h5, h6,
.entry-title, .site-title {
	font-family: var(--nk-font-head);
	color: var(--nk-navy);
	font-weight: 600;
}

a {
	color: var(--nk-accent);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.wp-block-button__link:focus-visible {
	outline: 2px solid var(--nk-accent);
	outline-offset: 2px;
}

/* Header: white bar, ice underline on the active nav item */
.site-header,
.main-header-bar {
	background: var(--nk-white);
}

.main-header-menu .menu-item .menu-link {
	font-family: var(--nk-font-body);
	font-weight: 500;
	color: var(--nk-navy);
}

.main-header-menu .current-menu-item > .menu-link,
.main-header-menu .current_page_item > .menu-link {
	color: var(--nk-navy);
	box-shadow: inset 0 -3px 0 var(--nk-ice);
}

/* Footer: navy bar */
.site-footer {
	background: var(--nk-navy);
	color: var(--nk-ice-light);
}

.site-footer a,
.site-footer .ast-footer-copyright {
	color: var(--nk-ice);
}

.site-footer a:hover {
	color: var(--nk-white);
}

/* ============================================================
   3. Shared section primitives
   ============================================================ */
.nk-section {
	padding: 4.5rem 1.5rem;
}

.nk-eyebrow {
	font-family: var(--nk-font-body);
	font-size: 12px;
	font-weight: 500;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--nk-accent);
	margin-bottom: 0.75rem;
}

.nk-dark .nk-eyebrow,
.nk-eyebrow--dark {
	color: var(--nk-ice);
}

/* Dark navy sections with the aurora-wave motif */
.nk-dark {
	background: var(--nk-navy);
	color: var(--nk-white);
	position: relative;
	overflow: hidden;
}

.nk-dark h1, .nk-dark h2, .nk-dark h3, .nk-dark h4 {
	color: var(--nk-white);
}

.nk-dark p {
	color: rgba(255, 255, 255, 0.85);
}

.nk-waves {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 120px;
	pointer-events: none;
}

.nk-waves svg {
	display: block;
	width: 100%;
	height: 100%;
}

/* Content above the waves */
.nk-dark > *:not(.nk-waves) {
	position: relative;
	z-index: 1;
}

/* ============================================================
   3b. Layout utilities (replacing Gutenberg group/columns)
   ============================================================ */
/* Nanook templates render their own full-bleed sections; neutralize
   Astra's container cap (max-width:1280px at ≥922px) and its flex
   container, which otherwise pin every page to a fixed width. Scoped to
   .site-content so the header/footer containers keep their normal
   width and edge padding. */
.ast-page-builder-template .site-content .ast-container {
	max-width: 100%;
	padding-left: 0;
	padding-right: 0;
	display: block;
}

.nk-main {
	width: 100%;
}

.nk-wrap {
	margin-inline: auto;
	width: 100%;
}

.nk-wrap--760 { max-width: 760px; }
.nk-wrap--860 { max-width: 860px; }
.nk-wrap--900 { max-width: 900px; }
.nk-wrap--1000 { max-width: 1000px; }
.nk-wrap--1140 { max-width: 1140px; }

.nk-section-head {
	text-align: center;
	margin-bottom: 2rem;
}

.nk-section-head h2 {
	margin: 0 auto;
}

.nk-grid {
	display: grid;
	gap: 1.75rem;
}

.nk-grid--2 { grid-template-columns: repeat(2, 1fr); }
.nk-grid--3 { grid-template-columns: repeat(3, 1fr); }
.nk-grid--4 { grid-template-columns: repeat(4, 1fr); }

/* Full-width card spanning all columns of its grid */
.nk-card--wide { grid-column: 1 / -1; }

/* About bio: photo column + text column */
.nk-bio-grid {
	display: grid;
	grid-template-columns: 220px 1fr;
	gap: 2.5rem;
	align-items: start;
}

/* Contact: form (62%) + details sidebar (38%) */
.nk-contact-grid {
	display: grid;
	grid-template-columns: 1.63fr 1fr;
	gap: 1.75rem;
	align-items: start;
}

@media (max-width: 921px) {
	.nk-grid--2,
	.nk-grid--3,
	.nk-grid--4,
	.nk-contact-grid {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 600px) {
	.nk-bio-grid {
		grid-template-columns: 1fr;
	}

	.nk-bio-grid > div:first-child {
		max-width: 220px;
		margin-inline: auto;
	}
}

/* ============================================================
   4. Hero (Home) & page heroes
   ============================================================ */
.nk-hero {
	padding: 7rem 1.5rem 6rem;
	text-align: center;
}

.nk-hero h1 {
	font-size: clamp(2.1rem, 5vw, 3.25rem);
	line-height: 1.15;
	margin: 0.5rem auto 1rem;
	max-width: 22ch;
}

.nk-hero .nk-hero-sub {
	font-size: 1.1rem;
	line-height: 1.65;
	max-width: 58ch;
	margin: 0 auto 2rem;
}

.nk-page-hero {
	padding: 5.5rem 1.5rem 4.5rem;
	text-align: center;
	/* Same aurora-lit navy as the Home hero (glow centered for the
	   centered layout). */
	background:
		radial-gradient(ellipse at 50% 0%, rgba(127, 212, 232, 0.20), transparent 60%),
		linear-gradient(160deg, #2f5273 0%, #223e58 50%, #16283a 100%);
}

.nk-page-hero .nk-waves {
	filter: saturate(1.4) brightness(1.35);
}

.nk-page-hero h1 {
	font-size: clamp(1.9rem, 4.5vw, 2.75rem);
	line-height: 1.2;
	margin: 0.5rem auto 0.75rem;
}

.nk-page-hero .nk-hero-sub {
	max-width: 58ch;
	margin: 0 auto;
}

/* Home hero: copy left, transparent GP ecosystem visualization right
   (stacks and centers on mobile).
   Aurora-lit navy: ice/cyan glow over a steel-navy → brand-navy gradient,
   lifting the flat #16283a that read too dark. */
.nk-hero--home {
	text-align: left;
	padding: 5rem 1.5rem 4.5rem;
	background:
		radial-gradient(ellipse at 70% 25%, rgba(127, 212, 232, 0.20), transparent 60%),
		linear-gradient(160deg, #2f5273 0%, #223e58 50%, #16283a 100%);
}

.nk-hero--home .nk-waves {
	filter: saturate(1.4) brightness(1.35);
}

.nk-hero-grid {
	display: grid;
	grid-template-columns: 1fr 1.6fr;
	gap: 3rem;
	align-items: center;
	max-width: 1240px;
}

.nk-hero--home h1 {
	margin: 0.5rem 0 1rem;
}

.nk-hero--home .nk-hero-sub {
	margin: 0 0 2rem;
}

.nk-hero--home .nk-buttons {
	justify-content: flex-start;
}

.nk-hero-viz {
	width: 100%;
}

@media (max-width: 921px) {
	.nk-hero-grid {
		grid-template-columns: 1fr;
		gap: 2.5rem;
	}

	.nk-hero--home {
		text-align: center;
	}

	.nk-hero--home h1,
	.nk-hero--home .nk-hero-sub {
		margin-inline: auto;
	}

	.nk-hero--home .nk-buttons {
		justify-content: center;
	}
}

/* ============================================================
   5. Buttons
   ============================================================ */
.nk-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	justify-content: center;
}

.nk-btn {
	display: inline-block;
	border-radius: 6px;
	font-family: var(--nk-font-body);
	font-weight: 500;
	padding: 0.8em 1.8em;
	text-decoration: none;
	transition: background-color 0.2s ease, color 0.2s ease;
}

/* Primary on light: steel fill / white text (hero-gradient mid tone) */
.nk-btn-navy {
	background: var(--nk-steel);
	color: var(--nk-white);
}

.nk-btn-navy:hover {
	background: var(--nk-navy);
	color: var(--nk-white);
}

/* Primary on dark: ice fill / navy text */
.nk-btn-ice {
	background: var(--nk-ice);
	color: var(--nk-navy);
}

.nk-btn-ice:hover {
	background: var(--nk-ice-light);
	color: var(--nk-navy);
}

/* Outlined secondary on dark */
.nk-btn-outline-light {
	background: transparent;
	color: var(--nk-white);
	border: 1px solid rgba(255, 255, 255, 0.55);
}

.nk-btn-outline-light:hover {
	background: rgba(255, 255, 255, 0.1);
	color: var(--nk-white);
}

/* Outlined secondary on light */
.nk-btn-outline-navy {
	background: transparent;
	color: var(--nk-navy);
	border: 1px solid var(--nk-navy);
}

.nk-btn-outline-navy:hover {
	background: var(--nk-navy);
	color: var(--nk-white);
}

/* ============================================================
   6. Cards
   ============================================================ */
.nk-card {
	background: var(--nk-white);
	border: 1px solid var(--nk-border);
	border-radius: var(--nk-radius);
	padding: 2rem;
	height: 100%;
}

.nk-card h3 {
	margin-top: 0;
}

.nk-card--ice {
	border-top: 3px solid var(--nk-ice);
}

.nk-card--navy {
	border-top: 3px solid var(--nk-navy);
}

.nk-card--accent {
	border-top: 3px solid var(--nk-accent);
}

.nk-card ul {
	margin: 1rem 0 0;
	padding-left: 1.2em;
	color: var(--nk-body);
}

.nk-card ul li {
	margin-bottom: 0.45em;
	line-height: 1.5;
}

/* Integration cards. All three logo files are cropped to their content
   boxes, so one shared img height = genuinely equal visible size. The
   logo sits in a fixed-height slot so every card's heading starts on the
   same line, and the card is a flex column so "Learn more" links pin to
   the bottom edge regardless of description length. */
.nk-int-card {
	text-align: left;
	display: flex;
	flex-direction: column;
}

.nk-int-card .nk-int-logo {
	margin: 0 0 1rem;
	height: 66px;
	display: flex;
	align-items: center;
}

.nk-int-card .nk-int-logo img {
	height: 57px;
	width: auto;
	max-width: 100%;
	object-fit: contain;
	object-position: left center;
}

.nk-int-card .nk-learn-more {
	margin-top: auto;
	margin-bottom: 0;
	padding-top: 0.75rem;
}

.nk-int-card .nk-learn-more a {
	font-weight: 500;
	text-decoration: none;
}

.nk-int-card .nk-learn-more a:hover {
	text-decoration: underline;
}

/* Integration detail page: logo card + "coming soon" expandable */
.nk-int-detail {
	text-align: center;
}

.nk-int-detail .nk-int-logo {
	height: auto;
	justify-content: center;
}

.nk-int-detail .nk-int-logo img {
	height: 72px;
	object-position: center;
}

.nk-coming-soon {
	background: var(--nk-white);
	border: 1px solid var(--nk-border);
	border-radius: var(--nk-radius);
	margin-top: 1.5rem;
	padding: 1.1rem 1.4rem;
}

.nk-coming-soon summary {
	cursor: pointer;
	font-family: var(--nk-font-head);
	font-weight: 600;
	color: var(--nk-navy);
}

.nk-coming-soon p {
	margin: 1rem 0 0;
}

/* Milestone cards (About) */
.nk-milestone .nk-milestone-year {
	font-family: var(--nk-font-head);
	font-size: 2.25rem;
	font-weight: 600;
	color: var(--nk-navy);
	margin: 0 0 0.35rem;
}

.nk-milestone p {
	color: var(--nk-muted);
	margin: 0;
}

/* ============================================================
   7. Dark banner strips (commitment / community)
   ============================================================ */
.nk-banner {
	background: var(--nk-navy-deep);
	border-top: 1px solid var(--nk-strip-border);
	border-bottom: 1px solid var(--nk-strip-border);
	color: var(--nk-white);
	text-align: center;
	padding: 3.25rem 1.5rem;
}

.nk-banner .nk-banner-icon {
	color: var(--nk-cyan);
	margin-bottom: 0.75rem;
}

.nk-banner .nk-banner-icon svg {
	width: 34px;
	height: 34px;
	stroke: var(--nk-cyan);
}

.nk-banner h2 {
	color: var(--nk-white);
	font-size: clamp(1.35rem, 3vw, 1.75rem);
	margin: 0 auto 0.75rem;
}

.nk-banner p {
	color: rgba(255, 255, 255, 0.8);
	max-width: 62ch;
	margin: 0 auto;
}

/* ============================================================
   7b. Commitment page: pledge badge + founder quote
   ============================================================ */
.nk-knights-badge {
	text-align: center;
	margin: 0 0 2.5rem;
}

.nk-knights-badge img {
	max-width: min(320px, 80%);
	height: auto;
}

.nk-pledge-quote {
	font-family: var(--nk-font-head);
	font-size: clamp(1.15rem, 2.5vw, 1.5rem);
	line-height: 1.5;
	color: var(--nk-white);
	margin: 0 auto 1rem;
}

.nk-pledge-quote-name {
	color: var(--nk-ice);
	font-size: 0.9rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	margin: 0;
}

/* About banner: community logos flanking the centered text. White chips
   because both logos use navy lettering that vanishes on the dark strip. */
.nk-banner-trio {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 2.25rem;
}

.nk-banner-trio-body {
	max-width: 56ch;
}

.nk-banner-trio-body a {
	color: var(--nk-cyan);
}

.nk-banner-trio-body a:hover {
	color: var(--nk-white);
}

.nk-banner-side-logo {
	flex-shrink: 0;
	display: block;
}

.nk-banner-side-logo img {
	display: block;
	width: 160px;
	height: auto;
}

/* Steel variant of the banner strip (About community banner): a shade
   lighter than the hero gradient's lightest stop (#2f5273) — between the
   dark navy strip and white. Logos as white silhouettes. */
.nk-banner--steel {
	background: #426d96;
	border-top: 1px solid #55809f;
	border-bottom: 1px solid #55809f;
}

.nk-banner--steel .nk-banner-trio-body a {
	color: var(--nk-white);
	text-decoration: underline;
}

.nk-banner--steel .nk-banner-trio-body a:hover {
	color: var(--nk-cyan);
}

.nk-banner--steel .nk-banner-side-logo img {
	filter: brightness(0) invert(1);
	opacity: 0.9;
	transition: opacity 0.2s ease;
}

.nk-banner--steel .nk-banner-side-logo:hover img {
	opacity: 1;
}

@media (max-width: 921px) {
	.nk-banner-trio {
		flex-direction: column;
		gap: 1.5rem;
	}

	.nk-banner-trio-body {
		order: -1;
	}
}

/* Home banner: small linked Knights badge left, text right */
.nk-banner-split {
	display: flex;
	align-items: center;
	gap: 2.25rem;
	text-align: left;
}

.nk-banner-split .nk-banner-badge {
	flex-shrink: 0;
}

.nk-banner-split .nk-banner-badge img {
	width: 140px;
	height: auto;
	display: block;
}

.nk-banner-split h2,
.nk-banner-split p {
	margin-left: 0;
	margin-right: 0;
}

.nk-banner-split p a {
	color: var(--nk-cyan);
}

.nk-banner-split p a:hover {
	color: var(--nk-white);
}

@media (max-width: 700px) {
	.nk-banner-split {
		flex-direction: column;
		gap: 1.5rem;
		text-align: center;
	}

	.nk-banner-split .nk-banner-badge img {
		width: 120px;
		margin-inline: auto;
	}
}

/* "Read our commitment" link inside the Home banner strip */
.nk-banner .nk-banner-link {
	margin-top: 1.25rem;
}

.nk-banner .nk-banner-link a {
	color: var(--nk-cyan);
	font-weight: 500;
	text-decoration: none;
}

.nk-banner .nk-banner-link a:hover {
	color: var(--nk-white);
	text-decoration: underline;
}

/* ============================================================
   8. CTA band
   ============================================================ */
.nk-cta-band {
	background: var(--nk-ice-light);
	text-align: center;
	padding: 4.25rem 1.5rem;
}

.nk-cta-band h2 {
	font-size: clamp(1.5rem, 3.5vw, 2.1rem);
	margin: 0 auto 0.75rem;
}

.nk-cta-band p {
	max-width: 60ch;
	margin: 0 auto 1.75rem;
}

/* ============================================================
   9. Expertise pills (About)
   ============================================================ */
.nk-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
	justify-content: center;
	list-style: none;
	margin: 1.5rem 0 0;
	padding: 0;
}

.nk-pills li {
	background: var(--nk-white);
	border: 1px solid var(--nk-border);
	border-radius: 999px;
	padding: 0.45em 1.1em;
	font-size: 0.92rem;
	color: var(--nk-body);
	white-space: nowrap;
}

/* ============================================================
   10. About bio
   ============================================================ */
/* Circular headshot with the Legend award badge pinned bottom-right */
.nk-bio-photo {
	position: relative;
	margin: 0;
}

.nk-bio-photo .nk-bio-headshot {
	display: block;
	width: 100%;
	aspect-ratio: 1;
	object-fit: cover;
	border-radius: 50%;
	border: 1px solid var(--nk-border);
}

.nk-bio-award {
	position: absolute;
	right: 0;
	bottom: 4px;
	width: 64px;
	height: 64px;
	border-radius: 50%;
	box-shadow: 0 0 0 3px var(--nk-white), 0 2px 10px rgba(0, 0, 0, 0.25);
}

.nk-bio-caption {
	margin-top: 0.75rem;
	text-align: center;
}

.nk-bio-caption .nk-bio-name {
	font-family: var(--nk-font-head);
	font-weight: 600;
	color: var(--nk-navy);
	display: block;
}

.nk-bio-caption .nk-bio-role {
	color: var(--nk-muted);
	font-size: 0.9rem;
	display: block;
}

/* ============================================================
   11. Contact layout
   ============================================================ */
.nk-contact-form-card {
	background: var(--nk-white);
	border: 1px solid var(--nk-border);
	border-radius: var(--nk-radius);
	padding: 2rem;
}

.nk-contact-form-card h2 {
	margin-top: 0;
	font-size: 1.4rem;
}

.nk-contact-card {
	background: var(--nk-white);
	border: 1px solid var(--nk-border);
	border-radius: var(--nk-radius);
	padding: 1.4rem 1.6rem;
	margin-bottom: 1rem;
}

.nk-contact-card .nk-eyebrow {
	margin-bottom: 0.35rem;
}

.nk-contact-card p {
	margin: 0;
	color: var(--nk-body);
}

/* Community card: ice-light emphasis, Dynamics Communities logo on top */
.nk-contact-card--ice {
	background: var(--nk-ice-light);
	border-color: var(--nk-ice);
}

.nk-dc-logo {
	margin: 0 0 0.85rem;
}

.nk-dc-logo a {
	display: inline-block;
}

.nk-dc-logo img {
	display: block;
	width: 180px;
	height: auto;
}

/* Fluent Forms styling to match the design system */
.nk-form .ff-el-group {
	margin-bottom: 1rem;
}

.nk-form .ff-el-input--label label {
	display: block;
	font-weight: 500;
	color: var(--nk-navy);
	font-size: 0.95rem;
	margin-bottom: 0.35rem;
}

.nk-form .ff-el-form-control {
	width: 100%;
	border: 1px solid var(--nk-border);
	border-radius: 6px;
	background: var(--nk-white);
	color: var(--nk-body);
	font-family: var(--nk-font-body);
	font-size: 1rem;
	line-height: 1.5;
	height: auto;
	padding: 0.65em 0.85em;
}

.nk-form .ff-el-form-control:focus {
	border-color: var(--nk-accent);
	outline: 2px solid var(--nk-accent);
	outline-offset: 0;
	box-shadow: none;
}

.nk-form .ff-el-is-required.asterisk-right label::after {
	color: #b3261e;
}

.nk-form .ff-btn-submit {
	background: var(--nk-steel);
	color: var(--nk-white);
	border: none;
	border-radius: 6px;
	font-family: var(--nk-font-body);
	font-weight: 500;
	font-size: 1rem;
	padding: 0.8em 2em;
	cursor: pointer;
	transition: background-color 0.2s ease;
}

.nk-form .ff-btn-submit:hover,
.nk-form .ff-btn-submit:focus {
	background: var(--nk-navy);
	color: var(--nk-white);
}

.nk-form .ff-el-group .error,
.nk-form .text-danger {
	color: #b3261e;
	font-size: 0.85rem;
	margin-top: 0.25rem;
}

.nk-form .ff-el-is-error .ff-el-form-control {
	border-color: #b3261e;
}

.nk-form .ff-message-success {
	border: 1px solid var(--nk-border);
	border-radius: 6px;
	background: var(--nk-ice-light);
	color: var(--nk-navy);
	box-shadow: none;
	margin: 1.25rem 0 0;
	padding: 0.75em 1em;
}

/* ============================================================
   11b. Code Whisperer promo card (About + Home)
   ============================================================ */
.nk-cw-card {
	background: var(--nk-ice-light);
	border: 1px solid var(--nk-ice);
	border-radius: var(--nk-radius);
	display: flex;
	align-items: center;
	gap: 2.5rem;
	padding: 2.25rem 2.5rem;
}

.nk-cw-logo {
	flex-shrink: 0;
	display: block;
}

.nk-cw-logo img {
	display: block;
	width: 210px;
	height: auto;
}

.nk-cw-body .nk-eyebrow {
	margin-bottom: 0.4rem;
}

.nk-cw-body h2 {
	font-size: clamp(1.3rem, 3vw, 1.6rem);
	margin: 0 0 0.6rem;
}

.nk-cw-body p {
	margin: 0 0 0.9rem;
}

.nk-cw-body .nk-cw-link {
	margin-bottom: 0;
}

.nk-cw-link a {
	font-weight: 500;
	text-decoration: none;
}

.nk-cw-link a:hover {
	text-decoration: underline;
}

@media (max-width: 700px) {
	.nk-cw-card {
		flex-direction: column;
		text-align: center;
		gap: 1.5rem;
		padding: 1.75rem;
	}

	.nk-cw-logo img {
		width: 180px;
		margin-inline: auto;
	}
}

/* ============================================================
   12. Responsive
   ============================================================ */
@media (max-width: 921px) {
	.nk-hero {
		padding: 5rem 1.25rem 4rem;
	}

	.nk-section {
		padding: 3.25rem 1.25rem;
	}
}

@media (max-width: 600px) {
	.nk-card {
		padding: 1.5rem;
	}

	.nk-pills li {
		font-size: 0.85rem;
	}

	.nk-hero .nk-buttons {
		flex-direction: column;
		align-items: center;
	}
}

/* Respect reduced-motion preferences (ecosystem animation & waves) */
@media (prefers-reduced-motion: reduce) {
	#dgp-ecosystem *,
	#dgp-ecosystem *::before,
	#dgp-ecosystem *::after {
		animation: none !important;
	}
}
