/* ==========================================================================
   KIRUR NISIM THEME - css/nisim/pages/logos.css            (owner: galleries)
   Clients page - view/pages/logos.tpl + the item component
   view/components/gallery_inner_image.tpl (shown here as a logo tile).
   From base.css: .nis-pagehero, .nis-kicker, .nis-title (--sm), .nis-b,
   .nis-rule, .nis-rich, .nis-cta, .nis-btn (--gold), .nis-vh, .dn,
   @keyframes nisUp, nisLine.
   Page blocks: .nis-cli (page), .nis-stats, .nis-logogrid.
   Minifier-safe: one declaration per line, single spaces, slash-star comments.
   ========================================================================== */

/* ---------- intro: the design paragraph, or the CMS "content top" ---------- */
.nis-cli__intro {
	padding: var(--nis-sec-y-sm) var(--nis-gutter) clamp(24px, 2.6vw, 38px);
	background: var(--nis-cream);
}
.nis-cli__lead {
	max-width: 60ch;
	margin: 0;
	color: var(--nis-text-muted);
	font-size: 18.5px;
	font-weight: 300;
	line-height: 1.9;
	text-wrap: pretty;
}
.nis-cli__rule {
	--nis-rule-w: 96px;
	margin-top: 30px;
	transform-origin: right center;
}
/* CMS "content top" / "content bottom" (empty today): printed after the design
   copy in the secondary look of owner rule R3 (hairline above, 15.5px / 1.85
   muted text, 21px / 500 titles, 62ch) */
.nis-cli__cms {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
	gap: var(--nis-gap-cols);
	padding-top: 26px;
	border-top: 1px solid var(--nis-line-3);
}
.nis-cli__cms > .nis-rich {
	max-width: 62ch;
	color: var(--nis-text-muted);
	font-size: 15.5px;
	line-height: 1.85;
}
.nis-cli__cms > .nis-rich h1,
.nis-cli__cms > .nis-rich h2,
.nis-cli__cms > .nis-rich h3,
.nis-cli__cms > .nis-rich h4,
.nis-cli__cms > .nis-rich h5,
.nis-cli__cms > .nis-rich h6 {
	margin: 1.2em 0 .4em;
	font-size: 21px;
	font-weight: 500;
	line-height: 1.45;
	letter-spacing: 0;
}
.nis-cli__cms > .nis-rich:empty {
	display: none;
}
.nis-cli__cms--top {
	margin-top: clamp(28px, 3vw, 42px);
}

/* ---------- stats band ---------- */
.nis-cli__stats {
	padding: clamp(44px, 5vw, 72px) var(--nis-gutter);
	background: var(--nis-mist);
}
.nis-stats {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(24px, 3vw, 48px);
}
.nis-stats__item {
	min-width: 0;
	padding: 0 clamp(10px, 1.4vw, 24px);
	border-inline-start: 1px solid var(--nis-line-3);
	text-align: center;
}
.nis-stats__num {
	color: var(--nis-navy);
	font-size: clamp(38px, 4.4vw, 64px);
	font-weight: 200;
	font-variant-numeric: tabular-nums;
	line-height: 1;
	direction: ltr;
}
.nis-stats__label {
	margin-top: 16px;
	color: var(--nis-navy);
	font-size: 16.5px;
	font-weight: 500;
}
.nis-stats__note {
	margin-top: 7px;
	color: var(--nis-text-soft);
	font-size: 14.5px;
	font-weight: 300;
}

/* ---------- all logos ----------
   The count label is printed after the list and placed beside the title, so a
   css counter can show the real number of logos without any script. */
