/**
 * LTC Shell — global site header and footer.
 *
 * Global chrome only: logo, primary navigation, programme dropdown,
 * mobile drawer, conversion CTA, and the footer lead-in/nav/baseline.
 * Depends on ltc-tokens.css / ltc-base.css / ltc-components.css for
 * colour, type and button primitives — this file adds only the
 * structural/positioning rules those primitives don't already cover.
 *
 * Progressive enhancement: the primary <nav> markup is used once and
 * reused for both the inline desktop nav and (under .js, on narrow
 * viewports) the mobile drawer — there is no duplicate nav in the DOM.
 * Without JavaScript the nav and programme sub-list stay in normal
 * document flow, fully visible and reachable.
 */

/* ---- Skip link ---- */

.ltc-skip-link {
	position: absolute;
	left: var(--ltc-space-3);
	top: -100px;
	z-index: 200;
	padding: var(--ltc-space-3) var(--ltc-space-5);
	background: var(--ltc-ink-950);
	color: var(--ltc-white);
	border-radius: var(--ltc-radius-button);
	text-decoration: none;
	font-weight: var(--ltc-weight-subhead);
	transition: top var(--ltc-duration-fast) var(--ltc-ease);
}

.ltc-skip-link:focus {
	top: var(--ltc-space-3);
}

/* =========================================================
   Header
   ========================================================= */

.ltc-site-header {
	position: sticky;
	top: var(--wp-admin--admin-bar--height, 0px);
	z-index: 100;
	background: var(--ltc-paper-50);
	border-bottom: 1px solid transparent;
	/* A UI state change, not an entrance — the "standard interaction"
	   duration (280ms) reads as immediate/clean; the old 550ms
	   "section reveal" duration made the shadow/border feel sluggish
	   to arrive as the page scrolls. */
	transition: box-shadow var(--ltc-duration-standard) var(--ltc-ease),
		border-color var(--ltc-duration-standard) var(--ltc-ease);
}

.ltc-site-header.is-stuck {
	border-bottom-color: var(--ltc-stone-200);
	box-shadow: 0 8px 24px rgba(7, 20, 22, 0.06);
}

.ltc-site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--ltc-space-6);
	height: 80px;
	transition: height var(--ltc-duration-standard) var(--ltc-ease);
}

.ltc-site-header.is-stuck .ltc-site-header__inner {
	height: 64px;
}

.ltc-site-header__logo {
	display: flex;
	align-items: center;
	flex: 0 0 auto;
	color: var(--ltc-ink-950);
	text-decoration: none;
}

.ltc-site-header__logo img {
	display: block;
	/* Was 36px (30px stuck) — the full "LOREM Training & Consulting"
	   lock-up read as illegible at that size, confirmed visually.
	   Raised so the wordmark is genuinely legible without making the
	   80px header feel oversized. */
	height: 54px;
	width: auto;
	transition: height var(--ltc-duration-standard) var(--ltc-ease);
}

.ltc-site-header.is-stuck .ltc-site-header__logo img {
	height: 44px;
}

.ltc-site-header__logo-text {
	font-family: var(--ltc-font-sans);
	font-weight: var(--ltc-weight-heading);
	font-size: 1.25rem;
	letter-spacing: -0.01em;
	color: var(--ltc-ink-950);
}

/* ---- Primary nav ---- */

.ltc-site-header__nav {
	flex: 1 1 auto;
	display: flex;
	justify-content: center;
	min-width: 0;
}

.ltc-nav {
	display: flex;
	align-items: center;
	gap: var(--ltc-space-7);
	list-style: none;
	margin: 0;
	padding: 0;
}

.ltc-nav__item {
	position: relative;
	/* Without this, flex-basis:auto on the growing .ltc-site-header__nav
	   resolves its content size as if "Problems We Solve" and "How We
	   Work" were free to wrap, so the browser hands the nav a box
	   narrower than its own single-line content needs (confirmed live:
	   nav received ~720-728px when its unwrapped content needs ~729px,
	   even though ~830px was available) — the two longest labels wrap
	   to two lines even though there is comfortably enough header width
	   at every desktop size down to the 1279px drawer breakpoint.
	   flex-shrink: 0 stops the item from being compressed below its
	   content size at all. */
	flex-shrink: 0;
}

