/*
 * Site chrome 2026 — header, mega menus, mobile drawer, footer.
 * Loaded on every page when the switch is on (library/chrome-26/bootstrap.php).
 *
 * Why a static stylesheet and not Tailwind utilities: the chrome is on every page
 * but `ampeco-base` (the Tailwind bundle) is not, and almost every rule here is a
 * JS-state selector (open panel, solid header, hidden header, drawer level).
 *
 * Tokens only, from the one source (the design system's _design-tokens.scss + theme.json):
 *   colour     semantic tokens (--text-*, --background-*, --border-*, --icon-*). Light/dark
 *              comes from .nds-scheme-light / .nds-scheme-dark in the markup: the same token
 *              map as .theme-light / .theme-dark, without the theme's descendant text colours.
 *   spacing    --spacing-* (responsive: smaller below 768px, by design-system rule)
 *   type       --typography-* (size, line height, family; weight only where the scale has none)
 *   radius     --wp--preset--border-radius--*      elevation  --nds-elevation-*
 * Literal values left here are component dimensions (bar/row heights, panel and card
 * widths, icon boxes), motion, and the few type weights the scale does not have.
 *
 * Breakpoint: the design switches to the mobile header below 1100px.
 * (@media cannot take var(), so 1100 / 1099.98 are literal.)
 */

/* ------------------------------------------------------------------ shared */
.c26 {
	--c26-topbar-h: 0px;
	font-family: var(--wp--preset--font-family--body);
}
.c26.has-top-bar { --c26-topbar-h: 40px; }

/* Primitive guard. Two site-wide stylesheets reuse design-system primitive names with other
   values on :root and load after app.css: homepage-v2 ampeco-base.css (--color-white-100: #fff)
   and report-playbook.css (white/black-50 = 50%, white/black-100 = solid). The semantic tokens
   resolve against whatever --color-* the element inherits, so on every page the dark footer got
   solid white borders and a 50% white "Get in touch" panel. Declaring the colliding primitives on
   the chrome roots makes the chrome resolve them locally, whatever loads after app.css.
   Values = the design system's (_design-tokens.scss $color-white-50/100, $color-black-50/100). */
.c26,
.c26-footer {
	--color-white-50: rgba(255, 255, 255, 0.05000000074505806);
	--color-white-100: rgba(255, 255, 255, 0.10000000149011612);
	--color-black-50: rgba(0, 0, 0, 0.05000000074505806);
	--color-black-100: rgba(0, 0, 0, 0.10000000149011612);
}
.c26 a { text-decoration: none; }
.c26 .nds-icon { display: inline-flex; flex-shrink: 0; }
.c26 .nds-icon svg { width: 100%; height: 100%; }
/* The theme sets 1.5px / 1.25px on 24 / 20px icons, but the NDS files use a 56-unit viewBox, so the line
   rendered at ~0.6px. Keep the stroke in screen pixels: 1.5px, as the design system's icons are drawn. */
.c26 .nds-icon svg * { vector-effect: non-scaling-stroke; }
.c26 .nds-icon svg [stroke] { stroke-width: 1.5px; }
.c26-ico { width: 16px; height: 16px; }

/* Type roles. One rule per design-system style; components below set layout only. */
.c26-topbar,
.c26-nav__link,
.c26-actions__link,
.c26-lang__btn,
.c26-lang__opt,
.c26-grp__head,
.c26-ln,
.c26-card__title,
.c26-strip__extra a,
.c26-ln__d,
.c26-card__eyebrow,
.c26-card__desc {
	font-family: var(--typography-body-small-font-family);
	font-size: var(--typography-body-small-font-size);
	font-weight: var(--typography-body-small-font-weight);
	line-height: var(--typography-body-small-line-height);
}
.c26-label {
	font-family: var(--typography-subtitle-font-family);
	font-size: var(--typography-subtitle-font-size);
	font-weight: var(--typography-subtitle-font-weight);
	line-height: var(--typography-subtitle-line-height);
}
.c26-strip__text {
	font-family: var(--typography-body-large-font-family);
	font-size: var(--typography-body-large-font-size);
	font-weight: var(--typography-body-large-font-weight);
	line-height: var(--typography-body-large-line-height);
}
/* Weights the design uses that the type scale does not define. */
.c26-ln,
.c26-strip__extra a { font-weight: 400; }
.c26-topbar__link { font-weight: 700; }
/* Buttons, labels and card titles are Medium in the design system (label/sm, label/md). */
.c26-label,
.c26-card__title,
.c26 .button,
.c26-drawer .button,
.c26-footer .button { font-weight: 500; }
.c26-card__eyebrow { font-weight: 600; text-transform: uppercase; }
/* Single-line labels sit on a 1:1 line box in the design. */
.c26-grp__head { line-height: 1; }

