/* =====================================================================
   Sometek: Palvelut – service grid with animated line icons (approved in LAB 03, 18 Nov 2026).
   One hairline tile grid; on hover a lime fill fades in and the content turns to its negative.
   ===================================================================== */

.sts-services {
	--sts-ink: #1E2318;
	--sts-muted: #5E6455;
	--sts-line: #E3E5DE;
	--sts-lime: var(--st-lime, #97C92A);
	--sts-fill: var(--sts-lime);
	--sts-on-fill: #10150A;
	--sts-icon-bg: #FFFFFF;
	--sts-cols: 3;
	color: var(--sts-ink);
	font-family: Cairo, system-ui, -apple-system, "Segoe UI", sans-serif;
	text-align: left;
}
.sts-services *,
.sts-services *::before,
.sts-services *::after { box-sizing: border-box; }
.sts-services .sts-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sts-services .sts-nowrap { white-space: nowrap; }

/* ---------- Heading: title on the left, intro on the right ---------- */

.sts-services .sts-head {
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
	gap: 24px 72px;
	align-items: end;
	margin-bottom: 72px;
}
.sts-services .sts-eyebrow {
	margin: 0 0 12px;
	color: var(--sts-lime);
	font: 700 13px/1.2 Cairo, sans-serif;
	letter-spacing: 3px;
	text-transform: uppercase;
}
.sts-services .sts-title {
	margin: 0;
	color: var(--sts-ink);
	font-size: clamp(42px, 5vw, 64px);
	font-weight: 600;
	line-height: 1.02;
	letter-spacing: -0.01em;
}
.sts-services .sts-intro {
	max-width: 640px;
	margin: 0;
	color: var(--sts-muted);
	font-size: 18px;
	line-height: 1.65;
}

/* ---------- Tiles ---------- */

.sts-services .sts-tiles {
	display: grid;
	grid-template-columns: repeat(var(--sts-cols), minmax(0, 1fr));
	border-top: 1px solid var(--sts-line);
	border-left: 1px solid var(--sts-line);
}
.sts-services .sts-tile {
	position: relative;
	isolation: isolate;
	display: flex;
	flex-direction: column;
	padding: 40px 36px 32px;
	border-right: 1px solid var(--sts-line);
	border-bottom: 1px solid var(--sts-line);
	background: #FFFFFF;
}
.sts-services .sts-tile::before {
	content: "";
	position: absolute;
	inset: -1px;
	z-index: -1;
	background: var(--sts-fill);
	opacity: 0;
	transition: opacity 0.45s ease;
}
.sts-services .sts-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 30px; }
.sts-services .sts-num {
	color: var(--sts-muted);
	font: 600 13px/1 Cairo, sans-serif;
	letter-spacing: 1.5px;
	font-variant-numeric: tabular-nums;
	transition: color 0.35s;
}
.sts-services .sts-tile-title {
	margin: 0 0 12px;
	color: var(--sts-ink);
	font-size: 23px;
	font-weight: 600;
	line-height: 1.2;
	transition: color 0.35s;
}
.sts-services .sts-tile-text {
	margin: 0;
	color: var(--sts-muted);
	font-size: 15px;
	line-height: 1.7;
	transition: color 0.35s;
}

/* The button: the whole tile is the link (its ::after covers the tile). */
.sts-services a.sts-more {
	position: static;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-top: auto;
	padding-top: 26px;
	color: var(--sts-ink);
	font: 700 13px/1.3 Cairo, sans-serif;
	letter-spacing: 1.5px;
	text-decoration: none;
	text-transform: uppercase;
	transition: color 0.35s;
}
.sts-services a.sts-more::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.sts-services a.sts-more:focus { outline: none; }
.sts-services a.sts-more:focus-visible::after { outline: 2px solid var(--sts-ink); outline-offset: -6px; }
.sts-services .sts-arrow { color: var(--sts-lime); transition: transform 0.35s, color 0.35s; }