.ltc-nav__link,
.ltc-nav__trigger {
	display: inline-flex;
	align-items: center;
	gap: var(--ltc-space-2);
	min-height: 44px;
	position: relative;
	font-family: var(--ltc-font-sans);
	font-size: var(--ltc-type-nav);
	font-weight: var(--ltc-weight-label);
	color: var(--ltc-ink-900);
	text-decoration: none;
	background: none;
	border: none;
	cursor: pointer;
	padding: 0;
	white-space: nowrap;
}

/* Restrained underline: a 1.5px rule that expands from the left edge,
   not a colour-only state change. Positioned to sit just under the
   nav's own 44px min-height box, so it never shifts surrounding
   layout. */
.ltc-nav__link::after,
.ltc-nav__trigger::after {
	content: '';
	position: absolute;
	left: 0;
	bottom: 10px;
	width: 100%;
	height: 1.5px;
	background: currentColor;
	transform: scaleX(0);
	transform-origin: left;
	transition: transform var(--ltc-duration-fast) var(--ltc-ease);
}

.ltc-nav__link:hover,
.ltc-nav__trigger:hover,
.ltc-nav__link:focus-visible,
.ltc-nav__trigger:focus-visible {
	color: var(--ltc-teal-700);
}

.ltc-nav__link:hover::after,
.ltc-nav__trigger:hover::after,
.ltc-nav__link:focus-visible::after,
.ltc-nav__trigger:focus-visible::after {
	transform: scaleX(1);
}

.ltc-nav__link[aria-current='page']::after,
.ltc-nav__trigger[aria-current='page']::after {
	transform: scaleX(1);
}

/* Current-page / current-section state. The "Programmes" trigger button
   gets this too (not just plain .ltc-nav__link) when the visitor is
   anywhere inside the programme architecture — hub, a capability page,
   or an individual programme — not only on the hub page itself. */
.ltc-nav__link[aria-current='page'],
.ltc-nav__trigger[aria-current='page'] {
	color: var(--ltc-teal-700);
	font-weight: var(--ltc-weight-heading);
}

.ltc-nav__trigger-chevron {
	transition: transform var(--ltc-duration-fast) var(--ltc-ease);
}

.ltc-nav__trigger[aria-expanded='true'] .ltc-nav__trigger-chevron {
	transform: rotate(180deg);
}

/* ---- Programme dropdown ----
   No-JS default: a normal, always-visible nested list (fully reachable
   and readable). Under .js it becomes an absolutely-positioned panel
   that opens/closes via ltc-shell.js. */

.ltc-dropdown {
	list-style: none;
	margin: var(--ltc-space-3) 0 0;
	padding: 0 0 0 var(--ltc-space-5);
}

.js .ltc-dropdown {
	position: absolute;
	top: calc(100% + 14px);
	left: 50%;
	margin: 0;
	padding: var(--ltc-space-4);
	min-width: 340px;
	max-width: min(520px, calc(100vw - var(--ltc-space-6)));
	background: var(--ltc-white);
	border: 1px solid var(--ltc-stone-200);
	border-radius: var(--ltc-radius-card);
	box-shadow: var(--ltc-shadow-elevated);
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 2px var(--ltc-space-5);
	opacity: 0;
	visibility: hidden;
	transform: translateX(-50%) translateY(-6px);
	transition: opacity var(--ltc-duration-fast) var(--ltc-ease),
		transform var(--ltc-duration-fast) var(--ltc-ease);
}

.js .ltc-nav__item--has-dropdown.is-open .ltc-dropdown {
	opacity: 1;
	visibility: visible;
	transform: translateX(-50%) translateY(0);
}

@media (prefers-reduced-motion: reduce) {
	.js .ltc-dropdown {
		transition: opacity var(--ltc-duration-fast) linear;
		transform: translateX(-50%);
	}
}

