/* ==========================================================
   IIT Bhubaneswar Central Library – base layer (loaded from commonhead on every page)
   Fonts, brand tokens and the emblem lockup. The home layout lives in iit-home.css,
   inner pages use the theme3 "modern" layer (re-coloured to these tokens).
   Fonts are self-hosted: the CSP blocks Google Fonts stylesheets.
   Colours come from the IIT Bhubaneswar emblem: slate ink #1f293a + sky blue #0093dd.
   ========================================================== */

@font-face {
	font-family: "IBM Plex Sans";
	src: url("../webfonts/ibmplexsans-var.woff2") format("woff2");
	font-weight: 100 700;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "IBM Plex Sans";
	src: url("../webfonts/ibmplexsans-italic-var.woff2") format("woff2");
	font-weight: 100 700;
	font-style: italic;
	font-display: swap;
}

@font-face {
	font-family: "IBM Plex Mono";
	src: url("../webfonts/ibmplexmono-400.woff2") format("woff2");
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "IBM Plex Mono";
	src: url("../webfonts/ibmplexmono-500.woff2") format("woff2");
	font-weight: 500;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "IBM Plex Mono";
	src: url("../webfonts/ibmplexmono-600.woff2") format("woff2");
	font-weight: 600;
	font-style: normal;
	font-display: swap;
}

:root {
	/* emblem slate (text, dark surfaces) + emblem sky (fills, rules, highlights).
	   Sky text on white uses --iit-sky-ink so it stays readable. */
	--iit-slate: #1f293a;
	--iit-slate-dark: #161d2a;
	--iit-slate-deep: #0c111a;
	--iit-slate-soft: #eef2f7;
	--iit-sky: #0093dd;
	--iit-sky-dark: #0076b3;
	--iit-sky-ink: #00669c;
	--iit-sky-soft: #e6f3fb;
	--iit-sky-glow: rgba(0, 147, 221, 0.35);
	--iit-ink: #0f1b2d;
	--iit-muted: #4a5568;
	--iit-subtle: #7d8796;
	--iit-line: #e1e6ee;
	--iit-paper: #f5f7fa;
	--iit-sans: "IBM Plex Sans", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
	--iit-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
	--iit-grid: linear-gradient(rgba(0, 147, 221, 0.09) 1px, transparent 1px),
		linear-gradient(90deg, rgba(0, 147, 221, 0.09) 1px, transparent 1px);
}

/* ---------- Emblem lockup (header brand) ---------- */

.iit-brand {
	gap: 12px !important;
}

.iit-brand img.iit-brand-emblem {
	width: auto !important;
	height: 46px !important;
	padding: 0 !important;
	border-radius: 0 !important;
	background: none !important;
	box-shadow: none !important;
	flex: 0 0 auto !important;
	object-fit: contain;
}

.iit-brand:hover img {
	transform: none !important;
}

/* thin divider between the emblem and the library name */
.iit-brand .hm-brand-text {
	padding-left: 12px;
	border-left: 1px solid rgba(255, 255, 255, 0.24);
}

.iit-brand .hm-brand-text small {
	font-family: var(--iit-mono);
	font-weight: 500 !important;
	letter-spacing: 0.14em !important;
	text-transform: uppercase;
}

.iit-brand .hm-brand-text strong {
	font-family: var(--iit-sans);
	font-weight: 600 !important;
	letter-spacing: -0.005em;
}

.iit-brand .hm-brand-text strong em {
	font-style: normal;
	font-weight: 400;
	opacity: 0.72;
}

.iit-brand-light .hm-brand-text {
	border-left-color: var(--iit-line);
}

.iit-brand-light .hm-brand-text small {
	color: var(--iit-sky-ink) !important;
}

.iit-brand-light img.iit-brand-emblem {
	height: 42px !important;
}

@media (max-width: 575.98px) {
	.iit-brand-light img.iit-brand-emblem {
		height: 36px !important;
	}

	.iit-brand-light .hm-brand-text {
		display: none !important;
	}
}

@media (max-width: 991.98px) {
	.iit-brand.hm-brand-mobile .hm-brand-text small {
		display: block !important;
	}
}

@media (max-width: 380px) {
	.iit-brand.hm-brand-mobile .hm-brand-text {
		display: none !important;
	}
}

/* main.css sets h1–h3 in Poppins (from a Google Fonts import the CSP may block); headings use the brand sans */
body :is(h1, h2, h3, h4, h5, h6) {
	font-family: var(--iit-sans);
}

/* rich footer block in partials/footer.html: shown only by iit-home.css */
.iit-footer {
	display: none;
}

/* keyboard focus that shows on slate and on white */
.home-modern a:focus-visible,
.home-modern button:focus-visible,
.res-modern a:focus-visible,
.res-modern button:focus-visible {
	outline: 3px solid var(--iit-sky);
	outline-offset: 2px;
}