/* Hover, keyboard focus or tap on a linked tile: the lime fill fades in and the content turns to its negative. */
.sts-services .sts-tile--link:is(:hover, :focus-within, :active)::before { opacity: 1; }
.sts-services .sts-tile--link:is(:hover, :focus-within) { --sts-icon-bg: var(--sts-fill); }
.sts-services .sts-tile--link:is(:hover, :focus-within) :is(.sts-tile-title, .sts-tile-text, .sts-num, a.sts-more, .sts-arrow) { color: var(--sts-on-fill); }
.sts-services .sts-tile--link:is(:hover, :focus-within) .sts-icon { stroke: var(--sts-on-fill); }
.sts-services .sts-tile--link:is(:hover, :focus-within) .sts-icon .a { stroke: #FFFFFF; transition-delay: 0.15s; }
.sts-services .sts-tile--link:is(:hover, :focus-within) .sts-arrow { transform: translateX(5px); }

/* ---------- Icons: thin line, one lime detail ---------- */

.sts-services .sts-icon {
	--sts-size: 72px;
	--sts-sw: 1; /* 1 unit = 1.5 px at 72 px */
	display: block;
	width: var(--sts-size);
	height: var(--sts-size);
	overflow: visible;
	fill: none;
	stroke: var(--sts-ink);
	stroke-width: var(--sts-sw);
	stroke-linecap: round;
	stroke-linejoin: round;
	transition: stroke 0.35s;
}
.sts-services .sts-icon .a { stroke: var(--sts-lime); transition: stroke 0.35s; }
.sts-services .sts-icon .f { fill: var(--sts-icon-bg); transition: fill 0.35s; }
.sts-services .sts-icon g { transform-box: fill-box; transform-origin: center; }
.sts-services .sts-icon :is(.h-b1, .h-b2, .h-b3) { transform-origin: 50% 100%; }
.sts-services .sts-icon .h-needle { transform-box: view-box; transform-origin: 17px 28.5px; } /* turns around its hub */

/* Draw in when the tile enters the view (only once the script runs; without it the icons are simply shown). */
.sts-js .sts-icon .d,
.sts-js .sts-icon .a { stroke-dasharray: 1.12 1.12; stroke-dashoffset: 1.12; opacity: 0; } /* 1.12, not 1: Chrome measures small circles ~10 % short */
.sts-js .is-in .sts-icon .d,
.sts-js .is-in .sts-icon .a {
	animation: sts-draw 1s cubic-bezier(0.65, 0, 0.35, 1) forwards;
	animation-delay: calc(var(--i, 0) * 110ms + 100ms);
}
.sts-js .is-in .sts-icon .a { animation-duration: 0.7s; animation-delay: calc(var(--i, 0) * 110ms + 450ms); }
@keyframes sts-draw { from { opacity: 1; stroke-dashoffset: 1.12; } to { opacity: 1; stroke-dashoffset: 0; } }

/* Each icon's own small motion on hover. */
@keyframes sts-launch { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(3px, -3px); } }
@keyframes sts-fan-back { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(3px, -3px); } }
@keyframes sts-fan-mid { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(1.5px, -1.5px); } }
@keyframes sts-spark { 0%, 100% { transform: rotate(0) scale(1); } 50% { transform: rotate(90deg) scale(1.18); } }
@keyframes sts-pulse { 0%, 100% { transform: scale(1) rotate(0); } 50% { transform: scale(1.25) rotate(45deg); } }
@keyframes sts-k1 { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(-14px); } }
@keyframes sts-k2 { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(16px); } }
@keyframes sts-k3 { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(-11px); } }
@keyframes sts-lift { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2.5px); } }
@keyframes sts-spin { 0% { transform: scaleX(1); } 50% { transform: scaleX(0.12); } 100% { transform: scaleX(1); } }
@keyframes sts-nudge { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(1.5px, -1.5px); } }
@keyframes sts-bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes sts-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2px); } }
@keyframes sts-swing { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-9deg); } }
@keyframes sts-turn { to { transform: rotate(360deg); } }
@keyframes sts-grow-a { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(0.6); } }
@keyframes sts-grow-b { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(1.25); } }
@keyframes sts-tap { 0%, 100% { transform: translate(0, 0) scale(1); } 40%, 70% { transform: translate(-4px, -4px) scale(1); } 55% { transform: translate(-4px, -4px) scale(0.86); } }
@keyframes sts-pop { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.3); } }
@keyframes sts-needle { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-80deg); } }
@keyframes sts-tilt { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-5deg); } 75% { transform: rotate(5deg); } }