.nis-cli__all {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: end;
	column-gap: 24px;
	padding: var(--nis-sec-y) var(--nis-gutter);
	background: var(--nis-cream);
	counter-reset: nis-logos;
}
.nis-cli__head {
	--nis-b-weight: 700;
	grid-row: 1;
	grid-column: 1;
	margin-bottom: clamp(30px, 3.4vw, 50px);
}
.nis-cli__count {
	grid-row: 1;
	grid-column: 2;
	margin-bottom: clamp(30px, 3.4vw, 50px);
	color: var(--nis-text-soft);
	font-size: 15.5px;
	font-weight: 300;
}
.nis-cli__count::before {
	content: counter(nis-logos) "\00a0";
}
.nis-cli__cms--bottom {
	grid-row: 3;
	grid-column: 1 / -1;
	margin-top: var(--nis-gap-sechead);
}
.nis-logogrid {
	display: grid;
	grid-row: 2;
	grid-column: 1 / -1;
	grid-template-columns: repeat(auto-fill, minmax(clamp(150px, 15vw, 220px), 1fr));
	gap: var(--nis-gap-tiles);
}
.nis-logogrid > li {
	min-width: 0;
	counter-increment: nis-logos;
}
/* the item component as a logo tile */
.nis-logogrid .nis-thumb {
	position: relative;
	aspect-ratio: 16 / 10;
	border: 1px solid var(--nis-line-1);
	border-radius: var(--nis-r-box);
	background: var(--nis-white);
	transition: transform .45s var(--nis-ease), box-shadow .45s ease, border-color .35s ease;
}
/* the anchors are a[href="#"] without a lightbox on this page: inert
   (galleries.js also cancels the click and takes them out of the tab order) */
.nis-logogrid .nis-thumb__link {
	display: block;
	color: inherit;
	cursor: default;
	pointer-events: none;
}
.nis-logogrid .nis-thumb__ov,
.nis-logogrid .nis-thumb__ov .zoom,
.nis-logogrid .nis-thumb__ov .zoomMiddle {
	display: contents;
}
.nis-logogrid .nis-thumb__ov .icon {
	display: none;
}
.nis-logogrid .nis-thumb__img {
	position: absolute;
	inset: clamp(16px, 1.8vw, 28px);
	display: flex;
	align-items: center;
	justify-content: center;
}
.nis-logogrid .nis-thumb__img img {
	display: block;
	width: auto;
	max-width: 100%;
	height: auto;
	max-height: 100%;
	object-fit: contain;
	filter: grayscale(1);
	opacity: .62;
	transition: filter .45s ease, opacity .45s ease, transform .5s var(--nis-ease);
}
@media (hover: hover) {
	.nis-logogrid > li:hover .nis-thumb {
		border-color: rgba(26, 48, 82, .5);
		box-shadow: var(--nis-sh-hover);
		transform: translateY(-6px);
	}
	.nis-logogrid > li:hover .nis-thumb__img img {
		filter: none;
		opacity: 1;
		transform: scale(1.05);
	}
}
/* touch screens have no hover: a logo turns to colour once its tile has been
   revealed (at once when the reveal does not run) */
@media (hover: none) {
	html.nis-js .nis-logogrid > li.is-in .nis-thumb__img img {
		filter: none;
		opacity: 1;
		transition-delay: .5s;
	}
	html:not(.nis-js) .nis-logogrid .nis-thumb__img img {
		filter: none;
		opacity: 1;
	}
}

/* ---------- CTA band, clients variant: centred row, paragraph, one button ---------- */
.nis-cli__cta {
	padding-top: clamp(52px, 6vw, 88px);
	padding-bottom: clamp(52px, 6vw, 88px);
}
.nis-cli__cta::before {
	display: none;
}
.nis-cli__cta .nis-cta__in {
	align-items: center;
	gap: clamp(24px, 3vw, 52px);
}
.nis-cli__cta .nis-cta__title {
	--nis-b-weight: 700;
	font-size: var(--nis-fs-title-sm);
	line-height: 1.25;
	text-wrap: pretty;
}
.nis-cli__cta p.nis-cta__text {
	color: rgba(247, 242, 234, .72);
}
/* the design's pill here is the deeper gold, bolder, and turns cream on hover */
.nis-cli__btn {
	--nis-btn-bg: var(--nis-gold);
	--nis-btn-bd: var(--nis-gold);
	--nis-btn-fg: var(--nis-navy-deep);
	--nis-btn-bg-h: var(--nis-on-navy);
	--nis-btn-bd-h: var(--nis-on-navy);
	--nis-btn-fg-h: var(--nis-navy-deep);
	flex: 0 0 auto;
	gap: 14px;
	padding: 18px 34px;
	font-size: 17px;
	font-weight: 600;
}
.nis-cli__btn .ph-light {
	font-size: 20px;
}

