/*
 * PIXVA v11 — visual system.
 *
 * A single layer that sits on top of theme.css and brand-v4.css:
 *   1. typographic scale        (tighter tracking as size grows, tabular figures)
 *   2. bento layout             (one dominant tile, supporting tiles around it)
 *   3. motion states            (only active when JS adds .px-motion)
 *   4. navigation, footer, 404  (scroll-aware chrome and structured wayfinding)
 *
 * Everything degrades gracefully: without JS nothing is hidden, and with
 * prefers-reduced-motion nothing animates.
 */

/* ============================================================ 1. type == */

:root {
	--px10-fs-display: clamp(40px, 6vw, 68px);
	--px10-fs-title:   clamp(26px, 3.4vw, 38px);
	--px10-fs-heading: clamp(20px, 2.2vw, 25px);
	--px10-fs-body:    16px;
	--px10-fs-small:   13px;
	--px10-fs-micro:   11px;

	--px10-lh-tight: 1.35;
	--px10-lh-snug:  1.6;
	--px10-lh-body:  1.95;

	/* Optical correction: big text needs negative tracking to stay tight. */
	--px10-tracking-display: -0.02em;
	--px10-tracking-title:   -0.012em;
	--px10-tracking-micro:    0.08em;
}

.px10-display {
	font-size: var(--px10-fs-display);
	font-weight: 800;
	line-height: var(--px10-lh-tight);
	letter-spacing: var(--px10-tracking-display);
	text-wrap: balance;
}

.px10-title {
	font-size: var(--px10-fs-title);
	font-weight: 800;
	line-height: var(--px10-lh-snug);
	letter-spacing: var(--px10-tracking-title);
	text-wrap: balance;
}

.px10-eyebrow {
	font-size: var(--px10-fs-micro);
	font-weight: 700;
	letter-spacing: var(--px10-tracking-micro);
	text-transform: uppercase;
}

/* Numbers must not jitter as they change and must align in columns. */
.px10-figure,
.px10-bento__value,
.px10-stat strong,
.px-card__metric {
	font-variant-numeric: tabular-nums;
	font-feature-settings: 'tnum' 1, 'lnum' 1;
}

/* ========================================================= 2. bento == */

/*
 * A twelve-column canvas. The first tile is intentionally larger so the eye
 * lands on one number before reading the rest — that is what makes a dashboard
 * readable instead of a wall of equal boxes.
 */
.px10-bento {
	display: grid;
	grid-template-columns: repeat(12, minmax(0, 1fr));
	gap: 14px;
}