.sts-tile:hover .h-arrow { animation: sts-launch 1.4s ease-in-out infinite; }
.sts-tile:hover .h-back { animation: sts-fan-back 1.8s ease-in-out infinite; }
.sts-tile:hover .h-mid { animation: sts-fan-mid 1.8s ease-in-out infinite; }
.sts-tile:hover .h-star { animation: sts-spark 2.2s ease-in-out infinite; }
.sts-tile:hover .sts-icon--cms .h-star { animation-name: sts-pulse; }
.sts-tile:hover .h-k1 { animation: sts-k1 2.4s ease-in-out infinite; }
.sts-tile:hover .h-k2 { animation: sts-k2 2.4s ease-in-out infinite; }
.sts-tile:hover .h-k3 { animation: sts-k3 2.4s ease-in-out infinite; }
.sts-tile:hover .h-block { animation: sts-lift 1.6s ease-in-out infinite; }
.sts-tile:hover .h-meridian { animation: sts-spin 2.4s ease-in-out infinite; }
.sts-tile:hover .h-bubble { animation: sts-nudge 1.6s ease-in-out infinite; }
.sts-tile:hover .h-pin { animation: sts-bounce 1.2s ease-in-out infinite; }
.sts-tile:hover .h-cube { animation: sts-float 1.8s ease-in-out infinite; }
.sts-tile:hover .h-orbit { animation: sts-swing 2.2s ease-in-out infinite; }
.sts-tile:hover .h-spin { animation: sts-turn 5s linear infinite; }
.sts-tile:hover .h-roof { animation: sts-float 1.6s ease-in-out infinite; }
.sts-tile:hover .h-b1 { animation: sts-grow-a 1.8s ease-in-out infinite; }
.sts-tile:hover .h-b2 { animation: sts-grow-b 1.8s ease-in-out 0.2s infinite; }
.sts-tile:hover .h-b3 { animation: sts-grow-a 1.8s ease-in-out 0.4s infinite; }
.sts-tile:hover .h-tap { animation: sts-tap 1.6s ease-in-out infinite; }
.sts-tile:hover .h-loop { animation: sts-turn 3s linear infinite; }
.sts-tile:hover .h-bolt { animation: sts-pop 1.5s ease-in-out infinite; }
.sts-tile:hover .h-phone { animation: sts-float 1.6s ease-in-out infinite; }
.sts-tile:hover .h-check { animation: sts-pop 1.2s ease-in-out infinite; }
.sts-tile:hover .h-pad { animation: sts-tilt 1.8s ease-in-out infinite; }
.sts-tile:hover .h-btn1 { animation: sts-pop 1s ease-in-out infinite; }
.sts-tile:hover .h-btn2 { animation: sts-pop 1s ease-in-out 0.5s infinite; }
.sts-tile:hover .h-needle { animation: sts-needle 2.4s ease-in-out infinite; }
.sts-tile:hover .h-w1 { animation: sts-grow-a 1.6s ease-in-out infinite; }
.sts-tile:hover .h-w2 { animation: sts-grow-b 1.6s ease-in-out 0.2s infinite; }
.sts-tile:hover .h-w3 { animation: sts-grow-a 1.6s ease-in-out 0.4s infinite; }

