/*
Theme Name: Apex
Theme URI: https://goapexfac.com
Author: Apex
Description: Single-stream B2G credibility site for a federal contracting vendor. Block theme with self-hosted fonts, brand tokens in theme.json, and no external dependencies.
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 7.4
Version: 1.0.7
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: apex
*/

/* ---------------------------------------------------------------------------
   Every colour, size, and space below comes from theme.json presets
   (--wp--preset--*). Raw values appear only where no preset can express them
   (opacity, outline widths, media queries).
   --------------------------------------------------------------------------- */

:root {
	--apex-header-height: 4.5rem;
	--apex-radius: 6px;
	--apex-focus: 0 0 0 3px var(--wp--preset--color--white), 0 0 0 6px var(--wp--preset--color--steel);
}

/* Anchor targets must clear the sticky header; smooth scroll only if the visitor allows motion. */
html {
	scroll-padding-top: calc(var(--apex-header-height) + 0.75rem);
	-webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: no-preference) {
	html { scroll-behavior: smooth; }
}

body {
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
}

/* Root-level blocks (header, main, footer) butt together; inner layouts keep their own gap. */
.wp-site-blocks > * + * { margin-block-start: 0; }

h1, h2, h3, .wp-block-post-title { text-wrap: balance; overflow-wrap: anywhere; }
/* break-word (not anywhere): a long token such as an email address moves to its own
   line instead of being split mid-word inside a flex row. */
p, li, dd { overflow-wrap: break-word; }
a[href^="mailto:"], a[href^="tel:"] { white-space: nowrap; }

/* Keyboard focus is always visible, on light and navy surfaces alike. */
:focus { outline: none; }
:focus-visible {
	outline: 3px solid var(--wp--preset--color--steel);
	outline-offset: 3px;
	border-radius: 2px;
}
.has-navy-background-color :focus-visible,
.has-navy-deep-background-color :focus-visible {
	outline-color: var(--wp--preset--color--silver-light);
}
.wp-element-button:focus-visible,
.wp-block-button__link:focus-visible {
	outline: 3px solid var(--wp--preset--color--navy);
	outline-offset: 3px;
}

/* Skip link injected by WordPress for block themes. */
.skip-link.screen-reader-text:focus {
	background: var(--wp--preset--color--navy);
	color: var(--wp--preset--color--white);
	padding: 0.75rem 1rem;
	top: 0.5rem;
	left: 0.5rem;
	z-index: 1000;
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 600;
}

/* Visually hidden helper (mirrors core .screen-reader-text for pattern markup). */
.apex-visually-hidden {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ---------------------------------------------------------------------------
   Header (sticky). The template-part wrapper carries .apex-header so the sticky
   element is a direct child of the page and can stick for the full scroll.
   --------------------------------------------------------------------------- */
.apex-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: var(--wp--preset--color--white);
	border-bottom: 1px solid var(--wp--preset--color--line);
}
.apex-header__row { min-height: var(--apex-header-height); }

.apex-brand__link { display: inline-flex; align-items: center; line-height: 0; text-decoration: none; }
.apex-brand__img { height: 2.75rem; width: auto; display: block; }
@media (max-width: 599px) { .apex-brand__img { height: 2.25rem; } }

.apex-header .wp-block-navigation a { padding: 0.35rem 0; }
.apex-header .wp-block-navigation a:hover { text-decoration: underline; text-underline-offset: 0.2em; }
.apex-header .wp-block-navigation__responsive-container.is-menu-open {
	background: var(--wp--preset--color--white);
	padding: var(--wp--preset--spacing--50) var(--wp--preset--spacing--40);
}
.apex-header .wp-block-navigation__responsive-container.is-menu-open a {
	font-size: var(--wp--preset--font-size--l);
}
.apex-header__cta .wp-block-button__link { white-space: nowrap; }
/* Core block CSS is printed after this sheet (separate block assets), so header
   overrides carry the .apex-header ancestor for specificity. On phones the CTA
   stays visible next to the menu toggle, just compact. */
.apex-header .apex-brand__link { flex-shrink: 0; }
@media (max-width: 599px) {
	.apex-header .apex-header__cta .wp-block-button__link { padding: 0.6rem 0.85rem; font-size: var(--wp--preset--font-size--xs); }
	.apex-header .apex-header__row { gap: var(--wp--preset--spacing--20); }
}

