/**
 * Global Design Guidelines — tokens, footer, and reusable components.
 * Loaded on every page so the footer and shared elements are always styled.
 */

:root {
	--hypro-carbon: #1a1e28;
	--hypro-carbon-mid: #262a35;
	--hypro-navy: #313644;
	--hypro-grey: #909aad;
	--hypro-grey-light: #bdc2cc;
	--hypro-grey-lightest: #f7f7f8;
	--hypro-cyan: #2ec4e6;
	--hypro-cyan-dark: #0b9cbc;
	--hypro-ink-80: rgba(49, 54, 68, 0.8);

	/* Figma press-card tokens (with fallbacks used in styles) */
	--Color-Brand-Electric-Cyan-Default: #2EC4E6;
	--Color-Brand-Carbon-Navy-Darkest: #1A1E28;
	--Color-Brand-Carbon-Navy-Light: #313644;
	--color-brand-carbon-navy-default: #262A35;

	/* Corner vars */
	--Corner-None: 0;
}

/* Ensure page body bg matches footer on all pages with the styled footer */
body {
	background-color: #1a1e28;
}

/* Ecosystem — light canvas (template + body class). Global dark body above otherwise yields unreadable text. */
body.page-template-page-ecosystem-php,
body.hypro-ecosystem-page {
	background-color: #f7f7f8;
	color: #262a35;
}

/* Light pages that override body bg (homepage hero etc.) do so at component level */
body.hypro-landing {
	background: #1a1e28;
}