/* Touch screens (no hover): each icon plays its motion twice after drawing in. */
@media (hover: none) {
	.sts-js .is-in .h-arrow { animation: sts-launch 1.4s ease-in-out 1.6s 2; }
	.sts-js .is-in .h-back { animation: sts-fan-back 1.8s ease-in-out 1.6s 2; }
	.sts-js .is-in .h-mid { animation: sts-fan-mid 1.8s ease-in-out 1.6s 2; }
	.sts-js .is-in .h-star { animation: sts-spark 2.2s ease-in-out 1.6s 2; }
	.sts-js .is-in .sts-icon--cms .h-star { animation-name: sts-pulse; }
	.sts-js .is-in .h-k1 { animation: sts-k1 2.4s ease-in-out 1.6s 2; }
	.sts-js .is-in .h-k2 { animation: sts-k2 2.4s ease-in-out 1.6s 2; }
	.sts-js .is-in .h-k3 { animation: sts-k3 2.4s ease-in-out 1.6s 2; }
	.sts-js .is-in .h-block { animation: sts-lift 1.6s ease-in-out 1.6s 2; }
	.sts-js .is-in .h-meridian { animation: sts-spin 2.4s ease-in-out 1.6s 2; }
	.sts-js .is-in .h-bubble { animation: sts-nudge 1.6s ease-in-out 1.6s 2; }
	.sts-js .is-in .h-pin { animation: sts-bounce 1.2s ease-in-out 1.6s 2; }
	.sts-js .is-in .h-cube { animation: sts-float 1.8s ease-in-out 1.6s 2; }
	.sts-js .is-in .h-orbit { animation: sts-swing 2.2s ease-in-out 1.6s 2; }
	.sts-js .is-in .h-spin { animation: sts-turn 5s linear 1.6s 1; }
	.sts-js .is-in .h-roof { animation: sts-float 1.6s ease-in-out 1.6s 2; }
	.sts-js .is-in .h-b1 { animation: sts-grow-a 1.8s ease-in-out 1.6s 2; }
	.sts-js .is-in .h-b2 { animation: sts-grow-b 1.8s ease-in-out 1.8s 2; }
	.sts-js .is-in .h-b3 { animation: sts-grow-a 1.8s ease-in-out 2s 2; }
	.sts-js .is-in .h-tap { animation: sts-tap 1.6s ease-in-out 1.6s 2; }
	.sts-js .is-in .h-loop { animation: sts-turn 3s linear 1.6s 1; }
	.sts-js .is-in .h-bolt { animation: sts-pop 1.5s ease-in-out 1.6s 2; }
	.sts-js .is-in .h-phone { animation: sts-float 1.6s ease-in-out 1.6s 2; }
	.sts-js .is-in .h-check { animation: sts-pop 1.2s ease-in-out 1.6s 2; }
	.sts-js .is-in .h-pad { animation: sts-tilt 1.8s ease-in-out 1.6s 2; }
	.sts-js .is-in .h-btn1 { animation: sts-pop 1s ease-in-out 1.6s 2; }
	.sts-js .is-in .h-btn2 { animation: sts-pop 1s ease-in-out 2.1s 2; }
	.sts-js .is-in .h-needle { animation: sts-needle 2.4s ease-in-out 1.6s 2; }
	.sts-js .is-in .h-w1 { animation: sts-grow-a 1.6s ease-in-out 1.6s 2; }
	.sts-js .is-in .h-w2 { animation: sts-grow-b 1.6s ease-in-out 1.8s 2; }
	.sts-js .is-in .h-w3 { animation: sts-grow-a 1.6s ease-in-out 2s 2; }
}

/* Animations off (widget setting) or reduced motion: icons are simply shown, the fill stays. */
.sts-services--still .sts-icon *,
.sts-services--still .sts-icon { animation: none !important; }
.sts-services--still .sts-icon .d,
.sts-services--still .sts-icon .a { stroke-dashoffset: 0 !important; opacity: 1 !important; }
@media (prefers-reduced-motion: reduce) {
	.sts-services *,
	.sts-services *::before { animation: none !important; transition: none !important; }
	.sts-js .sts-icon .d,
	.sts-js .sts-icon .a { stroke-dashoffset: 0; opacity: 1; }
}

/* ---------- Narrow screens ---------- */

@media (max-width: 1024px) {
	.sts-services .sts-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.sts-services.sts-cols-1 .sts-tiles { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
	.sts-services .sts-head { grid-template-columns: 1fr; margin-bottom: 56px; }
}
/* Phones: the services one below the other, a little more compact. */
@media (max-width: 640px) {
	.sts-services .sts-head { margin-bottom: 44px; }
	.sts-services .sts-intro { font-size: 17px; }
	.sts-services .sts-tiles { grid-template-columns: minmax(0, 1fr); }
	.sts-services .sts-tile { padding: 28px 22px 24px; }
	.sts-services .sts-top { margin-bottom: 18px; }
	.sts-services .sts-icon { --sts-size: 60px; --sts-sw: 1.2; }
	.sts-services .sts-tile-title { font-size: 21px; }
	.sts-services a.sts-more { padding-top: 20px; }
}