/* ---------------------------------------------------------------------------
   Sections
   --------------------------------------------------------------------------- */
.apex-section { padding-top: var(--wp--preset--spacing--60); padding-bottom: var(--wp--preset--spacing--60); }
.apex-section--tight { padding-top: var(--wp--preset--spacing--50); padding-bottom: var(--wp--preset--spacing--50); }
.apex-section > .wp-block-group > h2:first-child { margin-top: 0; }
.apex-lede { color: var(--wp--preset--color--ink-muted); max-width: 46rem; }
.apex-eyebrow {
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--wp--preset--color--steel);
	font-size: var(--wp--preset--font-size--xs);
}
.apex-section h2 + .apex-lede { margin-top: 0.5rem; }

/* Hero: faint blueprint grid in the hero only, fading out toward the identifiers bar. */
.apex-hero {
	background-color: var(--wp--preset--color--paper);
	background-image:
		linear-gradient(180deg, rgba(243, 245, 247, 0) 0%, rgba(243, 245, 247, 0) 40%, var(--wp--preset--color--paper) 100%),
		url("assets/images/blueprint.svg");
	background-size: auto, 120px 120px;
	background-position: center, top left;
	padding-top: var(--wp--preset--spacing--70);
	padding-bottom: var(--wp--preset--spacing--70);
}
@media (max-width: 781px) {
	.apex-hero { padding-top: var(--wp--preset--spacing--60); padding-bottom: var(--wp--preset--spacing--60); }
}
.apex-hero h1 { max-width: 20ch; }
.apex-hero .apex-lede { font-size: var(--wp--preset--font-size--l); color: var(--wp--preset--color--ink); }
.apex-hero .wp-block-buttons { margin-top: var(--wp--preset--spacing--40); }

/* Outline button variant (secondary action). */
.wp-block-button.is-style-outline .wp-block-button__link,
.wp-block-button.is-style-outline > .wp-block-button__link:not(.has-background) {
	background: transparent;
	color: var(--wp--preset--color--navy);
	border: 2px solid var(--wp--preset--color--navy);
	padding: calc(0.85rem - 2px) calc(1.5rem - 2px);
}
.wp-block-button.is-style-outline .wp-block-button__link:hover {
	background: var(--wp--preset--color--navy);
	color: var(--wp--preset--color--white);
}
.has-navy-background-color .wp-block-button.is-style-outline .wp-block-button__link {
	color: var(--wp--preset--color--white);
	border-color: var(--wp--preset--color--white);
}
.has-navy-background-color .wp-block-button.is-style-outline .wp-block-button__link:hover {
	background: var(--wp--preset--color--white);
	color: var(--wp--preset--color--navy);
}

/* Identifiers bar: the first thing a Contracting Officer looks for. Codes are real,
   selectable text; a click selects the whole value for copying. */
.apex-identifiers {
	background: var(--wp--preset--color--navy);
	color: var(--wp--preset--color--white);
	padding-top: var(--wp--preset--spacing--40);
	padding-bottom: var(--wp--preset--spacing--40);
}
.apex-id {
	display: flex;
	flex-wrap: wrap;
	gap: var(--wp--preset--spacing--30) var(--wp--preset--spacing--60);
	margin: 0;
	padding: 0;
}
.apex-id__item { margin: 0; }
.apex-id dt {
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--xs);
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--wp--preset--color--silver-light);
	margin: 0 0 0.15rem;
}
.apex-id dd {
	margin: 0;
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--l);
	font-weight: 700;
	letter-spacing: 0.02em;
	font-variant-numeric: tabular-nums;
	color: var(--wp--preset--color--white);
}
.apex-id dd.apex-id__code { -webkit-user-select: all; user-select: all; }
@media (max-width: 599px) {
	.apex-id { gap: var(--wp--preset--spacing--30) var(--wp--preset--spacing--40); }
	.apex-id dd { font-size: var(--wp--preset--font-size--m); }
}