.ltc-dropdown__link {
	display: block;
	padding: var(--ltc-space-3) var(--ltc-space-3);
	border-radius: 8px;
	font-size: 14px;
	line-height: 1.35;
	color: var(--ltc-ink-900);
	text-decoration: none;
}

.ltc-dropdown__link:hover,
.ltc-dropdown__link:focus-visible {
	background: var(--ltc-mist-surface);
	color: var(--ltc-teal-700);
}

.ltc-dropdown__link[aria-current='page'] {
	color: var(--ltc-teal-700);
	font-weight: var(--ltc-weight-subhead);
}

/* ---- Programmes mega-menu-lite: 9 real categories + a "view all"
   row, so it needs more width/columns than the generic 2-col
   dropdown above. Still fully keyboard-operable via the same
   ltc-shell.js open/close logic — only sizing differs. ---- */

.js .ltc-dropdown--programmes {
	grid-template-columns: repeat(3, 1fr);
	min-width: 620px;
	max-width: min(760px, calc(100vw - var(--ltc-space-6)));
	left: 0;
	transform: none;
}

.ltc-dropdown__link-name {
	display: block;
	font-weight: var(--ltc-weight-subhead);
}

.ltc-dropdown__link-count {
	display: block;
	margin-top: 2px;
	font-size: 12px;
	color: var(--ltc-text-muted);
}

.ltc-dropdown__item--all {
	grid-column: 1 / -1;
	margin-top: var(--ltc-space-2);
	padding-top: var(--ltc-space-3);
	border-top: 1px solid var(--ltc-stone-200);
}

.ltc-dropdown__link--all {
	display: flex;
	align-items: center;
	justify-content: space-between;
	color: var(--ltc-teal-700);
	font-weight: var(--ltc-weight-subhead);
}

/* ---- Header actions / CTA ---- */

.ltc-site-header__actions {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	gap: var(--ltc-space-4);
}

.ltc-btn--sm {
	min-height: 44px;
	padding: 0 var(--ltc-space-5);
	font-size: 14px;
}

.ltc-site-header__actions .ltc-btn--primary {
	background: var(--ltc-teal-700);
	color: var(--ltc-white);
}

.ltc-site-header__actions .ltc-btn--primary:hover {
	background: var(--ltc-teal-600);
}

/* Duplicate CTA rendered inside the nav/drawer itself — hidden on
   desktop (the header-actions CTA above is the only one visible
   there); shown only inside the mobile drawer, see ltc-responsive.css,
   because the open drawer visually covers the header-actions CTA. */
.ltc-drawer-cta {
	display: none;
}

/* ---- Mobile menu toggle (hidden unless .js, so a no-JS visitor never
   sees a button that does nothing — the nav is simply inline instead) ---- */

.ltc-menu-toggle {
	display: none;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border: 1px solid var(--ltc-stone-200);
	border-radius: var(--ltc-radius-button);
	background: var(--ltc-white);
	color: var(--ltc-ink-950);
	cursor: pointer;
}

.js .ltc-menu-toggle {
	display: none; /* re-enabled only under the mobile breakpoint, see ltc-responsive.css */
}

.ltc-menu-toggle__bar {
	position: relative;
	display: block;
	width: 18px;
	height: 2px;
	background: currentColor;
}

.ltc-menu-toggle__bar::before,
.ltc-menu-toggle__bar::after {
	content: '';
	position: absolute;
	left: 0;
	width: 18px;
	height: 2px;
	background: currentColor;
	transition: transform var(--ltc-duration-fast) var(--ltc-ease);
}

.ltc-menu-toggle__bar::before {
	top: -6px;
}

.ltc-menu-toggle__bar::after {
	top: 6px;
}

/* =========================================================
   Footer
   ========================================================= */

