/**
 * Nova Digital Forge - 2026 design system.
 *
 * assets/css/site.css is a prebuilt Tailwind artifact and there is no build step
 * in this theme, so it cannot be regenerated. It does not need to be: every
 * colour utility in it compiles to rgb(var(--nd-*)), and the display type reads
 * var(--font-serif). Redefining those custom properties therefore restyles the
 * whole site consistently, and scoping an override to one section inverts that
 * subtree without touching a single utility class.
 *
 * Selectors are :root-prefixed to match the generated utilities' specificity
 * (they ship as `:root .relative{...}`, not `.relative{...}`).
 *
 * Palette
 *   Deep charcoal      #111315   page ground, hero, footer
 *   Secondary charcoal #1B1F22   lifted dark sections, surfaces
 *   Warm white         #F7F7F2   light sections, text on dark
 *   Signal gold        #C9A43B   primary CTA, active state, small highlights
 *   Soft grey          #A6AAA6   supporting copy on dark
 *   Light border       #E4E6E0   hairlines on light
 */

/* -------------------------------------------------------------------------- */
/*  Dark ground (default)                                                     */
/* -------------------------------------------------------------------------- */

:root {
	--nd-bg: 17 19 21;
	--nd-bg-deep: 27 31 34;
	--nd-surface: 27 31 34;
	--nd-surface-2: 33 38 41;
	--nd-elevated: 42 48 51;

	--nd-border: 40 45 48;
	--nd-border-strong: 62 68 71;

	--nd-fg: 247 247 242;
	--nd-fg-muted: 166 170 166;
	--nd-fg-subtle: 132 137 133;

	--nd-accent: 201 164 59;
	--nd-accent-bright: 212 175 85;
	--nd-accent-deep: 168 134 44;
	--nd-on-accent: 17 19 21;

	/* The old palette carried a second blue accent. The brief asks for one
	   accent only, so these are neutralised to grey rather than removed - they
	   are referenced throughout the templates. */
	--nd-indigo: 166 170 166;
	--nd-indigo-bright: 200 204 199;

	--nd-success: 150 214 140;
	--nd-warning: 226 196 110;
	--nd-danger: 230 130 120;

	color-scheme: dark;
}

/* -------------------------------------------------------------------------- */
/*  Light ground                                                              */
/* -------------------------------------------------------------------------- */

/**
 * Applied by nd_section_open( 'tone' => 'light' ). Redefining the tokens on the
 * section re-points every utility inside it, so no template markup changes.
 *
 * Lime is deliberately NOT the accent here: #C7F36B on warm white is about
 * 1.3:1 and fails any contrast bar. The brief's own rule is a dark primary
 * button on light grounds, so the accent resolves to charcoal and lime is kept
 * for non-text highlights via --nd-lime.
 */
:root .nd-tone-light {
	--nd-bg: 247 247 242;
	--nd-bg-deep: 238 239 232;
	--nd-surface: 255 255 255;
	--nd-surface-2: 250 250 246;
	--nd-elevated: 255 255 255;

	--nd-border: 228 230 224;
	--nd-border-strong: 206 210 200;

	--nd-fg: 17 19 21;
	--nd-fg-muted: 84 90 86;
	--nd-fg-subtle: 102 108 103; /* 5.1:1 on warm white; 110 116 111 measured 4.45 and missed AA */

	--nd-accent: 17 19 21;
	--nd-accent-bright: 40 45 48;
	--nd-accent-deep: 8 10 11;
	--nd-on-accent: 247 247 242;

	--nd-indigo: 110 116 111;
	--nd-indigo-bright: 84 90 86;

	color-scheme: light;
	background-color: rgb(var(--nd-bg));
	color: rgb(var(--nd-fg));
}


/* -------------------------------------------------------------------------- */
/*  Typography                                                                */
/* -------------------------------------------------------------------------- */

/**
 * The brief asks for a modern sans throughout. Inter is already self-hosted and
 * preloaded by the theme, so pointing the display stack at it costs no new font
 * payload and removes the Playfair serif from headings. Inter needs more weight
 * and tighter tracking than Playfair did to hold at display sizes.
 */
:root {
	--font-serif: var(--font-sans);
}

:root .text-display-xl {
	font-weight: 680;
	letter-spacing: -0.032em;
	line-height: 1.02;
}

:root .text-display-lg {
	font-weight: 660;
	letter-spacing: -0.028em;
	line-height: 1.06;
}

:root .text-display-md {
	font-weight: 640;
	letter-spacing: -0.022em;
}

:root .text-display-sm {
	font-weight: 620;
	letter-spacing: -0.016em;
}

/* -------------------------------------------------------------------------- */
/*  Interaction                                                               */
/* -------------------------------------------------------------------------- */

:focus-visible {
	outline: 2px solid rgb(var(--nd-accent));
	outline-offset: 2px;
}

/* On dark grounds the lime focus ring is the clearest marker; on light the
   accent is charcoal, which is equally visible. Both inherit from the tokens. */

::selection {
	background: rgb(var(--nd-accent) / 0.32);
	color: rgb(var(--nd-fg));
}
/* -------------------------------------------------------------------------- */
/*  Section heading floats                                                    */
/* -------------------------------------------------------------------------- */

/**
 * The prebuilt CSS ships no flex-row-reverse or order-* utilities, so the
 * alternation between section headers is declared here. Applied to What We Do
 * so its header sits right while Industries stays left.
 */
@media (min-width: 1024px) {
	:root .nd-row-flip {
		flex-direction: row-reverse;
	}
}
/* -------------------------------------------------------------------------- */
/*  Client proof chip                                                         */
/* -------------------------------------------------------------------------- */

/**
 * Holds a client brand mark on an industry card. The marks are light artwork
 * drawn for dark grounds, so the chip stays charcoal regardless of the section
 * tone - on the warm-white Industries section they would otherwise disappear.
 */
:root .nd-proof-chip {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: none;
	width: 4.75rem;
	height: 2.5rem;
	padding: 0.375rem 0.5rem;
	border-radius: 0.5rem;
	background: rgb(17 19 21);
}

:root .nd-proof-chip img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
}
/* -------------------------------------------------------------------------- */
/*  Email copy confirmation                                                   */
/* -------------------------------------------------------------------------- */


:root .nd-sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}