/* Backdrop behind open menus / drawer */
.c26-overlay {
	position: fixed;
	inset: 0;
	z-index: 40;
	background: color-mix(in srgb, var(--background-default-reverse) 20%, transparent);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.25s ease-out;
}
.c26.is-menu-open .c26-overlay,
.c26.is-drawer-open .c26-overlay { opacity: 1; pointer-events: auto; }

/* Announcement bar (kept from the 2024 header, restyled; .nds-scheme-dark in the markup) */
.c26-topbar {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	z-index: 49;
	height: var(--c26-topbar-h);
	display: flex;
	align-items: center;
	justify-content: center;
	gap: var(--spacing-l);
	padding: 0 var(--spacing-l);
	background: var(--background-brand-alternative);
	color: var(--text-default-default);
}
.c26-topbar__text { margin: 0; color: inherit; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c26-topbar__text * { color: inherit; margin: 0; }
.c26-topbar__link { display: inline-flex; align-items: center; gap: var(--spacing-xs); color: inherit; white-space: nowrap; }
.c26-topbar__link:hover,
.c26-topbar__link:focus { color: var(--text-default-tertiary); }

/* ------------------------------------------------------------------ header */
/* Two independent movements, both compositor-only:
   - `translate` keeps the header under the announcement bar: chrome-26.js sets --c26-drop to
     the part of the bar still on screen every frame, so the header rides up with the page
     instead of jumping (no transition, it tracks the scroll). Without JS it sits under the bar.
   - `transform` slides it out/in on scroll direction (.is-retracted). Showing decelerates,
     hiding accelerates away; visibility flips only after the slide-out has finished. */
.c26-header {
	position: fixed;
	top: var(--spacing-m);
	left: var(--spacing-l);
	right: var(--spacing-l);
	z-index: 50;
	translate: 0 var(--c26-drop, var(--c26-topbar-h));
	will-change: transform, translate;
	transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), visibility 0s linear 0s;
}
.c26.is-retracted .c26-header {
	transform: translateY(calc(-100% - 2 * var(--spacing-m)));
	visibility: hidden;
	pointer-events: none;
	transition: transform 0.3s cubic-bezier(0.55, 0, 0.75, 0.2), visibility 0s linear 0.3s;
}
body.admin-bar .c26-header { margin-top: 32px; }