/* ---------- motion (decorative; only with JS and when motion is allowed) ----------
   Reveal: hidden under html.nis-js until galleries.js adds .is-in. If the
   script never takes over (.nis-cli.is-live missing) everything is shown by
   the css fail-safe after 3s. */
@keyframes nisCliShow {
	to {
		opacity: 1;
		transform: none;
	}
}
@media (prefers-reduced-motion: no-preference) {
	html.nis-js .nis-cli .nis-pagehero__in > * {
		animation: nisUp .7s ease backwards;
	}
	html.nis-js .nis-cli .nis-pagehero__in > .nis-kicker {
		animation-delay: .06s;
	}
	html.nis-js .nis-cli .nis-pagehero__in > .nis-pagehero__title {
		animation-duration: .8s;
		animation-delay: .12s;
	}
	html.nis-js .nis-cli .nis-pagehero__in > .nis-pagehero__lead {
		animation-duration: .8s;
		animation-delay: .2s;
	}
	html.nis-js .nis-cli__rule {
		animation: nisLine 1s var(--nis-ease) .25s backwards;
	}
	html.nis-js .nis-stats__item,
	html.nis-js .nis-logogrid > li,
	html.nis-js .nis-cli__cta .nis-cta__in {
		opacity: 0;
		transform: translateY(26px);
	}
	html.nis-js .nis-cli:not(.is-live) .nis-stats__item,
	html.nis-js .nis-cli:not(.is-live) .nis-logogrid > li,
	html.nis-js .nis-cli:not(.is-live) .nis-cli__cta .nis-cta__in {
		animation: nisCliShow .01s linear 3s forwards;
	}
	html.nis-js .nis-stats__item.is-in,
	html.nis-js .nis-logogrid > li.is-in,
	html.nis-js .nis-cli__cta .nis-cta__in.is-in {
		opacity: 1;
		transform: none;
		transition: opacity .9s var(--nis-ease), transform .9s var(--nis-ease);
	}
}

/* ---------- responsive ---------- */
@media (max-width: 899.98px) {
	.nis-cli__cta .nis-cta__in {
		align-items: flex-start;
	}
}
@media (max-width: 599.98px) {
	.nis-cli__intro {
		padding-top: 36px;
	}
	.nis-cli__lead {
		color: var(--nis-text-soft);
		font-size: 17px;
		line-height: 1.8;
	}
	.nis-cli__rule {
		margin-top: 24px;
	}
	.nis-cli__stats {
		padding-top: 30px;
		padding-bottom: 30px;
	}
	.nis-stats {
		grid-template-columns: minmax(0, 1fr);
		gap: 0;
	}
	.nis-stats__item {
		display: grid;
		grid-template-columns: 104px minmax(0, 1fr);
		align-items: center;
		column-gap: 18px;
		padding: 18px 0;
		border-top: 1px solid var(--nis-line-3);
		border-inline-start: 0;
		text-align: start;
	}
	.nis-stats__item:first-child {
		padding-top: 0;
		border-top: 0;
	}
	.nis-stats__item:last-child {
		padding-bottom: 0;
	}
	.nis-stats__num {
		grid-row: 1 / 3;
		font-size: 42px;
		text-align: center;
	}
	.nis-stats__label {
		align-self: end;
		margin-top: 0;
	}
	.nis-stats__note {
		align-self: start;
		margin-top: 2px;
	}
	.nis-cli__all {
		grid-template-columns: minmax(0, 1fr);
		padding-top: 44px;
		padding-bottom: 52px;
	}
	.nis-cli__head {
		margin-bottom: 4px;
	}
	.nis-cli__count {
		grid-row: 2;
		grid-column: 1;
		margin-bottom: 22px;
	}
	.nis-logogrid {
		grid-row: 3;
	}
	.nis-cli__cms--bottom {
		grid-row: 4;
	}
	.nis-logogrid .nis-thumb__img {
		inset: 14px;
	}
}