.ltc-site-footer {
	/* ink-900 (not ink-950, the same shade as the final-CTA section
	   right above it) plus a visible top border — confirmed live that
	   with identical backgrounds and no divider, the final CTA and
	   footer read as "one continuous oversized dark slab" with no
	   visual break between them. */
	background: var(--ltc-ink-900);
	border-top: 1px solid rgba(247, 245, 240, 0.1);
	color: rgba(247, 245, 240, 0.82);
}

.ltc-footer-cta {
	padding-block: var(--ltc-space-10);
	border-bottom: 1px solid rgba(247, 245, 240, 0.12);
}

.ltc-footer-cta__inner {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: var(--ltc-space-7);
	flex-wrap: wrap;
}

.ltc-footer-cta__copy {
	max-width: 46ch;
	margin-top: var(--ltc-space-4);
	color: rgba(247, 245, 240, 0.72);
	font-size: var(--ltc-type-body-lg);
	line-height: var(--ltc-leading-body-lg);
}

.ltc-footer-nav {
	padding-block: var(--ltc-space-7);
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--ltc-space-6);
}

.ltc-footer-nav--v3 {
	grid-template-columns: 1.6fr 1fr 1fr 1fr;
	align-items: start;
}

/* The real logo asset is dark-ink/teal on transparent, built for light
   surfaces — it has no low-contrast problem there, but needs help on
   this dark footer. No inverted/white lockup file was found in the
   local production backup, and a brightness/invert filter produced an
   unreadable solid block rather than a clean white silhouette (this
   specific source PNG does not survive that filter combination), so
   rather than ship something broken, the real logo is shown at its
   real colour on a small light chip instead. Flagged as provisional in
   the redesign report — a proper reversed/white lockup file should be
   sourced from the client for production. */
.ltc-footer-nav__logo {
	display: inline-flex;
	align-items: center;
	padding: var(--ltc-space-2) var(--ltc-space-3);
	background: var(--ltc-paper-50);
	border-radius: var(--ltc-radius-button);
}

.ltc-footer-nav__logo img {
	display: block;
	height: 34px;
	width: auto;
}

.ltc-footer-nav__brand {
	color: var(--ltc-white);
	font-weight: var(--ltc-weight-heading);
	font-size: 1.25rem;
}

.ltc-footer-nav__tagline {
	margin-top: var(--ltc-space-3);
	max-width: 32ch;
	color: rgba(247, 245, 240, 0.6);
	font-size: var(--ltc-type-body);
	line-height: var(--ltc-leading-body);
}

.ltc-footer-nav__heading {
	font-size: var(--ltc-type-eyebrow);
	text-transform: uppercase;
	letter-spacing: var(--ltc-tracking-eyebrow);
	color: rgba(247, 245, 240, 0.5);
}

.ltc-footer-nav__list {
	margin: var(--ltc-space-4) 0 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: var(--ltc-space-3);
}

.ltc-footer-nav__list a {
	color: rgba(247, 245, 240, 0.82);
	text-decoration: none;
	font-size: var(--ltc-type-body);
}

.ltc-footer-nav__list a:hover,
.ltc-footer-nav__list a:focus-visible {
	color: var(--ltc-teal-500);
	text-decoration: underline;
	text-underline-offset: 4px;
}

.ltc-footer-baseline {
	padding-block: var(--ltc-space-5);
	border-top: 1px solid rgba(247, 245, 240, 0.12);
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: var(--ltc-space-3);
	font-size: 13px;
	color: rgba(247, 245, 240, 0.55);
}

.ltc-footer-baseline__legal {
	display: flex;
	gap: var(--ltc-space-5);
	list-style: none;
	margin: 0;
	padding: 0;
}

.ltc-footer-baseline__legal a {
	color: rgba(247, 245, 240, 0.55);
	text-decoration: none;
}

.ltc-footer-baseline__legal a:hover,
.ltc-footer-baseline__legal a:focus-visible {
	color: var(--ltc-teal-500);
	text-decoration: underline;
}

.ltc-site-header :focus-visible,
.ltc-site-footer :focus-visible {
	outline: 2px solid var(--ltc-teal-600);
	outline-offset: 3px;
	border-radius: 4px;
}