/* Cards (core competencies, leadership entries). */
.apex-cards { gap: var(--wp--preset--spacing--40); }
.apex-card {
	background: var(--wp--preset--color--white);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--apex-radius);
	padding: var(--wp--preset--spacing--40);
	height: 100%;
}
.apex-card > * + * { margin-top: 0.6rem; }
.apex-card h3 { margin-top: 0.85rem; font-size: var(--wp--preset--font-size--m); }
.apex-card p { color: var(--wp--preset--color--ink-muted); font-size: var(--wp--preset--font-size--s); margin: 0; }
.apex-card__icon {
	display: inline-flex;
	width: 2.75rem; height: 2.75rem;
	align-items: center; justify-content: center;
	border-radius: var(--apex-radius);
	background: var(--wp--preset--color--paper);
	color: var(--wp--preset--color--steel);
}
.apex-card__icon svg { width: 1.5rem; height: 1.5rem; }
.has-paper-background-color .apex-card { border-color: var(--wp--preset--color--line); }
.has-paper-background-color .apex-card__icon { background: var(--wp--preset--color--paper-dark); }

/* Process steps. */
.apex-steps .wp-block-column { position: relative; }
.apex-steps__num {
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--xxl);
	font-weight: 800;
	line-height: 1;
	color: var(--wp--preset--color--steel);
	margin: 0 0 0.5rem;
	font-variant-numeric: tabular-nums;
}
.apex-steps h3 { margin-top: 0; font-size: var(--wp--preset--font-size--m); }
.apex-steps p { color: var(--wp--preset--color--ink-muted); font-size: var(--wp--preset--font-size--s); margin-top: 0.4rem; }
.apex-steps .wp-block-column { border-top: 3px solid var(--wp--preset--color--navy); padding-top: var(--wp--preset--spacing--30); }

/* Leadership experience entries. */
.apex-exp { gap: var(--wp--preset--spacing--40); }
.apex-exp__role {
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--xs);
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--wp--preset--color--steel);
	margin: 0;
}
.apex-exp .apex-card h3 { margin-top: 0.25rem; }
.apex-exp .apex-card ul { margin: 0.5rem 0 0; padding-left: 1.1rem; color: var(--wp--preset--color--ink-muted); font-size: var(--wp--preset--font-size--s); }
.apex-exp .apex-card li + li { margin-top: 0.25rem; }
.apex-note {
	font-size: var(--wp--preset--font-size--s);
	color: var(--wp--preset--color--ink-muted);
	border-left: 3px solid var(--wp--preset--color--silver);
	padding-left: 0.85rem;
}

/* Compliance & credentials columns. */
.apex-cred h3 { font-size: var(--wp--preset--font-size--m); padding-bottom: 0.5rem; border-bottom: 2px solid var(--wp--preset--color--navy); }
.apex-cred ul { list-style: none; padding: 0; margin: 0.75rem 0 0; }
.apex-cred li { padding: 0.45rem 0; border-bottom: 1px solid var(--wp--preset--color--line); }
.apex-cred li:last-child { border-bottom: 0; }
.apex-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; padding: 0; margin: 0.75rem 0 0; }
.apex-tags li {
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 600;
	font-size: var(--wp--preset--font-size--s);
	padding: 0.35rem 0.7rem;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 4px;
	background: var(--wp--preset--color--white);
	color: var(--wp--preset--color--navy);
}
.apex-badge {
	display: inline-block;
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--xs);
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--wp--preset--color--steel-dark);
	background: var(--wp--preset--color--paper-dark);
	border-radius: 3px;
	padding: 0.15rem 0.45rem;
	margin-left: 0.5rem;
	vertical-align: middle;
}

/* Capability statement + contact panels. */
.apex-panel {
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--apex-radius);
	padding: var(--wp--preset--spacing--50);
	background: var(--wp--preset--color--white);
}
.apex-contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.6rem; }
.apex-contact-list li { display: flex; flex-wrap: wrap; gap: 0.25rem 0.6rem; align-items: baseline; }
.apex-contact-list .apex-contact-list__label {
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--xs);
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--wp--preset--color--steel);
	min-width: 5.5rem;
}
.apex-contact-list a { font-weight: 600; }

/* Placeholders must be impossible to miss during review. */
.apex-placeholder,
[data-apex-placeholder] {
	background: #FFF4CC;
	color: #5C3D00;
	border: 1px dashed #B58900;
	padding: 0.1rem 0.35rem;
	border-radius: 3px;
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--xs);
	font-weight: 600;
}

/* ---------------------------------------------------------------------------
   Footer
   --------------------------------------------------------------------------- */