.px10-bento__item {
	grid-column: span 12;
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
	padding: 18px 20px;
	background: #fff;
	border: 1px solid var(--px-border, #dfe8ec);
	border-radius: 16px;
	overflow: hidden;
}

@media (min-width: 782px) {
	.px10-bento__item--hero  { grid-column: span 5; grid-row: span 2; }
	.px10-bento__item--half  { grid-column: span 7; }
	.px10-bento__item--third { grid-column: span 4; }
	.px10-bento__item--quarter { grid-column: span 3; }
	.px10-bento__item--wide  { grid-column: span 8; }
	.px10-bento__item--side  { grid-column: span 4; }
}

.px10-bento__label {
	font-size: var(--px10-fs-micro);
	font-weight: 700;
	letter-spacing: var(--px10-tracking-micro);
	color: #7b93a0;
	text-transform: uppercase;
}

.px10-bento__value {
	font-size: 30px;
	font-weight: 800;
	line-height: 1.15;
	color: var(--px-primary, #0b5b78);
}

.px10-bento__item--hero .px10-bento__value {
	font-size: clamp(44px, 6vw, 66px);
	letter-spacing: var(--px10-tracking-display);
}

.px10-bento__hint {
	font-size: 12px;
	line-height: 1.9;
	color: #8ba3b0;
}

/* A single accent tile per dashboard draws the eye without shouting. */
.px10-bento__item--accent {
	background: linear-gradient(140deg, var(--px-primary, #0b5b78), #0e7ea6);
	border-color: var(--px-primary, #0b5b78);
	color: #fff;
}

.px10-bento__item--accent .px10-bento__label,
.px10-bento__item--accent .px10-bento__hint { color: #cfe6ef; }
.px10-bento__item--accent .px10-bento__value { color: #fff; }

/* A soft glow, not a flat fill — reads as depth rather than decoration. */
.px10-bento__item--accent::after {
	content: '';
	position: absolute;
	inset: auto -30% -60% auto;
	width: 260px;
	height: 260px;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(255, 255, 255, .22), transparent 62%);
	pointer-events: none;
}

.px10-bento__spark {
	display: flex;
	align-items: flex-end;
	gap: 3px;
	height: 42px;
	margin-top: auto;
}

.px10-bento__spark > i {
	flex: 1;
	min-width: 0;
	border-radius: 2px 2px 0 0;
	background: var(--px-secondary, #16736d);
	opacity: .75;
	transform-origin: bottom center;
}

.px10-bento__item--accent .px10-bento__spark > i { background: #fff; opacity: .55; }

.px10-bento__link {
	margin-top: 10px;
	font-size: 12px;
	font-weight: 700;
	color: var(--px-primary, #0b5b78);
	text-decoration: none;
}
.px10-bento__link:hover { text-decoration: underline; }
.px10-bento__item--accent .px10-bento__link { color: #fff; }

/* ======================================================== 3. motion == */

/*
 * Hidden only once the script confirms it can reveal them again. Without JS,
 * or with reduced motion, .px-motion is absent and nothing is ever invisible.
 */
.px-motion [data-reveal] {
	opacity: 0;
	transform: translate3d(0, 26px, 0);
	will-change: opacity, transform;
}

.px-motion [data-reveal='scale'] { transform: translate3d(0, 20px, 0) scale(.97); }
.px-motion [data-grow] { transform: scaleX(0); transform-origin: right center; }

@media (prefers-reduced-motion: reduce) {
	.px-motion [data-reveal],
	.px-motion [data-reveal='scale'] { opacity: 1; transform: none; }
	.px-motion [data-grow] { transform: none; }
}

/* ===================================================== 4. navigation == */

/*
 * A hairline progress bar pinned under the header. It turns the header into a
 * two-state element: airy at the top of the page, compact and lifted once the
 * reader starts scrolling.
 */
.px-progress {
	position: fixed;
	top: 0;
	right: 0;
	left: 0;
	z-index: 60;
	height: 3px;
	background: transparent;
	pointer-events: none;
}

.px-progress > i {
	display: block;
	height: 100%;
	background: linear-gradient(90deg, var(--px-primary, #0b5b78), var(--px-secondary, #16736d));
	transform: scaleX(0);
	transform-origin: right center;
}

.admin-bar .px-progress { top: 32px; }
@media (max-width: 782px) { .admin-bar .px-progress { top: 46px; } }

.px-header {
	transition: box-shadow 260ms ease, border-color 260ms ease, background-color 260ms ease;
}

.px-header.is-scrolled {
	background: rgba(255, 255, 255, .86);
	-webkit-backdrop-filter: saturate(180%) blur(14px);
	backdrop-filter: saturate(180%) blur(14px);
	border-bottom-color: transparent;
	box-shadow: 0 1px 0 rgba(6, 56, 75, .07), 0 10px 30px rgba(6, 56, 75, .07);
}

.px-header.is-scrolled .px-header__inner { min-height: 62px; }
.px-header__inner { transition: min-height 260ms ease; }

/* Underline that grows from the centre — quieter than a colour flash. */
.px-menu > li > a {
	position: relative;
	padding-block: 6px;
}

.px-menu > li > a::after {
	content: '';
	position: absolute;
	right: 0;
	left: 0;
	bottom: 0;
	height: 2px;
	background: var(--px-primary, #0b5b78);
	transform: scaleX(0);
	transform-origin: center;
	transition: transform 260ms ease;
}

.px-menu > li > a:hover::after,
.px-menu > li.current-menu-item > a::after { transform: scaleX(1); }

@media (max-width: 991px) {
	.px-menu > li > a::after { display: none; }
}

/* ========================================================= 5. footer == */

.px-footer__grid {
	column-gap: 40px;
	row-gap: 36px;
}

.px-footer__grid h2 {
	font-size: var(--px10-fs-micro);
	font-weight: 800;
	letter-spacing: var(--px10-tracking-micro);
	text-transform: uppercase;
	opacity: .72;
	margin-bottom: 18px;
}

.px-footer__grid ul { list-style: none; margin: 0; padding: 0; }

.px-footer__grid li + li { margin-top: 10px; }

.px-footer__grid a {
	position: relative;
	transition: color 200ms ease, transform 200ms ease;
	display: inline-block;
}

.px-footer__grid a:hover { transform: translateX(-3px); }

.px-footer__bottom {
	border-top: 1px solid rgba(255, 255, 255, .12);
	padding-top: 20px;
	font-size: 12px;
}

/* ============================================================ 6. 404 == */

.px-notfound {
	position: relative;
	min-height: 62vh;
	display: grid;
	place-items: center;
	text-align: center;
	padding-block: 72px;
	overflow: hidden;
}

/* Oversized ghost digits behind the message — depth without a graphic. */
.px-notfound__ghost {
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	font-size: clamp(180px, 34vw, 420px);
	font-weight: 800;
	line-height: 1;
	letter-spacing: -0.05em;
	color: var(--px-primary, #0b5b78);
	opacity: .06;
	pointer-events: none;
	user-select: none;
	direction: ltr;
}

.px-notfound__inner {
	position: relative;
	max-width: 640px;
}

.px-notfound h1 { margin-bottom: 14px; }

.px-notfound__lead {
	font-size: 17px;
	line-height: 2;
	color: var(--px-muted, #617078);
	margin-bottom: 30px;
}

.px-notfound__links {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	justify-content: center;
	margin-bottom: 28px;
}

.px-notfound__search {
	max-width: 420px;
	margin-inline: auto;
}

/* =========================================================== 7. cards == */

/* One shared lift, applied wherever a card is interactive. */
.px10-lift {
	transition: transform 260ms cubic-bezier(.2, .7, .3, 1), box-shadow 260ms ease, border-color 260ms ease;
}

.px10-lift:hover {
	transform: translateY(-3px);
	border-color: var(--px-primary, #0b5b78);
	box-shadow: 0 14px 34px rgba(6, 56, 75, .10);
}

@media (prefers-reduced-motion: reduce) {
	.px10-lift:hover { transform: none; }
}

/* =========================================================== 8. print == */

@media print {
	.px-progress { display: none; }
	.px10-bento__item { break-inside: avoid; }
}
