/* ==========================================================
   Service page kit, Engineering look (light blueprint style)
   Web, App, Software, DevOps and UI/UX pages.
   ========================================================== */

/* hero: blueprint */
.e-hero {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	padding: calc(var(--header-h) + clamp(28px, 4.2vw, 56px)) 0 clamp(44px, 5.6vw, 80px);
}
.e-hero::before {
	content: '';
	position: absolute;
	inset: 0;
	z-index: -2;
	pointer-events: none;
	background:
		linear-gradient(color-mix(in srgb, var(--tone) 9%, transparent) 1px, transparent 1px) 0 0 / 32px 32px,
		linear-gradient(90deg, color-mix(in srgb, var(--tone) 9%, transparent) 1px, transparent 1px) 0 0 / 32px 32px;
	-webkit-mask-image: radial-gradient(ellipse 85% 75% at 60% 25%, #000 25%, transparent 80%);
	mask-image: radial-gradient(ellipse 85% 75% at 60% 25%, #000 25%, transparent 80%);
}
.e-hero::after {
	content: '';
	position: absolute;
	inset: 0;
	z-index: -1;
	pointer-events: none;
	background:
		radial-gradient(45% 50% at 85% 15%, color-mix(in srgb, var(--tone) 15%, transparent), transparent 70%),
		radial-gradient(35% 40% at 5% 90%, rgba(255, 190, 152, 0.22), transparent 70%);
}
.e-hero-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: clamp(32px, 5vw, 72px);
	align-items: center;
}
.e-code {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 22px;
	font: 400 12px/1 var(--font-mono);
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: color-mix(in srgb, var(--tone) 85%, #101820);
}
.e-code::before {
	content: '';
	width: 26px;
	height: 1px;
	background: currentColor;
}
.e-hero h1 {
	margin-top: 18px;
	font: 400 clamp(2.4rem, 4.2vw, 3.9rem)/1.06 var(--font-display);
	letter-spacing: -0.034em;
	text-wrap: balance;
}
.e-hero .lead {
	margin-top: 24px;
	max-width: 54ch;
	line-height: 1.7;
	font-size: clamp(1.05rem, 1.4vw, 1.18rem);
}
/* hero mockup: a live picture of the service (hm- primitives; page supplies the inside) */
.hm {
	position: relative;
	padding: 30px 0 36px;
	perspective: 1600px;
}
.hm-win {
	position: relative;
	overflow: hidden;
	border-radius: 16px;
	background: #fff;
	box-shadow:
		var(--shadow-lg),
		0 0 0 1px var(--line);
	transform: rotateY(-8deg) rotateX(4deg);
	transform-origin: 70% 50%;
	transition: transform 1.1s var(--ease);
}
.hm:hover .hm-win {
	transform: none;
}
.hm-bar {
	display: flex;
	align-items: center;
	gap: 10px;
	height: 36px;
	padding: 0 12px;
	background: #f4f3ef;
	border-bottom: 1px solid var(--line);
	font: 400 10.5px/1 var(--font-mono);
	color: var(--subtle);
}
.hm-bar .d {
	display: flex;
	gap: 5px;
}
.hm-bar .d i {
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: #ff6058;
}
.hm-bar .d i:nth-child(2) {
	background: #ffbd2e;
}
.hm-bar .d i:nth-child(3) {
	background: #28c941;
}
.hm-bar .url {
	flex: 1;
	max-width: 250px;
	height: 22px;
	margin: 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	border-radius: 6px;
	background: #fff;
	box-shadow: 0 0 0 1px var(--line);
	white-space: nowrap;
	overflow: hidden;
}
.hm-bar .url::before {
	content: '';
	width: 7px;
	height: 6px;
	margin-top: 2px;
	border-radius: 1.5px;
	background: var(--subtle);
	box-shadow:
		0 -4px 0 -1.5px #fff,
		0 -4px 0 0 var(--subtle);
}
.hm-win.dark {
	background: #0d151c;
	box-shadow:
		var(--shadow-lg),
		0 0 0 1px rgba(16, 24, 32, 0.3);
}
.hm-win.dark .hm-bar {
	background: #18222b;
	border-bottom-color: rgba(255, 255, 255, 0.06);
	color: #7d8691;
}
.hm-win.dark .hm-bar .url {
	background: rgba(255, 255, 255, 0.06);
	box-shadow: none;
}
.hm-f {
	position: absolute;
	z-index: 3;
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 14px 10px 10px;
	border-radius: 14px;
	font-size: 12.5px;
	line-height: 1.3;
	white-space: nowrap;
	background: rgba(255, 255, 255, 0.94);
	backdrop-filter: blur(10px);
	box-shadow:
		var(--shadow-md),
		0 0 0 1px var(--line);
	animation: hm-bob 6s ease-in-out infinite;
}
.hm-f + .hm-f {
	animation-delay: -2s;
}
.hm-f + .hm-f + .hm-f {
	animation-delay: -4s;
}
.hm-f b {
	display: block;
	font-weight: 400;
}
.hm-f small {
	display: block;
	color: var(--muted);
	font-size: 11px;
}
.hm-f .ic {
	flex: none;
	width: 32px;
	height: 32px;
	border-radius: 10px;
	display: grid;
	place-items: center;
	color: #fff;
	font: 400 12px/1 var(--font-mono);
	background: linear-gradient(135deg, var(--tone), var(--tone-2));
}
.hm-f .ic svg {
	width: 15px;
	height: 15px;
}
.hm-f.ok .ic {
	background: linear-gradient(135deg, #00a676, #00c389);
}
.hm-f.warm .ic {
	background: linear-gradient(135deg, #e2774a, #ffbe98);
}
.hm-f.dark {
	color: #fff;
	background: rgba(16, 24, 32, 0.92);
	box-shadow: var(--shadow-lg);
}
.hm-f.dark small {
	color: #9aa3ae;
}
@keyframes hm-bob {
	50% {
		transform: translateY(-7px);
	}
}
.hm-f.l {
	left: -18px;
}
.hm-f.r {
	right: -18px;
}

/* iPhone, true 71.6 × 147.6 mm proportions; set --w for size */
.ip {
	--w: 220px;
	position: relative;
	flex: none;
	width: var(--w);
	aspect-ratio: 71.6 / 147.6;
	padding: calc(var(--w) * 0.036);
	border-radius: calc(var(--w) * 0.175);
	background: linear-gradient(145deg, #2c3139, #121519 55%, #262b32);
	box-shadow:
		inset 0 0 0 1.5px #4d545e,
		inset 0 0 0 calc(var(--w) * 0.018) #0b0d10,
		0 44px 70px -32px rgba(15, 76, 129, 0.5),
		0 16px 30px -16px rgba(16, 24, 32, 0.4);
}
.ip::before {
	content: '';
	position: absolute;
	left: -2.5px;
	top: 18%;
	width: 3px;
	height: 4.5%;
	border-radius: 2px 0 0 2px;
	background: #3b424b;
	box-shadow:
		0 calc(var(--w) * 0.16) 0 #3b424b,
		0 calc(var(--w) * 0.29) 0 #3b424b;
}
.ip::after {
	content: '';
	position: absolute;
	right: -2.5px;
	top: 26%;
	width: 3px;
	height: 9.5%;
	border-radius: 0 2px 2px 0;
	background: #3b424b;
}
.ip-scr {
	position: relative;
	height: 100%;
	overflow: hidden;
	border-radius: calc(var(--w) * 0.14);
	background: #fff;
	color: var(--ink);
}
.ip-island {
	position: absolute;
	z-index: 6;
	top: calc(var(--w) * 0.04);
	left: 50%;
	width: 31%;
	height: calc(var(--w) * 0.092);
	transform: translateX(-50%);
	border-radius: 99px;
	background: #000;
}
.ip-status {
	position: relative;
	z-index: 5;
	display: flex;
	justify-content: space-between;
	align-items: center;
	height: calc(var(--w) * 0.175);
	padding: 0 calc(var(--w) * 0.085) 0 calc(var(--w) * 0.115);
	font: 400 calc(var(--w) * 0.052)/1 var(--font-body);
}
.ip-status i {
	position: relative;
	width: calc(var(--w) * 0.09);
	height: calc(var(--w) * 0.042);
	border-radius: 3px;
	box-shadow: inset 0 0 0 1px currentColor;
}
.ip-status i::after {
	content: '';
	position: absolute;
	inset: 2px 30% 2px 2px;
	border-radius: 1px;
	background: currentColor;
}
.ip-home {
	position: absolute;
	z-index: 6;
	bottom: calc(var(--w) * 0.03);
	left: 50%;
	width: 36%;
	height: 4px;
	transform: translateX(-50%);
	border-radius: 4px;
	background: rgba(16, 24, 32, 0.8);
}
.ip-scr.dk .ip-home {
	background: rgba(255, 255, 255, 0.85);
}
.ip-scr.dk .ip-status {
	color: #fff;
}

.e-stage-wrap {
	margin-top: clamp(32px, 4.2vw, 56px);
}
.e-stage {
	position: relative;
	min-height: 480px;
	border-radius: 28px;
	overflow: hidden;
	background: #fff;
	box-shadow:
		var(--shadow-lg),
		0 0 0 1px var(--line);
}
.e-fig {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	margin-top: 14px;
	font: 400 11.5px/1.4 var(--font-mono);
	letter-spacing: 0.04em;
	color: var(--subtle);
}
.e-fig b {
	font-weight: 400;
	color: var(--ink-2);
}

/* section heads: numbered */
.e-head {
	display: grid;
	grid-template-columns: 110px minmax(0, 1.2fr) minmax(0, 1fr);
	gap: 20px clamp(28px, 5vw, 72px);
	align-items: end;
	margin-bottom: clamp(32px, 4.2vw, 56px);
}
.e-head .no {
	align-self: start;
	padding-top: 8px;
	font: 400 13px/1 var(--font-mono);
	color: color-mix(in srgb, var(--tone) 85%, #101820);
}
.e-head .no b {
	display: block;
	margin-top: 10px;
	width: 40px;
	height: 2px;
	background: linear-gradient(90deg, var(--tone), var(--tone-2));
}
.e-head .h2 {
	max-width: 17ch;
}
.e-head .lead {
	line-height: 1.7;
}

/* scrollytelling: steps left, sticky stage right */
.e-scrolly {
	display: grid;
	grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
	gap: clamp(32px, 6vw, 88px);
}
.e-steps {
	display: grid;
}
.e-step {
	min-height: 72vh;
	display: flex;
	flex-direction: column;
	justify-content: center;
	opacity: 0.28;
	transition: opacity 0.5s var(--ease);
}
.e-step:first-child {
	min-height: 52vh;
	justify-content: flex-start;
	padding-top: 12vh;
}
.e-step:last-child {
	min-height: 64vh;
}
.e-step.on {
	opacity: 1;
}
.e-step small {
	font: 400 12px/1 var(--font-mono);
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: color-mix(in srgb, var(--tone) 85%, #101820);
}
.e-step h3 {
	margin-top: 14px;
	font: 400 clamp(1.6rem, 2.6vw, 2.2rem)/1.15 var(--font-display);
	letter-spacing: -0.025em;
}
.e-step p {
	margin-top: 14px;
	max-width: 42ch;
	color: var(--muted);
	font-size: 16.5px;
	line-height: 1.75;
}
.e-step ul {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 18px;
}
.e-step li {
	padding: 6px 11px;
	border-radius: 999px;
	font-size: 13px;
	color: var(--ink-2);
	background: #fff;
	box-shadow: inset 0 0 0 1px var(--line);
}
.e-prog {
	display: none;
}
.e-stick {
	position: sticky;
	top: calc(var(--header-h) + 32px);
	height: calc(100vh - var(--header-h) - 64px);
	max-height: 640px;
	display: grid;
	place-items: center;
}

/* tabs */
.e-tabbar {
	display: inline-flex;
	flex-wrap: wrap;
	gap: 4px;
	padding: 5px;
	border-radius: 999px;
	background: #fff;
	box-shadow:
		0 0 0 1px var(--line),
		var(--shadow-sm);
}
.e-tabbar button {
	height: 40px;
	padding: 0 18px;
	border: 0;
	border-radius: 999px;
	cursor: pointer;
	font-size: 14.5px;
	color: var(--muted);
	background: transparent;
	transition:
		background 0.3s,
		color 0.3s;
}
.e-tabbar button:hover {
	color: var(--ink);
}
.e-tabbar button[aria-selected='true'] {
	color: #fff;
	background: var(--ink);
}
.e-panel {
	display: none;
}
.e-panel.on {
	display: grid;
	animation: e-in 0.55s var(--ease);
}
@keyframes e-in {
	from {
		opacity: 0;
		transform: translateY(12px);
	}
}

/* generic spec cards */
.e-cards {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 14px;
}
.e-card {
	position: relative;
	padding: 24px;
	border-radius: 20px;
	background: #fff;
	box-shadow: 0 0 0 1px var(--line);
	transition:
		transform 0.45s var(--ease),
		box-shadow 0.45s var(--ease);
}
.e-card::before {
	content: '';
	position: absolute;
	left: 24px;
	right: 24px;
	top: 0;
	height: 2px;
	border-radius: 0 0 2px 2px;
	background: linear-gradient(90deg, var(--tone), var(--tone-2));
	transform: scaleX(0.18);
	transform-origin: left;
	transition: transform 0.6s var(--ease);
}
.e-card:hover {
	transform: translateY(-4px);
	box-shadow:
		0 0 0 1px color-mix(in srgb, var(--tone) 28%, transparent),
		var(--shadow-md);
}
.e-card:hover::before {
	transform: scaleX(1);
}
.e-card .ic {
	width: 42px;
	height: 42px;
	border-radius: 12px;
	display: grid;
	place-items: center;
	color: color-mix(in srgb, var(--tone) 85%, #101820);
	background: color-mix(in srgb, var(--tone) 10%, #fff);
}
.e-card .ic svg {
	width: 20px;
	height: 20px;
}
.e-card b {
	display: block;
	margin-top: 18px;
	font: 400 1.08rem/1.3 var(--font-display);
}
.e-card p {
	margin-top: 6px;
	color: var(--muted);
	font-size: 14.5px;
	line-height: 1.6;
}

/* work: featured + two */
.e-cases {
	display: grid;
	grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
	gap: 18px;
}
.e-case {
	--wt: var(--tone);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border-radius: 24px;
	background: #fff;
	box-shadow:
		0 0 0 1px var(--line),
		var(--shadow-sm);
	transition:
		transform 0.5s var(--ease),
		box-shadow 0.5s var(--ease);
}
.e-case:first-child {
	grid-row: span 2;
}
.e-case:hover {
	transform: translateY(-5px);
	box-shadow:
		0 0 0 1px color-mix(in srgb, var(--wt) 30%, transparent),
		var(--shadow-lg);
}
.e-case-shot {
	position: relative;
	flex: 1;
	min-height: 200px;
	overflow: hidden;
	background: var(--paper);
	border-bottom: 1px solid var(--line);
}
.e-case-shot img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: top;
	transition: transform 1.4s var(--ease);
}
.e-case:hover .e-case-shot img {
	transform: scale(1.04) translateY(-2%);
}
.e-case-shot.app {
	display: grid;
	place-items: center;
	text-align: center;
	color: #fff;
	background: linear-gradient(140deg, var(--wt), #101820);
}
.e-case-shot.app b {
	display: block;
	font: 400 1.8rem/1.1 var(--font-display);
	letter-spacing: -0.02em;
}
.e-case-shot.app small {
	display: block;
	margin-top: 8px;
	font: 400 11px/1 var(--font-mono);
	letter-spacing: 0.08em;
	text-transform: uppercase;
	opacity: 0.75;
}
.e-case-body {
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	gap: 16px;
	padding: 22px 24px 24px;
}
.e-case-body small {
	font: 400 11px/1 var(--font-mono);
	letter-spacing: 0.07em;
	text-transform: uppercase;
	color: color-mix(in srgb, var(--wt) 85%, #101820);
}
.e-case-body b {
	display: block;
	margin-top: 8px;
	font: 400 1.25rem/1.25 var(--font-display);
	letter-spacing: -0.015em;
}
.e-case-body p {
	margin-top: 6px;
	color: var(--muted);
	font-size: 14.5px;
	line-height: 1.6;
	max-width: 44ch;
}
.e-case-body .go {
	flex: none;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	display: grid;
	place-items: center;
	box-shadow: inset 0 0 0 1px var(--line-strong);
	transition:
		background 0.3s,
		color 0.3s,
		transform 0.4s var(--ease);
}
.e-case:hover .go {
	color: #fff;
	background: var(--wt);
	box-shadow: none;
	transform: rotate(-45deg);
}
.e-case-body .go svg {
	width: 15px;
	height: 15px;
}

@media (max-width: 1000px) {
	.e-hero-grid {
		grid-template-columns: 1fr;
		align-items: start;
	}
	.hm {
		max-width: 620px;
		padding: 23px 0px 52px;
	}
	.hm-win {
		transform: none;
	}
	.e-head {
		grid-template-columns: 1fr;
	}
	.e-head .no {
		padding-top: 0;
	}
	/* Phones and tablets: the whole section pins. The stage stays on top, the active
	   step sits right under it and cross-fades as you scroll; nothing slides beneath. */
	.e-scrolly {
		display: flex;
		flex-direction: column;
		gap: 0;
		height: calc(100vh + var(--n, 4) * 48vh);
	}
	.e-stick {
		order: -1;
		z-index: 2;
		top: var(--header-h);
		height: auto;
		max-height: none;
		padding: 12px 0 0;
	}
	.e-steps {
		position: sticky;
		top: calc(var(--header-h) + var(--stick-h, 360px));
		display: grid;
		padding-top: 130px;
	}
	.e-step,
	.e-step:first-child,
	.e-step:last-child {
		grid-area: 1 / 1;
		min-height: 0;
		padding-top: 0;
		justify-content: flex-start;
		opacity: 0;
		transform: translateY(14px);
		pointer-events: none;
		transition:
			opacity 0.45s var(--ease),
			transform 0.45s var(--ease);
	}
	.e-step.on {
		opacity: 1;
		transform: none;
		pointer-events: auto;
	}
	.e-step h3 {
		margin-top: 10px;
		font-size: 1.4rem;
	}
	.e-step p {
		margin-top: 8px;
		font-size: 15px;
		line-height: 1.65;
	}
	.e-step ul {
		margin-top: 12px;
	}
	/* step progress, built by kit.js */
	.e-prog {
		grid-area: 2 / 1;
		display: flex;
		gap: 6px;
		margin-top: 18px;
	}
	.e-prog i {
		flex: 1;
		height: 3px;
		border-radius: 3px;
		background: color-mix(in srgb, var(--tone) 16%, transparent);
		transition: background 0.4s;
	}
	.e-prog i.on {
		background: linear-gradient(90deg, var(--tone), var(--tone-2));
	}
	.e-cards {
		grid-template-columns: 1fr 1fr;
	}
	.e-cases {
		grid-template-columns: 1fr;
	}
	.e-case:first-child {
		grid-row: auto;
	}
	.e-case-shot {
		min-height: 0;
		aspect-ratio: 16 / 10;
		flex: none;
	}
}
@media (max-width: 1000px) and (max-height: 760px) {
	/* short phones: shrink the pinned stage so the step text still fits below it */
	.e-stick > * {
		zoom: 0.8;
	}
}
@media (max-width: 640px) {
	.hm-f {
		padding: 8px 10px 8px 8px;
		font-size: 11.5px;
	}
	.hm-f .ic {
		width: 28px;
		height: 28px;
	}
	.hm-f.l {
		left: -6px;
	}
	.hm-f.r {
		right: 12px;
	}
	.e-stage {
		min-height: 380px;
		border-radius: 22px;
	}
	.e-spec dl div {
		grid-template-columns: 96px 1fr;
	}
	.e-cards {
		grid-template-columns: 1fr;
	}
	.e-tabbar {
		display: flex;
		flex-wrap: nowrap;
		overflow-x: auto;
		scrollbar-width: none;
		border-radius: 16px;
	}
	.e-tabbar button {
		flex: none;
	}
	.e-fig {
		flex-direction: column;
		gap: 4px;
	}
}