.apex-footer {
	background: var(--wp--preset--color--navy);
	color: var(--wp--preset--color--white);
}
.apex-footer a { color: var(--wp--preset--color--white); text-decoration-color: var(--wp--preset--color--silver); }
.apex-footer a:hover { color: var(--wp--preset--color--silver-light); }
.apex-footer__brand { display: flex; align-items: center; gap: 0.9rem; }
.apex-footer__mark { height: 3rem; width: auto; display: block; }
.apex-footer__meta {
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--s);
	font-weight: 600;
	letter-spacing: 0.02em;
	color: var(--wp--preset--color--silver-light);
}
.apex-footer__meta span + span::before { content: "\00b7"; margin: 0 0.6rem; color: var(--wp--preset--color--silver); }
.apex-footer__legal { font-size: var(--wp--preset--font-size--xs); color: var(--wp--preset--color--silver-light); }
.apex-footer__legal span + span::before { content: "\00b7"; margin: 0 0.6rem; color: var(--wp--preset--color--silver); }
.apex-footer .wp-block-separator { border-color: var(--wp--preset--color--steel); opacity: 0.6; }
.apex-footer .wp-block-site-title a { color: var(--wp--preset--color--white); }

/* ---------------------------------------------------------------------------
   Contact Form 7 (Request a Quote). Labels are real <label for> elements.
   --------------------------------------------------------------------------- */
.wpcf7 form { display: grid; gap: var(--wp--preset--spacing--30); }
.wpcf7 label { display: block; font-weight: 600; font-size: var(--wp--preset--font-size--s); color: var(--wp--preset--color--navy); }
.wpcf7 .apex-req { color: var(--wp--preset--color--steel); }
.wpcf7 .wpcf7-form-control-wrap { display: block; margin-top: 0.35rem; }
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 input[type="url"],
.wpcf7 textarea,
.wpcf7 select {
	width: 100%;
	font: inherit;
	color: var(--wp--preset--color--ink);
	background: var(--wp--preset--color--white);
	border: 1px solid var(--wp--preset--color--silver);
	border-radius: 4px;
	padding: 0.7rem 0.85rem;
}
.wpcf7 textarea { min-height: 9rem; resize: vertical; }
.wpcf7 input[type="file"] { font: inherit; font-size: var(--wp--preset--font-size--s); margin-top: 0.35rem; }
.wpcf7 input:focus-visible, .wpcf7 textarea:focus-visible, .wpcf7 select:focus-visible {
	outline: 3px solid var(--wp--preset--color--steel);
	outline-offset: 2px;
	border-color: var(--wp--preset--color--steel);
}
.wpcf7 .wpcf7-not-valid { border-color: #B42318; }
.wpcf7 .wpcf7-not-valid-tip { color: #B42318; font-size: var(--wp--preset--font-size--xs); margin-top: 0.3rem; }
.wpcf7 .wpcf7-submit {
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 600;
	font-size: var(--wp--preset--font-size--s);
	letter-spacing: 0.01em;
	color: var(--wp--preset--color--white);
	background: var(--wp--preset--color--navy);
	border: 0;
	border-radius: 4px;
	padding: 0.85rem 1.5rem;
	cursor: pointer;
	justify-self: start;
}
.wpcf7 .wpcf7-submit:hover { background: var(--wp--preset--color--steel-dark); }
.wpcf7 .wpcf7-spinner { margin-left: 0.5rem; }
.wpcf7 form .wpcf7-response-output {
	margin: 0;
	padding: 0.85rem 1rem;
	border: 1px solid var(--wp--preset--color--steel);
	border-radius: 4px;
	font-size: var(--wp--preset--font-size--s);
}
.wpcf7 form.sent .wpcf7-response-output { border-color: #1E7B3A; background: #EEF8F1; }
.wpcf7 form.invalid .wpcf7-response-output,
.wpcf7 form.failed .wpcf7-response-output,
.wpcf7 form.spam .wpcf7-response-output { border-color: #B42318; background: #FDF0EE; }

/* Print: Contracting Officers print. Keep the codes, drop the chrome. */
@media print {
	.apex-header, .apex-footer nav, .wp-block-buttons { display: none !important; }
	.apex-identifiers { color: #000 !important; background: none !important; border: 1px solid #000; }
	.apex-id dt, .apex-id dd { color: #000 !important; }
	a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.8em; }
}