.c26-bar {
	height: 80px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0 var(--spacing-xxl);
	border-radius: var(--wp--preset--border-radius--m);
	background: transparent;
	box-shadow: inset 0 0 0 1px transparent;
	transition: background 0.3s ease-out, box-shadow 0.3s ease-out;
}
.c26-header.nds-scheme-light .c26-bar {
	background: var(--background-default-binary);
	-webkit-backdrop-filter: blur(20px);
	backdrop-filter: blur(20px);
	box-shadow: inset 0 0 0 1px var(--border-default-secondary), var(--nds-elevation-4);
}
.c26-bar__inner {
	width: 100%;
	max-width: 1200px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.c26-logo {
	display: block;
	width: 191px;
	height: 36px;
	flex-shrink: 0;
	color: var(--background-brand-default);
	transition: color 0.3s ease-out;
}
.c26-logo svg { display: block; width: 100%; height: 100%; }

.c26-nav__list { display: flex; gap: var(--spacing-xl); align-items: center; margin: 0; padding: 0; list-style: none; }
.c26-nav__item { margin: 0; }
.c26-nav__link {
	display: flex;
	align-items: center;
	gap: var(--spacing-s);
	height: 40px;
	color: var(--text-default-default);
	white-space: nowrap;
	transition: color 0.15s ease-out;
}
.c26-nav__chev { width: 16px; height: 16px; transition: transform 0.2s ease-out; }
.c26-nav__item.is-open .c26-nav__chev { transform: rotate(180deg); }
.c26-header.nds-scheme-dark .c26-nav__item.is-open > .c26-nav__link,
.c26-header.nds-scheme-dark .c26-nav__link:hover { color: var(--text-default-tertiary); }
.c26-header.nds-scheme-light .c26-nav__item.is-open > .c26-nav__link,
.c26-header.nds-scheme-light .c26-nav__link:hover { color: var(--text-brand-default); }

.c26-actions { display: flex; gap: var(--spacing-xl); align-items: center; }
.c26-actions__link {
	color: var(--text-default-default);
	white-space: nowrap;
	transition: color 0.3s ease-out;
}
.c26-actions__link:hover { color: var(--text-brand-default); }
.c26-actions__cta { white-space: nowrap; }

/* Language switcher */
.c26-lang { position: relative; display: flex; }
.c26-lang__btn {
	display: flex;
	align-items: center;
	gap: var(--spacing-s);
	height: 32px;
	padding: 0;
	border: 0;
	border-radius: var(--wp--preset--border-radius--xs);
	background: transparent;
	color: var(--text-default-default);
	cursor: pointer;
	transition: color 0.3s ease-out, box-shadow 0.3s ease-out;
}
.c26-lang__globe { width: 20px; height: 20px; }
.c26-lang__menu {
	position: absolute;
	top: calc(100% + var(--spacing-s));
	right: 0;
	z-index: 60;
	min-width: 180px;
	margin: 0;
	padding: var(--spacing-s);
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: var(--spacing-xxs);
	border-radius: var(--wp--preset--border-radius--s);
	background: var(--background-default-binary);
	box-shadow: var(--nds-elevation-2);
	opacity: 0;
	visibility: hidden;
	transform: translateY(calc(-1 * var(--spacing-xs)));
	transition: opacity 0.2s ease-out, transform 0.2s ease-out, visibility 0.2s;
}
.c26-lang.is-open .c26-lang__menu,
.c26:not(.is-ready) .c26-lang:focus-within .c26-lang__menu,
.c26:not(.is-ready) .c26-lang--desktop:hover .c26-lang__menu { opacity: 1; visibility: visible; transform: translateY(0); }
.c26-lang__menu li { margin: 0; }
/* Hover bridge over the gap above the dropdown, so the pointer can travel from the globe to the list. */
.c26-lang--desktop .c26-lang__menu::before { content: ""; position: absolute; left: 0; right: 0; top: calc(-1 * var(--spacing-s)); height: var(--spacing-s); }
.c26-lang__opt {
	display: flex;
	align-items: center;
	gap: var(--spacing-m);
	height: 40px;
	padding: 0 var(--spacing-m);
	border-radius: var(--wp--preset--border-radius--xs);
	color: var(--text-default-default);
	white-space: nowrap;
	transition: background 0.15s ease-out;
}
.c26-lang__opt:hover { background: var(--background-default-quaternary); }
.c26-lang__opt.is-current { background: var(--background-default-default); color: var(--text-brand-default); font-weight: 400; }
.c26-lang__flag { display: block; width: 20px; height: 14px; flex-shrink: 0; overflow: hidden; border-radius: var(--wp--preset--border-radius--xs); box-shadow: 0 0 0 1px var(--border-default-quaternary); }
.c26-lang__flag svg { display: block; width: 100%; height: 100%; }
.c26-lang__name { flex: 1 1 0; }
.c26-lang__check { display: inline-flex; width: 16px; height: 16px; color: var(--icon-brand-default); }
.c26-lang__check svg { width: 100%; height: 100%; }

/* ------------------------------------------------------------- mega panels */
.c26-panel {
	position: absolute;
	top: calc(80px + var(--spacing-s));
	left: 50%;
	width: var(--c26-panel-w, max-content);
	max-width: calc(100vw - 2 * var(--spacing-l));
	opacity: 0;
	visibility: hidden;
	transform: translate(-50%, -6px);
	transition: opacity 0.2s ease-out, transform 0.2s ease-out, visibility 0.2s;
}
.c26-nav__item.is-open > .c26-panel,
.c26:not(.is-ready) .c26-nav__item.has-panel:hover > .c26-panel,
.c26:not(.is-ready) .c26-nav__item.has-panel:focus-within > .c26-panel {
	opacity: 1;
	visibility: visible;
	transform: translate(-50%, 0);
}
.c26-panel__box {
	display: flex;
	flex-direction: column;
	gap: var(--spacing-s);
	padding: var(--spacing-s);
	border-radius: var(--wp--preset--border-radius--l);
	background: var(--background-default-binary);
	box-shadow: var(--nds-elevation-2);
}
.c26-panel__row { display: flex; gap: var(--spacing-s); align-items: stretch; }

/* Shared dropdown background (desktop, set up by chrome-26.js). The panels keep their layout
   but draw no box of their own; the morph resizes between them while their contents cross-fade. */
.c26-morph {
	position: absolute;
	top: calc(80px + var(--spacing-s));
	left: 50%;
	z-index: 0;
	border-radius: var(--wp--preset--border-radius--l);
	background: var(--background-default-binary);
	box-shadow: var(--nds-elevation-2);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transform: translate(-50%, -6px);
	transition: width 0.3s cubic-bezier(0.22, 1, 0.36, 1), height 0.3s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.2s ease-out, transform 0.2s ease-out, visibility 0.2s;
}
.c26-morph.is-on { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.c26-morph.is-instant { transition: opacity 0.2s ease-out, transform 0.2s ease-out, visibility 0.2s; }
.c26.has-morph .c26-panel { z-index: 1; }
.c26.has-morph .c26-panel__box { background: transparent; box-shadow: none; }
/* While a menu is open, switching only cross-fades the contents: no slide, the box stays put. */
.c26.has-morph.is-menu-open .c26-panel { transform: translate(-50%, 0); transition: opacity 0.1s ease-out, visibility 0.1s; }
.c26.has-morph.is-menu-open .c26-nav__item.is-open > .c26-panel { transition: opacity 0.22s ease-out 0.08s, visibility 0s; }
@media (max-width: 1099.98px) {
	.c26-morph { display: none; }
	.c26.has-morph .c26-panel__box { background: var(--background-default-binary); box-shadow: var(--nds-elevation-2); }
}
@media (prefers-reduced-motion: reduce) {
	.c26-morph { transition: opacity 0.01ms, visibility 0.01ms; }
}

.c26-tint { background: linear-gradient(to bottom left, var(--background-default-default) 53%, var(--background-default-tertiary) 116%); }
.c26-side,
.c26-main,
.c26-feat {
	border-radius: var(--wp--preset--border-radius--s);
	box-shadow: inset 0 0 0 1px var(--border-default-quaternary);
}
.c26-side { width: 280px; flex-shrink: 0; display: flex; flex-direction: column; }
.c26-side__foot,
.c26-col__foot { margin-top: auto; padding: var(--spacing-xxl); display: flex; }
.c26-side .c26-grp__links { gap: 0; }
/* Tighter than the export so the Platform panel fits a 14" laptop (about 800px of viewport). */
.c26-side .c26-ln--desc.has-icon { padding-block: var(--spacing-s); }
.c26-side .c26-ln__body { gap: var(--spacing-xs); }

.c26-main { flex: 1 1 0; min-width: 0; display: flex; }
.c26-main.has-pad { padding-bottom: var(--spacing-s); }
.c26-col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; }
.c26-col.is-fixed { flex: 0 0 var(--c26-col-w); }

.c26-grp { display: flex; flex-direction: column; }
.c26-grp__head {
	display: flex;
	flex-direction: column;
	gap: var(--spacing-xl);
	padding: var(--spacing-xxl) var(--spacing-xxl) 0;
	color: var(--text-default-secondary);
	white-space: nowrap;
}
.c26-grp__head::after { content: ""; height: 1px; background: var(--border-default-quaternary); }
.c26-grp__head.is-brand { color: var(--text-brand-default); }
.c26-grp__head.is-blank::after { background: transparent; }
.c26-grp__links { display: flex; flex-direction: column; padding: var(--spacing-s); }
.c26-grp--described .c26-grp__links { gap: var(--spacing-s); }

/* Plain link row */
.c26-ln {
	display: flex;
	align-items: center;
	gap: var(--spacing-xs);
	height: 32px;
	padding: var(--spacing-xs) var(--spacing-l);
	border-radius: var(--wp--preset--border-radius--xs);
	color: var(--text-default-default);
	white-space: nowrap;
	transition: background 0.15s ease-out, color 0.15s ease-out;
}
/* The design renders the chevron only on hover; it takes no space otherwise. */
.c26-ln__chev { width: 16px; height: 16px; display: none !important; }
/* Hover and keyboard focus: grey wash, blue text and the chevron (Figma Nav link hover). */
.c26-ln:hover,
.c26-ln:focus-visible { background: var(--background-default-quaternary); color: var(--text-brand-default); }
.c26-ln:hover .c26-ln__chev,
.c26-ln:focus-visible .c26-ln__chev,
.c26-fln:hover .c26-ln__chev { display: inline-flex !important; }

/* Title + description row (optionally with an icon) */
.c26-ln--desc {
	height: auto;
	align-items: flex-start;
	gap: var(--spacing-s);
	white-space: normal;
}
.c26-ln--desc.has-icon { padding: var(--spacing-m) var(--spacing-l); }
.c26-ln__icon { width: 24px; height: 24px; color: var(--icon-brand-default); }
.c26-ln__body { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: var(--spacing-s); }
.c26-ln__t { display: flex; align-items: center; gap: var(--spacing-xs); height: 24px; white-space: nowrap; }
.c26-ln__d {
	padding-bottom: var(--spacing-xs);
	color: var(--text-default-secondary);
	text-wrap: pretty;
}
.c26-ln--desc.has-icon .c26-ln__d { padding-bottom: 0; }
.c26-ln--desc:hover .c26-ln__d { color: var(--text-default-secondary); }
/* Design-system caption: 14px on a 20px line (the site's body-small uses 1.6). */
.c26-ln__d,
.c26-card__desc { line-height: 20px; }

/* Bold label link (Explore the platform, See all features, CTA links) */
.c26-label {
	display: inline-flex;
	align-items: center;
	gap: var(--spacing-m);
	color: var(--text-default-default);
	white-space: nowrap;
	transition: color 0.2s ease-out;
}
.c26-label__chev,
.c26-label__lead { width: 20px; height: 20px; }
.c26-label__lead svg { width: 100%; height: 100%; }
.c26-label:hover { color: var(--text-brand-default); }

/* Featured card */
.c26-feat { width: 331px; flex-shrink: 0; display: flex; flex-direction: column; }
.c26-feat.no-head { justify-content: center; }
.c26-feat__body { display: flex; flex-direction: column; align-items: center; padding: var(--spacing-xl); }
.c26-card { width: 289px; display: flex; flex-direction: column; color: var(--text-default-default); }
.c26-card__img { display: block; height: 122px; overflow: hidden; border-radius: var(--wp--preset--border-radius--xs); background: var(--background-default-secondary); }
.c26-card__img img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease-out;
}
.c26-card:hover .c26-card__img img { transform: scale(1.06); }
.c26-card__text { display: flex; flex-direction: column; gap: var(--spacing-m); padding-top: var(--spacing-xl); }
.c26-card__eyebrow {
	color: var(--text-brand-default);
	text-box: trim-both cap alphabetic;
}
.c26-card__title {
	color: var(--text-default-default);
	white-space: pre-line;
	text-box: trim-both cap alphabetic;
	transition: color 0.15s ease-out;
}
.c26-card:hover .c26-card__title { color: var(--text-brand-default); }
.c26-card__desc { margin-top: var(--spacing-xs); color: var(--text-default-secondary); }

/* CTA strip under a panel */
.c26-strip {
	display: flex;
	align-items: center;
	gap: var(--spacing-4xl);
	height: 60px;
	padding: var(--spacing-xl) var(--spacing-xxl);
}
.c26-strip--b { justify-content: space-between; }
/* Variant A: the link sits right after its sentence, not at the far edge. */
.c26-strip--a { gap: var(--spacing-l); }
.c26-strip--a .c26-strip__text { flex: 0 1 auto; }
.c26-strip__text {
	flex: 1 1 0;
	color: var(--text-default-secondary);
	text-box: trim-both cap alphabetic;
}
.c26-strip__extra { display: flex; gap: var(--spacing-xl); align-items: center; }
.c26-strip__extra a {
	color: var(--text-default-default);
	white-space: nowrap;
	transition: color 0.15s ease-out;
}
.c26-strip__extra a:hover { color: var(--text-brand-default); }

html.c26-lock,
html.c26-lock body { overflow: hidden; }

/* Landing pages: logo only */
.c26.is-simple .c26-bar__inner { justify-content: center; }

@media (prefers-reduced-motion: reduce) {
	.c26 *,
	.c26-footer * { transition-duration: 0.01ms !important; }
}