/* ─── Global footer (Figma node 999:6331) ──────────────────────────────── */
.site-footer.hypro-footer {
	background: linear-gradient(-57.92deg, #1a1e28 38.546%, #313644 108.18%);
	color: var(--hypro-grey-light);
	border-top: none;
	padding: 60px clamp(1.25rem, 5.56vw, 5rem) 20px;
}

.hypro-footer__inner {
	max-width: 90rem;
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	gap: 40px;
}

.hypro-footer__top {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: clamp(1.5rem, 5vw, 3.75rem);
}

.hypro-footer__brand-group {
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
	flex-shrink: 0;
}

.hypro-footer__brand {
	text-decoration: none;
	color: inherit;
}

.hypro-footer__logo {
	display: flex;
	align-items: center;
	gap: 14px;
}

.hypro-footer__logo img:first-child {
	width: 40px;
	height: 40px;
	flex-shrink: 0;
	object-fit: contain;
}

.hypro-footer__logo img:last-child {
	height: 53px;
	width: auto;
	object-fit: contain;
}

.hypro-footer__logo .site-logo__combined {
	height: 40px;
	width: auto;
	max-width: 220px;
	object-fit: contain;
	object-position: left center;
}

.hypro-footer__cols {
	display: flex;
	gap: clamp(2rem, 6vw, 3.75rem);
	align-items: flex-start;
}

.hypro-footer__col {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.hypro-footer__col--tight  { gap: 8px; }
.hypro-footer__col--spaced { gap: 8px; }

.hypro-footer__col-title {
	margin: 0;
	font-family: Inter, sans-serif;
	font-weight: 400;
	font-size: 14px;
	line-height: 1.3;
	letter-spacing: 0.56px;
	color: var(--hypro-grey-lightest);
	white-space: nowrap;
}

.hypro-footer__link {
	text-decoration: none;
	font-family: Inter, sans-serif;
	font-weight: 400;
	font-size: 14px;
	line-height: 1.3;
	letter-spacing: 0.56px;
	color: var(--hypro-grey-light);
	white-space: nowrap;
}

.hypro-footer__link.is-active {
	color: var(--hypro-grey-lightest);
}

.hypro-footer__divider {
	border-top: 1px solid rgba(123, 140, 167, 0.2);
	width: 100%;
}

.hypro-footer__bottom {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	gap: 1rem;
}

.hypro-footer__copyright {
	margin: 0;
	font-size: 14px;
	font-family: Inter, sans-serif;
	font-weight: 300;
	color: var(--hypro-grey-lightest);
	letter-spacing: 0.56px;
}

.hypro-footer__social {
	display: flex;
	gap: 10px;
	align-items: center;
	justify-content: flex-start;
}

.hypro-footer__social-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: #f7f7f8;
}

/* Icons: assets/images/footer/*.svg — Figma node 999:6331 (36×36, stroke ring + light glyphs) */
.hypro-footer__social-link img {
	display: block;
	width: 36px;
	height: 36px;
	object-fit: contain;
	flex-shrink: 0;
}

.hypro-footer__social-link:hover img,
.hypro-footer__social-link:focus-visible img {
	opacity: 0.92;
}

.hypro-footer__social-link:focus-visible {
	outline: 2px solid var(--hypro-cyan, #2ec4e6);
	outline-offset: 3px;
	border-radius: 50%;
}

.hypro-footer__legal {
	margin: 0;
	font-size: 14px;
	font-family: Inter, sans-serif;
	font-weight: 300;
	letter-spacing: 0.04em;
	color: var(--hypro-grey-lightest);
	white-space: nowrap;
	text-align: center;
	justify-self: center;
}

.hypro-footer__builtby {
	margin: 0;
	font-size: 14px;
	font-family: Inter, sans-serif;
	font-weight: 300;
	letter-spacing: 0.04em;
	color: var(--hypro-grey-lightest);
	white-space: nowrap;
	text-align: right;
	justify-self: end;
}

.hypro-footer__legal-link {
	color: inherit;
	text-decoration: none;
	transition: opacity 0.2s ease;
}

.hypro-footer__legal-link:hover,
.hypro-footer__legal-link:focus-visible {
	opacity: 0.75;
	text-decoration: underline;
}

.hypro-footer__legal-sep {
	opacity: 0.5;
}

/* Footer responsive */
@media (max-width: 900px) {
	.hypro-footer__top {
		flex-direction: column;
		align-items: flex-start;
	}

	.hypro-footer__cols {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 1rem 2rem;
		width: 100%;
	}

	.hypro-footer__bottom {
		grid-template-columns: 1fr;
		gap: 0.625rem;
	}

	.hypro-footer__legal,
	.hypro-footer__builtby {
		text-align: left;
		justify-self: start;
		white-space: normal;
	}
}

@media (max-width: 640px) {
	.hypro-footer__cols {
		grid-template-columns: 1fr;
	}

	.hypro-footer__logo img:last-child {
		height: 40px;
	}
}

@media (max-width: 480px) {
	.site-footer.hypro-footer {
		padding: 2.5rem 1rem 1.25rem;
	}

	.hypro-footer__inner {
		gap: 1.75rem;
	}

	.hypro-footer__bottom {
		gap: 0.75rem;
	}

	.hypro-footer__social {
		flex-wrap: wrap;
		justify-content: flex-start;
		row-gap: 0.5rem;
	}

	.hypro-footer__link {
		white-space: normal;
	}

	.hypro-footer__col-title {
		white-space: normal;
	}
}

/* =========================
   PressCard (Press Releases)
   ========================= */
.news-item__link {
	display: block;
	padding: 40px 80px 40px 32px;
	text-decoration: none;
	color: inherit;
	position: relative;
	overflow: hidden;
	background: transparent;
	border-radius: var(--Corner-None, 0);
	background-color: #fff;
	min-height: 186px;
}

.news-item__link::before {
	content: '';
	position: absolute;
	top: 0;
	right: auto;
	bottom: 0;
	left: -100%;
	width: calc(100% + 2px);
	background: linear-gradient(
		107.84932288114697deg,
		var(--Color-Brand-Carbon-Navy-Darkest, #1A1E28) 23.681%,
		var(--Color-Brand-Carbon-Navy-Light, #313644) 91.399%,
		var(--color-brand-carbon-navy-default, #262A35) 111.49%
	);
	opacity: 0;
	transition:
		left 650ms cubic-bezier(0.4, 0, 0.2, 1),
		opacity 200ms ease;
	z-index: 1;
}

.news-item__link::after {
	content: '';
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	width: 2px;
	background: var(--Color-Brand-Electric-Cyan-Default, #2EC4E6);
	opacity: 0;
	z-index: 3;
	transition: opacity 250ms ease;
}

.news-item__main {
	display: flex;
	flex-direction: column;
	gap: 20px;
	min-width: 0;
	position: relative;
	z-index: 2;
}

.news-item__text {
	display: flex;
	flex-direction: column;
	gap: 8px;
	align-items: flex-start;
}

.news-item__meta-row {
	display: flex;
	flex-direction: row;
	align-items: flex-end;
	justify-content: space-between;
	gap: 12px;
	width: 100%;
	min-width: 0;
}

.news-item__link:hover::before,
.news-item__link:focus::before {
	opacity: 1;
	left: -2px;
}

.news-item__link:hover::after,
.news-item__link:focus::after {
	opacity: 1;
}

.news-item__link:hover .news-item__tag,
.news-item__link:focus .news-item__tag {
	color: var(--hypro-grey-lightest);
	background: var(--Color-Brand-Carbon-Navy-Light, #313644);
	border-color: transparent;
}

.news-item__link:hover .news-item__title,
.news-item__link:focus .news-item__title {
	color: var(--hypro-cyan, #2ec4e6);
}

.news-item__link:hover .news-item__date,
.news-item__link:focus .news-item__date {
	color: rgba(247, 247, 248, 0.72);
}

.news-item__link:hover .news-item__arrow,
.news-item__link:focus .news-item__arrow {
	color: var(--hypro-cyan, #2ec4e6);
	opacity: 1;
}

.news-item__tag {
	display: inline-flex;
	align-items: center;
	padding: 2px 8px;
	border-radius: 2px;
	font-size: 10px;
	font-weight: 400;
	letter-spacing: 0.2px;
	line-height: 1.3;
	color: rgba(49, 54, 68, 0.8);
	border: 0;
	background: #d0eff6;
}

.news-item__title {
	font-family: Inter, sans-serif;
	font-size: 20px;
	font-weight: 600;
	line-height: 1.5;
	letter-spacing: 0;
	color: #262a35;
}

/* Date: grows in home variant (direct flex child), stays natural in archive */
.news-item__date {
	flex: 1 1 auto;
	min-width: 0;
	font-size: 12px;
	font-weight: 400;
	line-height: 1.4;
	letter-spacing: 0;
	color: #909aad;
}

/* Archive inline row: date + separator + read time sit side-by-side */
.news-item__meta-inline {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	flex: 1 1 auto;
	min-width: 0;
}

.news-item__meta-inline .news-item__date {
	flex: 0 0 auto;
}

.news-item__sep {
	display: inline-block;
	flex-shrink: 0;
	width: 3px;
	height: 3px;
	border-radius: 50%;
	background: #909aad;
	opacity: 0.6;
}

.news-item__read {
	font-size: 12px;
	font-weight: 400;
	line-height: 1.4;
	color: #909aad;
	white-space: nowrap;
}

.news-item__arrow {
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: var(--hypro-navy);
	opacity: 0.65;
	position: relative;
	z-index: 2;
	width: 28px;
	height: 29px;
	padding: 7px 10px;
	border-radius: 40px;
	align-self: flex-end;
	transform: translateY(4px);
}

.news-item__arrow svg {
	width: 15px;
	height: 15px;
	display: block;
}
